- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 05:35 AM
I am trying to set up a successful POST REST call to the ImportSet API. However, I think I have my user permissions mixed up and I don't know how to sort them out. When I post as a user with admin permissions, the record is successfully created and I get the response back with the JSON that I was expecting. However, when I post as a user with more limited permissions, the response comes back as '201 Created', but there is no response body and the record is never created in the destination table. I am extremely new to ServiceNow, but I've been tasked with getting a basic conceptual demo working of posting content to SN via REST.
Could someone help me understand how Users/Roles/ACLs should be set up for this to work?
Here is what I have done:
Create a custom Application. In that application create a destination table and a WebService/Import Set with a transform map that will dump records into that table.
Create a custom role inside my application for end users. It looks generically something like this: application_prefix.custom_role
Create a user for use in this scenario and assign them the custom role. Also give them the rest_service role as described in the documentation.
Assign that role as the application's "end user access" role on the application's design page.
Assign that role as the user role for both the base table and the web service table and check the "Create access controls" box.
What am I missing here? I'm sure it's something fairly simple, I just don't know where to start looking! And why is the REST API returning nothing and returning a false success response?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 11:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 01:12 PM
Srinivas Thelu It appears that having both import_set_loader and import_transformer roles allow the request to go through and the proper response to be given in return!
It still seems strange behavior that I've witnessed and not all together intuitive and I'd be tempted to categorize it as a bug with the API. But for now, I'll take this and run with it and revisit later when the opportunity arises.
Thank you all for your responses and your willingness to help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2015 09:55 AM
Hi Erica,
Can you please mark this question as answered and close the thread.
Thanks
Srinivas