The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Hi I am working in REST API of service now. In Import Set API i can't access Retrieve an Import Set record (GET) method. It says record not found evethough I gave sys_id of I posted.

yashothara
Kilo Contributor

In import Set API, I can't access Retrieve an Import Set Recordhttps://dev17686.service-now.com/$restapi.do?sysparm_cancelable=true method by giving sys_id   even though I posted a record and get sys_id of that.

1 ACCEPTED SOLUTION

The sys_id that is returned during a POST call to an import set table is not the sys_id of the record in the import set table.   It is the sys_id in the target table(where the record was transformed to)



To get the sys_id, as an admin, you have a multitude of options



Navigate to the record in a list, right click and copy sys_id.


Open the record in a new window, without the frames.   The URL will contain the sys_id


While in the record, right click on the header, select show XML, and find sys_id in there.


View solution in original post

19 REPLIES 19

ghsrikanth
Tera Guru

The user whom you are trying to access should have rest_service role. Could you please check whether the user has the role or not?



What is the HTTPSTATUS message that you are getting?


yashothara
Kilo Contributor

Hi the user has rest_service role. And the error I got is {
  "error": {
  "message": "No Record found",
  "detail": "Record doesn't exist or ACL restricts the record retrieval"
  },
  "status": "failure"
}


I am getting this HTTP Status code 404 Not Found.


But I submitted correct sys_id which I posted.


ghsrikanth
Tera Guru

1. Could you please check whether user has access to the record, if the user logs into the system and access the record?


2. For the target table, in the dictionary definition, please verify whether Allow Web services check box is checked or not?


Screen Shot 2016-03-14 at 2.46.43 PM.png



3. If everything fails, try to create a exclusive ACL for rest_service role, giving access to the table, mostly this should work.




Mark if it is helpful or correct, feedback is appreciated


kumarajit
Kilo Expert

can you please check the below role code for the logged in user who is performing the activities :



1. web_service_admin


2. rest_service role




rest_serviceCan use the REST API to perform REST web service operations such as querying or inserting records.
web_service_adminCan access the System Web Services application menu and the REST modules.

regards,
AB