Para obtener todos los Devices de un Device Group específico, haz una petición GET a la siguiente URL:
HTTP Method | URL |
---|
GET | https://api.netux.com/api/v2.0/device_groups/<device_group_key>/devices/ |
Parameter | Type | Description |
---|
device_group_key | String | The id or label of the Device Group, label should use the prefix ~ |
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 | String | 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 | Allows to dynamically specify the fields that should be included in the response object |
search | String | Search | Allows to search on the following fields with one request label , name , description , username , firstName , lastName |
$ curl -X GET 'https://api.netux.com/api/v2.0/device_groups/<device_groups_key>/devices/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
Devuelve un objeto con un array results
que contiene todos los Devices pertenecientes al Device Group específico.
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"url": "https://api.netux.com/api/v2.0/devices/12345a791d847273ee3f06c1",
"id": "12345a791d847273ee3f06c1",
"label": "dev0",
"name": "Dev0"
}
]
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}