Exportar datos de un Device

Este endpoint exporta los datos de un Device en el formato seleccionado y los envía al correo electrónico especificado.

Solicitud HTTP

Para exportar los datos de un Device, haz una petición POST a la siguiente URL:

HTTP MethodURL
POSThttps://api.netux.com/api/v2.0/devices/<device_key>/_/values/export/

Parámetros de ruta

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

Parámetros de consulta

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication Token can optionally be sent as a query parameter.
emailStringRequired ParameterEmail to which exported data is sent to
startDateLongRequired ParameterIn milliseconds
endDateLongRequired ParameterIn milliseconds
timezoneStringDefault is "UTC" Allowed values are all times zones included in the pytz.all_timezones
formatStringAllowed values: csv

Cabecera

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ curl -X POST 'https://api.netux.com/api/v2.0/devices/<device_key>/_/values/export/' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
 -d '{"email": "[email protected]"}'

Respuesta

Devuelve un Task Id del proceso asíncrono.

{
  "task": {
    "id": "5df7a0c81a9ca52c2bee6877"
  }
}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}