This endpoint retrieves the last value of a variable
To get the last value of a variable, make a GET request to the following URL:
| HTTP Method | URL |
|---|---|
| GET | https://industrial.api.ubidots.com/api/v1.6/devices/<device_label>/<variable_label>/lv |
Where <device_label> and <variable_label> are the labels of the device and variable, respectively, from which the last value will be retrieved.
Headers
The "X-Auth-Token" header is required for your request:
| Header | Value | Required? | Description |
|---|---|---|---|
X-Auth-Token | Token | Yes | Authentication Token for the account. |
Query Parameters
You may add optional parameters to the URL of your request:
| Parameter | Type | Description |
|---|---|---|
| token | String | The token used to authenticate the request. While sending it as a query parameter is supported, we strongly recommend using the X-Auth-Token header. |
Examples
Get last value of a variable:
Retrieve the last value of a variable.
$ curl -X GET 'https://industrial.api.ubidots.com/api/v1.6/devices/<device_label>/<variable_label>/lv' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'10.0{
"code": 401002,
"message": "Incorrect authentication credentials."
}
