Question

Asset Creation via API


Looking for some assistance with creating assets with the API. I am hoping to create a workflow with my Jamf Enrollment policy to auto create a computer as it enrolls so I don’t have to wait for the job to run. 

 

Looking through the documentation an asset ID is required to create an asset but if the asset does not exist it wouldn't have an asset id. I must be missing something so any guidance would be appreciated. :) 


3 replies

Userlevel 6
Badge +12

The documentation doesn’t do the best job of calling it out in my experience, but the assetId will be automatically generated when you do create the asset. You don’t need it in the payload.

 

Userlevel 6
Badge +12

For anyone else who may be interested…


POST to URL: 
https://{your site}.incidentiq.com/api/v1.0/assets/new

Payload should include the following fields:

{
"StatusTypeId": "", // this is a guid
"LocationId": "", // this is a guid
"ManufacturerId": "", // this is a guid
"ModelId": "", // this is a guid
"AssetTypeId": "", // this is a guid
"AssetTag": "",
"SerialNumber": ""
}

 

Userlevel 7
Badge +13

@BStead 367a84d nclack Thank you for submitting your question to our community! 😄

Thank you @jclark for jumping into this thread with your API knowledge! 

Reply