REST Import set API response message is empty

sridhar722
Mega Contributor

We are in Fuji. I have created Import set web service and transform map with Coalesce filed. User I am using has Rest_service, importset_admin, importset_loader and all the roles needed for it. I created ACL to read and write to this table by this user. Everything is working fine but not receiving response. When I use admin account, I am getting the correct response. Can anyone faced this issue before. Really appreciated your help

Thanks

11 REPLIES 11

Chuck Tomasi
Tera Patron

Have you tried the account you created from the REST API explorer to ensure you are getting a response at all? This is a useful debugging tool before you start plugging in to an external application.



REST API Explorer - ServiceNow Wiki


Hi Chuck



Thanks for the response.I follow your tech now videos. they are very good.


Yes I am trying in REST explorer only.I tried in chrome rest client also. I crated ACL and create, write access to rest_service role.



find_real_file.png


Hi,



Thanks for the kind words.



If everything works, you should be getting back an entire record's worth of information (including the freshly created sys_id.) I feel like I'm missing something, but can't come up with anything at this point.



If you impersonate this user, can they create records (and read the list of records)? You mentioned they have read access earlier, but just want to double check they can do these operations interactively.


emyrold
Giga Expert

I am having the exact same issue.   I am not able to find a difinitive list of required rolls needed for an inbound rest import set web service.   I watched a youtube clip of John Anderson Integration Best Practices - Inbound Web Services and he says you only need to assign the rest_service role.   However on other places I'm seeing things say you need import_admin or import_transformer (which I do not like because it seems like they are global writes to any import table).   Additionally, John Anderson only showed the creation of a single ACL on the import table "Create" table.none with the integration_role (containing the rest_service role).



This is what I have done:


1) created a new web service with three web service fields correlation_id (coalesce = true), correlation_display and state


2) system created the import table u_myNewIntegrationTable


3) created a web service transform map for each of the fields and target table = "ticket"


4) created role myIntegrationAdmin which includes the rest_service role


5) create user myIntegrationUser and assigned myintegrationAdmin role and verified rest_service was added to the user account. (temporarily kept "use for web service access only" unchecked for testing.


6) created and application and module for my import table and added the myIntegrationAdmin role to the module and applicaiton menu


7) create three ACL's (create, read, write) u_myNewIntegrationTable.none   ***John Anderson only created a single create table.none.


😎 Impersonated myIntegrationUser and verified it could see and write to all fields on the import table.


9) Impersonated myAdmin account, used REST Explorer to test changing the state of a ticket - worked as expected normal response body.


10) Impersonated myIntegrationUser and used REST Explorer to run the same test and my response body is empty.   Like the original poster, I receive the status code 201 created.   When I go look at the import table a record was created with the values I specified in the request body but it did not process against the target table.


11) I then tried web_service_admin and no luck either.



Any ideas would be appriciated.