Este endpoint devuelve todos los Devices.
Solicitud HTTP
Para obtener todos los Devices, haz una petición GET a la siguiente URL:
HTTP Method | URL |
---|---|
GET | https://api.netux.com/api/v2.0/devices/ |
Parámetros de consulta
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) |
createdAt | String | Sort | Sort all Variables based on date created. Default descending. |
label | String | Sort | Sort by label (default is alphabetically) |
name | String | Sort | Sort by name (default is alphabetically) |
lastActivity | String | Sort | Sort by last Activity (default is oldest first) |
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 | String | Filter | Filter by Id |
label | String | Filter | Filter by label |
name | String | Filter | Filter by name |
description | String | Filter | Filter by description |
description__isempty | Boolean | Filter | Filter by empty description |
tags | Array | Filter | Filter by tags |
properties | Object | Filter | Filter by properties |
deviceType | String | Filter | Filter by Device Type |
createdAt | Date | Filter | Filter by date created |
isActive | Boolean | Filter | Filter by acti/inactive |
organization | Related Organization Filter | Related Filter | Filter by Related Organization Filter (organization__<organization_attribute>__<filter> ) |
variables | Related Variables Filter | Related Filter | Filter by Related Variable Filter (<variables__<variable_attribute>__<filter> ) |
deviceGroup | Related Device Group Filter | Related Filter | Filter by Related Device Group Filter (deviceGroup__<deviceGroup_attribute>__<filter> ) |
lastActivity | Number | Filter | Filter by last activity |
Cabecera
Parameter | Required? | Description |
---|---|---|
X-Auth-Token | Yes | Authentication Token of account |
$ curl -X GET 'https://api.netux.com/api/v2.0/devices/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
Respuesta
Devuelve un objeto con un array results
que contiene todos los valores de los últimos Devices.
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"properties": {
"_location_fixed": {
"lat": 6.2486,
"lng": 75.5742
}
},
"createdAt": "2019-11-25T19:35:08.975270Z",
"description": "some description",
"id": "6e309da44fc8455a9cceb5aa",
"isActive": true,
"label": "first-device",
"lastActivity": null,
"name": "First Device",
"organization": {
"id": "af92e4c82bf1d39cc21882f5b",
"label": "my-first-customer",
"name": "My First Customer",
"url": "http://api.netux.com/api/v2.0/organizations/af92e4c82bf1d39cc21882f5b"
},
"tags": ["first"],
"url": "http://api.netux.com/api/v2.0/devices/6e309da44fc8455a9cceb5aa",
"variables": "http://api.netux.com/api/v2.0/devices/6e309da44fc8455a9cceb5aa/variables",
"variablesNumber": 1
},
]
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}