SWSD API - How to get PC ID to send (PUT) update to API

Is there a way, on a PC, to pull the relative ID assigned to that asset without having to do a GET and go through the pages of current computers in the hardwares.json?

Example for use case:

  1. Powershell script runs on a computer that already has the Solarwinds Discovery Agent installed to perform the following function:
  2. Script needs to know the computer's ID so it can do a PUSH to update custom data fields in the Computer Form.
  3. Performs a PUSH to update custom fields to record data for the Computer asset not normally gathered.

At the moment, looking to have to do a 2 step process for this. Check if a registry key we make exists (which will store the ID for the asset for use with the API) and if does not exist then scan through all computer assets via pagination gets to find it. If it exists, skip that and use it to perform the data updates.

Would prefer to not have to pull the data that way, but not finding another method so far. Hoping I am overlooking something and can pull it in an easier manner.

Parents Reply Children
No Data