(API) How can I do a query and only get back “In Service” assets? I know how to do the query but cannot seem to figure out how to do the filter.
Filter assets and only return back Asset Status = "In Service"
Best answer by athaxton_iiQ
Good Afternoon
I hope you are doing well so far today!
I wanted to reach out today to help assist with obtaining an API call in order to pull the assets associated with a Custom Asset View.
For this call, you will want to make the API POST call to the following URL below with {SITE} replaced with the site for your district:
URL: https://{SITE}.incidentiq.com/api/v1.0/assets/?%24s=20&%24o=AssetTag%20ASC'
Along with this URL, you will also need to supply the following Body for the call as well with {VIEWID} replaced with the specific ViewID for the Custom View you would like:
{"OnlyShowDeleted":false,"Filters":[{"Facet":"View","Id":"{VIEWID}"}],"FilterByViewPermission":true}
With that said though, if you may still be encountering issues using this call, please let me know!
Best Regards,
Drew
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

