All Variables

To retrieve all the variables for a device, please make a GET request to the following URL: https://cs.api.ubidots.com/api/v2.0/devices//variables/

Example: https://cs.api.ubidots.com/api/v2.0/devices/61fc258dd4ffae5290231519/variables/

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication Token can optionally be sent as a query parameter.
pageNumberPaginationReturns the corresponding page of the result
page_sizeNumberPaginationNumber of items per page, if not provided takes default values of 50 (for variables 200)
createdAtStringSortSort all Variables based on date created. Default descending.
labelStringSortSort by label
nameStringSortSort by name
fieldsComma separated listDynamic FieldsSpecify the fields that should be obtained in the response object.
searchStringSearchAllows to search on the following fields with one request label, name, description, username, firstName, lastName
idStringFilterFilter by id
labelStringFilterFilter by label
nameStringFilterFilter by name
descriptionStringfilterfilter by properties
tagsArrayFilterFilter by tags
createdAtDateFilterFilter by date created
propertiesJSONFilterFilter by properties
unitStringFilterFilter by unit
deviceRelated Device FilterRelated FilterFilter by Related Device Filter (device____)
lastActivityIntegerFilterFilter by last activity

Single Variable

To retrieve a single Variable please make a GET request to the following URL: https://cs.api.ubidots.com/api/v2.0/variables//

To retrieve a single Variable of a Device please make a GET request to the following URL: https://cs.api.ubidots.com/api/v2.0/devices//variables//

Example:
https://cs.api.ubidots.com/api/v2.0/devices/61fc258dd4ffae5290231519/variables/test-device/

Path Parameters
ParameterTypeDescription
variable_idStringID of Variable
Query Parameters
ParameterTypeUseDescription
fieldsComma separated listDynamic FieldsSpecify the fields that should be obtained in the response object
Header
ParameterRequired?Description
X-Auth-HeaderYesAuthentication Token of account
What are your feelings
Updated on February 3, 2024