Para obtener una sola Variable, haz una petición GET a la siguiente URL:
HTTP Method | URL |
---|
GET | https://api.netux.com/api/v2.0/variables/<variable_id>/ |
Para obtener una sola Variable de un Device, haz una petición GET a la siguiente URL:
HTTP Method | URL |
---|
GET | https://api.netux.com/api/v2.0/devices/<device_key>/variables/<variable_key>/ |
Parameter | Type | Description |
---|
variable_id | String | The id of the Variable |
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/variables/<variable_id>' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'
Devuelve un objeto Variable con la Variable solicitada.
{
"createdAt": "2019-12-18T14:38:38.354415Z",
"syntheticExpression": "",
"description": "my second variable",
"device": {
"id": "6e309da44fc8455a9cceb5aa",
"label": "first-device",
"name": "First Device",
"url":"https://api.netux.com/api/v2.0/devices/6e309da44fc8455a9cceb5aa"
},
"icon": "pencil",
"id": "5dfa39ee1a9ca53020c69391",
"label": "var0",
"lastActivity": null,
"lastValue": {},
"name": "var0",
"properties": {
"any":"thing"
},
"tags": ["blue", "yellow"],
"type": "raw",
"unit": "meters",
"url": "https://api.netux.com/api/v2.0/variables/5dfa39ee1a9ca53020c69391",
"valuesUrl": "https://api.netux.com/api/v1.6/variables/5dfa39ee1a9ca53020c69391/values"
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}