Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Rest API - Reading the dmn_demand table returns an empty result set

Dennis38
Tera Contributor

Using Postman: attempting to query the dmn_demand table returns an empty result set.

{
"result": []
}

Using the following Roles; the query returns data in the London version.

find_real_file.png

If I add the "admin" role; Postman returns the requested dmn_demand table result set.

Thanks!

1 ACCEPTED SOLUTION

Dennis38
Tera Contributor

Thanks for the help! We discovered it is custom JavaScript added to the "dmn_demand" read Access Control.

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron

Hi Dennis,

what is the query you are sending while consuming REST API?

How are you consuming the endpoint? can you share the method?

Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Dennis38
Tera Contributor

Hi Ankur,

This is the Get that is being sent from Postman.

https://myinstance.service-now.com/api/now/table/dmn_demand?sysparm_display_value=true

Thanks,

Dennis

Hi Dennis,

The endpoint doesn't have any query to return the result so it is empty;

give some query such as below

dmn_demand?sysparm_query=number%3DDEMAND001&sysparm_display_value=true

if you want to get specific fields in output then use this i.e. add this after the above endpoint

&sysparm_fields=short_description%2Cdescription

Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Prateek kumar
Giga Sage

It works on my PDI with the same roles.

Are there any other read ACL's configured in your instance??

and try

https://YourInstanceName.service-now.com/api/now/table/dmn_demand?sysparm_display_value=true&sysparm_limit=1


Please mark my response as correct and helpful if it helped solved your question.
-Thanks