- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 07:30 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 07:52 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 07:49 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 07:52 AM
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