To retrieve all a Device's last values please make a GET request to the following URL:
HTTP Method URL GET https://industrial.api.ubidots.com/api/v2.0/devices/<device_key>/_/values/last
Parameter Type Description device_key String The id or label of the Device, label should use the prefix ~
Parameter Type Description only_value Boolean Set ?only_value=true to retrieve only the values
cURL (Request)
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/devices/<device_key>/_/values/last' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
200 OK 400 Bad Request 401 Unauthorized
{
"humidity": {
"value": 59.0,
"timestamp": 1649867634000,
"context": {},
"created_at": 1649867635757
},
"clouds": {
"value": 75.0,
"timestamp": 1649867634000,
"context": {},
"created_at": 1649867635757
},
"pressure": {
"value": 1027.0,
"timestamp": 1649867634000,
"context": {},
"created_at": 1649867635757
},
"wind_speed": {
"value": 3.6,
"timestamp": 1649867634000,
"context": {},
"created_at": 1649867635757
}
}{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}{
"code": 401002,
"message": "Incorrect authentication credentials."
}
Returns an object containing all Device last values.