Rest Endpoint Table API script is returning empty array details post xanadu upgrade
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:19 AM - edited 01-27-2025 07:22 AM
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.
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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 09:40 AM
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;
}