Delete Device Values

This endpoint deletes Device Values for a specific time range.

Request

To delete Device Values for a specific time range please make a POST request to the following URL:

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

Path Parameters

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

Query Parameters

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication Token can optionally be sent as a query parameter.
startDateLongRequired ParameterStart date in milliseconds
endDateLongRequired ParameterEnd date in milliseconds

Header

ParameterRequired?Description
X-Auth-TokenYes[Authentication Token] (/reference/authentication) of account
$ curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/devices/<device_key>/_/values/delete/?startDate=1632614400000&endDate=1632614500000' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'
{
  "task": {
    "id": "5df7b7501a9ca5714e7a1301"
  }
}
{
    "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.