This endpoint exports Device data in the selected format and sends it to the specified email.
Request
To export data of a Device please make a POST request to the following URL:
| HTTP Method | URL |
|---|---|
| POST | https://industrial.api.ubidots.com/api/v2.0/devices/<device_key>/_/values/export/ |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| device_key | String | The id or label of the Device, label should use the prefix ~ |
Query Parameters
| Parameter | Type | Use | Description |
|---|---|---|---|
| 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 | |
| dataFormat | String | Allowed values: csv | txt | json | xlsx Default is csv. | |
| displayName | String | Allowed values: label | name | id Default is label. | |
| columns | String | Comma-separated options. Options are: date,created_at,timestamp,context,value |
Header
| Parameter | Required? | Description |
|---|---|---|
| X-Auth-Token | Yes | Authentication Token of account |
curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/devices/<device_key>/_/values/export/[email protected]&startDate=1734325200000&endDate=1734411599999&timezone=America/Bogota' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'{
"task": {
"id": "5df7a0c81a9ca52c2bee6877"
}
}{
"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 for the asynchronous process.

