REST API incident_sla is not accessible

gvikramg
Kilo Explorer

Hi,

I'm using REST API and not able to access some tables like incident_sla

I have ACL rules.

rest_service,

web_service_admin

Request URL: https://abc.service-now.com/api/now/table/incident_sla?sysparm_limit=20

<response>

<error>

<message>User Not Authorized</message>

<detail>736099 records constrained due to ACL restrictions</detail>

</error>

<status>failure</status>

</response>

Able to access other tables like incident, task_sla, sys_user ...etc and can see the response.

<response>

<result>...</result>

<result>...</result>

</response>

Do I need to have any more rules. Please let me know.

Thank You,

Vikram

1 ACCEPTED SOLUTION

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Vikram,



If you interactively log in to the instance with the REST user id can you see records via incident_sla.list in the Application Navigator?



If not, incident_sla is a database view of tables task_sla and incident with where clause = taskslatable_task = inc_sys_id,


perhaps   a read ACL on incident_sla which allows your REST user id to read it, will fix the issue?



Best Regards



Tony




View solution in original post

5 REPLIES 5

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Vikram,



If you interactively log in to the instance with the REST user id can you see records via incident_sla.list in the Application Navigator?



If not, incident_sla is a database view of tables task_sla and incident with where clause = taskslatable_task = inc_sys_id,


perhaps   a read ACL on incident_sla which allows your REST user id to read it, will fix the issue?



Best Regards



Tony




Tony:



I am faced with a similar situation, the REST response we get after inserting a record in the incident table includes the URI, it looks like:


https://instance.service-now.com/api/now/table/incident/92823a766fd396987b4d2a1cbb3ee46c


We want to use this URI so that the helpdesk guys can quickly query the record just created in ServiceNow, however ACL's prevent access to the URI.   Is there a way to configure what the REST response will return?



Thanks.



Carlos


Hi Carlos,



REST is going to use what ever credentials you provide to try and access the given table/fields. The ACLs apply via REST. If I use REST and the "chuck.tomasi" account, I may not have access even though REST returned the URI in the response. You'll have to work out with your ACLs who is authenticating with REST and what they should have access to. You can always verify the ACLs with the standard UI and impersonating that user.


Thanks Tony, we will take a look at the ACLs and see if we can grant access at that level.



Carlos