Obtener todos los Devices

Este endpoint devuelve todos los Devices.

Solicitud HTTP

Para obtener todos los Devices, haz una petición GET a la siguiente URL:

HTTP MethodURL
GEThttps://api.netux.com/api/v2.0/devices/

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)
createdAtStringSortSort all Variables based on date created. Default descending.
labelStringSortSort by label (default is alphabetically)
nameStringSortSort by name (default is alphabetically)
lastActivityStringSortSort by last Activity (default is oldest first)
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
idStringFilterFilter by Id
labelStringFilterFilter by label
nameStringFilterFilter by name
descriptionStringFilterFilter by description
description__isemptyBooleanFilterFilter by empty description
tagsArrayFilterFilter by tags
propertiesObjectFilterFilter by properties
deviceTypeStringFilterFilter by Device Type
createdAtDateFilterFilter by date created
isActiveBooleanFilterFilter by acti/inactive
organizationRelated Organization FilterRelated FilterFilter by Related Organization Filter (organization__<organization_attribute>__<filter>)
variablesRelated Variables FilterRelated FilterFilter by Related Variable Filter (<variables__<variable_attribute>__<filter>)
deviceGroupRelated Device Group FilterRelated FilterFilter by Related Device Group Filter (deviceGroup__<deviceGroup_attribute>__<filter>)
lastActivityNumberFilterFilter by last activity

Cabecera

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

Respuesta

Devuelve un objeto con un array results que contiene todos los valores de los últimos Devices.

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "properties": {
                "_location_fixed": {
                  "lat": 6.2486,
                    "lng": 75.5742
                     }
            },
            "createdAt": "2019-11-25T19:35:08.975270Z",
            "description": "some description",
            "id": "6e309da44fc8455a9cceb5aa",
            "isActive": true,
            "label": "first-device",
            "lastActivity": null,
            "name": "First Device",
            "organization": {
                "id": "af92e4c82bf1d39cc21882f5b",
                "label": "my-first-customer",
                "name": "My First Customer",
                "url": "http://api.netux.com/api/v2.0/organizations/af92e4c82bf1d39cc21882f5b"
            },
            "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."
}