Question

How to use API to check in device/asset


Userlevel 3
Badge +1

Does anybody know the location in the API docs to check in a device/asset via API?


12 replies

Userlevel 7
Badge +12

@jo.cpa Thank you for submitting your question to our community! 😄 

I believe it should be in the API documentation that is updated within the platform. If not, it will be posted soon. Thank you for your continued patience on this update. 

Badge

I am also trying to figure this out.  I am not seeing it in the API documentation (but I also don’t think my full access has been approved yet).

Userlevel 7
Badge +12

@CReinking 58066e5 hse You are able to gather the API information from the documentation within the developer tools in the Admin tab: 

 

Badge

Hi Kathryn, I already checked there.  Documentation is still quite incomplete there.

Userlevel 7
Badge +12

@CReinking 58066e5 hse I know they are transforming where this information is being held so all of the API calls might not have made it there yet. If not, you are always welcome to contact support and they will pull that API call you need, if we support it. 

Userlevel 5
Badge +11

Not to sound like a broken record, but I’ve commented in various places on the community how the API documentation kind of took a step backwards. It looks better, but missing a LOT of endpoints that were previously included in the old documentation.
 

Here’s what I think you might need...

POST to endpoint
https://{district}.incidentiq.com/api/v1.0/assets/{AssetId}/owner

Payload (I believe OwnerId would be blank if checking-in)

{"OwnerId":{OwenerId},"UpdateLastInventoryDate":true}

Hopefully someone can confirm.

Userlevel 3
Badge +1

Not to sound like a broken record, but I’ve commented in various places on the community how the API documentation kind of took a step backwards. It looks better, but missing a LOT of endpoints that were previously included in the old documentation.
 

 

Agreed.  It is impacting the usefulness of the system.

Userlevel 3
Badge +1

@jclark I was able to unassign from Owner… but I also need to set a location
To do some would the body include something like
{“Location”:{LocationID}} 

Really difficult to use an API without documentation.

Userlevel 5
Badge +11

@jclark I was able to unassign from Owner… but I also need to set a location
To do some would the body include something like
{“Location”:{LocationID}} 

Really difficult to use an API without documentation.

I don’t think I’ve had to use that one yet myself. I can try to figure it out, but hoping someone from iiQ can chime in to help out too.

Userlevel 5
Badge +9

FWIW I find it easier just to update the status (or something similar) and let an iiQ rule handle the rest. By easiest I mean from a scripting standpoint but that’s more to work around my novice ability. 

 

/api/v1.0/assets/bulk/set-status is an endpoint that works well for me. I have it changing to a status titled “Check into storage” and rules process it from there. That status is also used by our helpdesk to cut down on the number of steps for them to check something in manually for times they don’t want to use rollout scout.

Userlevel 5
Badge +9

Adding to the documentation confusion, aside from the method @Kathryn Carter mentioned, iin a support request I was also told to look at https://apihub.incidentiq.com which I find even less clear. Between the two I’ve hacked together some stuff that works and we have in production but I’m sure it’s ugly how I have it working.

Badge

Good Afternoon Everyone, 

I hope you are all doing well! My name is Drew Thaxton. I am a Customer Support Specialist from Incident IQ who specializes in helping our customers with API. I just wanted to reach out to help assist with any API questions or concerns and to provide some API calls that may be helpful as well. 

Regarding the API documentation, you should be able to locate our new API documentation site at https://incidentiq.stoplight.io/docs/v1. Previously, we did have two additional API documentation sites that we did recommend to districts as well, but as functionality of Incident IQ has expanded and been enhanced, these endpoints provided and information requested changed as well which did require us to create new documentation. With that said though, I do apologize that these additional calls identified may not have been included in this documentation, but we are looking to expand this documentation and help it grow to help suit your districts needs. Below,  you should be able to find two API calls which I hope will be able to help assist in updating an Asset Owner as well as updating an Asset’s location. Please note, in the two calls below you may notice {} brackets in the API URL, headers, and body of the call. For each of these {} brackets, you will want to replace the brackets with the Value it asks for in the brackets. 

API call to Update Asset Owner:
curl --location 'https://{SITE}.incidentiq.com/api/v1.0/assets/{ASSETID}/owner' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.9' \
--header 'client: WebBrowser' \
--header 'content-type: application/json' \
--header 'productid: 88df910c-91aa-e711-80c2-0004ffa00010' \
--header 'siteid: {SITEID}' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--header 'Authorization: Bearer {TOKEN}' \
--data '{"OwnerId":"{OWNERID}"}'

API call to update Asset Location:
curl --location 'https://{SITE}.incidentiq.com/api/v1.0/assets/bulk/set-location' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.9' \
--header 'client: WebBrowser' \
--header 'content-type: application/json' \
--header 'productid: 88df910c-91aa-e711-80c2-0004ffa00010' \
--header 'siteid: {SITEID}' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--header 'Authorization: Bearer {TOKEN}' \
--data '{"AssetIds":["{ASSETID}"],"Request":{"LocationId":"{LOCATIONID}","RoomId":null,"LocationDetails":null,"UpdateAssetToOwnersLocation":null},"IsSelectAll":false,"AssetsRequest":{"OnlyShowDeleted":false,"Filters":[],"FilterByViewPermission":true,"BypassIndex":true,"FilterByViewProduct":true,"ProductId":"88df910c-91aa-e711-80c2-0004ffa00010"}}’

I am also currently working with getting these two calls added to our documentation at https://incidentiq.stoplight.io/docs/v1, but if you may have any questions or concerns regarding any additional calls though, please let me know, and I will be more than happy to help assist in getting these calls as well! 

Best Regards,
Drew

Reply