This endpoint retrieves all Device Types.
Request
To retrieve all Device Types please make a GET request to the following URL:
HTTP Method | URL |
---|---|
GET | https://industrial.api.ubidots.com/api/v2.0/device_types/ |
Query Parameter
Parameter | Type | Use | Description |
---|---|---|---|
token | String | Authentication | Authentication Token can optionally be sent as a query parameter. |
page | Number | Pagination | Returns the corresponding page of the result |
page_size | Number | Pagination | Number of items per page, if not provided takes default values of 50 (for variables 200) |
created_at | Date | Sort | Sort all Variables based on date created. Default descending. |
label | String | Sort | Sort by label |
name | String | Sort | Sort by name |
fields | Comma separated list | Dynamic Fields | Specify the fields that should be obtained in the response object. |
search | String | Search | Allows to search on the following fields with one request label , name , description , username , firstName , lastName |
id | Id | Filter | Filter by Id |
name | String | Filter | Filter by name |
label | String | Filter | Filter by label |
description | String | Filter | Filter by description |
variables | Object | Filter | Filter by Variables |
properties | Object | Filter | Filter by properties |
tasks | Object | Filter | Filter by tasks |
deviceColor | String | Filter | Filter by deviceColor |
deviceIcon | String | Filter | Filter by deviceIcon |
variableColor | String | Filter | Filter by Variable color |
syntheticVariableColor | String | Filter | Filter by Synthetic Variable Color |
createdAt | Date | Filter | Filter by date created |
Header
Parameter | Required? | Description |
---|---|---|
X-Auth-Token | Yes | [Authentication Token] (/reference/authentication) of account |
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/device_types/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"url": "https://industrial.api.ubidots.com/api/v2.0/device_types/5e1f776089f9bd7c4e7f1e2b",
"id": "5e1f776089f9bd7c4e7f1e2b",
"name": "el type aquel",
"label": "el-type-aquel",
"description": "La description aquella",
"deviceColor": "#3BA9F5",
"deviceIcon": null,
"variableColor": "#FFAE58",
"syntheticVariableColor": "#5AD0C2",
"variables": [],
"properties": [],
"tasks": [],
"createdAt": "2020-01-15T20:34:40.935322Z"
}
]
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}
Response
An object with an array results
containing all Device Types.