Rest Endpoint Table API script is returning empty array details post xanadu upgrade

Kotaiah
Kilo Guru

Hi Team,

Good Day.

 

We have created Rest Endpoint Table API  ACL to restrict the web services users (service account) can't perform the create\delete\update operations on table api. Please refer the following script.

Kotaiah_0-1737990892024.png

Kotaiah_1-1737990920980.png

var methodNurl = String(current).split(" ");
This line of code is returning method and table API details (GET,https://instancename.service-now.com/api/now/table/sys_properties?sysparm_mid_pool=&sysparm_fields=v...) in Vancouver but in Xanadu its returning empty array and which cause the webservice users can't able to read the table data by using table API.
 
Any kind of help is really appreciate it.
 
Regards,
Kotaiah Sadari
  

 

 

 

1 REPLY 1

JenniferRah
Mega Sage

Try this in your ACL script:

var httpRequestData = new sn_auth.HttpRequestData();
var method = httpRequestData.getHttpMethod().toString();
if(gs.getUser().isMemberOf("ServiceNow-TableAPI-O") && method != 'get'){
	answer = false;
}else{
	answer = true;
}