Obtener todos los Devices de un Device Group

Este endpoint devuelve todos los Devices de un Device Group específico.

Solicitud HTTP

Para obtener todos los Devices de un Device Group específico, haz una petición GET a la siguiente URL:

HTTP MethodURL
GEThttps://api.netux.com/api/v2.0/device_groups/<device_group_key>/devices/

Parámetros de ruta

ParameterTypeDescription
device_group_keyStringThe id or label of the Device Group, label should use the prefix ~

Parámetros de consulta

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication Token can optionally be sent as a query parameter.
pageNumberPaginationReturns the corresponding page of the result
page_sizeNumberPaginationNumber of items per page, if not provided takes default values of 50 (for variables 200)
created_atStringSortSort all Variables based on date created. Default descending.
labelStringSortSort by label
nameStringSortSort by name
fieldsComma separated listDynamic FieldsAllows to dynamically specify the fields that should be included in the response object
searchStringSearchAllows to search on the following fields with one request label, name, description, username, firstName, lastName

Cabecera

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ curl -X GET 'https://api.netux.com/api/v2.0/device_groups/<device_groups_key>/devices/' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \

Respuesta

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."
}