Get last value of a variable

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 MethodURL
GEThttps://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:

HeaderValueRequired?Description
X-Auth-TokenTokenYesAuthentication Token for the account.

Query Parameters

You may add optional parameters to the URL of your request:

ParameterTypeDescription
tokenStringThe 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."
}