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.
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": ""
}
@BStead 367a84d nclack Thank you for submitting your question to our community!
Thank you @jclark for jumping into this thread with your API knowledge!
Hello! I am new to iiQ and am also looking at creating assets via the API. In regards to this API call - are all of those GUID fields required for the asset to be created? I know in a later post you mentioned that the AssetId will be automatically created. Thanks for your help!
@BCarlton 7204319 heartlandaea Welcome to iiQ and Community. @jclark I will leave this question to you
Yes, from my experience they are all required. Every asset in the system needs to be categorized to exist - so it needs a type, model, manufacturer, status, asset, serial and an initial location at the very least. You might be able to get away with not having the “type” (AssetTypeId) as that is linked to the model when you create it, but I haven’t tried that specifically so I can’t confirm.
Honestly though, it’s been my experience that it’s more beneficial to use the integrations iiQ offers for various MDM’s, or the asset import via CSV - as you have a visual interface that helps you see where the mistakes are.
We don’t have very many assets that don’t come into iiQ via an integration, but in either case we still use the CSV import for supplemental information after the asset is created by one of those - so for PO numbers, warranty/purchase dates, etc. This is where using the API would be beneficial for us (I just haven’t gotten around to it yet), but every district is different
Awesome - thank you for your quick response!
@BCarlton 7204319 heartlandaea Jclark is the man, so I am glad he could help you! Thanks @jclark