Para obtener un solo Device de una Organization, haz una petición GET a la siguiente URL:
HTTP Method | URL |
---|
GET | https://api.netux.com/api/v2.0/organizations/<organization_key>/devices/<device_key>/ |
Parameter | Type | Description |
---|
organization_key | String | The id or label of the Organization, label should use the prefix ~ |
device_key | String | The id or label of the Device, label should use the prefix ~ |
Parameter | Type | Use | Description |
---|
token | String | Authentication | Authentication Token can optionally be sent as a query parameter. |
fields | Comma separated list | Dynamic Fields | Specify the fields that should be obtained in the response object |
$ curl -X GET 'https://api.netux.com/api/v2.0/organizations/<organization_key>/devices/<device_key>/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'
Devuelve un objeto Device con el Device solicitado de la Organization proporcionada.
{
"context": {},
"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"
},
"position": {
"lat": 6.2486,
"lng": 75.5742
},
"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."
}