Tip: Retrieve servicenow CI item values using REST API (Turn on Display Value)

In my last blog post I shared about ‘Scripted REST API’ getDisplayValue() tip. Now, here lets see Out of the Box option.¬†When we query the CI with a query “sysparm_query=name=$($ConfigurationItem)&sysparm_limit=1”

We get the output illustrated below.

Now, add sysparm_display_value=true in the URL and see the results as actual values instead of ID

After adding the sysparm_display_value=true we see the display_value property! This helps to get readable output. (sysparm_query=name=$($ConfigurationItem)&sysparm_limit=1&sysparm_display_value=true)

Enjoy servicenow and PowerShell!


Leave a Reply

Your email address will not be published. Required fields are marked *