influx scripts invoke

  • influx CLI 2.4.0+
  • InfluxDB Cloud only

The influx scripts invoke command executes an invokable script in InfluxDB.

Usage

  1. influx scripts invoke [flags]

Flags

FlagDescriptionInput typeMaps to ?
-c—active-configCLI configuration to use for commandstring
—configs-pathPath to influx CLI configurations (default ~/.influxdbv2/configs)stringINFLUX_CONFIGS_PATH
-f—fileFile name containing the script parameters, in JSONstring
-h—helpHelp for the delete command
—hide-headersHide table headers (default false)INFLUX_HIDE_HEADERS
—hostHTTP address of InfluxDB (default http://localhost:8086)stringINFLUX_HOST
—http-debugInspect communication with InfluxDB servers.string
—jsonOutput data as JSON (default false)INFLUX_OUTPUT_JSON
-p—paramsJSON string containing script parametersstring
-i—scriptID(Required) Script IDstring
—skip-verifySkip TLS certificate verificationINFLUX_SKIP_VERIFY
-t—tokenAPI tokenstringINFLUX_TOKEN

Examples

Authentication credentials

The examples below assume your InfluxDB host, organization, and token are provided by either the active influx CLI configuration or by environment variables (INFLUX_HOST, INFLUX_ORG, and INFLUX_TOKEN). If you do not have a CLI configuration set up or the environment variables set, include these required credentials for each command with the following flags:

Invoke a script
  1. influx scripts invoke -i 0Xx0oox00XXoxxoo1
Invoke a script with parameters
  1. influx scripts invoke \
  2. -i 0Xx0oox00XXoxxoo1 \
  3. -p "{ \"myParameter\": \"example-data\" }"