Skip to main content

Query Assets

List of paths to query for all assets across an application.

Methods & Paths

MethodURINameSummary
GET/v1.2/organizations/{org_id}/applications/{app_id}/assetsAsset ListRetrieve all assets for current application
GET/v1.2/organizations/{org_id}/applications/{app_id}/assets/{asset_id}AssetRetrieve an asset

Query Parameters

NameSourceType
limitquerynumber
pagequerynumber

Responses

CodeStatusDescriptionHas headersSchema
200OKSuccessful company retrievalschema
400Bad RequestBad request sent to serverschema
401UnauthorizedYou are unauthorizedschema
403ForbiddenYou are forbidden to perform this actionschema

Company Model

NameTypeRequiredExample
idstringuuid
location_idnumber9964
account_idstringuuid
namestringMy Asset
descriptionstringMy Asset Description
hardware_idstringa-bcdb38337bbcbd97
organization_idstringiotinabox
application_idstringiotinabox
typestringvehicle
proxy_idstringuuid
client_idstringuuid
device_type_idstringuuid
external_idstringmyid
summarizeboolfalse
ignore_offlineboolfalse
last_processeddate (formatted string)1970-01-01T00:00:00.000Z
created_atdate (formatted string)1970-01-01T00:00:00.000Z
updated_atdate (formatted string)1970-01-01T00:00:00.000Z

List Assets

Request Example

curl --request GET --url https://api.mydevices.com/v1.2/organizations/{org_id}/applications/{app_id}/assets \
--header 'authorization: Bearer YourAuthToken' \
--header 'content-type: application/json'

Example Response:

{
"page": 0,
"limit": 50,
"count": 87,
"rows": [
{
"id": "00bffb1f-2397-4790-9d84-6c3200a3dddd",
"location_id": 9964,
"account_id": "0cd9e93a-abe5-45e2-b3c8-370c6d1c3814",
"name": "Test Asset22",
"description": null,
"type": null,
"proxy_id": "56c68b70-2cb1-11ee-8d58-3b27843533f3",
"client_id": "0a6d3980-cdad-11ed-a5d0-e1a895926449",
"device_type_id": "0daafec5-038c-4813-8c82-fad342d62632",
"hardware_id": "a-bcdb38337bbcbd97",
"external_id": "abcd",
"last_processed": null,
"running_interval": 30,
"summarize": false,
"ignore_offline": false,
"organization_id": "iotinabox",
"application_id": "iotinabox",
"created_at": "2023-07-27T19:11:06.000Z",
"updated_at": "2023-07-27T19:11:06.000Z",
"deleted_at": null,
"createdAt": "2023-07-27T19:11:06.000Z",
"updatedAt": "2023-07-27T19:11:06.000Z"
},
//...
]
}

Get Asset by ID

Request Example

curl --request GET --url https://api.mydevices.com/v1.2/organizations/{org_id}/applications/{app_id}/assets/{asset_id} \
--header 'authorization: Bearer YourAuthToken' \
--header 'content-type: application/json'

Example Response:

{
"id": "00bffb1f-2397-4790-9d84-6c3200a3dddd",
"location_id": 9964,
"account_id": "0cd9e93a-abe5-45e2-b3c8-370c6d1c3814",
"name": "Test Asset22",
"description": null,
"type": null,
"proxy_id": "56c68b70-2cb1-11ee-8d58-3b27843533f3",
"client_id": "0a6d3980-cdad-11ed-a5d0-e1a895926449",
"device_type_id": "0daafec5-038c-4813-8c82-fad342d62632",
"hardware_id": "a-bcdb38337bbcbd97",
"external_id": "abcd",
"last_processed": null,
"running_interval": 30,
"summarize": false,
"ignore_offline": false,
"organization_id": "iotinabox",
"application_id": "iotinabox",
"created_at": "2023-07-27T19:11:06.000Z",
"updated_at": "2023-07-27T19:11:06.000Z",
"deleted_at": null,
"createdAt": "2023-07-27T19:11:06.000Z",
"updatedAt": "2023-07-27T19:11:06.000Z"
}