This endpoint retrieves the last value of a variable
To get the last value of a variable please 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 label of the Device and Variable, respectively, from which the last value will retrieved.
Headers
The "X-Auth-Token" header is required for your request:
Header | Value | Required? | Description |
---|---|---|---|
X-Auth-Token | Token | Yes | Authentication Token of account. |
Query Parameters
You may add optional parameters to the URL of your request:
Parameter | Type | Description |
---|---|---|
token | String | The token 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:
Retrieves 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."
}