InfluxDB Invokable Scripts API
Store, manage, and execute scripts in InfluxDB.A script stores your custom Flux script and provides an invokableendpoint that accepts runtime parameters.In a script, you can specify custom runtime parameters(`params`)--for example, `params.myparameter`.Once you create a script, InfluxDB generates an[`/api/v2/scripts/SCRIPT_ID/invoke` endpoint](#operation/PostScriptsIDInvoke)for your organization.You can run the script from API requests and tasks, defining parametervalues for each run.When the script runs, InfluxDB replaces `params` references in thescript with the runtime parameter values you define.Use the `/api/v2/scripts` endpoints to create and manage scripts.See related guides to learn how to define parameters and execute scripts.### Related guides- [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) from API requests.- [Create a task that references a script](https://docs.influxdata.com/influxdb/cloud/process-data/manage-tasks/create-task/#create-a-task-that-references-a-script)
InfluxDB Invokable Scripts API is one of 40 APIs that InfluxDB publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.
Tagged areas include Invokable Scripts. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, authentication docs, and a getting-started guide.
This API exposes 7 operations across 4 paths, and defines 10 schemas. It is described by OpenAPI 3.0.0.
Requests are made against the base URL https://cloud2.influxdata.com/api/v2.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 2
InfluxDB Invokable Scripts API declares
2 security schemes
for authenticating requests.
It accepts HTTP basic authentication (BasicAuthentication).
An API key is passed in the header as Authorization (TokenAuthentication).
By default, every request must be authenticated.
BasicAuthentication— Basic authentication scheme Use the HTTP Basic authentication scheme for InfluxDB /api/v2 API operations that support it: Syntax Authorization: Basic BASE64ENC…TokenAuthentication— Use the [Token authentication](section/Authentication/TokenAuthentication) scheme to authenticate to the InfluxDB API. In your API requests, send an Authorizat…
Paths & Operations 7
Across 4 paths, the API surfaces 7 operations — 1 DELETE, 3 GET, 1 PATCH, 2 POST. Each is listed below with its method, path, parameters, and response codes.
Store, manage, and execute scripts in InfluxDB. A script stores your custom Flux script and provides an invokable endpoint that accepts runtime parameters. In a script, you can sp…
Schemas 10
The contract defines 10 schemas that model the data the API accepts and returns. The most detailed are Script (9 properties), Error (4 properties), ScriptCreateRequest (4 properties), ScriptUpdateRequest (2 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from InfluxDB 12
Other APIs InfluxDB publishes across the network.