- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 04:58 AM
I am currently trying to call the table API as an external user with the roles snc_external, sn_customerservice.customer, sn_customerservice.customer_case_manager with the following curl command The following curl command is used to call the table API.
curl "https://devXXXXX.service-now.com/api/now/table/sn_customerservice_case?sysparm_limit=1" --request GET --header "Accept: application/json" --user userID:Password
However, when the above is executed,
{"result":[]}
is returned as a result and no data can be retrieved.
We have confirmed that the same user can refer to the data of sn_customerservice_case from the CSM portal.
Is there some control in curl that prevents the use of the table API for external users?
In addition, we have confirmed that access to the Table API can be controlled if the user does not have the role "snc_platform_rest_api_access" in the OOTB ACL called "Table API". However, this ACL is inactive by default, and was also inactive when the above curl was executed.
Do you know if the table API can be used by an external user?
#
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:19 AM
The issue at hand is self-resolved.
I had added the parameter sysparm_limit=1, which is said to narrow down the acquisition records before evaluating ACLs.
I removed sysparm_limit=1 from curl and was able to retrieve the data as an external user.
The following is the specification of sysparm_limit.
https://developer.servicenow.com/dev.do#! /reference/api/utah/rest/c_TableAPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 05:15 AM
did you check that user satisfies table level READ ACL?
Also did you check any query business rule on that table is restricting the records?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 05:22 AM
Thank you very much.
I have checked the READ ACL and query rule (sn_query_rule).
Since the user in question is able to reference data from the CSM portal, we believe that the ACLs and query rules are OK, but is there anything else we should check?
If an ACL error occurs, the curl return value will be as follows.
We believe that the ACL is not the cause of the problem, since we are not currently seeing this kind of error.
{"error":{"message": "User Not Authorized", "detail": "Failed API level ACL Validation"}, "status": "failure"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:19 AM
The issue at hand is self-resolved.
I had added the parameter sysparm_limit=1, which is said to narrow down the acquisition records before evaluating ACLs.
I removed sysparm_limit=1 from curl and was able to retrieve the data as an external user.
The following is the specification of sysparm_limit.
https://developer.servicenow.com/dev.do#! /reference/api/utah/rest/c_TableAPI