Este endpoint devuelve todos los Device Groups.
Solicitud HTTP
Para obtener todos los Device Groups, haz una petición GET a la siguiente URL:
HTTP Method | URL |
---|---|
GET | https://api.netux.com/api/v2.0/device_groups/ |
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) |
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 | 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 |
organization | <organization_key> | Filter | Filter by organization key |
events | Related Filter of Events | Filter | Filter by event key |
createdAt | Date | Filter | Filter by date created |
Cabecera
Parameter | Required? | Description |
---|---|---|
X-Auth-Token | Yes | Authentication Token of account |
$ curl -X GET 'https://api.netux.com/api/v2.0/device_groups/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
Respuesta
Devuelve un objeto con un array results
que contiene todos los Device Groups.
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"url": "https://api.netux.com/api/v2.0/device_groups/5e1c8daf89f9bd33017e05e9",
"id": "5e1c8daf89f9bd33017e05e9",
"label": "group-test",
"name": "Group Test",
"organization": null,
"devices": "https://api.netux.com/api/v2.0/device_groups/5e1c8daf89f9bd33017e05e9/devices",
"devicesNumber": 1,
"createdAt": "2020-01-13T15:33:03.655965Z"
}
]
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}