Skip to main content
Solved

Updating Asset via API

  • May 9, 2025
  • 10 replies
  • 253 views

Forum|alt.badge.img+2

Does anyone have a payload to unassign an asset from a user, along with setting the verification date? I’m able to pull information from the API for a device but am having trouble updating fields on said asset.

Best answer by jclark

To unassign the asset you can POST to:

https://{site}.incidentiq.com/api/v1.0/assets/{AssetId}/owner

Payload:

{"OwnerId":null}

 

We don’t use verifications currently so I haven’t messed with that API myself.

10 replies

Kathryn Carter
Forum|alt.badge.img+18
  • Community Manager
  • 11045 replies
  • May 12, 2025

@iljared98 For most API requests, if you contact our support team, they will be the best to tackle these kind of inquiries. 

Unless ​@jclark you have any ideas for them in the mean time. 😄


Forum|alt.badge.img+16
  • Specialist
  • 803 replies
  • Answer
  • May 12, 2025

To unassign the asset you can POST to:

https://{site}.incidentiq.com/api/v1.0/assets/{AssetId}/owner

Payload:

{"OwnerId":null}

 

We don’t use verifications currently so I haven’t messed with that API myself.


Forum|alt.badge.img+2
  • Author
  • Observer
  • 1 reply
  • May 13, 2025

To unassign the asset you can POST to:

https://{site}.incidentiq.com/api/v1.0/assets/{AssetId}/owner

Payload:

{"OwnerId":null}

 

We don’t use verifications currently so I haven’t messed with that API myself.

Fantastic, this is exactly what I was looking for. Thank you. I’ll do some more probing around for the other asset fields.


bclark
Mentor
Forum|alt.badge.img+13
  • Mentor
  • 257 replies
  • May 13, 2025

One idea is just to have an API change the status of an asset and then have a rule that fires on that change doing everything else for you. Maybe not as clean as going purely through the API but a work around for those (like me) who feel like they’re still figuring out the APIs


Forum|alt.badge.img+3
  • Contributor
  • 12 replies
  • June 16, 2025
payload = json.dumps({
"AssetIds": ["{AssetID 1}","{AssetID 2}","{AssetID 3}"],

"Request": {
"VerifiedByUserId": "{API User ID}",
"IsSuccessful": "true",
"Comments": "Auto-Verification - script"
}

})

# Connection Request
conn.request("POST", "/api/v1.0/assets/bulk/verify", payload, headers)
res = conn.getresponse()
data = res.read()
JSON = json.loads(data.decode("utf-8"))

I’m not sure if this helps you, but this is a snippet of a python script that we use to batch verify assets (it will update the date).  It works great!


Kathryn Carter
Forum|alt.badge.img+18
  • Community Manager
  • 11045 replies
  • June 16, 2025

@matt_prause Thanks for sharing your insight and script! 😄


Forum|alt.badge.img

One idea is just to have an API change the status of an asset and then have a rule that fires on that change doing everything else for you. Maybe not as clean as going purely through the API but a work around for those (like me) who feel like they’re still figuring out the APIs

How do you change the status of an asset through the API? I opened a support ticket in May that was just closed stating that it is not supported. 


Hannah Bailey
Forum|alt.badge.img+17
  • iiQ Community Manager
  • 1878 replies
  • July 18, 2025

@DNikles 805e57 lebanonsd 

I am not an API expert by any means, but I followed up with our team on this. Updating asset status is not included in our API documentation, which is why we are stating that it is not supported. However, I would love to hear from other districts if they have figured this out.


bclark
Mentor
Forum|alt.badge.img+13
  • Mentor
  • 257 replies
  • July 30, 2025

One idea is just to have an API change the status of an asset and then have a rule that fires on that change doing everything else for you. Maybe not as clean as going purely through the API but a work around for those (like me) who feel like they’re still figuring out the APIs

How do you change the status of an asset through the API? I opened a support ticket in May that was just closed stating that it is not supported. 

Sorry this took so long. Here’s how I do it in bash. I’m sure there are better ways. The bulk action can be used for more than one but I only do one at a time for my use cases.

 

AssetStatus=$(curl -sX POST --location 'https://MYDOMAIN.incidentiq.com/api/v1.0/assets/bulk/set-status' \
--header 'accept: application/json, text/plain, */*' \
--header 'content-type: application/json' \
--header 'SiteId: '$siteId'' \
--header 'productid: '$ticketingProductId'' \
--header 'Authorization: Bearer '$iiqToken'' \
--data '{
"AssetIds": [ "'$assetId'" ],
"Request": {
"AssetId": "'$assetId'",
"AssetStatusTypeId": "'$AssetStatusTypeId'"
}
}')

AssetStatus

 


bclark
Mentor
Forum|alt.badge.img+13
  • Mentor
  • 257 replies
  • July 30, 2025
payload = json.dumps({
"AssetIds": ["{AssetID 1}","{AssetID 2}","{AssetID 3}"],

"Request": {
"VerifiedByUserId": "{API User ID}",
"IsSuccessful": "true",
"Comments": "Auto-Verification - script"
}

})

# Connection Request
conn.request("POST", "/api/v1.0/assets/bulk/verify", payload, headers)
res = conn.getresponse()
data = res.read()
JSON = json.loads(data.decode("utf-8"))

I’m not sure if this helps you, but this is a snippet of a python script that we use to batch verify assets (it will update the date).  It works great!

This was really helpful to me today. Thank you.