Query Assets
List of paths to query for all assets across an application.
Methods & Paths
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /v1.2/organizations/{org_id}/applications/{app_id}/assets | Asset List | Retrieve all assets for current application |
| GET | /v1.2/organizations/{org_id}/applications/{app_id}/assets/{asset_id} | Asset | Retrieve an asset |
Query Parameters
| Name | Source | Type |
|---|---|---|
| limit | query | number |
| page | query | number |
Responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | Successful company retrieval | schema | |
| 400 | Bad Request | Bad request sent to server | schema | |
| 401 | Unauthorized | You are unauthorized | schema | |
| 403 | Forbidden | You are forbidden to perform this action | schema |
Company Model
| Name | Type | Required | Example |
|---|---|---|---|
| id | string | uuid | |
| location_id | number | 9964 | |
| account_id | string | uuid | |
| name | string | My Asset | |
| description | string | My Asset Description | |
| hardware_id | string | a-bcdb38337bbcbd97 | |
| organization_id | string | iotinabox | |
| application_id | string | iotinabox | |
| type | string | vehicle | |
| proxy_id | string | uuid | |
| client_id | string | uuid | |
| device_type_id | string | uuid | |
| external_id | string | myid | |
| summarize | bool | false | |
| ignore_offline | bool | false | |
| last_processed | date (formatted string) | 1970-01-01T00:00:00.000Z | |
| created_at | date (formatted string) | 1970-01-01T00:00:00.000Z | |
| updated_at | date (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"
}