Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

API Rest does not return network devices and only servers

KenY
Giga Contributor

I have an API REST url

 

$apiEndpoint = "https://<instancename>/api/now/table/cmdb_ci_hardware?sysparm_query=nameLIKEDEVICENAME&sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_suppress_pagination_header=true&sysparm_limit=1"
 
Testing from REST API Explorer, I get values for both. Unfortunately, when I changed the device name to a server name, I get results from PowerShell. But when I use a network device, nothing returns. I checked and confirmed both server and network device are visible in CMDB. The script I used directly came from REST API Explorer.
 
api.png
 
I'm new to this, if someone can enlighten me? Thanks!
0 REPLIES 0