Usage
Last updated
Was this helpful?
Last updated
Was this helpful?
ubidots <command> <subcommand> <argument> [options]
config
This command configures the CLI's cloud settings required to connect with your Ubidots account. This means that you must run this command prior to any other. It will prompt you for:
API domain: Leave the default value unless you are on a private Ubidots deployment.
Authentication method: The authentication method that you'd like to use.
Access token: A valid .
ubidots config
API Domain [https://industrial.api.ubidots.com]:
Authentication Method [TOKEN]:
Access Token [*******************************pPem]:
> [DONE]: Configuration saved successfully.
This configuration will be saved at $HOME/.ubidots_cli/config.yaml
. You can check it by running cat
:
cat $HOME/.ubidots_cli/config.yaml
access_token: <ubidots-token>
api_domain: https://industrial.api.ubidots.com
auth_method: X-Auth-Token
devices
This command allows you to perform CRUD operations over devices in Ubidots. Its subcommands are:
Usage: ubidots devices [OPTIONS] COMMAND [ARGS]...
Device management and operations.
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ add Adds a new device. โ
โ delete Deletes a specific device using its id or label. โ
โ get Retrieves a specific device using its id or label. โ
โ list Lists all available devices. โ
โ update Update a device. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Create a device in your Ubidots account.
Usage: ubidots devices add [OPTIONS] LABEL
โญโ Arguments โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ label TEXT The label for the device. [required] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --name TEXT The name of the device. โ
โ --description TEXT A brief description of the device. โ
โ --organization TEXT The organization associated with the device. Its โ
โ id or ['~label' | \~label]. โ
โ --tags TEXT Comma-separated tags for the device. e.g. โ
โ tag1,tag2,tag3 โ
โ --properties TEXT Device properties in JSON format. [default: {}] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Retrieve a device from Ubidots.
Usage: ubidots devices get [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the device. If both id and โ
โ label are provided, the id takes precedence. โ
โ --label TEXT Descriptive label identifier for the device. โ
โ Ignored if id is provided. โ
โ --fields TEXT Comma-separated fields to process. e.g. โ
โ field1,field2,field3 โ
โ [default: id,label,name] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Update a device in your Ubidots account.
Update an existing device settings on Ubidots.
Usage: ubidots devices update [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the device. If both id โ
โ and label are provided, the id takes precedence. โ
โ --label TEXT Descriptive label identifier for the device. โ
โ Ignored if id is provided. โ
โ --new-label TEXT The label for the device. โ
โ --new-name TEXT The name of the device. โ
โ --description TEXT A brief description of the device. โ
โ --organization TEXT The organization associated with the device. Its โ
โ id or ['~label' | \~label]. โ
โ --tags TEXT Comma-separated tags for the device. e.g. โ
โ tag1,tag2,tag3 โ
โ --properties TEXT Device properties in JSON format. [default: {}] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Delete a device from your Ubidots account.
Usage: ubidots devices delete [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the device. If both id and โ
โ label are provided, the id takes precedence. โ
โ --label TEXT Descriptive label identifier for the device. โ
โ Ignored if id is provided. โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
This command permanently deletes the device, just like removing it through the platform, thus special care is advised.
Retrieve all devices from your Ubidots account.
Usage: ubidots devices list [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --fields TEXT Comma-separated fields to process * e.g. field1,field2,field3. * โ
โ Available fields: (id, label, name, createdAt, description, โ
โ isActive, lastActivity, organization, location, tags, url, โ
โ variables, variablesCount, properties). For more details, visit โ
โ the documentation at: โ
โ https://docs.ubidots.com/reference/device-object โ
โ [default: id,label,name] โ
โ --filter TEXT Filter results by attributes. e.g. โ
โ 'key1=val1&key2__in=val20,val21' or โ
โ key1=val1\&key2__in=val20,val21 โ
โ --sort-by TEXT Attribute to sort the result set by. โ
โ --page-size INTEGER Defines the page number to be retrieved. โ
โ --page INTEGER Defines how many items per page are retrieved. โ
โ --format [table|json] [default: table] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
variables
This command allows you to perform CRUD operations over variables in Ubidots. Its subcommands are:
Usage: ubidots variables [OPTIONS] COMMAND [ARGS]...
Variable management and operations.
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ add Adds a new variable. โ
โ delete Deletes a specific variable using its id โ
โ get Retrieves a specific variable using its id. โ
โ list Lists all available variables. โ
โ update Update a variable. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Create a new variable in a given device in Ubidots.
Usage: ubidots variables add [OPTIONS] DEVICE [LABEL] [NAME]
โญโ Arguments โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ device TEXT The device associated with the variable. Its id or โ
โ ['~label'|\~label]. โ
โ [required] โ
โ label [LABEL] The label for the variable. โ
โ name [NAME] The name of the variable. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --description TEXT A brief description of the โ
โ variable. โ
โ --type [raw|synthetic] The type of variable. โ
โ [default: raw] โ
โ --unit TEXT The unit of measurement that โ
โ represents the variable. โ
โ --synthetic-expression TEXT If the variable is of type โ
โ 'synthetic', this is the โ
โ corresponding synthetic โ
โ expression used to calculate โ
โ its value. โ
โ --tags TEXT Comma-separated tags for the โ
โ variable. e.g. tag1,tag2,tag3 โ
โ --properties TEXT Device properties in JSON โ
โ format. โ
โ [default: {}] โ
โ --min INTEGER Lowest value allowed. โ
โ --max INTEGER Highest value allowed. โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Retrieve a variable from Ubidots.
Usage: ubidots variables get [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the variable. [required] โ
โ --fields TEXT Comma-separated fields to process. e.g. โ
โ field1,field2,field3 โ
โ [default: id,label,name] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Update a variable in Ubidots.
Usage: ubidots variables update [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for โ
โ the variable. โ
โ [required] โ
โ --new-label TEXT The label for the โ
โ variable. โ
โ --new-name TEXT The name of the variable. โ
โ --description TEXT A brief description of the โ
โ variable. โ
โ --type [raw|synthetic] The type of variable. โ
โ [default: raw] โ
โ --unit TEXT The unit of measurement โ
โ that represents the โ
โ variable. โ
โ --synthetic-expression TEXT If the variable is of type โ
โ 'synthetic', this is the โ
โ corresponding synthetic โ
โ expression used to โ
โ calculate its value. โ
โ --tags TEXT Comma-separated tags for โ
โ the variable. e.g. โ
โ tag1,tag2,tag3 โ
โ --properties TEXT Device properties in JSON โ
โ format. โ
โ [default: {}] โ
โ --min INTEGER Lowest value allowed. โ
โ --max INTEGER Highest value allowed. โ
โ --help Show this message and โ
โ exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Delete a variable from your Ubidots account.
Usage: ubidots variables delete [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the variable. [required] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
This command permanently deletes the variable, just like removing it through the platform, thus special care is advised.
List all variables on your Ubidots account
Usage: ubidots variables list [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --fields TEXT Comma-separated fields to process * e.g. field1,field2,field3. * โ
โ Available fields: (id, label, name, createdAt, โ
โ syntheticExpression, description, device, lastActivity, lastValue, โ
โ properties, tags, type, unit, url, valuesUrl). For more details, โ
โ visit the documentation at: โ
โ https://docs.ubidots.com/reference/variable-object โ
โ [default: id,label,name] โ
โ --filter TEXT Filter results by attributes. e.g. โ
โ 'key1=val1&key2__in=val20,val21' or โ
โ key1=val1\&key2__in=val20,val21 โ
โ --sort-by TEXT Attribute to sort the result set by. โ
โ --page-size INTEGER Defines the page number to be retrieved. โ
โ --page INTEGER Defines how many items per page are retrieved. โ
โ --format [table|json] [default: table] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
functions
This command allows you to:
Perform CRUD operations over UbiFunctions in Ubidots.
Set up a local development environment for UbiFunctions.
It's subcommands are:
Usage: ubidots functions [OPTIONS] COMMAND [ARGS]...
Tool for managing and deploying functions.
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ add Adds a new function. โ
โ delete Deletes a specific function using its id or label. โ
โ get Retrieves a specific function using its id or label. โ
โ list Lists all available functions. โ
โ update Update a function. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Create an UbiFunction in your Ubidots account.
Usage: ubidots functions add [OPTIONS] NAME
โญโ Arguments โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ name TEXT The name of the function. [required] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --label TEXT The label for the โ
โ function. โ
โ --runtime [python3.9:lite|pytho The runtime for the โ
โ n3.9:base|python3.9:f function. โ
โ ull|python3.11:lite|p [default: โ
โ ython3.11:base|python nodejs20.x:lite] โ
โ 3.11:full|nodejs20.x: โ
โ lite|nodejs20.x:base] โ
โ --raw --no-raw Flag to determine if โ
โ the output should be โ
โ in raw format. โ
โ [default: no-raw] โ
โ --token TEXT Optional โ
โ authentication token โ
โ to invoke the โ
โ function. โ
โ --methods TEXT The HTTP methods the โ
โ function will respond โ
โ to. โ
โ [default: GET] โ
โ --cors --no-cors Flag to enable โ
โ Cross-Origin Resource โ
โ Sharing (CORS) for the โ
โ function. โ
โ [default: no-cors] โ
โ --cron TEXT Cron expression to โ
โ schedule the function โ
โ for periodic โ
โ execution. โ
โ [default: * * * * *] โ
โ --environment TEXT environment in JSON โ
โ format. โ
โ [default: []] โ
โ --help Show this message and โ
โ exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Retrieve an UbiFunction from Ubidots.
Usage: ubidots functions get [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the function. If both id โ and label are provided, the id takes precedence. โ
โ --label TEXT Descriptive label identifier for the function.
โ Ignored if id is provided. โ
โ --fields TEXT Comma-separated fields to process. e.g. โ
โ field1,field2,field3 โ
โ [default: id,label,name] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Update an existing UbiFunction in Ubidots.
Usage: ubidots functions update [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the โ
โ function. If both id and label โ are provided, the id takes โ
โ precedence. โ
โ --label TEXT Descriptive label โ
โ identifier for the โ
โ function. Ignored if id is
โ provided. โ
โ --new-label TEXT The label for the device. โ
โ --new-name TEXT The name of the device. โ
โ --runtime [python3.9:lite|python3.9:bas The runtime for the function. โ
โ e|python3.9:full|python3.11:l [default: nodejs20.x:lite] โ
โ ite|python3.11:base|python3.1 โ
โ 1:full|nodejs20.x:lite|nodejs โ
โ 20.x:base] โ
โ --raw --no-raw Flag to determine if the โ
โ output should be in raw โ
โ format. โ
โ [default: no-raw] โ
โ --token TEXT Optional authentication token โ
โ to invoke the function. โ
โ --methods TEXT The HTTP methods the function โ
โ will respond to. โ
โ [default: GET] โ
โ --cors --no-cors Flag to enable Cross-Origin โ
โ Resource Sharing (CORS) for โ
โ the function. โ
โ [default: no-cors] โ
โ --cron TEXT Cron expression to schedule โ
โ the function for periodic โ
โ execution. โ
โ [default: * * * * *] โ
โ --environment TEXT environment in JSON format. โ
โ [default: []] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Delete an UbiFunction from your Ubidots account.
Usage: ubidots functions delete [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --id TEXT Unique identifier for the function. If both id and label are
โ provided, the id takes precedence. โ
โ --label TEXT Descriptive label **identifier** for the function. Ignored if id is โ
โ provided. โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
This command permanently deletes the UbiFunction, just like removing it through the platform, thus special care is advised.
List all UbiFunctions on your account.
Usage: ubidots functions list [OPTIONS]
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --fields TEXT Comma-separated fields to process * e.g. field1,field2,field3. * โ
โ Available fields: (url, id, label, name, isActive, createdAt, โ
โ serverless, triggers, environment, zipFileProperties). โ
โ [default: id,label,name] โ
โ --filter TEXT Filter results by attributes. e.g. โ
โ 'key1=val1&key2__in=val20,val21' or โ
โ key1=val1\&key2__in=val20,val21 โ
โ --sort-by TEXT Attribute to sort the result set by. โ
โ --page-size INTEGER Defines the page number to be retrieved. โ
โ --page INTEGER Defines how many items per page are retrieved. โ
โ --format [table|json] [default: table] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ