Import Set API - no response

efindley
Giga Contributor

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?  

1 ACCEPTED SOLUTION
11 REPLIES 11

srinivasthelu
Tera Guru

Hi Erica,



Have you tried giving the import_admin role to the dedicated user?



Thanks


Srini


No, I did not add that role.   I don't want the user to be able to fully manage the import sets, I just want them to be able to post to it and then read from the tables used in the transform map.


Then you need to create ACLS(read, write, create) on your import set table(table and field level ACLs).



here is the link Using Access Control Rules - ServiceNow Wiki


I do have a table level ACL defined for that user's role...all CRUD operations allowed.   I did not define individual field level controls, because I don't care to be that specific.   The wiki page you posted seems to indicate that if no field ACL exists, then the table ACL is used.   Did I misunderstand the documentation?