This endpoint deletes a specific Variable.
Request
To delete a Variable please make a DELETE request to the following URL:
HTTP Method | URL |
---|---|
DELETE | https://industrial.api.ubidots.com/api/v2.0/variables/<variable_id>/ |
To delete a Variable of a Device please make a DELETE request to the following URL:
HTTP Method | URL |
---|---|
DELETE | https://industrial.api.ubidots.com/api/v2.0/devices/<device_key>/variables/<variable_key> |
Path Parameters
Parameter | Type | Description |
---|---|---|
variable_id | String | The id of the Variable |
Query Parameters
Parameter | Type | Use | Description |
---|---|---|---|
token | String | Authentication | Authentication Token can optionally be sent as a query parameter. |
Header
Parameter | Required? | Description |
---|---|---|
X-Auth-Token | Yes | Authentication Token of account |
$ curl -X DELETE 'https://industrial.api.ubidots.com/api/v2.0/variables/<variable_id>/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}
Response
If the Variable was deleted successfully, returns status code 204.
Attention
Deleting a Variable cannot be undone. Please backup any variable data before deleting a Variable.