Export Variable Data

This endpoint exports Variable data in the selected format and sends it to the specified email.

Request

To export data of a Variable please make a POST request to the following URL:

HTTP MethodURL
POSThttps://industrial.api.ubidots.com/api/v2.0/variables/<variable_id>/_/values/export/

To export data of a Variable in a Device please make a POST request to the following URL:

HTTP MethodURL
POSThttps://industrial.api.ubidots.com/api/v2.0/devices/<device_key>/variables/<variable_key>/_/values/export/

Path Parameters

ParameterTypeDescription
variable_idStringThe id of the Variable

Query Parameters

Parameter

Type

Use

Description

token

String

Authentication

Authentication Token can optionally be sent as a query parameter.

email

String

Required Parameter

Email to which exported data is sent to

startDate

Long

Required Parameter

In milliseconds

endDate

Long

Required Parameter

In milliseconds

timezone

String

Default is "UTC" Allowed values are all times zones included in the pytz.all_timezones

format

String

Allowed values: csv | txt | json | xlsx
Default is csv.

Header

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/variables/<variable_id>/_/values/export/[email protected]&startDate=0&endDate=9999999' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
 -d '{"email": "[email protected]"}'
{
    "task": {
        "id": "a26aee8b4d186455"
    }
}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}

Response

Returns a Task Id of the asynchronous process.