- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2017 01:58 PM
I've been trying to learn the REST API and have hit a wall. I'm able to generate Incident and Change tickets and now I'm trying to create RITMs. I started by running some GET tests on the catalogs and categories and was successful at doing a GET /sn_sc/servicecatalog/items. When I tried to do a GET /sn_sc/servicecatalog/items/{sys_id} I kept getting a NullPointerException. Here are the details.
I started with the following GET (I'm using Postman if that matters). I have the authentication verified and all necessary roles, also verified.
https://MYINSTANCEREDACTED.service-now.com/api/sn_sc/servicecatalog/items
This gave me the expected result
Then I performed the next GET using a sys_id of an item from the result above. I also verified the sys_id in the instance from Maintain Items
I get the NullPointerException here.
Any ideas on why the GET sys_id is failing?
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 11:55 AM
Well, I found the issue.
Looks like there's a plugin that activated in new instances, but not ones that are upgraded. I activated these plugins and the REST calls are working now.
Thanks for everyone's help.
William
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2017 02:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 01:40 AM
Hey,
Could you please try this: GET /sn_sc/servicecatalog/items/${sys_id}
Let me know if this was helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 08:08 AM
https://MYINSTANCEREDACTED.service-now.com/api/sn_sc/servicecatalog/items/$03b153c92b4e85004f1c769bf8da152b
Gives me a response of "message": "Either Catalog Item is not valid or security constraints prevent access"
I tried an earlier test with https://MYINSTANCEREDACTED.service-now.com/api/sn_sc/servicecatalog/items/{03b153c92b4e85004f1c769bf8da152b}
just in case I was missing some REST syntax 101 and needed to include the brackets. This also results in the same message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 08:56 AM
I forgot to mention that I also tried this with an admin account to see if authentication was an issue. I can also browse to this catalog item while impersonating the user I'm using in these tests.