Obtener todos los Devices de una Organization

Este endpoint devuelve todos los Devices de una Organization específica.

Solicitud HTTP

Para obtener todos los Devices de una Organization específica, haz una petición GET a la siguiente URL:

HTTP MethodURL
GEThttps://api.netux.com/api/v2.0/organizations/<organization_key>/devices/

Parámetros de ruta

ParameterTypeDescription
organization_keyStringThe id or label of the Organization, 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 FieldsSpecify the fields that should be obtained in the response object.
searchStringSearchAllows to search on the following fields with one request label, name, description, username, firstName, lastName
idStringFilter AttributeFilter by id
labelStringFilter AttributeFilter by label
nameStringFilter AttributeFilter by name
descriptionStringFilter AttributeFilter by description
description__isemptyBooleanFilter AttributeIf True, filters for Devices with an empty description field
tagsArrayFilter AttributeFilter by tags
contextJsonFilter AttributeFilter by context
createdAtStringFilter AttributeFilter by date of creation
isActiveBooleanFilter AttributeFilter for devices that are (not) active
variablesRelated Variables FilterRelated Filter AttributeFilter by Related Variables Filter (variables__<variable_attribute>__<filter>)
deviceGroupRelated Device Group FilterRelated Filter AttributeFilter by Related Device Group Filter (deviceGroup__<deviceGroup_attribute>__<filter>)

Cabecera

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

Respuesta

Devuelve un objeto con un array results que contiene todos los Devices de la Organization específica.

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "context": {},
            "createdAt": "2019-11-25T19:35:08.975270Z",
            "description": "some description",
            "id": "6e309da44fc8455a9cceb5aa",
            "isActive": true,
            "label": "first-device",
            "lastActivity": null,
            "name": "First Device",
            "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."
}