Table API alm_hardware

JimFaraone
Tera Contributor

Hello All,

 

I'm automating some processes and as a part of that automation I query the alm_hardware table.  As part of the response, I was expecting a column called State that contain asset state e.g. In Use, Retired, etc. etc.   Unfortunately I do not see that column in the response.   What API call do I need to make to get the state of the asset?

Thank you

current request looks like this:

$url = "https://<my domian url>/api/now/table/alm_hardware"
$response = Invoke-RestMethod -Uri $url -Headers $headers -Method Get
$response.result


Column i'm looking for.

JimFaraone_0-1739287785818.png

 

1 ACCEPTED SOLUTION

JimFaraone
Tera Contributor

I resolved my own issue by adding sysparam_display_value=true to my request.  this changed that column from the int value to the char value i was expecting.

alm_hardware?sysparm_display_value=true

View solution in original post

2 REPLIES 2

JimFaraone
Tera Contributor

I resolved my own issue.

I added ?sysparm_display_value=true and this changed that column from an int to the values i was looking for.

alm_hardware?sysparm_display_value=true

JimFaraone
Tera Contributor

I resolved my own issue by adding sysparam_display_value=true to my request.  this changed that column from the int value to the char value i was expecting.

alm_hardware?sysparm_display_value=true