- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2017 05:33 AM
Hi Mihaela,
If the password for 'admin' user changed then you can get the exception. If you're using a script to test the REST API you need to adapt user/password to a user that has access via REST.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2017 05:42 AM
How are you testing the APIs? Using REST API explorer or any external tools?
You can try resetting admin password and try it again. For some tables, ACL's also block access for admin users.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2017 05:43 AM
Hello Mihaela,
I assume you are testing with one of the example scripts generated when testing the API, these scripts all use admin:admin as username/password but you have to update with a real username password combination. (so it has to be a user that is in the instance and has rights to do the things you want to do.
Link to the documentation (ensure that you use the correct version, this is for Istanbul) REST API security
Kind Regards,
Gerrit Kuilder
Technical lead Integrations EMEA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2017 10:17 AM
Thank you very much for the information. I am testing GRUD operations on insidents and user tables through the POSTMAN using REST API.
And if I do simultaneous calls through java spring RestTemplate with Basic Authentication using admin:admin some of the calls return Not Authorized and after a Refresh the call response is 200OK. So once the call is successfull other time it is unauthenticated. To clarify I am working with the demo environment tables defined from the wiki page.
Regards,
Mihaela
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2017 12:38 PM
reI need to have access to the GRUD Operations to the TABLE API. I read from the documentation that I have to create a user with role "rest_service". How can I do it with basic authentication and user admin:admin on the demo environment on the ServiceNow Wiki. Has anyone tried it? Thank you
Best regards,
Mihaela