Incomplete json response from PostMan as client
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 05:32 AM
I am making a call to below api from postman. Strangely , in the json response the attribute "ui_policy" is empty. However, when I do the same thing from SN's REST API Explorer, I do get the ui_policy for the catalog item. Does it mean that any external app cannot fire a rest api to get this attribute?
Here is the api:
GET https://{xxx}/api/sn_sc/servicecatalog/items/{sys_id}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 05:45 AM
The behavior you're experiencing might be due to the fact that ServiceNow's REST API Explorer uses a different user context (usually the logged-in user) than the one used when making a call from an external application like Postman.
Here are some steps you can take to troubleshoot and potentially resolve the issue:
1. Check User Permissions: Ensure that the user account you're using to make the API call from Postman has the necessary permissions to access the "ui_policy" attribute.
2. Use OAuth: If you're not already, consider using OAuth for authentication when making your API call. This can help ensure that the user context is properly set.
3. Debugging: Use the REST API Explorer in ServiceNow to see the exact request it's making, including headers and any other parameters. Then, replicate this as closely as possible in Postman.
4. Check API Version: Ensure you're using the correct version of the Service Catalog API. The "ui_policy" attribute might not be available in all versions.
5. Contact ServiceNow Support: If you're still having trouble, consider reaching out to ServiceNow's support team. They might be able to provide more insight into why you're experiencing this behavior.
Remember, ServiceNow's REST APIs are designed to be used by external applications, so it's unlikely that there's a hard restriction on accessing certain attributes. It's more likely that there's a configuration or permission issue causing the behavior you're seeing.
nowKB.com
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 09:55 PM
I have granted admin to the test user accout that I use to trigger the api on postman

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 06:23 AM
@Dorothy This looks like a case where the user you are using to make the postman API call might not have access to the UI Policy table in ServiceNow, and hence the respective attribute is not added in the API response. I am assuming you are accessing the Rest API explorer via an admin account which has access on the UI Policy table hence you can see the corresponding attribute.
I recommend granting the access on UI Policy table either by granting additional role to the API user or adding the role which API user has in the read ACL of UI Policy table. Once done, you will be able to see ui_policy attribute having data in your Postman call.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 07:58 AM
I have granted admin to the test user accout that Iuse to trigger the api on postman