REST API's not returning response ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2016 07:11 PM
Hi Team,
I am using the OOB rest API for incident table :-
https://instance.service-now.com/api/now/table/incident
I have few doubts :-
1. For creating incident via REST API , if we have to pass the username of Caller
'caller_id':'cb3230342bb3d60083dac7ac17da15af'
e.g :- This i am using for populating a user, is there any other way of populating caller, because 3rd party tool might not aware of the sys id of user record. So how rest will create the incident for some other user.
2. When i am hitting this Rest API, then the incident is getting created but Response is showing as empty in other tool. Does anyone knows why it comes as empty.
Thanks & Regards,
Gaurav Kumar
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 05:45 AM
Have you looked at using the URI argument sysparm_input_display_value=true
This enables you to use the display value for the caller_id field instead of a sys_id.
'caller_id':'Chuck Tomasi'
for example.
Here's a screenshot from the REST API explorer.
Getting Started with REST - ServiceNow Wiki
REST API Explorer - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 06:10 AM
To me it looks like it could be a scoping issue. I'm not positive on this but by the looks of the naming convention of your import set table, it seems that it is a scoped application. If that is the case then I believe this is why you are able to get a correct response when using the instance API Explorer tool and not getting a correct response with the external Advance REST Client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 06:21 AM
Yes, you are right Chris. I have created the import sets under my scope application.
I think, there may be the issue with role of the user. Because when im creating account using admin credentials, im getting correct response.
But when i'm creating account with the user(user has the role "sn_customerservice_manager"), I'm getting the above error.
But By using the same user credentials, I can create the account via UI.
So, I'm just confused on that.
Please give me your suggestion on this Chris.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 06:23 AM
Does the user have SOAP credentials?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 06:24 AM
Hi,
This isn't specific to scoped apps or not. It sounds like it's more of a general security thing. What ever account you are using to create the accounts needs to have the appropriate permissions just like any logged in user. If you are creating records in the sys_user table for example, you need user_admin role on the REST Account doing the operation.
Docs: Access control rules
Docs: Contextual security
Security Best Practices - ServiceNow Wiki