Back to Influxdb

Invoke

content/shared/influxdb-v2/reference/cli/influx/scripts/invoke.md

latest2.4 KB
Original Source

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

Usage

influx scripts invoke [flags]

Flags

FlagDescriptionInput type{{< cli/mapped >}}
-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({{< req >}}) Script IDstring
--skip-verifySkip TLS certificate verificationINFLUX_SKIP_VERIFY
-t--tokenAPI tokenstringINFLUX_TOKEN

Examples

{{< cli/influx-creds-note >}}

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