From 5f84fb79f8bd4ca382c293a52e9320f4fc1b4973 Mon Sep 17 00:00:00 2001 From: kelseiv <47797004+kelseiv@users.noreply.github.com> Date: Mon, 11 Oct 2021 14:15:39 -0700 Subject: [PATCH] Add InfluxDB 2.0.9 release notes and new influxd flux-log-enabled option (#3170) --- api-docs/.redocly.yaml | 11 + api-docs/README.md | 16 +- api-docs/cloud/swagger.yml | 1220 ++++++-- api-docs/cloud/swaggerV1Compat.yml | 166 +- api-docs/generate-api-docs.sh | 7 +- .../plugins/decorators/replace-servers-url.js | 20 + .../plugins/decorators/set-servers-url.js | 21 + .../plugins/rules/validate-servers-url.js | 19 + api-docs/plugins/servers-plugin.js | 28 + api-docs/redoc-static.html | 2312 ++++++++++++++ api-docs/v2.0/swagger.yml | 2723 ++++++++++++++--- api-docs/v2.0/swaggerV1Compat.yml | 166 +- api-docs/yarn.lock | 1 + .../stdlib/influxdata/influxdb/cardinality.md | 6 +- .../influxdb/v2.0/reference/config-options.md | 60 +- .../v2.0/reference/release-notes/influxdb.md | 105 +- .../release-notes/supported-release.md | 2 +- 17 files changed, 5984 insertions(+), 899 deletions(-) create mode 100644 api-docs/.redocly.yaml create mode 100644 api-docs/plugins/decorators/replace-servers-url.js create mode 100644 api-docs/plugins/decorators/set-servers-url.js create mode 100644 api-docs/plugins/rules/validate-servers-url.js create mode 100644 api-docs/plugins/servers-plugin.js create mode 100644 api-docs/redoc-static.html diff --git a/api-docs/.redocly.yaml b/api-docs/.redocly.yaml new file mode 100644 index 000000000..78958a319 --- /dev/null +++ b/api-docs/.redocly.yaml @@ -0,0 +1,11 @@ +lint: + extends: + - recommended + plugins: + - './plugins/servers-plugin.js' + rules: + no-server-trailing-slash: off + servers/validate-servers-url: error + decorators: + servers/replace-servers-url: error + servers/set-servers-url: error diff --git a/api-docs/README.md b/api-docs/README.md index 407e98eb3..d94d08c9b 100755 --- a/api-docs/README.md +++ b/api-docs/README.md @@ -1,6 +1,7 @@ ## Generate InfluxDB API docs -InfluxDB uses [Redoc](https://github.com/Redocly/redoc/) and -[redoc-cli](https://github.com/Redocly/redoc/blob/master/cli/README.md) to generate +InfluxDB uses [Redoc](https://github.com/Redocly/redoc/), +[redoc-cli](https://github.com/Redocly/redoc/blob/master/cli/README.md), +and Redocly's [OpenApi CLI](https://redoc.ly/docs/cli/) to generate API documentation from the InfluxDB `swagger.yml`. To minimize repo size, the generated API documentation HTML is gitignored, therefore @@ -12,15 +13,20 @@ to generate version-specific API documentation. The structure versions swagger files using the following pattern: ``` + │ └── swagger.yml + └── etc... +``` + +### OpenAPI CLI configuration +`.redoc.yaml` sets linting and bundling options for `openapi` CLI. +`./plugins` contains custom OpenAPI CLI plugins composed of *rules* (for linting) and *decorators* (for bundle customization). api-docs/ ├── v2.0/ │ └── swagger.yml ├── v2.1/ │ └── swagger.yml ├── v2.2/ - │ └── swagger.yml - └── etc... -``` +`openapi` CLI requires that modules use CommonJS `require` syntax for imports. ### Generate API docs locally Because the API documentation HTML is gitignored, you must manually generate it diff --git a/api-docs/cloud/swagger.yml b/api-docs/cloud/swagger.yml index 9af4ab26e..0abd3d029 100644 --- a/api-docs/cloud/swagger.yml +++ b/api-docs/cloud/swagger.yml @@ -2,34 +2,117 @@ openapi: 3.0.0 info: title: Influx Cloud API Service version: 2.0.1 + description: > + The InfluxDB v2 API provides a programmatic interface for all interactions + with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. servers: - url: /api/v2 +tags: + - name: Authentication + description: | + Use one of the following schemes to authenticate to the InfluxDB API: + - [Token authentication](#section/Authentication/TokenAuth) + - [Basic authentication](#section/Authentication/BasicAuth) + - [Querystring authentication](#section/Authentication/QuerystringAuth) + + x-traitTag: true + - name: Query + description: | + Retrieve data, analyze queries, and get query suggestions. + - name: Write + description: | + Write time series data to buckets. + - name: Authorizations + description: > + Create and manage API tokens. An **authorization** associates a list of + permissions to an **organization** and provides a token for API access. To + assign a token to a specific user, scope the authorization to the user ID. +x-tagGroups: + - name: Get started + tags: + - Authentication + - name: ' ' + tags: + - Write + - Query + - name: Resource endpoints + tags: + - Buckets + - Dashboards + - Tasks + - name: Security and access endpoints + tags: + - Authorizations + - Organizations + - Users + - name: System information endpoints + tags: + - Ping + - Routes + - name: All endpoints + tags: + - Authorizations + - Buckets + - Cells + - Checks + - DBRPs + - Dashboards + - Delete + - DemoDataBuckets + - Labels + - Limits + - NotificationEndpoints + - NotificationRules + - OAuth + - Organizations + - Ping + - Public Flags + - Query + - Routes + - Rules + - Secrets + - Setup + - Signin + - Signout + - Sources + - Tasks + - Telegrafs + - Templates + - Usage + - Users + - Variables + - Write paths: /signin: post: operationId: PostSignin - summary: Exchange basic auth credentials for session + summary: Create a user session. + description: >- + Authenticates ***Basic Auth*** credentials for a user. If successful, + creates a new UI session for the user. + tags: + - Signin security: - BasicAuth: [] parameters: - $ref: '#/components/parameters/TraceSpan' responses: '204': - description: Successfully authenticated + description: Success. User authenticated. '401': - description: Unauthorized access + description: Unauthorized access. content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: user account is disabled + description: User account is disabled. content: application/json: schema: $ref: '#/components/schemas/Error' default: - description: Unsuccessful authentication + description: Unsuccessful authentication. content: application/json: schema: @@ -37,7 +120,10 @@ paths: /signout: post: operationId: PostSignout - summary: Expire the current session + summary: Expire the current UI session + tags: + - Signout + description: Expires the current UI session for the user. parameters: - $ref: '#/components/parameters/TraceSpan' responses: @@ -56,11 +142,13 @@ paths: schema: $ref: '#/components/schemas/Error' /ping: - servers: - - url: '' get: operationId: GetPing summary: Checks the status of InfluxDB instance and version of InfluxDB. + servers: + - url: / + tags: + - Ping responses: '204': description: OK @@ -76,6 +164,10 @@ paths: head: operationId: HeadPing summary: Checks the status of InfluxDB instance and version of InfluxDB. + servers: + - url: / + tags: + - Ping responses: '204': description: OK @@ -103,6 +195,8 @@ paths: application/json: schema: $ref: '#/components/schemas/Routes' + servers: + - url: / /documents/templates: get: operationId: GetDocumentsTemplates @@ -343,7 +437,7 @@ paths: operationId: GetDBRPs tags: - DBRPs - summary: List all database retention policy mappings + summary: List database retention policy mappings parameters: - $ref: '#/components/parameters/TraceSpan' - in: query @@ -383,13 +477,13 @@ paths: type: string responses: '200': - description: A list of all database retention policy mappings + description: Success. Returns a list of database retention policy mappings. content: application/json: schema: $ref: '#/components/schemas/DBRPs' '400': - description: if any of the parameter passed is invalid + description: Bad request. The request has one or more invalid parameters. content: application/json: schema: @@ -416,13 +510,13 @@ paths: $ref: '#/components/schemas/DBRPCreate' responses: '201': - description: Database retention policy mapping created + description: Created. Returns the created database retention policy mapping. content: application/json: schema: $ref: '#/components/schemas/DBRP' '400': - description: if any of the IDs in the mapping is invalid + description: Bad request. The mapping in the request has one or more invalid IDs. content: application/json: schema: @@ -985,7 +1079,9 @@ paths: $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: '201': - description: Telegraf configuration owner was added. Returns a ResourceOwner that references the User. + description: >- + Telegraf configuration owner was added. Returns a ResourceOwner that + references the User. content: application/json: schema: @@ -1125,9 +1221,36 @@ paths: operationId: PostWrite tags: - Write - summary: Write time series data into InfluxDB + summary: Write data + description: > + Writes data to a bucket. + + + To write data into InfluxDB, you need the following: + + - **organization** – _See [View + organizations](https://docs.influxdata.com/influxdb/cloud/organizations/view-orgs/#view-your-organization-id) + for instructions on viewing your organization ID._ + + - **bucket** – _See [View + buckets](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/view-buckets/) + for + instructions on viewing your bucket ID._ + - **API token** – _See [View + tokens](https://docs.influxdata.com/influxdb/cloud/security/tokens/view-tokens/) + for instructions on viewing your API token._ + - **InfluxDB URL** – _See [InfluxDB + URLs](https://docs.influxdata.com/influxdb/cloud/reference/urls/)_. + + - data in [line + protocol](https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol) + format. + + + For more information and examples, see [Write data with the InfluxDB + API](https://docs.influxdata.com/influxdb/cloud/write-data/developer-tools/api). requestBody: - description: Line protocol body + description: Data in line protocol format. required: true content: text/plain: @@ -1138,20 +1261,28 @@ paths: - $ref: '#/components/parameters/TraceSpan' - in: header name: Content-Encoding - description: 'When present, its value indicates to the database that compression is applied to the line-protocol body.' + description: >- + When present, the header value tells the database that compression + is applied to the line protocol in the request body. schema: type: string - description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity. + description: >- + The header value specifies that the line protocol in the request + body is encoded with gzip or not encoded with identity. default: identity enum: - gzip - identity - in: header name: Content-Type - description: Content-Type is used to indicate the format of the data sent to the server. + description: >- + The header value indicates the format of the data in the request + body. schema: type: string - description: Text/plain specifies the text line protocol; charset is assumed to be utf-8. + description: > + `text/plain` specifies line protocol. `UTF-8` is the default + character set. default: text/plain; charset=utf-8 enum: - text/plain @@ -1159,29 +1290,40 @@ paths: - application/vnd.influx.arrow - in: header name: Content-Length - description: 'Content-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent.' + description: >- + The header value indicates the size of the entity-body, in bytes, + sent to the database. If the length is greater than the database's + `max body` configuration option, the server responds with status + code `413`. schema: type: integer description: The length in decimal number of octets. - in: header name: Accept - description: Specifies the return content format. + description: The header value specifies the response format. schema: type: string - description: The return format for errors. + description: The response format for errors. default: application/json enum: - application/json - in: query name: org - description: 'Specifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + The parameter value specifies the destination organization for + writes. The database writes all points in the batch to this + organization. If you provide both `orgID` and `org` parameters, + `org` takes precedence. required: true schema: type: string - description: All points within batch are written to this organization. + description: Organization name or ID. - in: query name: orgID - description: 'Specifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + The parameter value specifies the ID of the destination organization + for writes. If both `orgID` and `org` are specified, `org` takes + precedence. schema: type: string - in: query @@ -1198,44 +1340,68 @@ paths: $ref: '#/components/schemas/WritePrecision' responses: '204': - description: Write data is correctly formatted and accepted for writing to the bucket. + description: >- + InfluxDB validated the request data format and accepted the data for + writing to the bucket. `204` doesn't indicate a successful write + operation since writes are asynchronous. See [how to check for write + errors](https://docs.influxdata.com/influxdb/cloud/write-data/troubleshoot). '400': - description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. + description: >- + Bad request. The line protocol data in the request is malformed. The + response body contains the first malformed line in the data. + InfluxDB rejected the batch and did not write any data. content: application/json: schema: $ref: '#/components/schemas/LineProtocolError' '401': - description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist. + description: | + Unauthorized. The error may indicate one of the following: + * The `Authorization: Token` header is missing or malformed. + * The API token value is missing from the header. + * The token does not have sufficient permissions to write to this organization and bucket. content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: No token was sent and they are required. + '404': + description: >- + Not found. A requested resource was not found. The response body + contains the requested resource type, e.g. `organization name` or + `bucket`, and name. content: application/json: schema: $ref: '#/components/schemas/Error' '413': - description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. + description: >- + Request entity too large. The payload exceeded the 50MB limit. + InfluxDB rejected the batch and did not write any data. content: application/json: schema: $ref: '#/components/schemas/LineProtocolLengthError' '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the write again. + description: >- + The token is temporarily over quota. The Retry-After header + describes when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 '503': - description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. + description: >- + The server is temporarily unavailable to accept writes. The + `Retry-After` header describes when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -1250,9 +1416,9 @@ paths: operationId: PostDelete tags: - Delete - summary: Delete time series data from InfluxDB + summary: Delete data requestBody: - description: Predicate delete request + description: Deletes data from an InfluxDB bucket. required: true content: application/json: @@ -1455,90 +1621,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /dashboards: - post: - operationId: PostDashboards - tags: - - Dashboards - summary: Create a dashboard - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Dashboard to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateDashboardRequest' - responses: - '201': - description: Added dashboard - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/Dashboard' - - $ref: '#/components/schemas/DashboardWithViewProperties' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - operationId: GetDashboards - tags: - - Dashboards - summary: List all dashboards - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Descending' - - in: query - name: owner - description: A user identifier. Returns only dashboards where this user has the `owner` role. - schema: - type: string - - in: query - name: sortBy - description: The column to sort by. - schema: - type: string - enum: - - ID - - CreatedAt - - UpdatedAt - - in: query - name: id - description: 'A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used.' - schema: - type: array - items: - type: string - - in: query - name: orgID - description: The identifier of the organization. - schema: - type: string - - in: query - name: org - description: The name of the organization. - schema: - type: string - responses: - '200': - description: All dashboards - content: - application/json: - schema: - $ref: '#/components/schemas/Dashboards' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '/dashboards/{dashboardID}': get: operationId: GetDashboardsID @@ -1560,7 +1642,9 @@ paths: type: string enum: - properties - description: Includes the cell view properties in the response if set to `properties` + description: >- + Includes the cell view properties in the response if set to + `properties` responses: '200': description: Retrieve a single dashboard @@ -1603,7 +1687,9 @@ paths: description: 'optional, when provided will replace the description' type: string cells: - description: 'optional, when provided will replace all existing cells with the cells provided' + description: >- + optional, when provided will replace all existing cells with + the cells provided $ref: '#/components/schemas/CellWithViewProperties' parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1667,7 +1753,9 @@ paths: - Cells - Dashboards summary: Replace cells in a dashboard - description: Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. + description: >- + Replaces all cells in a dashboard. This is used primarily to update the + positional information of all cells. requestBody: required: true content: @@ -1748,7 +1836,9 @@ paths: - Cells - Dashboards summary: Update the non-positional information related to a cell - description: Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. + description: >- + Updates the non positional information related to a cell. Updates to a + single cell's positional data could cause grid conflicts. requestBody: required: true content: @@ -2312,15 +2402,43 @@ paths: operationId: PostQuery tags: - Query - summary: Query InfluxDB + summary: Query data + description: > + Retrieves data from InfluxDB buckets. + + + To query data, you need the following: + + - **organization** – _See [View + organizations](https://docs.influxdata.com/influxdb/cloud/organizations/view-orgs/#view-your-organization-id) + for instructions on viewing your organization ID._ + + - **API token** – _See [View + tokens](https://docs.influxdata.com/influxdb/cloud/security/tokens/view-tokens/) + for instructions on viewing your API token._ + - **InfluxDB URL** – _See [InfluxDB + URLs](https://docs.influxdata.com/influxdb/cloud/reference/urls/)_. + + - [Flux](https://docs.influxdata.com/influxdb/cloud/reference/flux) or + [InfluxQL](https://docs.influxdata.com/influxdb/cloud/query-data/influxql/) + query. + + + For more information and examples, see [Query with the InfluxDB + API](https://docs.influxdata.com/influxdb/cloud/query-data/execute-queries/influx-api/). parameters: - $ref: '#/components/parameters/TraceSpan' - in: header name: Accept-Encoding - description: 'The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.' + description: >- + The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to + understand. schema: type: string - description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity. + description: >- + Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. default: identity enum: - gzip @@ -2334,12 +2452,17 @@ paths: - application/vnd.flux - in: query name: org - description: 'Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + Specifies the name of the organization executing the query. Takes + either the ID or Name. If both `orgID` and `org` are specified, + `org` takes precedence. schema: type: string - in: query name: orgID - description: 'Specifies the ID of the organization executing the query. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + Specifies the ID of the organization executing the query. If both + `orgID` and `org` are specified, `org` takes precedence. schema: type: string requestBody: @@ -2355,19 +2478,26 @@ paths: type: string responses: '200': - description: Query results + description: Success. Returns query results. headers: Content-Encoding: - description: 'The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body' + description: >- + The Content-Encoding entity header is used to compress the + media-type. When present, its value indicates which encodings + were applied to the entity-body schema: type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. + description: >- + Specifies that the response in the body is encoded with gzip + or not encoded with identity. default: identity enum: - gzip - identity Trace-Id: - description: 'The Trace-Id header reports the request''s trace ID, if one was generated.' + description: >- + The Trace-Id header reports the request's trace ID, if one was + generated. schema: type: string description: Specifies the request's trace ID. @@ -2375,17 +2505,24 @@ paths: text/csv: schema: type: string - example: | - result,table,_start,_stop,_time,region,host,_value mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 + example: > + result,table,_start,_stop,_time,region,host,_value + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 application/vnd.influx.arrow: schema: type: string format: binary '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the read again. + description: >- + Token is temporarily over quota. The Retry-After header describes + when to try the read again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -3290,19 +3427,42 @@ paths: default: description: Unexpected error $ref: '#/components/responses/ServerError' + /resources: + get: + operationId: GetResources + tags: + - resource list + summary: List all known resources + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + '200': + description: All resources targets + content: + application/json: + schema: + type: array + items: + type: string + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /stacks: get: operationId: ListStacks tags: - - InfluxDB Templates - summary: List all installed InfluxDB templates + - Templates + summary: List installed templates parameters: - in: query name: orgID required: true schema: type: string - description: The organization id of the stacks + description: The organization ID of the stacks - in: query name: name schema: @@ -3315,7 +3475,7 @@ paths: description: A collection of stackIDs to filter the list by. responses: '200': - description: Influx stacks found + description: Success. Returns the list of stacks. content: application/json: schema: @@ -3334,10 +3494,10 @@ paths: post: operationId: CreateStack tags: - - InfluxDB Templates + - Templates summary: Create a new stack requestBody: - description: Stack to create. + description: The stack to create. required: true content: application/json: @@ -3357,7 +3517,7 @@ paths: type: string responses: '201': - description: InfluxDB Stack created + description: Success. Returns the newly created stack. content: application/json: schema: @@ -3372,7 +3532,7 @@ paths: get: operationId: ReadStack tags: - - InfluxDB Templates + - Templates summary: Retrieve a stack parameters: - in: path @@ -3380,10 +3540,10 @@ paths: required: true schema: type: string - description: Theidentifier of the stack. + description: The identifier of the stack. responses: '200': - description: The InfluxDB stack + description: Returns the stack. content: application/json: schema: @@ -3397,17 +3557,17 @@ paths: patch: operationId: UpdateStack tags: - - InfluxDB Templates - summary: Update an InfluxDB Stack + - Templates + summary: Update a stack parameters: - in: path name: stack_id required: true schema: type: string - description: Theidentifier of the stack. + description: The identifier of the stack. requestBody: - description: Influx stack to update. + description: The stack to update. required: true content: application/json: @@ -3442,7 +3602,7 @@ paths: - resourceID responses: '200': - description: Influx stack updated + description: Returns the updated stack. content: application/json: schema: @@ -3456,7 +3616,7 @@ paths: delete: operationId: DeleteStack tags: - - InfluxDB Templates + - Templates summary: Delete a stack and associated resources parameters: - in: path @@ -3464,7 +3624,7 @@ paths: required: true schema: type: string - description: Theidentifier of the stack. + description: The identifier of the stack. - in: query name: orgID required: true @@ -3473,7 +3633,7 @@ paths: description: The identifier of the organization. responses: '204': - description: The stack and its associated resources are deleted + description: The stack and its associated resources were deleted. default: description: Unexpected error content: @@ -3484,18 +3644,18 @@ paths: post: operationId: UninstallStack tags: - - InfluxDB Templates - summary: Uninstall an InfluxDB Stack + - Templates + summary: Uninstall a stack parameters: - in: path name: stack_id required: true schema: type: string - description: The stack id + description: The identifier of the stack. responses: '200': - description: Influx stack uninstalled + description: Returns the uninstalled stack. content: application/json: schema: @@ -3510,8 +3670,9 @@ paths: post: operationId: ApplyTemplate tags: - - InfluxDB Templates - summary: Apply or dry-run an InfluxDB Template + - Templates + summary: Apply or dry-run a template + description: Applies or performs a dry-run of template in an organization. requestBody: required: true content: @@ -3526,15 +3687,21 @@ paths: $ref: '#/components/schemas/TemplateApply' responses: '200': - description: | - Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources that do not exist at the time of the dry run. + description: > + Success. The package dry-run succeeded. No new resources were + created. Returns a diff and summary of the dry-run. The diff and + summary won't contain IDs for resources that didn't exist at the + time of the dry-run. content: application/json: schema: $ref: '#/components/schemas/TemplateSummary' '201': - description: | - Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before the package is applied with the changes the application will impose. This corresponds to `"dryRun": true` + description: > + Success. The package applied successfully. Returns a diff and + summary of the run. The summary contains newly created resources. + The diff compares the initial state to the state after the package + applied. This corresponds to `"dryRun": true`. content: application/json: schema: @@ -3549,8 +3716,8 @@ paths: post: operationId: ExportTemplate tags: - - InfluxDB Templates - summary: Export a new Influx Template + - Templates + summary: Export a new template requestBody: description: Export resources as an InfluxDB template. required: false @@ -3562,7 +3729,9 @@ paths: - $ref: '#/components/schemas/TemplateExportByName' responses: '200': - description: InfluxDB template created + description: >- + The template was created successfully. Returns the newly created + template. content: application/json: schema: @@ -3576,95 +3745,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /tasks: - get: - operationId: GetTasks - tags: - - Tasks - summary: List all tasks - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: name - description: Returns task with a specific name. - schema: - type: string - - in: query - name: after - schema: - type: string - description: Return tasks after a specified ID. - - in: query - name: user - schema: - type: string - description: Filter tasks to a specific user ID. - - in: query - name: org - schema: - type: string - description: Filter tasks to a specific organization name. - - in: query - name: orgID - schema: - type: string - description: Filter tasks to a specific organization ID. - - in: query - name: status - schema: - type: string - enum: - - active - - inactive - description: Filter tasks by a status--"inactive" or "active". - - in: query - name: limit - schema: - type: integer - minimum: 1 - maximum: 500 - default: 100 - description: The number of tasks to return - responses: - '200': - description: A list of tasks - content: - application/json: - schema: - $ref: '#/components/schemas/Tasks' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasks - tags: - - Tasks - summary: Create a new task - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Task to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TaskCreateRequest' - responses: - '201': - description: Task created - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '/tasks/{taskID}': get: operationId: GetTasksID @@ -4658,7 +4738,9 @@ paths: - in: query name: orgID required: true - description: Only show notification rules that belong to a specific organization ID. + description: >- + Only show notification rules that belong to a specific organization + ID. schema: type: string - in: query @@ -4668,7 +4750,9 @@ paths: type: string - in: query name: tag - description: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. + description: >- + Only return notification rules that "would match" statuses which + contain the tag key value pairs provided. schema: type: string pattern: '^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$' @@ -5030,7 +5114,9 @@ paths: - in: query name: orgID required: true - description: Only show notification endpoints that belong to specific organization ID. + description: >- + Only show notification endpoints that belong to specific + organization ID. schema: type: string responses: @@ -5420,7 +5506,9 @@ paths: tags: - Setup summary: Retrieve setup status - description: 'Check if setup is allowed. Returns `true` if no default user, organization, or bucket have been created.' + description: >- + Check if setup is allowed. Returns `true` if no default user, + organization, or bucket have been created. parameters: - $ref: '#/components/parameters/TraceSpan' responses: @@ -5435,7 +5523,9 @@ paths: tags: - Setup summary: 'Create an initial user, organization, and bucket' - description: 'Post an onboarding request to create an initial user, organization, and bucket.' + description: >- + Post an onboarding request to create an initial user, organization, and + bucket. parameters: - $ref: '#/components/parameters/TraceSpan' requestBody: @@ -5461,7 +5551,9 @@ paths: tags: - Setup summary: 'Create a new user, organization, and bucket' - description: 'Post an onboarding request to create a new user, organization, and bucket.' + description: >- + Post an onboarding request to create a new user, organization, and + bucket. requestBody: description: Source to create required: true @@ -5572,11 +5664,12 @@ paths: - DemoDataBuckets summary: List of Demo Data Buckets parameters: - - description: bucket id - in: path name: bucketID + required: true schema: type: string + description: bucket id responses: '200': description: if sampledata route is not available gateway responds with 200 @@ -5589,16 +5682,17 @@ paths: schema: $ref: '#/components/schemas/Error' delete: - operationId: GetDemoDataBucketMembers + operationId: DeleteDemoDataBucketMembers tags: - DemoDataBuckets summary: List of Demo Data Buckets parameters: - - description: bucket id - in: path name: bucketID + required: true schema: type: string + description: bucket id responses: '200': description: if sampledata route is not available gateway responds with 200 @@ -5935,31 +6029,42 @@ paths: examples: badNameExample: summary: Invalid name - description: 'The error returned when the name is invalid, such as too few or too many characters or the name contains non-printable ASCII or is not valid UTF-8.' + description: >- + The error returned when the name is invalid, such as too few + or too many characters or the name contains non-printable + ASCII or is not valid UTF-8. value: code: invalid message: name is invalid missingColumnsExample: summary: Missing columns - description: The error returned when the request body is missing the columns property. + description: >- + The error returned when the request body is missing the + columns property. value: code: invalid message: columns is required missingTimestampExample: summary: Missing timestamp - description: The error returned when the request body is missing a timestamp type column. + description: >- + The error returned when the request body is missing a + timestamp type column. value: code: invalid message: Timestamp column is required duplicateColumnNamesExample: summary: Duplicate column names - description: The error returned when the request body contains duplicate column names. + description: >- + The error returned when the request body contains duplicate + column names. value: code: invalid message: Duplicate column names missingFieldExample: summary: Missing field - description: The error returned when the request body is missing at least one field type column. + description: >- + The error returned when the request body is missing at least + one field type column. value: code: invalid message: At least one field column is required @@ -6054,7 +6159,9 @@ paths: examples: missingColumnsExample: summary: Deleted columns - description: The error returned when the request body does not contain all the columns from the source. + description: >- + The error returned when the request body does not contain + all the columns from the source. value: code: invalid message: Unable to delete columns from schema @@ -6124,10 +6231,15 @@ paths: description: Usage data headers: Content-Encoding: - description: 'The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body' + description: >- + The Content-Encoding entity header is used to compress the + media-type. When present, its value indicates which encodings + were applied to the entity-body schema: type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. + description: >- + Specifies that the response in the body is encoded with gzip + or not encoded with identity. default: identity enum: - gzip @@ -6136,11 +6248,210 @@ paths: text/csv: schema: type: string - example: | - #group,false,false,true,true,false,false,true,true,true,true #datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double,string,string,string,string #default,_result,,,,,,,,, ,result,table,_start,_stop,_time,_value,_field,_measurement,bucket_id,org_id ,,0,2021-05-10T14:25:10.865702397Z,2021-05-10T15:25:10.865702397Z,2021-05-10T15:00:00Z,5434066,gauge,storage_usage_bucket_bytes,2f6ba0cf9a2fdcbb,cec6fc1d2176dc11 ,,1,2021-05-10T14:25:10.865702397Z,2021-05-10T15:25:10.865702397Z,2021-05-10T15:00:00Z,9924053.966666665,gauge,storage_usage_bucket_bytes,8af67bcaf69d9daf,cec6fc1d2176dc11 + example: > + #group,false,false,true,true,false,false,true,true,true,true + #datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double,string,string,string,string + #default,_result,,,,,,,,, + ,result,table,_start,_stop,_time,_value,_field,_measurement,bucket_id,org_id + ,,0,2021-05-10T14:25:10.865702397Z,2021-05-10T15:25:10.865702397Z,2021-05-10T15:00:00Z,5434066,gauge,storage_usage_bucket_bytes,2f6ba0cf9a2fdcbb,cec6fc1d2176dc11 + ,,1,2021-05-10T14:25:10.865702397Z,2021-05-10T15:25:10.865702397Z,2021-05-10T15:00:00Z,9924053.966666665,gauge,storage_usage_bucket_bytes,8af67bcaf69d9daf,cec6fc1d2176dc11 default: description: unexpected error $ref: '#/components/responses/ServerError' + /dashboards: + post: + operationId: PostDashboards + tags: + - Dashboards + summary: Create a dashboard + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Dashboard to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDashboardRequest' + responses: + '201': + description: Added dashboard + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + get: + operationId: GetDashboards + tags: + - Dashboards + summary: List all dashboards + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Descending' + - in: query + name: limit + schema: + type: integer + minimum: -1 + maximum: 100 + default: 20 + description: The non-zero number of dashboards to return + - in: query + name: owner + description: >- + A user identifier. Returns only dashboards where this user has the + `owner` role. + schema: + type: string + - in: query + name: sortBy + description: The column to sort by. + schema: + type: string + enum: + - ID + - CreatedAt + - UpdatedAt + - in: query + name: id + description: >- + A list of dashboard identifiers. Returns only the listed dashboards. + If both `id` and `owner` are specified, only `id` is used. + schema: + type: array + items: + type: string + - in: query + name: orgID + description: The identifier of the organization. + schema: + type: string + - in: query + name: org + description: The name of the organization. + schema: + type: string + responses: + '200': + description: All dashboards + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboards' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tasks: + get: + operationId: GetTasks + tags: + - Tasks + summary: List all tasks + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: name + description: Returns task with a specific name. + schema: + type: string + - in: query + name: after + schema: + type: string + description: Return tasks after a specified ID. + - in: query + name: user + schema: + type: string + description: Filter tasks to a specific user ID. + - in: query + name: org + schema: + type: string + description: Filter tasks to a specific organization name. + - in: query + name: orgID + schema: + type: string + description: Filter tasks to a specific organization ID. + - in: query + name: status + schema: + type: string + enum: + - active + - inactive + description: Filter tasks by a status--"inactive" or "active". + - in: query + name: limit + schema: + type: integer + minimum: -1 + maximum: 500 + default: 100 + description: The non-zero number of tasks to return + - in: query + name: type + description: 'Type of task, unset by default.' + required: false + schema: + default: '' + type: string + enum: + - basic + - system + responses: + '200': + description: A list of tasks + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + operationId: PostTasks + tags: + - Tasks + summary: Create a new task + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Task to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TaskCreateRequest' + responses: + '201': + description: Task created + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' components: parameters: TraceSpan: @@ -6190,8 +6501,9 @@ components: required: false schema: type: string - description: | - The last resource ID from which to seek from (but not including). This is to be used instead of `offset`. + description: > + The last resource ID from which to seek from (but not including). This + is to be used instead of `offset`. schemas: LanguageRequest: description: Flux query to be analyzed. @@ -6221,12 +6533,16 @@ components: params: type: object additionalProperties: true - description: | - Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both) + description: > + Enumeration of key/value pairs that respresent parameters to be + injected into query (can only specify either this field or extern + and not both) dialect: $ref: '#/components/schemas/Dialect' now: - description: Specifies the time that should be reported as "now" in the query. Default is the server's now time. + description: >- + Specifies the time that should be reported as "now" in the query. + Default is the server's now time. type: string format: date-time InfluxQLQuery: @@ -6244,7 +6560,9 @@ components: enum: - influxql bucket: - description: Bucket is to be used instead of the database and retention policy specified in the InfluxQL query. + description: >- + Bucket is to be used instead of the database and retention policy + specified in the InfluxQL query. type: string Package: description: Represents a complete package source tree. @@ -6350,7 +6668,9 @@ components: - $ref: '#/components/schemas/BuiltinStatement' - $ref: '#/components/schemas/TestStatement' BadStatement: - description: A placeholder for statements for which no correct statement nodes can be created + description: >- + A placeholder for statements for which no correct statement nodes can be + created type: object properties: type: @@ -6379,7 +6699,9 @@ components: init: $ref: '#/components/schemas/Expression' ExpressionStatement: - description: May consist of an expression that does not return a value and is executed solely for its side-effects + description: >- + May consist of an expression that does not return a value and is + executed solely for its side-effects type: object properties: type: @@ -6516,7 +6838,9 @@ components: items: $ref: '#/components/schemas/Expression' ConditionalExpression: - description: 'Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`' + description: >- + Selects one of two expressions, `Alternate` or `Consequent`, depending + on a third boolean expression, `Test` type: object properties: type: @@ -6528,7 +6852,9 @@ components: consequent: $ref: '#/components/schemas/Expression' LogicalExpression: - description: Represents the rule conditions that collectively evaluate to either true or false + description: >- + Represents the rule conditions that collectively evaluate to either true + or false type: object properties: type: @@ -6607,7 +6933,9 @@ components: value: type: boolean DateTimeLiteral: - description: Represents an instant in time with nanosecond precision using the syntax of golang's RFC3339 Nanosecond variant + description: >- + Represents an instant in time with nanosecond precision using the syntax + of golang's RFC3339 Nanosecond variant type: object properties: type: @@ -6616,7 +6944,9 @@ components: type: string format: date-time DurationLiteral: - description: Represents the elapsed time between two instants as an int64 nanosecond count with syntax of golang's time.Duration + description: >- + Represents the elapsed time between two instants as an int64 nanosecond + count with syntax of golang's time.Duration type: object properties: type: @@ -6627,7 +6957,9 @@ components: items: $ref: '#/components/schemas/Duration' FloatLiteral: - description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985 + description: >- + Represents floating point numbers according to the double + representations defined by the IEEE-754-1985 type: object properties: type: @@ -6643,13 +6975,17 @@ components: value: type: string PipeLiteral: - description: 'Represents a specialized literal value, indicating the left hand value of a pipe expression' + description: >- + Represents a specialized literal value, indicating the left hand value + of a pipe expression type: object properties: type: $ref: '#/components/schemas/NodeType' RegexpLiteral: - description: Expressions begin and end with `/` and are regular expressions with syntax accepted by RE2 + description: >- + Expressions begin and end with `/` and are regular expressions with + syntax accepted by RE2 type: object properties: type: @@ -6673,7 +7009,9 @@ components: value: type: string Duration: - description: A pair consisting of length of time and the unit of time measured. It is the atomic unit from which all duration literals are composed. + description: >- + A pair consisting of length of time and the unit of time measured. It is + the atomic unit from which all duration literals are composed. type: object properties: type: @@ -6705,7 +7043,9 @@ components: name: type: string Dialect: - description: 'Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions' + description: >- + Dialect are options to change the default CSV output format; + https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions type: object properties: header: @@ -6744,7 +7084,9 @@ components: AuthorizationUpdateRequest: properties: status: - description: If inactive the token is inactive and requests using the token will be rejected. + description: >- + If inactive the token is inactive and requests using the token will + be rejected. default: active type: string enum: @@ -6881,7 +7223,9 @@ components: everySeconds: type: integer format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. + description: >- + Duration in seconds for how long data will be kept in the database. + 0 means infinite. example: 86400 minimum: 0 shardGroupDurationSeconds: @@ -6901,7 +7245,9 @@ components: everySeconds: type: integer format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. + description: >- + Duration in seconds for how long data will be kept in the database. + 0 means infinite. example: 86400 minimum: 0 shardGroupDurationSeconds: @@ -7174,7 +7520,10 @@ components: $ref: '#/components/schemas/TemplateKind' name: type: string - description: 'if defined with id, name is used for resource exported by id. if defined independently, resources strictly matching name are exported' + description: >- + if defined with id, name is used for resource exported by id. + if defined independently, resources strictly matching name are + exported required: - id - kind @@ -7239,7 +7588,9 @@ components: description: Field the environment reference corresponds too envRefKey: type: string - description: Key identified as environment reference and is the key identified in the template + description: >- + Key identified as environment reference and is the key identified + in the template value: description: Value provided to fulfill reference nullable: true @@ -7249,7 +7600,9 @@ components: - type: number - type: boolean defaultValue: - description: Default value that will be provided for the reference when no value is provided + description: >- + Default value that will be provided for the reference when no + value is provided nullable: true oneOf: - type: string @@ -8042,7 +8395,9 @@ components: properties: scheduledFor: nullable: true - description: 'Time used for run''s "now" option, RFC3339. Default is the server''s now time.' + description: >- + Time used for run's "now" option, RFC3339. Default is the server's + now time. type: string format: date-time Tasks: @@ -8062,7 +8417,9 @@ components: readOnly: true type: string type: - description: 'The type of task, this can be used for filtering tasks on list actions.' + description: >- + The type of task, this can be used for filtering tasks on list + actions. type: string orgID: description: The ID of the organization that owns this Task. @@ -8084,7 +8441,9 @@ components: labels: $ref: '#/components/schemas/Labels' authorizationID: - description: The ID of the authorization used when this task communicates with the query engine. + description: >- + The ID of the authorization used when this task communicates with + the query engine. type: string flux: description: The Flux script to run for this task. @@ -8093,10 +8452,15 @@ components: description: A simple task repetition schedule; parsed from Flux. type: string cron: - description: A task repetition schedule in the form '* * * * * *'; parsed from Flux. + description: >- + A task repetition schedule in the form '* * * * * *'; parsed from + Flux. type: string offset: - description: 'Duration to delay after the schedule, before executing the task; parsed from flux, if set to zero it will remove this option and use 0 as the default.' + description: >- + Duration to delay after the schedule, before executing the task; + parsed from flux, if set to zero it will remove this option and use + 0 as the default. type: string latestCompleted: description: 'Timestamp of latest scheduled, completed run, RFC3339.' @@ -8352,11 +8716,15 @@ components: type: string op: readOnly: true - description: op describes the logical code operation during error. Useful for debugging. + description: >- + op describes the logical code operation during error. Useful for + debugging. type: string err: readOnly: true - description: err is a stack of errors that occurred during processing of the request. Useful for debugging. + description: >- + err is a stack of errors that occurred during processing of the + request. Useful for debugging. type: string required: - code @@ -8380,11 +8748,15 @@ components: type: string op: readOnly: true - description: Op describes the logical code operation during error. Useful for debugging. + description: >- + Op describes the logical code operation during error. Useful for + debugging. type: string err: readOnly: true - description: Err is a stack of errors that occurred during processing of the request. Useful for debugging. + description: >- + Err is a stack of errors that occurred during processing of the + request. Useful for debugging. type: string line: readOnly: true @@ -8421,10 +8793,14 @@ components: type: object properties: value: - description: value is the value of the field. Meaning of the value is implied by the `type` key + description: >- + value is the value of the field. Meaning of the value is implied by + the `type` key type: string type: - description: '`type` describes the field type. `func` is a function. `field` is a field reference.' + description: >- + `type` describes the field type. `func` is a function. `field` is a + field reference. type: string enum: - func @@ -8434,7 +8810,9 @@ components: - regex - wildcard alias: - description: Alias overrides the field name in the returned response. Applies only if type is `func` + description: >- + Alias overrides the field name in the returned response. Applies + only if type is `func` type: string args: description: Args are the arguments to the function @@ -8509,7 +8887,9 @@ components: type: array minItems: 0 maxItems: 2 - description: 'The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits' + description: >- + The extents of an axis in the form [lower, upper]. Clients determine + whether bounds are to be inclusive or exclusive of their limits items: type: string label: @@ -9412,30 +9792,69 @@ components: type: object properties: verticalTimeAxis: - description: verticalTimeAxis describes the orientation of the table by indicating whether the time axis will be displayed vertically + description: >- + verticalTimeAxis describes the orientation of the table by + indicating whether the time axis will be displayed vertically type: boolean sortBy: $ref: '#/components/schemas/RenamableField' wrapping: - description: Wrapping describes the text wrapping style to be used in table views + description: >- + Wrapping describes the text wrapping style to be used in table + views type: string enum: - truncate - wrap - single-line fixFirstColumn: - description: fixFirstColumn indicates whether the first column of the table should be locked + description: >- + fixFirstColumn indicates whether the first column of the table + should be locked type: boolean fieldOptions: - description: fieldOptions represent the fields retrieved by the query with customization options + description: >- + fieldOptions represent the fields retrieved by the query with + customization options type: array items: $ref: '#/components/schemas/RenamableField' timeFormat: - description: timeFormat describes the display format for time values according to moment.js date formatting + description: >- + timeFormat describes the display format for time values according to + moment.js date formatting type: string decimalPlaces: $ref: '#/components/schemas/DecimalPlaces' + SimpleTableViewProperties: + type: object + required: + - type + - showAll + - queries + - shape + - note + - showNoteWhenEmpty + properties: + type: + type: string + enum: + - simple-table + showAll: + type: boolean + queries: + type: array + items: + $ref: '#/components/schemas/DashboardQuery' + shape: + type: string + enum: + - chronograf-v2 + note: + type: string + showNoteWhenEmpty: + description: 'If true, will display note when empty' + type: boolean MarkdownViewProperties: type: object required: @@ -9673,7 +10092,9 @@ components: type: boolean default: true detectCoordinateFields: - description: 'If true, search results get automatically regroupped so that lon,lat and value are treated as columns' + description: >- + If true, search results get automatically regroupped so that lon,lat + and value are treated as columns type: boolean default: true useS2CellID: @@ -9759,7 +10180,9 @@ components: type: number format: float DecimalPlaces: - description: 'Indicates whether decimal places should be enforced, and how many digits it should show.' + description: >- + Indicates whether decimal places should be enforced, and how many digits + it should show. type: object properties: isEnforced: @@ -9816,6 +10239,7 @@ components: - $ref: '#/components/schemas/HistogramViewProperties' - $ref: '#/components/schemas/GaugeViewProperties' - $ref: '#/components/schemas/TableViewProperties' + - $ref: '#/components/schemas/SimpleTableViewProperties' - $ref: '#/components/schemas/MarkdownViewProperties' - $ref: '#/components/schemas/CheckViewProperties' - $ref: '#/components/schemas/ScatterViewProperties' @@ -10271,7 +10695,9 @@ components: type: object properties: allowed: - description: True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. + description: >- + True means that the influxdb instance has NOT had initial setup; + false means that the database has been setup. type: boolean PasswordResetBody: properties: @@ -10344,7 +10770,9 @@ components: type: object additionalProperties: type: string - description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + description: >- + Key/Value pairs associated with this label. Keys can be removed by + sending an update with an empty value. example: color: ffb3b3 description: this is a description @@ -10362,7 +10790,9 @@ components: type: object additionalProperties: type: string - description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + description: >- + Key/Value pairs associated with this label. Keys can be removed by + sending an update with an empty value. example: color: ffb3b3 description: this is a description @@ -10375,7 +10805,9 @@ components: type: object additionalProperties: type: string - description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + description: >- + Key/Value pairs associated with this label. Keys can be removed by + sending an update with an empty value. example: color: ffb3b3 description: this is a description @@ -10633,7 +11065,9 @@ components: description: String duration before deadman triggers. type: string staleTime: - description: String duration for time that a series is considered stale and should not trigger deadman. + description: >- + String duration for time that a series is considered stale and + should not trigger deadman. type: string reportZero: description: 'If only zero values reported since time, trigger an alert' @@ -10852,10 +11286,14 @@ components: runbookLink: type: string limitEvery: - description: 'Don''t notify me more than times every seconds. If set, limit cannot be empty.' + description: >- + Don't notify me more than times every seconds. + If set, limit cannot be empty. type: integer limit: - description: 'Don''t notify me more than times every seconds. If set, limitEvery cannot be empty.' + description: >- + Don't notify me more than times every seconds. + If set, limitEvery cannot be empty. type: integer tagRules: description: List of tag rules the notification rule attempts to match. @@ -11005,7 +11443,9 @@ components: - channel properties: type: - description: The discriminator between other types of notification rules is "telegram". + description: >- + The discriminator between other types of notification rules is + "telegram". type: string enum: - telegram @@ -11013,14 +11453,19 @@ components: description: The message template as a flux interpolated string. type: string parseMode: - description: 'Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" .' + description: >- + Parse mode of the message text per + https://core.telegram.org/bots/api#formatting-options . Defaults to + "MarkdownV2" . type: string enum: - MarkdownV2 - HTML - Markdown disableWebPagePreview: - description: Disables preview of web links in the sent messages when "true". Defaults to "false" . + description: >- + Disables preview of web links in the sent messages when "true". + Defaults to "false" . type: boolean NotificationEndpointUpdate: type: object @@ -11125,7 +11570,9 @@ components: - type: object properties: url: - description: Specifies the URL of the Slack endpoint. Specify either `URL` or `Token`. + description: >- + Specifies the URL of the Slack endpoint. Specify either `URL` or + `Token`. type: string token: description: Specifies the API token string. Specify either `URL` or `Token`. @@ -11189,10 +11636,14 @@ components: - channel properties: token: - description: 'Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot .' + description: >- + Specifies the Telegram bot token. See + https://core.telegram.org/bots#creating-a-new-bot . type: string channel: - description: 'ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage .' + description: >- + ID of the telegram channel, a chat_id in + https://core.telegram.org/bots/api#sendmessage . type: string NotificationEndpointType: type: string @@ -11222,7 +11673,9 @@ components: description: InfluxDB v1 retention policy default: type: boolean - description: Specify if this mapping represents the default retention policy for the database specificed. + description: >- + Specify if this mapping represents the default retention policy for + the database specificed. links: $ref: '#/components/schemas/Links' required: @@ -11265,7 +11718,9 @@ components: description: InfluxDB v1 retention policy default: type: boolean - description: Specify if this mapping represents the default retention policy for the database specificed. + description: >- + Specify if this mapping represents the default retention policy for + the database specificed. required: - bucketID - database @@ -11385,7 +11840,9 @@ components: id: type: string nullable: true - description: If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type. + description: >- + If ID is set that is a permission for a specific resource. if it is + not set it is a permission for all resources of that resource type. name: type: string nullable: true @@ -11393,7 +11850,10 @@ components: orgID: type: string nullable: true - description: If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type. + description: >- + If orgID is set that is a permission for all resources owned my that + org. if it is not set it is a permission for all resources of that + resource type. org: type: string nullable: true @@ -11432,7 +11892,9 @@ components: permissions: type: array minItems: 1 - description: List of permissions for an auth. An auth must have at least one Permission. + description: >- + List of permissions for an auth. An auth must have at least one + Permission. items: $ref: '#/components/schemas/Permission' id: @@ -11441,7 +11903,9 @@ components: token: readOnly: true type: string - description: Passed via the Authorization Header and Token Authentication type. + description: >- + Passed via the Authorization Header and Token Authentication + type. userID: readOnly: true type: string @@ -11572,6 +12036,12 @@ components: cardinality: type: integer description: Allowed organization total cardinality. 0 is unlimited. + concurrentDeleteRequests: + type: integer + description: Allowed organization concurrent outstanding delete requests. + deleteRequestsPerSecond: + type: integer + description: Allowed organization delete request rate. required: - readKBs - concurrentReadRequests @@ -11893,6 +12363,76 @@ components: schema: $ref: '#/components/schemas/Error' securitySchemes: + TokenAuth: + type: http + scheme: token + bearerFormat: InfluxDB Token String + description: > + InfluxDB API tokens ensure secure interaction between users and data. A + token belongs to an organization and identifies InfluxDB permissions + within the organization. + + + Include your API token in an `Authentication: Token YOUR_API_TOKEN` HTTP + header with each request. + + + ### Example + + + `curl https://us-east-1-1.aws.cloud2.influxdata.com/ + --header "Authentication: Token YOUR_API_TOKEN"` + + For more information and examples, see the following: + - [Use tokens in API requests](https://docs.influxdata.com/influxdb/cloud/api-guide/api_intro/#authentication). + - [Manage API tokens](https://docs.influxdata.com/influxdb/cloud/security/tokens). + - [`/authorizations`](#tag/Authorizations) endpoint. BasicAuth: type: http scheme: basic + description: > + Use Basic authentication with clients that support the InfluxDB 1.x + convention of username and password (that don't support the + `Authorization: Token` scheme): + - **username**: InfluxDB Cloud username + - **password**: InfluxDB Cloud API token + + ### Example + + + `curl --get "https://europe-west1-1.gcp.cloud2.influxdata.com/query" + --user "YOUR_USERNAME":"YOUR_TOKEN_OR_PASSWORD"` + + For more information and examples, see how to [authenticate with a + username and password + scheme](https://docs.influxdata.com/influxdb/cloud/reference/api/influxdb-1x/). + QuerystringAuth: + type: apiKey + in: query + name: u=&p= + description: > + Use InfluxDB 1.x API parameters to provide credentials through the query + string. + + + Username and password schemes require the following credentials: + + - **username**: InfluxDB Cloud username + + - **password**: InfluxDB Cloud API token + + + ### Example + + + `curl --get "https://europe-west1-1.gcp.cloud2.influxdata.com/query" + --data-urlencode "u=YOUR_USERNAME" + --data-urlencode "p=YOUR_TOKEN_OR_PASSWORD"` + + For more information and examples, see how to [authenticate with a + username and password + scheme](https://docs.influxdata.com/influxdb/cloud/reference/api/influxdb-1x/). +security: + - TokenAuth: [] + - BasicAuth: [] + - QuerystringAuth: [] diff --git a/api-docs/cloud/swaggerV1Compat.yml b/api-docs/cloud/swaggerV1Compat.yml index d0ab5fd9d..0da0e97fb 100644 --- a/api-docs/cloud/swaggerV1Compat.yml +++ b/api-docs/cloud/swaggerV1Compat.yml @@ -1,5 +1,4 @@ -# this is a manually maintained file for these old routes until oats#15 is resolved -openapi: "3.0.0" +openapi: 3.0.0 info: title: Influx API Service (V1 compatible endpoints) version: 0.1.0 @@ -8,7 +7,7 @@ servers: description: V1 compatible api endpoints. paths: /write: - post: # technically this functions with other methods as well + post: operationId: PostWriteV1 tags: - Write @@ -21,15 +20,17 @@ paths: schema: type: string parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/AuthUserV1" - - $ref: "#/components/parameters/AuthPassV1" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/AuthUserV1' + - $ref: '#/components/parameters/AuthPassV1' - in: query name: db schema: type: string required: true - description: The bucket to write to. If none exist a bucket will be created with a default 3 day retention policy. + description: >- + The bucket to write to. If none exist a bucket will be created with + a default 3 day retention policy. - in: query name: rp schema: @@ -42,54 +43,76 @@ paths: description: Write precision. - in: header name: Content-Encoding - description: When present, its value indicates to the database that compression is applied to the line-protocol body. + description: >- + When present, its value indicates to the database that compression + is applied to the line-protocol body. schema: type: string - description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity. + description: >- + Specifies that the line protocol in the body is encoded with gzip + or not encoded with identity. default: identity enum: - gzip - identity responses: - "204": - description: Write data is correctly formatted and accepted for writing to the bucket. - "400": - description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. + '204': + description: >- + Write data is correctly formatted and accepted for writing to the + bucket. + '400': + description: >- + Line protocol poorly formed and no points were written. Response + can be used to determine the first malformed line in the body + line-protocol. All data in body was rejected and not written. content: application/json: schema: - $ref: "#/components/schemas/LineProtocolError" - "401": - description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist. + $ref: '#/components/schemas/LineProtocolError' + '401': + description: >- + Token does not have sufficient permissions to write to this + organization and bucket or the organization and bucket do not exist. content: application/json: schema: - $ref: "#/components/schemas/Error" - "403": + $ref: '#/components/schemas/Error' + '403': description: No token was sent and they are required. content: application/json: schema: - $ref: "#/components/schemas/Error" - "413": - description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. + $ref: '#/components/schemas/Error' + '413': + description: >- + Write has been rejected because the payload is too large. Error + message returns max size supported. All data in body was rejected + and not written. content: application/json: schema: - $ref: "#/components/schemas/LineProtocolLengthError" - "429": - description: Token is temporarily over quota. The Retry-After header describes when to try the write again. + $ref: '#/components/schemas/LineProtocolLengthError' + '429': + description: >- + Token is temporarily over quota. The Retry-After header describes + when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 - "503": - description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. + '503': + description: >- + Server is temporarily unavailable to accept writes. The Retry-After + header describes when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -98,9 +121,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /query: - post: # technically this functions with other methods as well + post: operationId: PostQueryV1 tags: - Query @@ -108,18 +131,21 @@ paths: requestBody: description: InfluxQL query to execute. content: - text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter + text/plain: schema: type: string parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/AuthUserV1" - - $ref: "#/components/parameters/AuthPassV1" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/AuthUserV1' + - $ref: '#/components/parameters/AuthPassV1' - in: header name: Accept schema: type: string - description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps. + description: >- + Specifies how query results should be encoded in the response. + **Note:** With `application/csv`, query results include epoch + timestamps instead of RFC3339 timestamps. default: application/json enum: - application/json @@ -128,10 +154,15 @@ paths: - application/x-msgpack - in: header name: Accept-Encoding - description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. + description: >- + The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to + understand. schema: type: string - description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity. + description: >- + Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. default: identity enum: - gzip @@ -148,42 +179,53 @@ paths: schema: type: string responses: - "200": + '200': description: Query results headers: Content-Encoding: - description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body + description: >- + The Content-Encoding entity header is used to compress the + media-type. When present, its value indicates which encodings + were applied to the entity-body schema: type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. + description: >- + Specifies that the response in the body is encoded with gzip + or not encoded with identity. default: identity enum: - gzip - identity Trace-Id: - description: The Trace-Id header reports the request's trace ID, if one was generated. + description: >- + The Trace-Id header reports the request's trace ID, if one was + generated. schema: type: string description: Specifies the request's trace ID. content: application/csv: schema: - $ref: "#/components/schemas/InfluxQLCSVResponse" + $ref: '#/components/schemas/InfluxQLCSVResponse' text/csv: schema: - $ref: "#/components/schemas/InfluxQLCSVResponse" + $ref: '#/components/schemas/InfluxQLCSVResponse' application/json: schema: - $ref: "#/components/schemas/InfluxQLResponse" + $ref: '#/components/schemas/InfluxQLResponse' application/x-msgpack: schema: type: string format: binary - "429": - description: Token is temporarily over quota. The Retry-After header describes when to try the read again. + '429': + description: >- + Token is temporarily over quota. The Retry-After header describes + when to try the read again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -192,7 +234,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' components: parameters: TraceSpan: @@ -200,8 +242,8 @@ components: name: Zap-Trace-Span description: OpenTracing span context example: - trace_id: "1" - span_id: "1" + trace_id: '1' + span_id: '1' baggage: key: value required: false @@ -260,7 +302,6 @@ components: description: Code is the machine-readable error code. readOnly: true type: string - # This set of enumerations must remain in sync with the constants defined in errors.go enum: - internal error - not found @@ -277,7 +318,9 @@ components: readOnly: true description: Message is a human-readable message. type: string - required: [code, message] + required: + - code + - message LineProtocolError: properties: code: @@ -297,18 +340,26 @@ components: type: string op: readOnly: true - description: Op describes the logical code operation during error. Useful for debugging. + description: >- + Op describes the logical code operation during error. Useful for + debugging. type: string err: readOnly: true - description: Err is a stack of errors that occurred during processing of the request. Useful for debugging. + description: >- + Err is a stack of errors that occurred during processing of the + request. Useful for debugging. type: string line: readOnly: true description: First line within sent body containing malformed data type: integer format: int32 - required: [code, message, op, err] + required: + - code + - message + - op + - err LineProtocolLengthError: properties: code: @@ -326,4 +377,7 @@ components: description: Max length in bytes for a body of line-protocol. type: integer format: int32 - required: [code, message, maxLength] + required: + - code + - message + - maxLength diff --git a/api-docs/generate-api-docs.sh b/api-docs/generate-api-docs.sh index 66609fe08..fe2396000 100755 --- a/api-docs/generate-api-docs.sh +++ b/api-docs/generate-api-docs.sh @@ -1,9 +1,9 @@ -#!/bin/bash -e +#!/bin/bash set -e # Get list of versions from directory names -versions="$(ls -d -- */ | grep -v 'node_modules')" +versions="$(ls -d -- */ | grep -v 'node_modules' | grep -v 'plugins')" for version in $versions do @@ -57,10 +57,10 @@ weight: 304 --options.sortPropsAlphabetically \ --options.menuToggle \ --options.hideHostname \ + --options.noAutoAuth \ --templateOptions.version="$version" \ --templateOptions.titleVersion="$titleVersion" \ - # Use Redoc to generate the v1 compatibility API html npm_config_yes=true npx $redocCLI bundle $version/swaggerV1Compat.yml \ -t template.hbs \ @@ -72,7 +72,6 @@ weight: 304 --templateOptions.titleVersion="$titleVersion" \ --output=redoc-static-v1-compat.html \ - # Create temp file with frontmatter and Redoc html echo "$v2frontmatter" >> $version.tmp echo "$v1frontmatter" >> $version-v1-compat.tmp diff --git a/api-docs/plugins/decorators/replace-servers-url.js b/api-docs/plugins/decorators/replace-servers-url.js new file mode 100644 index 000000000..f7ae41bb2 --- /dev/null +++ b/api-docs/plugins/decorators/replace-servers-url.js @@ -0,0 +1,20 @@ +module.exports = ReplaceRootURL; + +/** @type {import('@redocly/openapi-cli').OasDecorator} */ + +/** + * Returns an object with keys in [node type, any, ref]. + * The key instructs openapi when to invoke the key's Visitor object. + * Object key "Server" is an OAS 3.0 node type. + */ +function ReplaceRootURL() { + return { + Operation: { + leave(operation, ctx) { + if(Array.isArray(operation.servers)) { + operation.servers.forEach(server => server.url = server.url === '' ? '/' : server.url); + } + } + } + } +}; diff --git a/api-docs/plugins/decorators/set-servers-url.js b/api-docs/plugins/decorators/set-servers-url.js new file mode 100644 index 000000000..6dae81787 --- /dev/null +++ b/api-docs/plugins/decorators/set-servers-url.js @@ -0,0 +1,21 @@ +module.exports = SetServersURL; + +/** @type {import('@redocly/openapi-cli').OasDecorator} */ + +/** + * Returns an object with keys in [node type, any, ref]. + * The key instructs openapi when to invoke the key's Visitor object. + * Object key "Server" is an OAS 3.0 node type. + */ +function SetServersURL() { + return { + Operation: { + leave(operation, ctx) { + const operations = ['GetRoutes'] + if(operations.includes(operation.operationId)) { + operation.servers = [{url: '/'}]; + } + } + } + } +}; diff --git a/api-docs/plugins/rules/validate-servers-url.js b/api-docs/plugins/rules/validate-servers-url.js new file mode 100644 index 000000000..238c0ca57 --- /dev/null +++ b/api-docs/plugins/rules/validate-servers-url.js @@ -0,0 +1,19 @@ +module.exports = ValidateServersUrl + + /** + * Detects Operations that have servers.url: ''. + */ +/** @type {import('@redocly/openapi-cli').OasRule} */ +function ValidateServersUrl() { + return { + Operation(operation, ctx) { + if(Array.isArray(operation.servers)) { + operation.servers.forEach(server => server.url === '' && + ctx.report({ + message: `operation server has empty url`, + location: ctx.location.child('operationId') + })) + } + } + } +} diff --git a/api-docs/plugins/servers-plugin.js b/api-docs/plugins/servers-plugin.js new file mode 100644 index 000000000..d308d7339 --- /dev/null +++ b/api-docs/plugins/servers-plugin.js @@ -0,0 +1,28 @@ +const ReplaceServersUrl = require('./decorators/replace-servers-url'); +const SetServersUrl = require('./decorators/set-servers-url'); +const ValidateServersUrl = require('./rules/validate-servers-url'); +const id = 'servers'; + +/** @type {import('@redocly/openapi-cli').CustomRulesConfig} */ +const rules = { + oas3: { + 'validate-servers-url': ValidateServersUrl + } +} + +/** @type {import('@redocly/openapi-cli').CustomRulesConfig} */ +const decorators = { + oas3: { + 'replace-servers-url': ReplaceServersUrl, + 'set-servers-url': SetServersUrl + } +}; + +module.exports = { + id, + configs: { + all: {rules, decorators}, + }, + rules, + decorators +}; diff --git a/api-docs/redoc-static.html b/api-docs/redoc-static.html new file mode 100644 index 000000000..d9926085b --- /dev/null +++ b/api-docs/redoc-static.html @@ -0,0 +1,2312 @@ + + + + + + Influx Cloud API Service + + + + + + + + + +

Influx Cloud API Service (2.0.1)

Download OpenAPI specification:Download

The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the /api/v2/ endpoint.

+

Authentication

TokenAuth

InfluxDB API tokens ensure secure interaction between users and data. A token belongs to an organization and identifies InfluxDB permissions within the organization.

+

Include your API token in an Authentication: Token YOUR_API_TOKEN HTTP header with each request.

+

Example

+

curl https://us-east-1-1.aws.cloud2.influxdata.com/ + --header "Authentication: Token YOUR_API_TOKEN"

+

For more information and examples, see the following:

+ +
Security Scheme Type HTTP
HTTP Authorization Scheme token

BasicAuth

Use Basic authentication with clients that support the InfluxDB 1.x convention of username and password (that don't support the Authorization: Token scheme):

+
    +
  • username: InfluxDB Cloud username
  • +
  • password: InfluxDB Cloud API token
  • +
+

Example

+

curl --get "https://europe-west1-1.gcp.cloud2.influxdata.com/query" + --user "YOUR_USERNAME":"YOUR_TOKEN_OR_PASSWORD"

+

For more information and examples, see how to authenticate with a username and password scheme.

+
Security Scheme Type HTTP
HTTP Authorization Scheme basic

QuerystringAuth

Use InfluxDB 1.x API parameters to provide credentials through the query string.

+

Username and password schemes require the following credentials:

+
    +
  • username: InfluxDB Cloud username
  • +
  • password: InfluxDB Cloud API token
  • +
+

Example

+

curl --get "https://europe-west1-1.gcp.cloud2.influxdata.com/query" + --data-urlencode "u=YOUR_USERNAME" + --data-urlencode "p=YOUR_TOKEN_OR_PASSWORD"

+

For more information and examples, see how to authenticate with a username and password scheme.

+
Security Scheme Type API Key
Query parameter name: u=&p=

Authentication

Use one of the following schemes to authenticate to the InfluxDB API:

+ +

TokenAuth

InfluxDB API tokens ensure secure interaction between users and data. A token belongs to an organization and identifies InfluxDB permissions within the organization.

+

Include your API token in an Authentication: Token YOUR_API_TOKEN HTTP header with each request.

+

Example

+

curl https://us-east-1-1.aws.cloud2.influxdata.com/ + --header "Authentication: Token YOUR_API_TOKEN"

+

For more information and examples, see the following:

+ +
Security Scheme Type HTTP
HTTP Authorization Scheme token

BasicAuth

Use Basic authentication with clients that support the InfluxDB 1.x convention of username and password (that don't support the Authorization: Token scheme):

+
    +
  • username: InfluxDB Cloud username
  • +
  • password: InfluxDB Cloud API token
  • +
+

Example

+

curl --get "https://europe-west1-1.gcp.cloud2.influxdata.com/query" + --user "YOUR_USERNAME":"YOUR_TOKEN_OR_PASSWORD"

+

For more information and examples, see how to authenticate with a username and password scheme.

+
Security Scheme Type HTTP
HTTP Authorization Scheme basic

QuerystringAuth

Use InfluxDB 1.x API parameters to provide credentials through the query string.

+

Username and password schemes require the following credentials:

+
    +
  • username: InfluxDB Cloud username
  • +
  • password: InfluxDB Cloud API token
  • +
+

Example

+

curl --get "https://europe-west1-1.gcp.cloud2.influxdata.com/query" + --data-urlencode "u=YOUR_USERNAME" + --data-urlencode "p=YOUR_TOKEN_OR_PASSWORD"

+

For more information and examples, see how to authenticate with a username and password scheme.

+
Security Scheme Type API Key
Query parameter name: u=&p=

Write

Write time series data to buckets.

+

Write data

Writes data to a bucket.

+

To write data into InfluxDB, you need the following:

+ +

For more information and examples, see Write data with the InfluxDB API.

+
query Parameters
org
required
string

The parameter value specifies the destination organization for writes. The database writes all points in the batch to this organization. If you provide both orgID and org parameters, org takes precedence.

+
orgID
string

The parameter value specifies the ID of the destination organization for writes. If both orgID and org are specified, org takes precedence.

+
bucket
required
string

The destination bucket for writes.

+
precision
string (WritePrecision)
Enum: "ms" "s" "us" "ns"

The precision for the unix timestamps within the body line-protocol.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, the header value tells the database that compression is applied to the line protocol in the request body.

+
Content-Type
string
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8" "application/vnd.influx.arrow"

The header value indicates the format of the data in the request body.

+
Content-Length
integer

The header value indicates the size of the entity-body, in bytes, sent to the database. If the length is greater than the database's max body configuration option, the server responds with status code 413.

+
Accept
string
Default: application/json
Value: "application/json"

The header value specifies the response format.

+
Request Body schema: text/plain

Data in line protocol format.

+
string <byte>

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string",
  • "line": 0
}

Query

Retrieve data, analyze queries, and get query suggestions.

+

Generate an Abstract Syntax Tree (AST) from a query

Analyzes flux query and generates a query specification.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Content-Type
string
Value: "application/json"
Request Body schema: application/json

Analyzed Flux query to generate abstract syntax tree.

+
query
required
string

Flux query script to be analyzed

+

Responses

Request samples

Content type
application/json
{
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "ast": {
    }
}

Retrieve query suggestions

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "funcs": [
    ]
}

Retrieve query suggestions for a branching suggestion

path Parameters
name
required
string

The name of the branching suggestion.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "params": {
    }
}

Analyze an InfluxQL or Flux query

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Content-Type
string
Value: "application/json"
Request Body schema: application/json

Flux or InfluxQL query to analyze

+
object (File)

Represents a source from a single file

+
query
required
string

Query script to execute.

+
type
string
Value: "flux"

The type of query. Must be "flux".

+
object

Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both)

+
object (Dialect)

Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions

+
now
string <date-time>

Specifies the time that should be reported as "now" in the query. Default is the server's now time.

+

Responses

Request samples

Content type
application/json
{
  • "extern": {
    },
  • "query": "string",
  • "type": "flux",
  • "params": { },
  • "dialect": {
    },
  • "now": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Query data

Retrieves data from InfluxDB buckets.

+

To query data, you need the following:

+ +

For more information and examples, see Query with the InfluxDB API.

+
query Parameters
org
string

Specifies the name of the organization executing the query. Takes either the ID or Name. If both orgID and org are specified, org takes precedence.

+
orgID
string

Specifies the ID of the organization executing the query. If both orgID and org are specified, org takes precedence.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.

+
Content-Type
string
Enum: "application/json" "application/vnd.flux"
Request Body schema:

Flux query or specification to execute

+
One of
object (File)

Represents a source from a single file

+
query
required
string

Query script to execute.

+
type
string
Value: "flux"

The type of query. Must be "flux".

+
object

Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both)

+
object (Dialect)

Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions

+
now
string <date-time>

Specifies the time that should be reported as "now" in the query. Default is the server's now time.

+

Responses

Request samples

Content type
Example
{
  • "extern": {
    },
  • "query": "string",
  • "type": "flux",
  • "params": { },
  • "dialect": {
    },
  • "now": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Buckets

List all buckets

query Parameters
offset
integer >= 0
limit
integer [ 1 .. 100 ]
Default: 20
after
string

The last resource ID from which to seek from (but not including). This is to be used instead of offset.

+
org
string

The name of the organization.

+
orgID
string

The organization ID.

+
name
string

Only returns buckets with a specific name.

+
id
string

Only returns buckets with a specific ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "buckets": [
    ]
}

Create a bucket

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Bucket to create

+
orgID
required
string
name
required
string
description
string
rp
string
required
Array of objects (RetentionRules)

Rules to expire or retain data. No rules means data never expires.

+
schemaType
string (SchemaType)
Enum: "implicit" "explicit"

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "rp": "string",
  • "retentionRules": [
    ],
  • "schemaType": "implicit"
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "type": "user",
  • "name": "string",
  • "description": "string",
  • "orgID": "string",
  • "rp": "string",
  • "schemaType": "implicit",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "retentionRules": [
    ],
  • "labels": [
    ]
}

Retrieve a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "type": "user",
  • "name": "string",
  • "description": "string",
  • "orgID": "string",
  • "rp": "string",
  • "schemaType": "implicit",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "retentionRules": [
    ],
  • "labels": [
    ]
}

Update a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Bucket update to apply

+
name
string
description
string
Array of objects (PatchRetentionRules)

Updates to rules to expire or retain data. No rules means no updates.

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "retentionRules": [
    ]
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "type": "user",
  • "name": "string",
  • "description": "string",
  • "orgID": "string",
  • "rp": "string",
  • "schemaType": "implicit",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "retentionRules": [
    ],
  • "labels": [
    ]
}

Delete a bucket

path Parameters
bucketID
required
string

The ID of the bucket to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all labels for a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all users with member privileges for a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from a bucket

path Parameters
userID
required
string

The ID of the member to remove.

+
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all owners of a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from a bucket

path Parameters
userID
required
string

The ID of the owner to remove.

+
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Dashboards

Retrieve a Dashboard

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
query Parameters
include
string
Value: "properties"

Includes the cell view properties in the response if set to properties

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
Example
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

Update a dashboard

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Patching of a dashboard

+
name
string

optional, when provided will replace the name

+
description
string

optional, when provided will replace the description

+
object (CellWithViewProperties)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "cells": {
    }
}

Response samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

Delete a dashboard

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Replace cells in a dashboard

Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.

+
path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
Array ()
id
string
object
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>
viewID
string

The reference to a view from the views API.

+

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

Create a dashboard cell

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Cell that will be added

+
name
string
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>
usingView
string

Makes a copy of the provided view.

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "usingView": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "viewID": "string"
}

Update the non-positional information related to a cell

Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.

+
path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
cellID
required
string

The ID of the cell to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "viewID": "string"
}

Delete a dashboard cell

path Parameters
dashboardID
required
string

The ID of the dashboard to delete.

+
cellID
required
string

The ID of the cell to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Retrieve the view for a cell

path Parameters
dashboardID
required
string

The dashboard ID.

+
cellID
required
string

The cell ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "properties": {
    }
}

Update the view for a cell

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
cellID
required
string

The ID of the cell to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
name
required
string
required
LinePlusSingleStatProperties (object) or XYViewProperties (object) or SingleStatViewProperties (object) or HistogramViewProperties (object) or GaugeViewProperties (object) or TableViewProperties (object) or SimpleTableViewProperties (object) or MarkdownViewProperties (object) or CheckViewProperties (object) or ScatterViewProperties (object) or HeatmapViewProperties (object) or MosaicViewProperties (object) or BandViewProperties (object) or GeoViewProperties (object) (ViewProperties)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "properties": {
    }
}

List all labels for a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all dashboard members

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from a dashboard

path Parameters
userID
required
string

The ID of the member to remove.

+
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all dashboard owners

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from a dashboard

path Parameters
userID
required
string

The ID of the owner to remove.

+
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Create a dashboard

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Dashboard to create

+
orgID
required
string

The ID of the organization that owns the dashboard.

+
name
required
string

The user-facing name of the dashboard.

+
description
string

The user-facing description of the dashboard.

+

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
Example
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

List all dashboards

query Parameters
offset
integer >= 0
descending
boolean
Default: false
limit
integer [ -1 .. 100 ]
Default: 20

The non-zero number of dashboards to return

+
owner
string

A user identifier. Returns only dashboards where this user has the owner role.

+
sortBy
string
Enum: "ID" "CreatedAt" "UpdatedAt"

The column to sort by.

+
id
Array of strings

A list of dashboard identifiers. Returns only the listed dashboards. If both id and owner are specified, only id is used.

+
orgID
string

The identifier of the organization.

+
org
string

The name of the organization.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "dashboards": [
    ]
}

Tasks

Retrieve a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "orgID": "string",
  • "org": "string",
  • "name": "string",
  • "ownerID": "string",
  • "description": "string",
  • "status": "active",
  • "labels": [
    ],
  • "authorizationID": "string",
  • "flux": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Update a task

Update a task. This will cancel all queued runs.

+
path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Task update to apply

+
status
string (TaskStatusType)
Enum: "active" "inactive"
flux
string

The Flux script to run for this task.

+
name
string

Override the 'name' option in the flux script.

+
every
string

Override the 'every' option in the flux script.

+
cron
string

Override the 'cron' option in the flux script.

+
offset
string

Override the 'offset' option in the flux script.

+
description
string

An optional description of the task.

+

Responses

Request samples

Content type
application/json
{
  • "status": "active",
  • "flux": "string",
  • "name": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "orgID": "string",
  • "org": "string",
  • "name": "string",
  • "ownerID": "string",
  • "description": "string",
  • "status": "active",
  • "labels": [
    ],
  • "authorizationID": "string",
  • "flux": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Delete a task

Deletes a task and all associated records

+
path Parameters
taskID
required
string

The ID of the task to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List runs for a task

path Parameters
taskID
required
string

The ID of the task to get runs for.

+
query Parameters
after
string

Returns runs after a specific ID.

+
limit
integer [ 1 .. 500 ]
Default: 100

The number of runs to return

+
afterTime
string <date-time>

Filter runs to those scheduled after this time, RFC3339

+
beforeTime
string <date-time>

Filter runs to those scheduled before this time, RFC3339

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "runs": [
    ]
}

Manually start a task run, overriding the current schedule

path Parameters
taskID
required
string
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
scheduledFor
string <date-time> Nullable

Time used for run's "now" option, RFC3339. Default is the server's now time.

+

Responses

Request samples

Content type
application/json
{
  • "scheduledFor": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "taskID": "string",
  • "status": "scheduled",
  • "scheduledFor": "2019-08-24T14:15:22Z",
  • "log": [
    ],
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Retrieve a single run for a task

path Parameters
taskID
required
string

The task ID.

+
runID
required
string

The run ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "taskID": "string",
  • "status": "scheduled",
  • "scheduledFor": "2019-08-24T14:15:22Z",
  • "log": [
    ],
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Cancel a running task

path Parameters
taskID
required
string

The task ID.

+
runID
required
string

The run ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Retry a task run

path Parameters
taskID
required
string

The task ID.

+
runID
required
string

The run ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json; charset=utf-8
object

Responses

Request samples

Content type
application/json; charset=utf-8
{ }

Response samples

Content type
application/json
{
  • "id": "string",
  • "taskID": "string",
  • "status": "scheduled",
  • "scheduledFor": "2019-08-24T14:15:22Z",
  • "log": [
    ],
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Retrieve all logs for a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}

Retrieve all logs for a run

path Parameters
taskID
required
string

ID of task to get logs for.

+
runID
required
string

ID of run to get logs for.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}

List all labels for a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a task

path Parameters
taskID
required
string

The task ID.

+
labelID
required
string

The label ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all task members

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from a task

path Parameters
userID
required
string

The ID of the member to remove.

+
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all owners of a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from a task

path Parameters
userID
required
string

The ID of the owner to remove.

+
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all tasks

query Parameters
name
string

Returns task with a specific name.

+
after
string

Return tasks after a specified ID.

+
user
string

Filter tasks to a specific user ID.

+
org
string

Filter tasks to a specific organization name.

+
orgID
string

Filter tasks to a specific organization ID.

+
status
string
Enum: "active" "inactive"

Filter tasks by a status--"inactive" or "active".

+
limit
integer [ -1 .. 500 ]
Default: 100

The non-zero number of tasks to return

+
type
string
Default: ""
Enum: "basic" "system"

Type of task, unset by default.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "tasks": [
    ]
}

Create a new task

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Task to create

+
orgID
string

The ID of the organization that owns this Task.

+
org
string

The name of the organization that owns this Task.

+
status
string (TaskStatusType)
Enum: "active" "inactive"
flux
required
string

The Flux script to run for this task.

+
description
string

An optional description of the task.

+

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "org": "string",
  • "status": "active",
  • "flux": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "orgID": "string",
  • "org": "string",
  • "name": "string",
  • "ownerID": "string",
  • "description": "string",
  • "status": "active",
  • "labels": [
    ],
  • "authorizationID": "string",
  • "flux": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Authorizations

Create and manage API tokens. An authorization associates a list of permissions to an organization and provides a token for API access. To assign a token to a specific user, scope the authorization to the user ID.

+

List all authorizations

query Parameters
userID
string

Only show authorizations that belong to a user ID.

+
user
string

Only show authorizations that belong to a user name.

+
orgID
string

Only show authorizations that belong to an organization ID.

+
org
string

Only show authorizations that belong to a organization name.

+
token
string

Find a token by value.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "authorizations": [
    ]
}

Create an authorization

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Authorization to create

+
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the token is inactive and requests using the token will be rejected.

+
description
string

A description of the token.

+
orgID
required
string

ID of org that authorization is scoped to.

+
required
Array of objects (Permission) non-empty

List of permissions for an auth. An auth must have at least one Permission.

+

Responses

Request samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "orgID": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgID": "string",
  • "permissions": [
    ],
  • "id": "string",
  • "token": "string",
  • "userID": "string",
  • "user": "string",
  • "org": "string",
  • "links": {
    }
}

Retrieve an authorization

path Parameters
authID
required
string

The identifier of the authorization to get.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgID": "string",
  • "permissions": [
    ],
  • "id": "string",
  • "token": "string",
  • "userID": "string",
  • "user": "string",
  • "org": "string",
  • "links": {
    }
}

Update authorization status

Update an authorization's status to active or inactive.

+
path Parameters
authID
required
string

The identifier of the authorization to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

The updated Authorization object.

+
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the token is inactive and requests using the token will be rejected.

+
description
string

A description of the token.

+

Responses

Request samples

Content type
application/json
{
  • "status": "active",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgID": "string",
  • "permissions": [
    ],
  • "id": "string",
  • "token": "string",
  • "userID": "string",
  • "user": "string",
  • "org": "string",
  • "links": {
    }
}

Delete an authorization

path Parameters
authID
required
string

The identifier of the authorization to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Organizations

List all organizations

query Parameters
offset
integer >= 0
limit
integer [ 1 .. 100 ]
Default: 20
descending
boolean
Default: false
org
string

Filter organizations to a specific organization name.

+
orgID
string

Filter organizations to a specific organization ID.

+
userID
string

Filter organizations to a specific user ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "orgs": [
    ]
}

Create an organization

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Organization to create

+
name
required
string
description
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active"
}

Retrieve an organization

path Parameters
orgID
required
string

The ID of the organization to get.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active"
}

Update an organization

path Parameters
orgID
required
string

The ID of the organization to get.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Organization update to apply

+
name
string

New name to set on the organization

+
description
string

New description to set on the organization

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active"
}

Delete an organization

path Parameters
orgID
required
string

The ID of the organization to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all members of an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from an organization

path Parameters
userID
required
string

The ID of the member to remove.

+
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all owners of an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from an organization

path Parameters
userID
required
string

The ID of the owner to remove.

+
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Users

Return the feature flags for the currently authenticated user

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{ }

Retrieve the currently authenticated user

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Update a password

Authorizations:
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

New password

+
password
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Update a password

Authorizations:
path Parameters
userID
required
string

The user ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

New password

+
password
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all users

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Create a user

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to create

+
oauthID
string
name
required
string
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the user is inactive.

+
role
string
Enum: "owner" "member"
org_id
string

Responses

Request samples

Content type
application/json
{
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "role": "owner",
  • "org_id": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Retrieve a user

path Parameters
userID
required
string

The user ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Update a user

path Parameters
userID
required
string

The ID of the user to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User update to apply

+
oauthID
string
name
required
string
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the user is inactive.

+
role
string
Enum: "owner" "member"
org_id
string

Responses

Request samples

Content type
application/json
{
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "role": "owner",
  • "org_id": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Delete a user

path Parameters
userID
required
string

The ID of the user to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Ping

Checks the status of InfluxDB instance and version of InfluxDB.

Responses

Checks the status of InfluxDB instance and version of InfluxDB.

Responses

Routes

List all top level routes

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Authorizations

Create and manage API tokens. An authorization associates a list of permissions to an organization and provides a token for API access. To assign a token to a specific user, scope the authorization to the user ID.

+

List all authorizations

query Parameters
userID
string

Only show authorizations that belong to a user ID.

+
user
string

Only show authorizations that belong to a user name.

+
orgID
string

Only show authorizations that belong to an organization ID.

+
org
string

Only show authorizations that belong to a organization name.

+
token
string

Find a token by value.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "authorizations": [
    ]
}

Create an authorization

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Authorization to create

+
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the token is inactive and requests using the token will be rejected.

+
description
string

A description of the token.

+
orgID
required
string

ID of org that authorization is scoped to.

+
required
Array of objects (Permission) non-empty

List of permissions for an auth. An auth must have at least one Permission.

+

Responses

Request samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "orgID": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgID": "string",
  • "permissions": [
    ],
  • "id": "string",
  • "token": "string",
  • "userID": "string",
  • "user": "string",
  • "org": "string",
  • "links": {
    }
}

Retrieve an authorization

path Parameters
authID
required
string

The identifier of the authorization to get.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgID": "string",
  • "permissions": [
    ],
  • "id": "string",
  • "token": "string",
  • "userID": "string",
  • "user": "string",
  • "org": "string",
  • "links": {
    }
}

Update authorization status

Update an authorization's status to active or inactive.

+
path Parameters
authID
required
string

The identifier of the authorization to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

The updated Authorization object.

+
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the token is inactive and requests using the token will be rejected.

+
description
string

A description of the token.

+

Responses

Request samples

Content type
application/json
{
  • "status": "active",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "status": "active",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgID": "string",
  • "permissions": [
    ],
  • "id": "string",
  • "token": "string",
  • "userID": "string",
  • "user": "string",
  • "org": "string",
  • "links": {
    }
}

Delete an authorization

path Parameters
authID
required
string

The identifier of the authorization to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Buckets

List all buckets

query Parameters
offset
integer >= 0
limit
integer [ 1 .. 100 ]
Default: 20
after
string

The last resource ID from which to seek from (but not including). This is to be used instead of offset.

+
org
string

The name of the organization.

+
orgID
string

The organization ID.

+
name
string

Only returns buckets with a specific name.

+
id
string

Only returns buckets with a specific ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "buckets": [
    ]
}

Create a bucket

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Bucket to create

+
orgID
required
string
name
required
string
description
string
rp
string
required
Array of objects (RetentionRules)

Rules to expire or retain data. No rules means data never expires.

+
schemaType
string (SchemaType)
Enum: "implicit" "explicit"

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "rp": "string",
  • "retentionRules": [
    ],
  • "schemaType": "implicit"
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "type": "user",
  • "name": "string",
  • "description": "string",
  • "orgID": "string",
  • "rp": "string",
  • "schemaType": "implicit",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "retentionRules": [
    ],
  • "labels": [
    ]
}

Retrieve a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "type": "user",
  • "name": "string",
  • "description": "string",
  • "orgID": "string",
  • "rp": "string",
  • "schemaType": "implicit",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "retentionRules": [
    ],
  • "labels": [
    ]
}

Update a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Bucket update to apply

+
name
string
description
string
Array of objects (PatchRetentionRules)

Updates to rules to expire or retain data. No rules means no updates.

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "retentionRules": [
    ]
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "type": "user",
  • "name": "string",
  • "description": "string",
  • "orgID": "string",
  • "rp": "string",
  • "schemaType": "implicit",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "retentionRules": [
    ],
  • "labels": [
    ]
}

Delete a bucket

path Parameters
bucketID
required
string

The ID of the bucket to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all labels for a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all users with member privileges for a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from a bucket

path Parameters
userID
required
string

The ID of the member to remove.

+
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all owners of a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a bucket

path Parameters
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from a bucket

path Parameters
userID
required
string

The ID of the owner to remove.

+
bucketID
required
string

The bucket ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Cells

Replace cells in a dashboard

Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.

+
path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
Array ()
id
string
object
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>
viewID
string

The reference to a view from the views API.

+

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

Create a dashboard cell

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Cell that will be added

+
name
string
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>
usingView
string

Makes a copy of the provided view.

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "usingView": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "viewID": "string"
}

Update the non-positional information related to a cell

Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.

+
path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
cellID
required
string

The ID of the cell to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "viewID": "string"
}

Delete a dashboard cell

path Parameters
dashboardID
required
string

The ID of the dashboard to delete.

+
cellID
required
string

The ID of the cell to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Retrieve the view for a cell

path Parameters
dashboardID
required
string

The dashboard ID.

+
cellID
required
string

The cell ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "properties": {
    }
}

Update the view for a cell

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
cellID
required
string

The ID of the cell to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
name
required
string
required
LinePlusSingleStatProperties (object) or XYViewProperties (object) or SingleStatViewProperties (object) or HistogramViewProperties (object) or GaugeViewProperties (object) or TableViewProperties (object) or SimpleTableViewProperties (object) or MarkdownViewProperties (object) or CheckViewProperties (object) or ScatterViewProperties (object) or HeatmapViewProperties (object) or MosaicViewProperties (object) or BandViewProperties (object) or GeoViewProperties (object) (ViewProperties)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "properties": {
    }
}

Checks

List all checks

query Parameters
offset
integer >= 0
limit
integer [ 1 .. 100 ]
Default: 20
orgID
required
string

Only show checks that belong to a specific organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "checks": [
    ],
  • "links": {}
}

Add new check

Request Body schema: application/json

Check to create

+
name
required
string
orgID
required
string

The ID of the organization that owns this check.

+
taskID
string

The ID of the task associated with this check.

+
required
object (DashboardQuery)
status
string (TaskStatusType)
Enum: "active" "inactive"
description
string

An optional description of the check.

+
Array of objects (Labels)
type
required
string
timeSince
string

String duration before deadman triggers.

+
staleTime
string

String duration for time that a series is considered stale and should not trigger deadman.

+
reportZero
boolean

If only zero values reported since time, trigger an alert

+
level
string (CheckStatusLevel)
Enum: "UNKNOWN" "OK" "INFO" "CRIT" "WARN"

The state to record if check matches a criteria.

+
every
string

Check repetition interval.

+
offset
string

Duration to delay after the schedule, before executing check.

+
Array of objects

List of tags to write to each status.

+
statusMessageTemplate
string

The template used to generate and write a status message.

+

Responses

Request samples

Content type
application/json
Example
{
  • "name": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "query": {
    },
  • "status": "active",
  • "description": "string",
  • "labels": [
    ],
  • "type": "deadman",
  • "timeSince": "string",
  • "staleTime": "string",
  • "reportZero": true,
  • "level": "UNKNOWN",
  • "every": "string",
  • "offset": "string",
  • "tags": [
    ],
  • "statusMessageTemplate": "string"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "query": {
    },
  • "status": "active",
  • "description": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "deadman",
  • "timeSince": "string",
  • "staleTime": "string",
  • "reportZero": true,
  • "level": "UNKNOWN",
  • "every": "string",
  • "offset": "string",
  • "tags": [
    ],
  • "statusMessageTemplate": "string"
}

Retrieve a check

path Parameters
checkID
required
string

The check ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "query": {
    },
  • "status": "active",
  • "description": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "deadman",
  • "timeSince": "string",
  • "staleTime": "string",
  • "reportZero": true,
  • "level": "UNKNOWN",
  • "every": "string",
  • "offset": "string",
  • "tags": [
    ],
  • "statusMessageTemplate": "string"
}

Update a check

path Parameters
checkID
required
string

The check ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Check update to apply

+
name
required
string
orgID
required
string

The ID of the organization that owns this check.

+
taskID
string

The ID of the task associated with this check.

+
required
object (DashboardQuery)
status
string (TaskStatusType)
Enum: "active" "inactive"
description
string

An optional description of the check.

+
Array of objects (Labels)
type
required
string
timeSince
string

String duration before deadman triggers.

+
staleTime
string

String duration for time that a series is considered stale and should not trigger deadman.

+
reportZero
boolean

If only zero values reported since time, trigger an alert

+
level
string (CheckStatusLevel)
Enum: "UNKNOWN" "OK" "INFO" "CRIT" "WARN"

The state to record if check matches a criteria.

+
every
string

Check repetition interval.

+
offset
string

Duration to delay after the schedule, before executing check.

+
Array of objects

List of tags to write to each status.

+
statusMessageTemplate
string

The template used to generate and write a status message.

+

Responses

Request samples

Content type
application/json
Example
{
  • "name": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "query": {
    },
  • "status": "active",
  • "description": "string",
  • "labels": [
    ],
  • "type": "deadman",
  • "timeSince": "string",
  • "staleTime": "string",
  • "reportZero": true,
  • "level": "UNKNOWN",
  • "every": "string",
  • "offset": "string",
  • "tags": [
    ],
  • "statusMessageTemplate": "string"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "query": {
    },
  • "status": "active",
  • "description": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "deadman",
  • "timeSince": "string",
  • "staleTime": "string",
  • "reportZero": true,
  • "level": "UNKNOWN",
  • "every": "string",
  • "offset": "string",
  • "tags": [
    ],
  • "statusMessageTemplate": "string"
}

Update a check

path Parameters
checkID
required
string

The check ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Check update to apply

+
name
string
description
string
status
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "status": "active"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "query": {
    },
  • "status": "active",
  • "description": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "deadman",
  • "timeSince": "string",
  • "staleTime": "string",
  • "reportZero": true,
  • "level": "UNKNOWN",
  • "every": "string",
  • "offset": "string",
  • "tags": [
    ],
  • "statusMessageTemplate": "string"
}

Delete a check

path Parameters
checkID
required
string

The check ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all labels for a check

path Parameters
checkID
required
string

The check ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a check

path Parameters
checkID
required
string

The check ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete label from a check

path Parameters
checkID
required
string

The check ID.

+
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Retrieve a check query

path Parameters
checkID
required
string

The check ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "flux": "string"
}

DBRPs

List database retention policy mappings

query Parameters
orgID
string

Specifies the organization ID to filter on

+
org
string

Specifies the organization name to filter on

+
id
string

Specifies the mapping ID to filter on

+
bucketID
string

Specifies the bucket ID to filter on

+
default
boolean

Specifies filtering on default

+
db
string

Specifies the database to filter on

+
rp
string

Specifies the retention policy to filter on

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a database retention policy mapping

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

The database retention policy mapping to add

+
orgID
string

the organization ID that owns this mapping.

+
org
string

the organization that owns this mapping.

+
bucketID
required
string

the bucket ID used as target for the translation.

+
database
required
string

InfluxDB v1 database

+
retention_policy
required
string

InfluxDB v1 retention policy

+
default
boolean

Specify if this mapping represents the default retention policy for the database specificed.

+

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "org": "string",
  • "bucketID": "string",
  • "database": "string",
  • "retention_policy": "string",
  • "default": true
}

Response samples

Content type
application/json
{}

Retrieve a database retention policy mapping

path Parameters
dbrpID
required
string

The database retention policy mapping ID

+
query Parameters
orgID
string

Specifies the organization ID of the mapping

+
org
string

Specifies the organization name of the mapping

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Update a database retention policy mapping

path Parameters
dbrpID
required
string

The database retention policy mapping.

+
query Parameters
orgID
string

Specifies the organization ID of the mapping

+
org
string

Specifies the organization name of the mapping

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Database retention policy update to apply

+
retention_policy
string

InfluxDB v1 retention policy

+
default
boolean

Responses

Request samples

Content type
application/json
{
  • "retention_policy": "string",
  • "default": true
}

Response samples

Content type
application/json
{}

Delete a database retention policy

path Parameters
dbrpID
required
string

The database retention policy mapping

+
query Parameters
orgID
string

Specifies the organization ID of the mapping

+
org
string

Specifies the organization name of the mapping

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Dashboards

Retrieve a Dashboard

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
query Parameters
include
string
Value: "properties"

Includes the cell view properties in the response if set to properties

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
Example
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

Update a dashboard

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Patching of a dashboard

+
name
string

optional, when provided will replace the name

+
description
string

optional, when provided will replace the description

+
object (CellWithViewProperties)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "cells": {
    }
}

Response samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

Delete a dashboard

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Replace cells in a dashboard

Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.

+
path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
Array ()
id
string
object
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>
viewID
string

The reference to a view from the views API.

+

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

Create a dashboard cell

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Cell that will be added

+
name
string
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>
usingView
string

Makes a copy of the provided view.

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "usingView": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "viewID": "string"
}

Update the non-positional information related to a cell

Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.

+
path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
cellID
required
string

The ID of the cell to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
x
integer <int32>
y
integer <int32>
w
integer <int32>
h
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "x": 0,
  • "y": 0,
  • "w": 0,
  • "h": 0,
  • "viewID": "string"
}

Delete a dashboard cell

path Parameters
dashboardID
required
string

The ID of the dashboard to delete.

+
cellID
required
string

The ID of the cell to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Retrieve the view for a cell

path Parameters
dashboardID
required
string

The dashboard ID.

+
cellID
required
string

The cell ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "properties": {
    }
}

Update the view for a cell

path Parameters
dashboardID
required
string

The ID of the dashboard to update.

+
cellID
required
string

The ID of the cell to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
name
required
string
required
LinePlusSingleStatProperties (object) or XYViewProperties (object) or SingleStatViewProperties (object) or HistogramViewProperties (object) or GaugeViewProperties (object) or TableViewProperties (object) or SimpleTableViewProperties (object) or MarkdownViewProperties (object) or CheckViewProperties (object) or ScatterViewProperties (object) or HeatmapViewProperties (object) or MosaicViewProperties (object) or BandViewProperties (object) or GeoViewProperties (object) (ViewProperties)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "properties": {
    }
}

List all labels for a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all dashboard members

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from a dashboard

path Parameters
userID
required
string

The ID of the member to remove.

+
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all dashboard owners

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a dashboard

path Parameters
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from a dashboard

path Parameters
userID
required
string

The ID of the owner to remove.

+
dashboardID
required
string

The dashboard ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Create a dashboard

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Dashboard to create

+
orgID
required
string

The ID of the organization that owns the dashboard.

+
name
required
string

The user-facing name of the dashboard.

+
description
string

The user-facing description of the dashboard.

+

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
Example
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "links": {
    },
  • "id": "string",
  • "meta": {
    },
  • "cells": [
    ],
  • "labels": [
    ]
}

List all dashboards

query Parameters
offset
integer >= 0
descending
boolean
Default: false
limit
integer [ -1 .. 100 ]
Default: 20

The non-zero number of dashboards to return

+
owner
string

A user identifier. Returns only dashboards where this user has the owner role.

+
sortBy
string
Enum: "ID" "CreatedAt" "UpdatedAt"

The column to sort by.

+
id
Array of strings

A list of dashboard identifiers. Returns only the listed dashboards. If both id and owner are specified, only id is used.

+
orgID
string

The identifier of the organization.

+
org
string

The name of the organization.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "dashboards": [
    ]
}

Delete

Delete data

query Parameters
org
string

Specifies the organization to delete data from.

+
bucket
string

Specifies the bucket to delete data from.

+
orgID
string

Specifies the organization ID of the resource.

+
bucketID
string

Specifies the bucket ID to delete data from.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Deletes data from an InfluxDB bucket.

+
start
required
string <date-time>

RFC3339Nano

+
stop
required
string <date-time>

RFC3339Nano

+
predicate
string

InfluxQL-like delete statement

+

Responses

Request samples

Content type
application/json
{
  • "start": "2019-08-24T14:15:22Z",
  • "stop": "2019-08-24T14:15:22Z",
  • "predicate": "tag1=\"value1\" and (tag2=\"value2\" and tag3!=\"value3\")"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

DemoDataBuckets

List of Demo Data Buckets

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "buckets": [
    ]
}

List of Demo Data Buckets

path Parameters
bucketID
required
string

bucket id

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List of Demo Data Buckets

path Parameters
bucketID
required
string

bucket id

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Labels

Create a label

Request Body schema: application/json

Label to create

+
orgID
required
string
name
required
string
object

Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value.

+

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "properties": {
    }
}

Response samples

Content type
application/json
{}

List all labels

query Parameters
orgID
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Retrieve a label

path Parameters
labelID
required
string

The ID of the label to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Update a label

path Parameters
labelID
required
string

The ID of the label to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label update

+
name
string
object

Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value.

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "properties": {
    }
}

Response samples

Content type
application/json
{}

Delete a label

path Parameters
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Limits

Retrieve limits for an organization

path Parameters
orgID
required
string

The identifier of the organization.

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "limits": {
    }
}

NotificationEndpoints

List all notification endpoints

query Parameters
offset
integer >= 0
limit
integer [ 1 .. 100 ]
Default: 20
orgID
required
string

Only show notification endpoints that belong to specific organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "notificationEndpoints": [
    ],
  • "links": {}
}

Add a notification endpoint

Request Body schema: application/json

Notification endpoint to create

+
id
string
orgID
string
userID
string
description
string

An optional description of the notification endpoint.

+
name
required
string
status
string
Default: "active"
Enum: "active" "inactive"

The status of the endpoint.

+
Array of objects (Labels)
type
required
string (NotificationEndpointType)
url
string

Specifies the URL of the Slack endpoint. Specify either URL or Token.

+
token
string

Specifies the API token string. Specify either URL or Token.

+

Responses

Request samples

Content type
application/json
Example
{
  • "id": "string",
  • "orgID": "string",
  • "userID": "string",
  • "description": "string",
  • "name": "string",
  • "status": "active",
  • "labels": [
    ],
  • "type": "slack",
  • "url": "string",
  • "token": "string"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "orgID": "string",
  • "userID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "name": "string",
  • "status": "active",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "url": "string",
  • "token": "string"
}

Retrieve a notification endpoint

path Parameters
endpointID
required
string

The notification endpoint ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "orgID": "string",
  • "userID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "name": "string",
  • "status": "active",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "url": "string",
  • "token": "string"
}

Update a notification endpoint

path Parameters
endpointID
required
string

The notification endpoint ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

A new notification endpoint to replace the existing endpoint with

+
id
string
orgID
string
userID
string
description
string

An optional description of the notification endpoint.

+
name
required
string
status
string
Default: "active"
Enum: "active" "inactive"

The status of the endpoint.

+
Array of objects (Labels)
type
required
string (NotificationEndpointType)
url
string

Specifies the URL of the Slack endpoint. Specify either URL or Token.

+
token
string

Specifies the API token string. Specify either URL or Token.

+

Responses

Request samples

Content type
application/json
Example
{
  • "id": "string",
  • "orgID": "string",
  • "userID": "string",
  • "description": "string",
  • "name": "string",
  • "status": "active",
  • "labels": [
    ],
  • "type": "slack",
  • "url": "string",
  • "token": "string"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "orgID": "string",
  • "userID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "name": "string",
  • "status": "active",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "url": "string",
  • "token": "string"
}

Update a notification endpoint

path Parameters
endpointID
required
string

The notification endpoint ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Check update to apply

+
name
string
description
string
status
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "status": "active"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "orgID": "string",
  • "userID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "name": "string",
  • "status": "active",
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "url": "string",
  • "token": "string"
}

Delete a notification endpoint

path Parameters
endpointID
required
string

The notification endpoint ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all labels for a notification endpoint

path Parameters
endpointID
required
string

The notification endpoint ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a notification endpoint

path Parameters
endpointID
required
string

The notification endpoint ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a notification endpoint

path Parameters
endpointID
required
string

The notification endpoint ID.

+
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

NotificationRules

List all notification rules

query Parameters
offset
integer >= 0
limit
integer [ 1 .. 100 ]
Default: 20
orgID
required
string

Only show notification rules that belong to a specific organization ID.

+
checkID
string

Only show notifications that belong to the specific check ID.

+
tag
string^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$
Example: tag=env:prod

Only return notification rules that "would match" statuses which contain the tag key value pairs provided.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "notificationRules": [
    ],
  • "links": {}
}

Add a notification rule

Request Body schema: application/json

Notification rule to create

+
endpointID
required
string
orgID
required
string

The ID of the organization that owns this notification rule.

+
taskID
string

The ID of the task associated with this notification rule.

+
status
required
string (TaskStatusType)
Enum: "active" "inactive"
name
required
string

Human-readable name describing the notification rule.

+
sleepUntil
string
every
string

The notification repetition interval.

+
offset
string

Duration to delay after the schedule, before executing check.

+
runbookLink
string
limitEvery
integer

Don't notify me more than times every seconds. If set, limit cannot be empty.

+
limit
integer

Don't notify me more than times every seconds. If set, limitEvery cannot be empty.

+
Array of objects (TagRule)

List of tag rules the notification rule attempts to match.

+
description
string

An optional description of the notification rule.

+
required
Array of objects (StatusRule) non-empty

List of status rules the notification rule attempts to match.

+
Array of objects (Labels)
type
required
string
channel
string
messageTemplate
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "endpointID": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "status": "active",
  • "name": "string",
  • "sleepUntil": "string",
  • "every": "string",
  • "offset": "string",
  • "runbookLink": "string",
  • "limitEvery": 0,
  • "limit": 0,
  • "tagRules": [
    ],
  • "description": "string",
  • "statusRules": [
    ],
  • "labels": [
    ],
  • "type": "slack",
  • "channel": "string",
  • "messageTemplate": "string"
}

Response samples

Content type
application/json
Example
{
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "id": "string",
  • "endpointID": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active",
  • "name": "string",
  • "sleepUntil": "string",
  • "every": "string",
  • "offset": "string",
  • "runbookLink": "string",
  • "limitEvery": 0,
  • "limit": 0,
  • "tagRules": [
    ],
  • "description": "string",
  • "statusRules": [
    ],
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "channel": "string",
  • "messageTemplate": "string"
}

Retrieve a notification rule

path Parameters
ruleID
required
string

The notification rule ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
Example
{
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "id": "string",
  • "endpointID": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active",
  • "name": "string",
  • "sleepUntil": "string",
  • "every": "string",
  • "offset": "string",
  • "runbookLink": "string",
  • "limitEvery": 0,
  • "limit": 0,
  • "tagRules": [
    ],
  • "description": "string",
  • "statusRules": [
    ],
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "channel": "string",
  • "messageTemplate": "string"
}

Update a notification rule

path Parameters
ruleID
required
string

The notification rule ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Notification rule update to apply

+
endpointID
required
string
orgID
required
string

The ID of the organization that owns this notification rule.

+
taskID
string

The ID of the task associated with this notification rule.

+
status
required
string (TaskStatusType)
Enum: "active" "inactive"
name
required
string

Human-readable name describing the notification rule.

+
sleepUntil
string
every
string

The notification repetition interval.

+
offset
string

Duration to delay after the schedule, before executing check.

+
runbookLink
string
limitEvery
integer

Don't notify me more than times every seconds. If set, limit cannot be empty.

+
limit
integer

Don't notify me more than times every seconds. If set, limitEvery cannot be empty.

+
Array of objects (TagRule)

List of tag rules the notification rule attempts to match.

+
description
string

An optional description of the notification rule.

+
required
Array of objects (StatusRule) non-empty

List of status rules the notification rule attempts to match.

+
Array of objects (Labels)
type
required
string
channel
string
messageTemplate
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "endpointID": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "status": "active",
  • "name": "string",
  • "sleepUntil": "string",
  • "every": "string",
  • "offset": "string",
  • "runbookLink": "string",
  • "limitEvery": 0,
  • "limit": 0,
  • "tagRules": [
    ],
  • "description": "string",
  • "statusRules": [
    ],
  • "labels": [
    ],
  • "type": "slack",
  • "channel": "string",
  • "messageTemplate": "string"
}

Response samples

Content type
application/json
Example
{
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "id": "string",
  • "endpointID": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active",
  • "name": "string",
  • "sleepUntil": "string",
  • "every": "string",
  • "offset": "string",
  • "runbookLink": "string",
  • "limitEvery": 0,
  • "limit": 0,
  • "tagRules": [
    ],
  • "description": "string",
  • "statusRules": [
    ],
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "channel": "string",
  • "messageTemplate": "string"
}

Update a notification rule

path Parameters
ruleID
required
string

The notification rule ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Notification rule update to apply

+
name
string
description
string
status
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "status": "active"
}

Response samples

Content type
application/json
Example
{
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "id": "string",
  • "endpointID": "string",
  • "orgID": "string",
  • "taskID": "string",
  • "ownerID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active",
  • "name": "string",
  • "sleepUntil": "string",
  • "every": "string",
  • "offset": "string",
  • "runbookLink": "string",
  • "limitEvery": 0,
  • "limit": 0,
  • "tagRules": [
    ],
  • "description": "string",
  • "statusRules": [
    ],
  • "labels": [
    ],
  • "links": {
    },
  • "type": "slack",
  • "channel": "string",
  • "messageTemplate": "string"
}

Delete a notification rule

path Parameters
ruleID
required
string

The notification rule ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all labels for a notification rule

path Parameters
ruleID
required
string

The notification rule ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a notification rule

path Parameters
ruleID
required
string

The notification rule ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete label from a notification rule

path Parameters
ruleID
required
string

The notification rule ID.

+
labelID
required
string

The ID of the label to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Organizations

List all organizations

query Parameters
offset
integer >= 0
limit
integer [ 1 .. 100 ]
Default: 20
descending
boolean
Default: false
org
string

Filter organizations to a specific organization name.

+
orgID
string

Filter organizations to a specific organization ID.

+
userID
string

Filter organizations to a specific user ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "orgs": [
    ]
}

Create an organization

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Organization to create

+
name
required
string
description
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active"
}

Retrieve an organization

path Parameters
orgID
required
string

The ID of the organization to get.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active"
}

Update an organization

path Parameters
orgID
required
string

The ID of the organization to get.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Organization update to apply

+
name
string

New name to set on the organization

+
description
string

New description to set on the organization

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "links": {
    },
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "active"
}

Delete an organization

path Parameters
orgID
required
string

The ID of the organization to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all members of an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from an organization

path Parameters
userID
required
string

The ID of the member to remove.

+
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all owners of an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from an organization

path Parameters
userID
required
string

The ID of the owner to remove.

+
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Ping

Checks the status of InfluxDB instance and version of InfluxDB.

Responses

Checks the status of InfluxDB instance and version of InfluxDB.

Responses

Query

Retrieve data, analyze queries, and get query suggestions.

+

Generate an Abstract Syntax Tree (AST) from a query

Analyzes flux query and generates a query specification.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Content-Type
string
Value: "application/json"
Request Body schema: application/json

Analyzed Flux query to generate abstract syntax tree.

+
query
required
string

Flux query script to be analyzed

+

Responses

Request samples

Content type
application/json
{
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "ast": {
    }
}

Retrieve query suggestions

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "funcs": [
    ]
}

Retrieve query suggestions for a branching suggestion

path Parameters
name
required
string

The name of the branching suggestion.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "params": {
    }
}

Analyze an InfluxQL or Flux query

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Content-Type
string
Value: "application/json"
Request Body schema: application/json

Flux or InfluxQL query to analyze

+
object (File)

Represents a source from a single file

+
query
required
string

Query script to execute.

+
type
string
Value: "flux"

The type of query. Must be "flux".

+
object

Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both)

+
object (Dialect)

Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions

+
now
string <date-time>

Specifies the time that should be reported as "now" in the query. Default is the server's now time.

+

Responses

Request samples

Content type
application/json
{
  • "extern": {
    },
  • "query": "string",
  • "type": "flux",
  • "params": { },
  • "dialect": {
    },
  • "now": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Query data

Retrieves data from InfluxDB buckets.

+

To query data, you need the following:

+ +

For more information and examples, see Query with the InfluxDB API.

+
query Parameters
org
string

Specifies the name of the organization executing the query. Takes either the ID or Name. If both orgID and org are specified, org takes precedence.

+
orgID
string

Specifies the ID of the organization executing the query. If both orgID and org are specified, org takes precedence.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.

+
Content-Type
string
Enum: "application/json" "application/vnd.flux"
Request Body schema:

Flux query or specification to execute

+
One of
object (File)

Represents a source from a single file

+
query
required
string

Query script to execute.

+
type
string
Value: "flux"

The type of query. Must be "flux".

+
object

Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both)

+
object (Dialect)

Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions

+
now
string <date-time>

Specifies the time that should be reported as "now" in the query. Default is the server's now time.

+

Responses

Request samples

Content type
Example
{
  • "extern": {
    },
  • "query": "string",
  • "type": "flux",
  • "params": { },
  • "dialect": {
    },
  • "now": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Routes

List all top level routes

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Rules

Retrieve a notification rule query

path Parameters
ruleID
required
string

The notification rule ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "flux": "string"
}

Secrets

List all secret keys for an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "secrets": [
    ],
  • "links": {
    }
}

Update secrets in an organization

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Secret key value pairs to update/add

+
property name*
string

Responses

Request samples

Content type
application/json
{
  • "apikey": "abc123xyz"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Delete secrets from an organization Deprecated

path Parameters
orgID
required
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Secret key to delete

+
secrets
Array of strings

Responses

Request samples

Content type
application/json
{
  • "secrets": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Delete a secret from an organization

path Parameters
orgID
required
string

The organization ID.

+
secretID
required
string

The secret ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Setup

Retrieve setup status

Check if setup is allowed. Returns true if no default user, organization, or bucket have been created.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "allowed": true
}

Create an initial user, organization, and bucket

Post an onboarding request to create an initial user, organization, and bucket.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Source to create

+
username
required
string
password
string
org
required
string
bucket
required
string
retentionPeriodHrs
integer
Deprecated
retentionPeriodSeconds
integer
object (Limit)

These are org limits similar to those configured in/by quartz.

+

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "org": "string",
  • "bucket": "string",
  • "retentionPeriodHrs": 0,
  • "retentionPeriodSeconds": 0,
  • "limit": {
    }
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "org": {
    },
  • "bucket": {
    },
  • "auth": {
    }
}

Create a new user, organization, and bucket

Post an onboarding request to create a new user, organization, and bucket.

+
Request Body schema: application/json

Source to create

+
username
required
string
password
string
org
required
string
bucket
required
string
retentionPeriodHrs
integer
Deprecated
retentionPeriodSeconds
integer
object (Limit)

These are org limits similar to those configured in/by quartz.

+

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "org": "string",
  • "bucket": "string",
  • "retentionPeriodHrs": 0,
  • "retentionPeriodSeconds": 0,
  • "limit": {
    }
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "org": {
    },
  • "bucket": {
    },
  • "auth": {
    }
}

Signin

Create a user session.

Authenticates Basic Auth credentials for a user. If successful, creates a new UI session for the user.

+
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Signout

Expire the current UI session

Expires the current UI session for the user.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Tasks

Retrieve a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "orgID": "string",
  • "org": "string",
  • "name": "string",
  • "ownerID": "string",
  • "description": "string",
  • "status": "active",
  • "labels": [
    ],
  • "authorizationID": "string",
  • "flux": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Update a task

Update a task. This will cancel all queued runs.

+
path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Task update to apply

+
status
string (TaskStatusType)
Enum: "active" "inactive"
flux
string

The Flux script to run for this task.

+
name
string

Override the 'name' option in the flux script.

+
every
string

Override the 'every' option in the flux script.

+
cron
string

Override the 'cron' option in the flux script.

+
offset
string

Override the 'offset' option in the flux script.

+
description
string

An optional description of the task.

+

Responses

Request samples

Content type
application/json
{
  • "status": "active",
  • "flux": "string",
  • "name": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "orgID": "string",
  • "org": "string",
  • "name": "string",
  • "ownerID": "string",
  • "description": "string",
  • "status": "active",
  • "labels": [
    ],
  • "authorizationID": "string",
  • "flux": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Delete a task

Deletes a task and all associated records

+
path Parameters
taskID
required
string

The ID of the task to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List runs for a task

path Parameters
taskID
required
string

The ID of the task to get runs for.

+
query Parameters
after
string

Returns runs after a specific ID.

+
limit
integer [ 1 .. 500 ]
Default: 100

The number of runs to return

+
afterTime
string <date-time>

Filter runs to those scheduled after this time, RFC3339

+
beforeTime
string <date-time>

Filter runs to those scheduled before this time, RFC3339

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "runs": [
    ]
}

Manually start a task run, overriding the current schedule

path Parameters
taskID
required
string
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json
scheduledFor
string <date-time> Nullable

Time used for run's "now" option, RFC3339. Default is the server's now time.

+

Responses

Request samples

Content type
application/json
{
  • "scheduledFor": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "taskID": "string",
  • "status": "scheduled",
  • "scheduledFor": "2019-08-24T14:15:22Z",
  • "log": [
    ],
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Retrieve a single run for a task

path Parameters
taskID
required
string

The task ID.

+
runID
required
string

The run ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "taskID": "string",
  • "status": "scheduled",
  • "scheduledFor": "2019-08-24T14:15:22Z",
  • "log": [
    ],
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Cancel a running task

path Parameters
taskID
required
string

The task ID.

+
runID
required
string

The run ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Retry a task run

path Parameters
taskID
required
string

The task ID.

+
runID
required
string

The run ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json; charset=utf-8
object

Responses

Request samples

Content type
application/json; charset=utf-8
{ }

Response samples

Content type
application/json
{
  • "id": "string",
  • "taskID": "string",
  • "status": "scheduled",
  • "scheduledFor": "2019-08-24T14:15:22Z",
  • "log": [
    ],
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Retrieve all logs for a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}

Retrieve all logs for a run

path Parameters
taskID
required
string

ID of task to get logs for.

+
runID
required
string

ID of run to get logs for.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}

List all labels for a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a task

path Parameters
taskID
required
string

The task ID.

+
labelID
required
string

The label ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all task members

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from a task

path Parameters
userID
required
string

The ID of the member to remove.

+
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all owners of a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a task

path Parameters
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from a task

path Parameters
userID
required
string

The ID of the owner to remove.

+
taskID
required
string

The task ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all tasks

query Parameters
name
string

Returns task with a specific name.

+
after
string

Return tasks after a specified ID.

+
user
string

Filter tasks to a specific user ID.

+
org
string

Filter tasks to a specific organization name.

+
orgID
string

Filter tasks to a specific organization ID.

+
status
string
Enum: "active" "inactive"

Filter tasks by a status--"inactive" or "active".

+
limit
integer [ -1 .. 500 ]
Default: 100

The non-zero number of tasks to return

+
type
string
Default: ""
Enum: "basic" "system"

Type of task, unset by default.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "tasks": [
    ]
}

Create a new task

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Task to create

+
orgID
string

The ID of the organization that owns this Task.

+
org
string

The name of the organization that owns this Task.

+
status
string (TaskStatusType)
Enum: "active" "inactive"
flux
required
string

The Flux script to run for this task.

+
description
string

An optional description of the task.

+

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "org": "string",
  • "status": "active",
  • "flux": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "orgID": "string",
  • "org": "string",
  • "name": "string",
  • "ownerID": "string",
  • "description": "string",
  • "status": "active",
  • "labels": [
    ],
  • "authorizationID": "string",
  • "flux": "string",
  • "every": "string",
  • "cron": "string",
  • "offset": "string",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "lastRunStatus": "failed",
  • "lastRunError": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "links": {
    }
}

Telegrafs

List all Telegraf configurations

query Parameters
orgID
string

The organization ID the Telegraf config belongs to.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "configurations": [
    ]
}

Create a Telegraf configuration

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Telegraf configuration to create

+
name
string
description
string
object
config
string
orgID
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": {
    },
  • "config": "string",
  • "orgID": "string"
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": {
    },
  • "config": "string",
  • "orgID": "string",
  • "id": "string",
  • "links": {
    },
  • "labels": [
    ]
}

Retrieve a Telegraf configuration

path Parameters
telegrafID
required
string

The Telegraf configuration ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Accept
string
Default: application/toml
Enum: "application/toml" "application/json" "application/octet-stream"

Responses

Response samples

Content type
[agent]
+interval = "10s"

Update a Telegraf configuration

path Parameters
telegrafID
required
string

The Telegraf config ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Telegraf configuration update to apply

+
name
string
description
string
object
config
string
orgID
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": {
    },
  • "config": "string",
  • "orgID": "string"
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": {
    },
  • "config": "string",
  • "orgID": "string",
  • "id": "string",
  • "links": {
    },
  • "labels": [
    ]
}

Delete a Telegraf configuration

path Parameters
telegrafID
required
string

The Telegraf configuration ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all labels for a Telegraf config

path Parameters
telegrafID
required
string

The Telegraf config ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a Telegraf config

path Parameters
telegrafID
required
string

The Telegraf config ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a Telegraf config

path Parameters
telegrafID
required
string

The Telegraf config ID.

+
labelID
required
string

The label ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all users with member privileges for a Telegraf config

path Parameters
telegrafID
required
string

The Telegraf config ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a Telegraf config

path Parameters
telegrafID
required
string

The Telegraf config ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as member

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "member"
}

Remove a member from a Telegraf config

path Parameters
userID
required
string

The ID of the member to remove.

+
telegrafID
required
string

The Telegraf config ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all owners of a Telegraf configuration

path Parameters
telegrafID
required
string

The Telegraf configuration ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a Telegraf configuration

path Parameters
telegrafID
required
string

The Telegraf configuration ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to add as owner

+
id
required
string
name
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    },
  • "role": "owner"
}

Remove an owner from a Telegraf config

path Parameters
userID
required
string

The ID of the owner to remove.

+
telegrafID
required
string

The Telegraf config ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Templates

List all templates

query Parameters
org
string

Specifies the name of the organization of the template.

+
orgID
string

Specifies the organization ID of the template.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "documents": [
    ]
}

Create a template

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Template that will be created

+
required
object (DocumentMeta)
content
required
object
org
string

The organization Name. Specify either orgID or org.

+
orgID
string

The organization Name. Specify either orgID or org.

+
labels
Array of strings

An array of label IDs to be added as labels to the document.

+

Responses

Request samples

Content type
application/json
{
  • "meta": {
    },
  • "content": { },
  • "org": "string",
  • "orgID": "string",
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "meta": {
    },
  • "content": { },
  • "labels": [
    ],
  • "links": {
    }
}

Retrieve a template

path Parameters
templateID
required
string

The template ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "meta": {
    },
  • "content": { },
  • "labels": [
    ],
  • "links": {
    }
}

Update a template

path Parameters
templateID
required
string

The template ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Template that will be updated

+
object (DocumentMeta)
content
object

Responses

Request samples

Content type
application/json
{
  • "meta": {
    },
  • "content": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "meta": {
    },
  • "content": { },
  • "labels": [
    ],
  • "links": {
    }
}

Delete a template

path Parameters
templateID
required
string

The template ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all labels for a template

path Parameters
templateID
required
string

The template ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a template

path Parameters
templateID
required
string

The template ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a template

path Parameters
templateID
required
string

The template ID.

+
labelID
required
string

The label ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List installed templates

query Parameters
orgID
required
string

The organization ID of the stacks

+
name
string

A collection of names to filter the list by.

+
stackID
string

A collection of stackIDs to filter the list by.

+

Responses

Response samples

Content type
application/json
{
  • "stacks": [
    ]
}

Create a new stack

Request Body schema: application/json

The stack to create.

+
orgID
string
name
string
description
string
urls
Array of strings

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "urls": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ]
}

Retrieve a stack

path Parameters
stack_id
required
string

The identifier of the stack.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ]
}

Update a stack

path Parameters
stack_id
required
string

The identifier of the stack.

+
Request Body schema: application/json

The stack to update.

+
name
string Nullable
description
string Nullable
templateURLs
Array of strings Nullable
Array of objects

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "templateURLs": [
    ],
  • "additionalResources": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ]
}

Delete a stack and associated resources

path Parameters
stack_id
required
string

The identifier of the stack.

+
query Parameters
orgID
required
string

The identifier of the organization.

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Uninstall a stack

path Parameters
stack_id
required
string

The identifier of the stack.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ]
}

Apply or dry-run a template

Applies or performs a dry-run of template in an organization.

+
Request Body schema:
dryRun
boolean
orgID
string
stackID
string
object
Array of objects
object
object
Array of objects
Array of objects or objects

Responses

Request samples

Content type
{
  • "dryRun": true,
  • "orgID": "string",
  • "stackID": "string",
  • "template": {
    },
  • "templates": [
    ],
  • "envRefs": {
    },
  • "secrets": {
    },
  • "remotes": [
    ],
  • "actions": [
    ]
}

Response samples

Content type
application/json
{
  • "sources": [
    ],
  • "stackID": "string",
  • "summary": {
    },
  • "diff": {
    },
  • "errors": [
    ]
}

Export a new template

Request Body schema: application/json

Export resources as an InfluxDB template.

+
One of
stackID
string
Array of objects
Array of objects

Responses

Request samples

Content type
application/json
Example
{
  • "stackID": "string",
  • "orgIDs": [
    ],
  • "resources": [
    ]
}

Response samples

Content type
[
  • {
    }
]

Usage

Retrieve usage for an organization

path Parameters
orgID
required
string

The identifier of the organization.

+
query Parameters
start
required
timestamp

start time

+
stop
timestamp

stop time

+
raw
boolean
Default: false

return raw usage data

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Users

Return the feature flags for the currently authenticated user

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{ }

Retrieve the currently authenticated user

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Update a password

Authorizations:
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

New password

+
password
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Update a password

Authorizations:
path Parameters
userID
required
string

The user ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

New password

+
password
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all users

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Create a user

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User to create

+
oauthID
string
name
required
string
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the user is inactive.

+
role
string
Enum: "owner" "member"
org_id
string

Responses

Request samples

Content type
application/json
{
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "role": "owner",
  • "org_id": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Retrieve a user

path Parameters
userID
required
string

The user ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Update a user

path Parameters
userID
required
string

The ID of the user to update.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

User update to apply

+
oauthID
string
name
required
string
status
string
Default: "active"
Enum: "active" "inactive"

If inactive the user is inactive.

+
role
string
Enum: "owner" "member"
org_id
string

Responses

Request samples

Content type
application/json
{
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "role": "owner",
  • "org_id": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "oauthID": "string",
  • "name": "string",
  • "status": "active",
  • "links": {
    }
}

Delete a user

path Parameters
userID
required
string

The ID of the user to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Variables

List all labels for a variable

path Parameters
variableID
required
string

The variable ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{}

Add a label to a variable

path Parameters
variableID
required
string

The variable ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Label to add

+
labelID
string

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a variable

path Parameters
variableID
required
string

The variable ID.

+
labelID
required
string

The label ID to delete.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

List all variables

query Parameters
org
string

The name of the organization.

+
orgID
string

The organization ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "variables": [
    ]
}

Create a variable

header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Variable to create

+
orgID
required
string
name
required
string
description
string
selected
Array of strings
sort_order
integer
Array of objects (Labels)
required
QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties)
createdAt
string <date-time>
updatedAt
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "labels": [
    ],
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "links": {},
  • "id": "string",
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "labels": [
    ],
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Retrieve a variable

path Parameters
variableID
required
string

The variable ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "id": "string",
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "labels": [
    ],
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a variable

path Parameters
variableID
required
string

The variable ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string"
}

Update a variable

path Parameters
variableID
required
string

The variable ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Variable update to apply

+
orgID
required
string
name
required
string
description
string
selected
Array of strings
sort_order
integer
Array of objects (Labels)
required
QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties)
createdAt
string <date-time>
updatedAt
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "labels": [
    ],
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "links": {},
  • "id": "string",
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "labels": [
    ],
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Replace a variable

path Parameters
variableID
required
string

The variable ID.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Request Body schema: application/json

Variable to replace

+
orgID
required
string
name
required
string
description
string
selected
Array of strings
sort_order
integer
Array of objects (Labels)
required
QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties)
createdAt
string <date-time>
updatedAt
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "labels": [
    ],
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "links": {},
  • "id": "string",
  • "orgID": "string",
  • "name": "string",
  • "description": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "labels": [
    ],
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Write

Write time series data to buckets.

+

Write data

Writes data to a bucket.

+

To write data into InfluxDB, you need the following:

+ +

For more information and examples, see Write data with the InfluxDB API.

+
query Parameters
org
required
string

The parameter value specifies the destination organization for writes. The database writes all points in the batch to this organization. If you provide both orgID and org parameters, org takes precedence.

+
orgID
string

The parameter value specifies the ID of the destination organization for writes. If both orgID and org are specified, org takes precedence.

+
bucket
required
string

The destination bucket for writes.

+
precision
string (WritePrecision)
Enum: "ms" "s" "us" "ns"

The precision for the unix timestamps within the body line-protocol.

+
header Parameters
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

+
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, the header value tells the database that compression is applied to the line protocol in the request body.

+
Content-Type
string
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8" "application/vnd.influx.arrow"

The header value indicates the format of the data in the request body.

+
Content-Length
integer

The header value indicates the size of the entity-body, in bytes, sent to the database. If the length is greater than the database's max body configuration option, the server responds with status code 413.

+
Accept
string
Default: application/json
Value: "application/json"

The header value specifies the response format.

+
Request Body schema: text/plain

Data in line protocol format.

+
string <byte>

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string",
  • "line": 0
}
+ + + + \ No newline at end of file diff --git a/api-docs/v2.0/swagger.yml b/api-docs/v2.0/swagger.yml index 75dae7d87..7e0f0a37d 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -2,34 +2,121 @@ openapi: 3.0.0 info: title: Influx OSS API Service version: 2.0.0 + description: > + The InfluxDB v2 API provides a programmatic interface for all interactions + with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. servers: - url: /api/v2 +tags: + - name: Authentication + description: | + Use one of the following schemes to authenticate to the InfluxDB API: + - [Token authentication](#section/Authentication/TokenAuth) + - [Basic authentication](#section/Authentication/BasicAuth) + - [Querystring authentication](#section/Authentication/QuerystringAuth) + + x-traitTag: true + - name: Query + description: | + Retrieve data, analyze queries, and get query suggestions. + - name: Write + description: | + Write time series data to buckets. + - name: Authorizations + description: > + Create and manage API tokens. An **authorization** associates a list of + permissions to an **organization** and provides a token for API access. To + assign a token to a specific user, scope the authorization to the user ID. +x-tagGroups: + - name: Get started + tags: + - Authentication + - name: ' ' + tags: + - Write + - Query + - name: Resource endpoints + tags: + - Buckets + - Dashboards + - Tasks + - name: Security and access endpoints + tags: + - Authorizations + - Organizations + - Users + - name: System information endpoints + tags: + - Health + - Ping + - Ready + - Routes + - name: All endpoints + tags: + - Authorizations + - Backup + - Buckets + - Cells + - Checks + - DBRPs + - Dashboards + - Delete + - Health + - Labels + - Legacy Authorizations + - NotificationEndpoints + - NotificationRules + - Organizations + - Ping + - Query + - Ready + - RemoteConnections + - Replications + - Restore + - Routes + - Rules + - Secrets + - Setup + - Signin + - Signout + - Sources + - Tasks + - Telegrafs + - Templates + - Users + - Variables + - Write paths: /signin: post: operationId: PostSignin - summary: Exchange basic auth credentials for session + summary: Create a user session. + description: >- + Authenticates ***Basic Auth*** credentials for a user. If successful, + creates a new UI session for the user. + tags: + - Signin security: - BasicAuth: [] parameters: - $ref: '#/components/parameters/TraceSpan' responses: '204': - description: Successfully authenticated + description: Success. User authenticated. '401': - description: Unauthorized access + description: Unauthorized access. content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: user account is disabled + description: User account is disabled. content: application/json: schema: $ref: '#/components/schemas/Error' default: - description: Unsuccessful authentication + description: Unsuccessful authentication. content: application/json: schema: @@ -37,7 +124,10 @@ paths: /signout: post: operationId: PostSignout - summary: Expire the current session + summary: Expire the current UI session + tags: + - Signout + description: Expires the current UI session for the user. parameters: - $ref: '#/components/parameters/TraceSpan' responses: @@ -55,6 +145,45 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /ping: + get: + operationId: GetPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + servers: + - url: / + tags: + - Ping + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. + head: + operationId: HeadPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + servers: + - url: / + tags: + - Ping + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. /: get: operationId: GetRoutes @@ -70,6 +199,8 @@ paths: application/json: schema: $ref: '#/components/schemas/Routes' + servers: + - url: / /documents/templates: get: operationId: GetDocumentsTemplates @@ -310,15 +441,19 @@ paths: operationId: GetDBRPs tags: - DBRPs - summary: List all database retention policy mappings + summary: List database retention policy mappings parameters: - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID - required: true description: Specifies the organization ID to filter on schema: type: string + - in: query + name: org + description: Specifies the organization name to filter on + schema: + type: string - in: query name: id description: Specifies the mapping ID to filter on @@ -346,13 +481,13 @@ paths: type: string responses: '200': - description: A list of all database retention policy mappings + description: Success. Returns a list of database retention policy mappings. content: application/json: schema: $ref: '#/components/schemas/DBRPs' '400': - description: if any of the parameter passed is invalid + description: Bad request. The request has one or more invalid parameters. content: application/json: schema: @@ -376,16 +511,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DBRP' + $ref: '#/components/schemas/DBRPCreate' responses: '201': - description: Database retention policy mapping created + description: Created. Returns the created database retention policy mapping. content: application/json: schema: $ref: '#/components/schemas/DBRP' '400': - description: if any of the IDs in the mapping is invalid + description: Bad request. The mapping in the request has one or more invalid IDs. content: application/json: schema: @@ -406,10 +541,14 @@ paths: - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID - required: true description: Specifies the organization ID of the mapping schema: type: string + - in: query + name: org + description: Specifies the organization name of the mapping + schema: + type: string - in: path name: dbrpID schema: @@ -422,7 +561,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DBRP' + $ref: '#/components/schemas/DBRPGet' '400': description: if any of the IDs passed is invalid content: @@ -451,10 +590,14 @@ paths: - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID - required: true description: Specifies the organization ID of the mapping schema: type: string + - in: query + name: org + description: Specifies the organization name of the mapping + schema: + type: string - in: path name: dbrpID schema: @@ -467,7 +610,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DBRP' + $ref: '#/components/schemas/DBRPGet' '400': description: if any of the IDs passed is invalid content: @@ -495,10 +638,14 @@ paths: - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID - required: true description: Specifies the organization ID of the mapping schema: type: string + - in: query + name: org + description: Specifies the organization name of the mapping + schema: + type: string - in: path name: dbrpID schema: @@ -936,7 +1083,9 @@ paths: $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: '201': - description: Telegraf configuration owner was added. Returns a ResourceOwner that references the User. + description: >- + Telegraf configuration owner was added. Returns a ResourceOwner that + references the User. content: application/json: schema: @@ -1076,9 +1225,36 @@ paths: operationId: PostWrite tags: - Write - summary: Write time series data into InfluxDB + summary: Write data + description: > + Writes data to a bucket. + + + To write data into InfluxDB, you need the following: + + - **organization** – _See [View + organizations](https://docs.influxdata.com/influxdb/v2.0/organizations/view-orgs/#view-your-organization-id) + for instructions on viewing your organization ID._ + + - **bucket** – _See [View + buckets](https://docs.influxdata.com/influxdb/v2.0/organizations/buckets/view-buckets/) + for + instructions on viewing your bucket ID._ + - **API token** – _See [View + tokens](https://docs.influxdata.com/influxdb/v2.0/security/tokens/view-tokens/) + for instructions on viewing your API token._ + - **InfluxDB URL** – _See [InfluxDB + URLs](https://docs.influxdata.com/influxdb/v2.0/reference/urls/)_. + + - data in [line + protocol](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol) + format. + + + For more information and examples, see [Write data with the InfluxDB + API](https://docs.influxdata.com/influxdb/v2.0/write-data/developer-tools/api). requestBody: - description: Line protocol body + description: Data in line protocol format. required: true content: text/plain: @@ -1089,20 +1265,28 @@ paths: - $ref: '#/components/parameters/TraceSpan' - in: header name: Content-Encoding - description: 'When present, its value indicates to the database that compression is applied to the line-protocol body.' + description: >- + When present, the header value tells the database that compression + is applied to the line protocol in the request body. schema: type: string - description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity. + description: >- + The header value specifies that the line protocol in the request + body is encoded with gzip or not encoded with identity. default: identity enum: - gzip - identity - in: header name: Content-Type - description: Content-Type is used to indicate the format of the data sent to the server. + description: >- + The header value indicates the format of the data in the request + body. schema: type: string - description: Text/plain specifies the text line protocol; charset is assumed to be utf-8. + description: > + `text/plain` specifies line protocol. `UTF-8` is the default + character set. default: text/plain; charset=utf-8 enum: - text/plain @@ -1110,29 +1294,40 @@ paths: - application/vnd.influx.arrow - in: header name: Content-Length - description: 'Content-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent.' + description: >- + The header value indicates the size of the entity-body, in bytes, + sent to the database. If the length is greater than the database's + `max body` configuration option, the server responds with status + code `413`. schema: type: integer description: The length in decimal number of octets. - in: header name: Accept - description: Specifies the return content format. + description: The header value specifies the response format. schema: type: string - description: The return format for errors. + description: The response format for errors. default: application/json enum: - application/json - in: query name: org - description: 'Specifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + The parameter value specifies the destination organization for + writes. The database writes all points in the batch to this + organization. If you provide both `orgID` and `org` parameters, + `org` takes precedence. required: true schema: type: string - description: All points within batch are written to this organization. + description: Organization name or ID. - in: query name: orgID - description: 'Specifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + The parameter value specifies the ID of the destination organization + for writes. If both `orgID` and `org` are specified, `org` takes + precedence. schema: type: string - in: query @@ -1149,44 +1344,68 @@ paths: $ref: '#/components/schemas/WritePrecision' responses: '204': - description: Write data is correctly formatted and accepted for writing to the bucket. + description: >- + InfluxDB validated the request data format and accepted the data for + writing to the bucket. `204` doesn't indicate a successful write + operation since writes are asynchronous. See [how to check for write + errors](https://docs.influxdata.com/influxdb/v2.0/write-data/troubleshoot). '400': - description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. + description: >- + Bad request. The line protocol data in the request is malformed. The + response body contains the first malformed line in the data. + InfluxDB rejected the batch and did not write any data. content: application/json: schema: $ref: '#/components/schemas/LineProtocolError' '401': - description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist. + description: | + Unauthorized. The error may indicate one of the following: + * The `Authorization: Token` header is missing or malformed. + * The API token value is missing from the header. + * The token does not have sufficient permissions to write to this organization and bucket. content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: No token was sent and they are required. + '404': + description: >- + Not found. A requested resource was not found. The response body + contains the requested resource type, e.g. `organization name` or + `bucket`, and name. content: application/json: schema: $ref: '#/components/schemas/Error' '413': - description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. + description: >- + Request entity too large. The payload exceeded the 50MB limit. + InfluxDB rejected the batch and did not write any data. content: application/json: schema: $ref: '#/components/schemas/LineProtocolLengthError' '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the write again. + description: >- + The token is temporarily over quota. The Retry-After header + describes when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 '503': - description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. + description: >- + The server is temporarily unavailable to accept writes. The + `Retry-After` header describes when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -1201,9 +1420,9 @@ paths: operationId: PostDelete tags: - Delete - summary: Delete time series data from InfluxDB + summary: Delete data requestBody: - description: Predicate delete request + description: Deletes data from an InfluxDB bucket. required: true content: application/json: @@ -1406,90 +1625,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /dashboards: - post: - operationId: PostDashboards - tags: - - Dashboards - summary: Create a dashboard - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Dashboard to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateDashboardRequest' - responses: - '201': - description: Added dashboard - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/Dashboard' - - $ref: '#/components/schemas/DashboardWithViewProperties' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - operationId: GetDashboards - tags: - - Dashboards - summary: List all dashboards - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Descending' - - in: query - name: owner - description: A user identifier. Returns only dashboards where this user has the `owner` role. - schema: - type: string - - in: query - name: sortBy - description: The column to sort by. - schema: - type: string - enum: - - ID - - CreatedAt - - UpdatedAt - - in: query - name: id - description: 'A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used.' - schema: - type: array - items: - type: string - - in: query - name: orgID - description: The identifier of the organization. - schema: - type: string - - in: query - name: org - description: The name of the organization. - schema: - type: string - responses: - '200': - description: All dashboards - content: - application/json: - schema: - $ref: '#/components/schemas/Dashboards' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '/dashboards/{dashboardID}': get: operationId: GetDashboardsID @@ -1511,7 +1646,9 @@ paths: type: string enum: - properties - description: Includes the cell view properties in the response if set to `properties` + description: >- + Includes the cell view properties in the response if set to + `properties` responses: '200': description: Retrieve a single dashboard @@ -1554,7 +1691,9 @@ paths: description: 'optional, when provided will replace the description' type: string cells: - description: 'optional, when provided will replace all existing cells with the cells provided' + description: >- + optional, when provided will replace all existing cells with + the cells provided $ref: '#/components/schemas/CellWithViewProperties' parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1618,7 +1757,9 @@ paths: - Cells - Dashboards summary: Replace cells in a dashboard - description: Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. + description: >- + Replaces all cells in a dashboard. This is used primarily to update the + positional information of all cells. requestBody: required: true content: @@ -1699,7 +1840,9 @@ paths: - Cells - Dashboards summary: Update the non-positional information related to a cell - description: Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. + description: >- + Updates the non positional information related to a cell. Updates to a + single cell's positional data could cause grid conflicts. requestBody: required: true content: @@ -2263,15 +2406,43 @@ paths: operationId: PostQuery tags: - Query - summary: Query InfluxDB + summary: Query data + description: > + Retrieves data from InfluxDB buckets. + + + To query data, you need the following: + + - **organization** – _See [View + organizations](https://docs.influxdata.com/influxdb/v2.0/organizations/view-orgs/#view-your-organization-id) + for instructions on viewing your organization ID._ + + - **API token** – _See [View + tokens](https://docs.influxdata.com/influxdb/v2.0/security/tokens/view-tokens/) + for instructions on viewing your API token._ + - **InfluxDB URL** – _See [InfluxDB + URLs](https://docs.influxdata.com/influxdb/v2.0/reference/urls/)_. + + - [Flux](https://docs.influxdata.com/influxdb/v2.0/reference/flux) or + [InfluxQL](https://docs.influxdata.com/influxdb/v2.0/query-data/influxql/) + query. + + + For more information and examples, see [Query with the InfluxDB + API](https://docs.influxdata.com/influxdb/v2.0/query-data/execute-queries/influx-api/). parameters: - $ref: '#/components/parameters/TraceSpan' - in: header name: Accept-Encoding - description: 'The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.' + description: >- + The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to + understand. schema: type: string - description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity. + description: >- + Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. default: identity enum: - gzip @@ -2285,12 +2456,17 @@ paths: - application/vnd.flux - in: query name: org - description: 'Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + Specifies the name of the organization executing the query. Takes + either the ID or Name. If both `orgID` and `org` are specified, + `org` takes precedence. schema: type: string - in: query name: orgID - description: 'Specifies the ID of the organization executing the query. If both `orgID` and `org` are specified, `org` takes precedence.' + description: >- + Specifies the ID of the organization executing the query. If both + `orgID` and `org` are specified, `org` takes precedence. schema: type: string requestBody: @@ -2306,19 +2482,26 @@ paths: type: string responses: '200': - description: Query results + description: Success. Returns query results. headers: Content-Encoding: - description: 'The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body' + description: >- + The Content-Encoding entity header is used to compress the + media-type. When present, its value indicates which encodings + were applied to the entity-body schema: type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. + description: >- + Specifies that the response in the body is encoded with gzip + or not encoded with identity. default: identity enum: - gzip - identity Trace-Id: - description: 'The Trace-Id header reports the request''s trace ID, if one was generated.' + description: >- + The Trace-Id header reports the request's trace ID, if one was + generated. schema: type: string description: Specifies the request's trace ID. @@ -2326,17 +2509,24 @@ paths: text/csv: schema: type: string - example: | - result,table,_start,_stop,_time,region,host,_value mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 + example: > + result,table,_start,_stop,_time,region,host,_value + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 application/vnd.influx.arrow: schema: type: string format: binary '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the read again. + description: >- + Token is temporarily over quota. The Retry-After header describes + when to try the read again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -2943,7 +3133,6 @@ paths: operationId: GetOrgsIDSecrets tags: - Secrets - - Organizations summary: List all secret keys for an organization parameters: - $ref: '#/components/parameters/TraceSpan' @@ -2970,7 +3159,6 @@ paths: operationId: PatchOrgsIDSecrets tags: - Secrets - - Organizations summary: Update secrets in an organization parameters: - $ref: '#/components/parameters/TraceSpan' @@ -2996,37 +3184,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '/orgs/{orgID}/secrets/delete': - post: - operationId: PostOrgsIDSecrets - tags: - - Secrets - - Organizations - summary: Delete secrets from an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - requestBody: - description: Secret key to delete - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SecretKeys' - responses: - '204': - description: Keys successfully patched - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '/orgs/{orgID}/members': get: operationId: GetOrgsIDMembers @@ -3217,19 +3374,99 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + '/orgs/{orgID}/secrets/delete': + post: + deprecated: true + operationId: PostOrgsIDSecrets + tags: + - Secrets + summary: Delete secrets from an organization + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + requestBody: + description: Secret key to delete + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SecretKeys' + responses: + '204': + description: Keys successfully patched + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '/orgs/{orgID}/secrets/{secretID}': + delete: + operationId: DeleteOrgsIDSecretsID + tags: + - Secrets + summary: Delete a secret from an organization + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + - in: path + name: secretID + schema: + type: string + required: true + description: The secret ID. + responses: + '204': + description: Keys successfully deleted + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + /resources: + get: + operationId: GetResources + tags: + - resource list + summary: List all known resources + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + '200': + description: All resources targets + content: + application/json: + schema: + type: array + items: + type: string + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /stacks: get: operationId: ListStacks tags: - - InfluxDB Templates - summary: List all installed InfluxDB templates + - Templates + summary: List installed templates parameters: - in: query name: orgID required: true schema: type: string - description: The organization id of the stacks + description: The organization ID of the stacks - in: query name: name schema: @@ -3242,7 +3479,7 @@ paths: description: A collection of stackIDs to filter the list by. responses: '200': - description: Influx stacks found + description: Success. Returns the list of stacks. content: application/json: schema: @@ -3261,10 +3498,10 @@ paths: post: operationId: CreateStack tags: - - InfluxDB Templates + - Templates summary: Create a new stack requestBody: - description: Stack to create. + description: The stack to create. required: true content: application/json: @@ -3284,7 +3521,7 @@ paths: type: string responses: '201': - description: InfluxDB Stack created + description: Success. Returns the newly created stack. content: application/json: schema: @@ -3299,7 +3536,7 @@ paths: get: operationId: ReadStack tags: - - InfluxDB Templates + - Templates summary: Retrieve a stack parameters: - in: path @@ -3307,10 +3544,10 @@ paths: required: true schema: type: string - description: Theidentifier of the stack. + description: The identifier of the stack. responses: '200': - description: The InfluxDB stack + description: Returns the stack. content: application/json: schema: @@ -3324,17 +3561,17 @@ paths: patch: operationId: UpdateStack tags: - - InfluxDB Templates - summary: Update an InfluxDB Stack + - Templates + summary: Update a stack parameters: - in: path name: stack_id required: true schema: type: string - description: Theidentifier of the stack. + description: The identifier of the stack. requestBody: - description: Influx stack to update. + description: The stack to update. required: true content: application/json: @@ -3369,7 +3606,7 @@ paths: - resourceID responses: '200': - description: Influx stack updated + description: Returns the updated stack. content: application/json: schema: @@ -3383,7 +3620,7 @@ paths: delete: operationId: DeleteStack tags: - - InfluxDB Templates + - Templates summary: Delete a stack and associated resources parameters: - in: path @@ -3391,7 +3628,7 @@ paths: required: true schema: type: string - description: Theidentifier of the stack. + description: The identifier of the stack. - in: query name: orgID required: true @@ -3400,7 +3637,7 @@ paths: description: The identifier of the organization. responses: '204': - description: The stack and its associated resources are deleted + description: The stack and its associated resources were deleted. default: description: Unexpected error content: @@ -3411,18 +3648,18 @@ paths: post: operationId: UninstallStack tags: - - InfluxDB Templates - summary: Uninstall an InfluxDB Stack + - Templates + summary: Uninstall a stack parameters: - in: path name: stack_id required: true schema: type: string - description: The stack id + description: The identifier of the stack. responses: '200': - description: Influx stack uninstalled + description: Returns the uninstalled stack. content: application/json: schema: @@ -3437,8 +3674,9 @@ paths: post: operationId: ApplyTemplate tags: - - InfluxDB Templates - summary: Apply or dry-run an InfluxDB Template + - Templates + summary: Apply or dry-run a template + description: Applies or performs a dry-run of template in an organization. requestBody: required: true content: @@ -3453,15 +3691,21 @@ paths: $ref: '#/components/schemas/TemplateApply' responses: '200': - description: | - Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources that do not exist at the time of the dry run. + description: > + Success. The package dry-run succeeded. No new resources were + created. Returns a diff and summary of the dry-run. The diff and + summary won't contain IDs for resources that didn't exist at the + time of the dry-run. content: application/json: schema: $ref: '#/components/schemas/TemplateSummary' '201': - description: | - Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before the package is applied with the changes the application will impose. This corresponds to `"dryRun": true` + description: > + Success. The package applied successfully. Returns a diff and + summary of the run. The summary contains newly created resources. + The diff compares the initial state to the state after the package + applied. This corresponds to `"dryRun": true`. content: application/json: schema: @@ -3476,8 +3720,8 @@ paths: post: operationId: ExportTemplate tags: - - InfluxDB Templates - summary: Export a new Influx Template + - Templates + summary: Export a new template requestBody: description: Export resources as an InfluxDB template. required: false @@ -3489,7 +3733,9 @@ paths: - $ref: '#/components/schemas/TemplateExportByName' responses: '200': - description: InfluxDB template created + description: >- + The template was created successfully. Returns the newly created + template. content: application/json: schema: @@ -3503,95 +3749,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /tasks: - get: - operationId: GetTasks - tags: - - Tasks - summary: List all tasks - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: name - description: Returns task with a specific name. - schema: - type: string - - in: query - name: after - schema: - type: string - description: Return tasks after a specified ID. - - in: query - name: user - schema: - type: string - description: Filter tasks to a specific user ID. - - in: query - name: org - schema: - type: string - description: Filter tasks to a specific organization name. - - in: query - name: orgID - schema: - type: string - description: Filter tasks to a specific organization ID. - - in: query - name: status - schema: - type: string - enum: - - active - - inactive - description: Filter tasks by a status--"inactive" or "active". - - in: query - name: limit - schema: - type: integer - minimum: 1 - maximum: 500 - default: 100 - description: The number of tasks to return - responses: - '200': - description: A list of tasks - content: - application/json: - schema: - $ref: '#/components/schemas/Tasks' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasks - tags: - - Tasks - summary: Create a new task - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Task to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TaskCreateRequest' - responses: - '201': - description: Task created - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '/tasks/{taskID}': get: operationId: GetTasksID @@ -4585,7 +4742,9 @@ paths: - in: query name: orgID required: true - description: Only show notification rules that belong to a specific organization ID. + description: >- + Only show notification rules that belong to a specific organization + ID. schema: type: string - in: query @@ -4595,7 +4754,9 @@ paths: type: string - in: query name: tag - description: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. + description: >- + Only return notification rules that "would match" statuses which + contain the tag key value pairs provided. schema: type: string pattern: '^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$' @@ -4957,7 +5118,9 @@ paths: - in: query name: orgID required: true - description: Only show notification endpoints that belong to specific organization ID. + description: >- + Only show notification endpoints that belong to specific + organization ID. schema: type: string responses: @@ -5227,13 +5390,13 @@ paths: schema: $ref: '#/components/schemas/Error' /health: - servers: - - url: '' get: operationId: GetHealth tags: - Health summary: Get the health of an instance + servers: + - url: / parameters: - $ref: '#/components/parameters/TraceSpan' responses: @@ -5253,13 +5416,13 @@ paths: description: Unexpected error $ref: '#/components/responses/ServerError' /ready: - servers: - - url: '' get: operationId: GetReady tags: - Ready summary: Get the readiness of an instance at startup + servers: + - url: / parameters: - $ref: '#/components/parameters/TraceSpan' responses: @@ -5404,7 +5567,9 @@ paths: tags: - Setup summary: 'Check if database has default user, org, bucket' - description: 'Returns `true` if no default user, organization, or bucket has been created.' + description: >- + Returns `true` if no default user, organization, or bucket has been + created. parameters: - $ref: '#/components/parameters/TraceSpan' responses: @@ -5550,7 +5715,7 @@ paths: description: The ID of the authorization to update. responses: '200': - description: The active or inactie authorization + description: The active or inactive authorization content: application/json: schema: @@ -5577,6 +5742,187 @@ paths: default: description: Unexpected error $ref: '#/components/responses/ServerError' + /legacy/authorizations: + servers: + - url: /private + get: + operationId: GetLegacyAuthorizations + tags: + - Legacy Authorizations + summary: List all legacy authorizations + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: userID + schema: + type: string + description: Only show legacy authorizations that belong to a user ID. + - in: query + name: user + schema: + type: string + description: Only show legacy authorizations that belong to a user name. + - in: query + name: orgID + schema: + type: string + description: Only show legacy authorizations that belong to an organization ID. + - in: query + name: org + schema: + type: string + description: Only show legacy authorizations that belong to a organization name. + - in: query + name: token + schema: + type: string + description: Only show legacy authorizations with a specified token (auth name). + - in: query + name: authID + schema: + type: string + description: Only show legacy authorizations with a specified auth ID. + responses: + '200': + description: A list of legacy authorizations + content: + application/json: + schema: + $ref: '#/components/schemas/Authorizations' + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + post: + operationId: PostLegacyAuthorizations + tags: + - Legacy Authorizations + summary: Create a legacy authorization + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Legacy authorization to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyAuthorizationPostRequest' + responses: + '201': + description: Legacy authorization created + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + '400': + description: Invalid request + $ref: '#/components/responses/ServerError' + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + '/legacy/authorizations/{authID}': + servers: + - url: /private + get: + operationId: GetLegacyAuthorizationsID + tags: + - Legacy Authorizations + summary: Retrieve a legacy authorization + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: authID + schema: + type: string + required: true + description: The ID of the legacy authorization to get. + responses: + '200': + description: Legacy authorization details + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + patch: + operationId: PatchLegacyAuthorizationsID + tags: + - Legacy Authorizations + summary: Update a legacy authorization to be active or inactive + requestBody: + description: Legacy authorization to update + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AuthorizationUpdateRequest' + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: authID + schema: + type: string + required: true + description: The ID of the legacy authorization to update. + responses: + '200': + description: The active or inactive legacy authorization + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + delete: + operationId: DeleteLegacyAuthorizationsID + tags: + - Legacy Authorizations + summary: Delete a legacy authorization + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: authID + schema: + type: string + required: true + description: The ID of the legacy authorization to delete. + responses: + '204': + description: Legacy authorization deleted + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + '/legacy/authorizations/{authID}/password': + servers: + - url: /private + post: + operationId: PostLegacyAuthorizationsIDPassword + tags: + - Legacy Authorizations + summary: Set a legacy authorization password + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: authID + schema: + type: string + required: true + description: The ID of the legacy authorization to update. + requestBody: + description: New password + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordResetBody' + responses: + '204': + description: Legacy authorization password set + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' /variables: get: operationId: GetVariables @@ -5978,7 +6324,9 @@ paths: type: string - in: query name: id - description: 'List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used.' + description: >- + List of scraper target IDs to return. If both `id` and `owner` are + specified, only `id` is used. schema: type: array items: @@ -6382,6 +6730,878 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /backup/kv: + get: + operationId: GetBackupKV + tags: + - Backup + summary: >- + Download snapshot of metadata stored in the server's embedded KV store. + Should not be used in versions greater than 2.1.x, as it doesn't include + metadata stored in embedded SQL. + deprecated: true + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + '200': + description: Snapshot of KV metadata + content: + application/octet-stream: + schema: + type: string + format: binary + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + /backup/metadata: + get: + operationId: GetBackupMetadata + tags: + - Backup + summary: Download snapshot of all metadata in the server + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Accept-Encoding + description: >- + The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to + understand. + schema: + type: string + description: >- + Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. + default: identity + enum: + - gzip + - identity + responses: + '200': + description: Snapshot of metadata + headers: + Content-Encoding: + description: >- + The Content-Encoding entity header is used to compress the + media-type. When present, its value indicates which encodings + were applied to the entity-body + schema: + type: string + description: >- + Specifies that the response in the body is encoded with gzip + or not encoded with identity. + default: identity + enum: + - gzip + - identity + content: + multipart/mixed: + schema: + $ref: '#/components/schemas/MetadataBackup' + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + '/backup/shards/{shardID}': + get: + operationId: GetBackupShardId + tags: + - Backup + summary: Download snapshot of all TSM data in a shard + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Accept-Encoding + description: >- + The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to + understand. + schema: + type: string + description: >- + Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. + default: identity + enum: + - gzip + - identity + - in: path + name: shardID + schema: + type: integer + format: int64 + required: true + description: The shard ID. + - in: query + name: since + description: Earliest time to include in the snapshot. RFC3339 format. + schema: + type: string + format: date-time + responses: + '200': + description: TSM snapshot. + headers: + Content-Encoding: + description: >- + The Content-Encoding entity header is used to compress the + media-type. When present, its value indicates which encodings + were applied to the entity-body + schema: + type: string + description: >- + Specifies that the response in the body is encoded with gzip + or not encoded with identity. + default: identity + enum: + - gzip + - identity + content: + application/octet-stream: + schema: + type: string + format: binary + '404': + description: Shard not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + /restore/kv: + post: + operationId: PostRestoreKV + tags: + - Restore + summary: Overwrite the embedded KV store on the server with a backed-up snapshot. + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Content-Encoding + description: >- + When present, its value indicates to the database that compression + is applied to the line-protocol body. + schema: + type: string + description: >- + Specifies that the line protocol in the body is encoded with gzip + or not encoded with identity. + default: identity + enum: + - gzip + - identity + - in: header + name: Content-Type + schema: + type: string + default: application/octet-stream + enum: + - application/octet-stream + requestBody: + description: Full KV snapshot. + required: true + content: + text/plain: + schema: + type: string + format: binary + responses: + '200': + description: KV store successfully overwritten. + content: + application/json: + schema: + type: object + properties: + token: + description: >- + token is the root token for the instance after restore + (this is overwritten during the restore) + type: string + '204': + description: KV store successfully overwritten. + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + /restore/sql: + post: + operationId: PostRestoreSQL + tags: + - Restore + summary: >- + Overwrite the embedded SQL store on the server with a backed-up + snapshot. + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Content-Encoding + description: >- + When present, its value indicates to the database that compression + is applied to the line-protocol body. + schema: + type: string + description: >- + Specifies that the line protocol in the body is encoded with gzip + or not encoded with identity. + default: identity + enum: + - gzip + - identity + - in: header + name: Content-Type + schema: + type: string + default: application/octet-stream + enum: + - application/octet-stream + requestBody: + description: Full SQL snapshot. + required: true + content: + text/plain: + schema: + type: string + format: binary + responses: + '204': + description: SQL store successfully overwritten. + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + '/restore/bucket/{bucketID}': + post: + operationId: PostRestoreBucketID + tags: + - Restore + summary: Overwrite storage metadata for a bucket with shard info from a backup. + deprecated: true + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: bucketID + schema: + type: string + required: true + description: The bucket ID. + - in: header + name: Content-Type + schema: + type: string + default: application/octet-stream + enum: + - application/octet-stream + requestBody: + description: Database info serialized as protobuf. + required: true + content: + text/plain: + schema: + type: string + format: byte + responses: + '200': + description: ID mappings for shards in bucket. + content: + application/json: + schema: + type: string + format: byte + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + /restore/bucketMetadata: + post: + operationId: PostRestoreBucketMetadata + tags: + - Restore + summary: Create a new bucket pre-seeded with shard info from a backup. + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Metadata manifest for a bucket. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BucketMetadataManifest' + responses: + '201': + description: ID mappings for shards in new bucket. + content: + application/json: + schema: + $ref: '#/components/schemas/RestoredBucketMappings' + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + '/restore/shards/{shardID}': + post: + operationId: PostRestoreShardId + tags: + - Restore + summary: Restore a TSM snapshot into a shard. + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Content-Encoding + description: >- + When present, its value indicates to the database that compression + is applied to the line-protocol body. + schema: + type: string + description: >- + Specifies that the line protocol in the body is encoded with gzip + or not encoded with identity. + default: identity + enum: + - gzip + - identity + - in: header + name: Content-Type + schema: + type: string + default: application/octet-stream + enum: + - application/octet-stream + - in: path + name: shardID + schema: + type: string + required: true + description: The shard ID. + requestBody: + description: TSM snapshot. + required: true + content: + text/plain: + schema: + type: string + format: binary + responses: + '204': + description: TSM snapshot successfully restored. + default: + description: Unexpected error + $ref: '#/components/responses/ServerError' + /remotes: + get: + operationId: GetRemoteConnections + tags: + - RemoteConnections + summary: List all remote connections + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: orgID + description: The organization ID. + required: true + schema: + type: string + - in: query + name: name + schema: + type: string + - in: query + name: remoteURL + schema: + type: string + format: uri + responses: + '200': + description: List of remote connections + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnections' + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + post: + operationId: PostRemoteConnection + tags: + - RemoteConnections + summary: Register a new remote connection + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: validate + description: 'If true, validate the remote connection, but don''t save it.' + schema: + type: boolean + default: false + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnectionCreationRequest' + responses: + '201': + description: Remote connection saved + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnection' + '204': + description: 'Remote connection validated, but not saved' + '400': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + '/remotes/{remoteID}': + get: + operationId: GetRemoteConnectionByID + tags: + - RemoteConnections + summary: Retrieve a remote connection + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + schema: + type: string + required: true + responses: + '200': + description: Remote connection + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnection' + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + patch: + operationId: PatchRemoteConnectionByID + tags: + - RemoteConnections + summary: Update a remote connection + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + schema: + type: string + required: true + - in: query + name: validate + description: 'If true, validate the updated information, but don''t save it.' + schema: + type: boolean + default: false + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnectionUpdateRequest' + responses: + '200': + description: Updated information saved + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnection' + '204': + description: 'Updated connection validated, but not saved' + '400': + $ref: '#/components/responses/ServerError' + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + delete: + operationId: DeleteRemoteConnectionByID + tags: + - RemoteConnections + summary: Delete a remote connection + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + schema: + type: string + required: true + responses: + '204': + description: Remote connection info deleted. + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + '/remotes/{remoteID}/validate': + post: + operationId: PostValidateRemoteConnectionByID + tags: + - RemoteConnections + summary: Validate a remote connection + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + schema: + type: string + required: true + responses: + '204': + description: Remote connection is valid + '400': + description: Remote connection failed validation + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + /replications: + get: + operationId: GetReplications + tags: + - Replications + summary: List all replications + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: orgID + description: The organization ID. + required: true + schema: + type: string + - in: query + name: name + schema: + type: string + - in: query + name: remoteID + schema: + type: string + - in: query + name: localBucketID + schema: + type: string + responses: + '200': + description: List of replications + content: + application/json: + schema: + $ref: '#/components/schemas/Replications' + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + post: + operationId: PostReplication + tags: + - Replications + summary: Register a new replication + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: validate + description: 'If true, validate the replication, but don''t save it.' + schema: + type: boolean + default: false + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ReplicationCreationRequest' + responses: + '201': + description: Replication saved + content: + application/json: + schema: + $ref: '#/components/schemas/Replication' + '204': + description: 'Replication validated, but not saved' + '400': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + '/replications/{replicationID}': + get: + operationId: GetReplicationByID + tags: + - Replications + summary: Retrieve a replication + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + schema: + type: string + required: true + responses: + '200': + description: Replication + content: + application/json: + schema: + $ref: '#/components/schemas/Replication' + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + patch: + operationId: PatchReplicationByID + tags: + - Replications + summary: Update a replication + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + schema: + type: string + required: true + - in: query + name: validate + description: 'If true, validate the updated information, but don''t save it.' + schema: + type: boolean + default: false + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ReplicationUpdateRequest' + responses: + '200': + description: Updated information saved + content: + application/json: + schema: + $ref: '#/components/schemas/Replication' + '204': + description: 'Updated replication validated, but not saved' + '400': + $ref: '#/components/responses/ServerError' + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + delete: + operationId: DeleteReplicationByID + tags: + - Replications + summary: Delete a replication + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + schema: + type: string + required: true + responses: + '204': + description: Replication deleted. + '404': + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + '/replications/{replicationID}/validate': + post: + operationId: PostValidateReplicationByID + tags: + - Replications + summary: Validate a replication + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + schema: + type: string + required: true + responses: + '204': + description: Replication is valid + '400': + description: Replication failed validation + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + /dashboards: + post: + operationId: PostDashboards + tags: + - Dashboards + summary: Create a dashboard + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Dashboard to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDashboardRequest' + responses: + '201': + description: Added dashboard + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + get: + operationId: GetDashboards + tags: + - Dashboards + summary: List all dashboards + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Descending' + - in: query + name: owner + description: >- + A user identifier. Returns only dashboards where this user has the + `owner` role. + schema: + type: string + - in: query + name: sortBy + description: The column to sort by. + schema: + type: string + enum: + - ID + - CreatedAt + - UpdatedAt + - in: query + name: id + description: >- + A list of dashboard identifiers. Returns only the listed dashboards. + If both `id` and `owner` are specified, only `id` is used. + schema: + type: array + items: + type: string + - in: query + name: orgID + description: The identifier of the organization. + schema: + type: string + - in: query + name: org + description: The name of the organization. + schema: + type: string + responses: + '200': + description: All dashboards + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboards' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tasks: + get: + operationId: GetTasks + tags: + - Tasks + summary: List all tasks + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: name + description: Returns task with a specific name. + schema: + type: string + - in: query + name: after + schema: + type: string + description: Return tasks after a specified ID. + - in: query + name: user + schema: + type: string + description: Filter tasks to a specific user ID. + - in: query + name: org + schema: + type: string + description: Filter tasks to a specific organization name. + - in: query + name: orgID + schema: + type: string + description: Filter tasks to a specific organization ID. + - in: query + name: status + schema: + type: string + enum: + - active + - inactive + description: Filter tasks by a status--"inactive" or "active". + - in: query + name: limit + schema: + type: integer + minimum: 1 + maximum: 500 + default: 100 + description: The number of tasks to return + responses: + '200': + description: A list of tasks + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + operationId: PostTasks + tags: + - Tasks + summary: Create a new task + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Task to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TaskCreateRequest' + responses: + '201': + description: Task created + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' components: parameters: TraceSpan: @@ -6431,8 +7651,9 @@ components: required: false schema: type: string - description: | - The last resource ID from which to seek from (but not including). This is to be used instead of `offset`. + description: > + The last resource ID from which to seek from (but not including). This + is to be used instead of `offset`. schemas: LanguageRequest: description: Flux query to be analyzed. @@ -6462,12 +7683,16 @@ components: params: type: object additionalProperties: true - description: | - Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both) + description: > + Enumeration of key/value pairs that respresent parameters to be + injected into query (can only specify either this field or extern + and not both) dialect: $ref: '#/components/schemas/Dialect' now: - description: Specifies the time that should be reported as "now" in the query. Default is the server's now time. + description: >- + Specifies the time that should be reported as "now" in the query. + Default is the server's now time. type: string format: date-time InfluxQLQuery: @@ -6485,7 +7710,9 @@ components: enum: - influxql bucket: - description: Bucket is to be used instead of the database and retention policy specified in the InfluxQL query. + description: >- + Bucket is to be used instead of the database and retention policy + specified in the InfluxQL query. type: string Package: description: Represents a complete package source tree. @@ -6591,7 +7818,9 @@ components: - $ref: '#/components/schemas/BuiltinStatement' - $ref: '#/components/schemas/TestStatement' BadStatement: - description: A placeholder for statements for which no correct statement nodes can be created + description: >- + A placeholder for statements for which no correct statement nodes can be + created type: object properties: type: @@ -6620,7 +7849,9 @@ components: init: $ref: '#/components/schemas/Expression' ExpressionStatement: - description: May consist of an expression that does not return a value and is executed solely for its side-effects + description: >- + May consist of an expression that does not return a value and is + executed solely for its side-effects type: object properties: type: @@ -6757,7 +7988,9 @@ components: items: $ref: '#/components/schemas/Expression' ConditionalExpression: - description: 'Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`' + description: >- + Selects one of two expressions, `Alternate` or `Consequent`, depending + on a third boolean expression, `Test` type: object properties: type: @@ -6769,7 +8002,9 @@ components: consequent: $ref: '#/components/schemas/Expression' LogicalExpression: - description: Represents the rule conditions that collectively evaluate to either true or false + description: >- + Represents the rule conditions that collectively evaluate to either true + or false type: object properties: type: @@ -6848,7 +8083,9 @@ components: value: type: boolean DateTimeLiteral: - description: Represents an instant in time with nanosecond precision using the syntax of golang's RFC3339 Nanosecond variant + description: >- + Represents an instant in time with nanosecond precision using the syntax + of golang's RFC3339 Nanosecond variant type: object properties: type: @@ -6857,7 +8094,9 @@ components: type: string format: date-time DurationLiteral: - description: Represents the elapsed time between two instants as an int64 nanosecond count with syntax of golang's time.Duration + description: >- + Represents the elapsed time between two instants as an int64 nanosecond + count with syntax of golang's time.Duration type: object properties: type: @@ -6868,7 +8107,9 @@ components: items: $ref: '#/components/schemas/Duration' FloatLiteral: - description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985 + description: >- + Represents floating point numbers according to the double + representations defined by the IEEE-754-1985 type: object properties: type: @@ -6884,13 +8125,17 @@ components: value: type: string PipeLiteral: - description: 'Represents a specialized literal value, indicating the left hand value of a pipe expression' + description: >- + Represents a specialized literal value, indicating the left hand value + of a pipe expression type: object properties: type: $ref: '#/components/schemas/NodeType' RegexpLiteral: - description: Expressions begin and end with `/` and are regular expressions with syntax accepted by RE2 + description: >- + Expressions begin and end with `/` and are regular expressions with + syntax accepted by RE2 type: object properties: type: @@ -6914,7 +8159,9 @@ components: value: type: string Duration: - description: A pair consisting of length of time and the unit of time measured. It is the atomic unit from which all duration literals are composed. + description: >- + A pair consisting of length of time and the unit of time measured. It is + the atomic unit from which all duration literals are composed. type: object properties: type: @@ -6946,7 +8193,9 @@ components: name: type: string Dialect: - description: 'Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions' + description: >- + Dialect are options to change the default CSV output format; + https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions type: object properties: header: @@ -6985,7 +8234,9 @@ components: AuthorizationUpdateRequest: properties: status: - description: If inactive the token is inactive and requests using the token will be rejected. + description: >- + If inactive the token is inactive and requests using the token will + be rejected. default: active type: string enum: @@ -7122,7 +8373,9 @@ components: everySeconds: type: integer format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. + description: >- + Duration in seconds for how long data will be kept in the database. + 0 means infinite. example: 86400 minimum: 0 shardGroupDurationSeconds: @@ -7142,7 +8395,9 @@ components: everySeconds: type: integer format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. + description: >- + Duration in seconds for how long data will be kept in the database. + 0 means infinite. example: 86400 minimum: 0 shardGroupDurationSeconds: @@ -7405,18 +8660,23 @@ components: items: $ref: '#/components/schemas/TemplateKind' resources: - type: object - properties: - id: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - name: - type: string - description: 'if defined with id, name is used for resource exported by id. if defined independently, resources strictly matching name are exported' - required: - - id - - kind + type: array + items: + type: object + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + name: + type: string + description: >- + if defined with id, name is used for resource exported by id. + if defined independently, resources strictly matching name are + exported + required: + - id + - kind TemplateExportByName: type: object properties: @@ -7441,15 +8701,17 @@ components: items: $ref: '#/components/schemas/TemplateKind' resources: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - name: - type: string - required: - - name - - kind + type: array + items: + type: object + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + name: + type: string + required: + - name + - kind Template: type: array items: @@ -7476,7 +8738,9 @@ components: description: Field the environment reference corresponds too envRefKey: type: string - description: Key identified as environment reference and is the key identified in the template + description: >- + Key identified as environment reference and is the key identified + in the template value: description: Value provided to fulfill reference nullable: true @@ -7486,7 +8750,9 @@ components: - type: number - type: boolean defaultValue: - description: Default value that will be provided for the reference when no value is provided + description: >- + Default value that will be provided for the reference when no + value is provided nullable: true oneOf: - type: string @@ -8279,7 +9545,9 @@ components: properties: scheduledFor: nullable: true - description: 'Time used for run''s "now" option, RFC3339. Default is the server''s now time.' + description: >- + Time used for run's "now" option, RFC3339. Default is the server's + now time. type: string format: date-time Tasks: @@ -8299,7 +9567,9 @@ components: readOnly: true type: string type: - description: 'The type of task, this can be used for filtering tasks on list actions.' + description: >- + The type of task, this can be used for filtering tasks on list + actions. type: string orgID: description: The ID of the organization that owns this Task. @@ -8310,6 +9580,9 @@ components: name: description: The name of the task. type: string + ownerID: + description: The ID of the user who owns this Task. + type: string description: description: An optional description of the task. type: string @@ -8318,7 +9591,9 @@ components: labels: $ref: '#/components/schemas/Labels' authorizationID: - description: The ID of the authorization used when this task communicates with the query engine. + description: >- + The ID of the authorization used when this task communicates with + the query engine. type: string flux: description: The Flux script to run for this task. @@ -8327,10 +9602,15 @@ components: description: A simple task repetition schedule; parsed from Flux. type: string cron: - description: A task repetition schedule in the form '* * * * * *'; parsed from Flux. + description: >- + A task repetition schedule in the form '* * * * * *'; parsed from + Flux. type: string offset: - description: 'Duration to delay after the schedule, before executing the task; parsed from flux, if set to zero it will remove this option and use 0 as the default.' + description: >- + Duration to delay after the schedule, before executing the task; + parsed from flux, if set to zero it will remove this option and use + 0 as the default. type: string latestCompleted: description: 'Timestamp of latest scheduled, completed run, RFC3339.' @@ -8586,11 +9866,15 @@ components: type: string op: readOnly: true - description: op describes the logical code operation during error. Useful for debugging. + description: >- + op describes the logical code operation during error. Useful for + debugging. type: string err: readOnly: true - description: err is a stack of errors that occurred during processing of the request. Useful for debugging. + description: >- + err is a stack of errors that occurred during processing of the + request. Useful for debugging. type: string required: - code @@ -8614,11 +9898,15 @@ components: type: string op: readOnly: true - description: Op describes the logical code operation during error. Useful for debugging. + description: >- + Op describes the logical code operation during error. Useful for + debugging. type: string err: readOnly: true - description: Err is a stack of errors that occurred during processing of the request. Useful for debugging. + description: >- + Err is a stack of errors that occurred during processing of the + request. Useful for debugging. type: string line: readOnly: true @@ -8655,10 +9943,14 @@ components: type: object properties: value: - description: value is the value of the field. Meaning of the value is implied by the `type` key + description: >- + value is the value of the field. Meaning of the value is implied by + the `type` key type: string type: - description: '`type` describes the field type. `func` is a function. `field` is a field reference.' + description: >- + `type` describes the field type. `func` is a function. `field` is a + field reference. type: string enum: - func @@ -8668,7 +9960,9 @@ components: - regex - wildcard alias: - description: Alias overrides the field name in the returned response. Applies only if type is `func` + description: >- + Alias overrides the field name in the returned response. Applies + only if type is `func` type: string args: description: Args are the arguments to the function @@ -8743,7 +10037,9 @@ components: type: array minItems: 0 maxItems: 2 - description: 'The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits' + description: >- + The extents of an axis in the form [lower, upper]. Clients determine + whether bounds are to be inclusive or exclusive of their limits items: type: string label: @@ -9646,30 +10942,69 @@ components: type: object properties: verticalTimeAxis: - description: verticalTimeAxis describes the orientation of the table by indicating whether the time axis will be displayed vertically + description: >- + verticalTimeAxis describes the orientation of the table by + indicating whether the time axis will be displayed vertically type: boolean sortBy: $ref: '#/components/schemas/RenamableField' wrapping: - description: Wrapping describes the text wrapping style to be used in table views + description: >- + Wrapping describes the text wrapping style to be used in table + views type: string enum: - truncate - wrap - single-line fixFirstColumn: - description: fixFirstColumn indicates whether the first column of the table should be locked + description: >- + fixFirstColumn indicates whether the first column of the table + should be locked type: boolean fieldOptions: - description: fieldOptions represent the fields retrieved by the query with customization options + description: >- + fieldOptions represent the fields retrieved by the query with + customization options type: array items: $ref: '#/components/schemas/RenamableField' timeFormat: - description: timeFormat describes the display format for time values according to moment.js date formatting + description: >- + timeFormat describes the display format for time values according to + moment.js date formatting type: string decimalPlaces: $ref: '#/components/schemas/DecimalPlaces' + SimpleTableViewProperties: + type: object + required: + - type + - showAll + - queries + - shape + - note + - showNoteWhenEmpty + properties: + type: + type: string + enum: + - simple-table + showAll: + type: boolean + queries: + type: array + items: + $ref: '#/components/schemas/DashboardQuery' + shape: + type: string + enum: + - chronograf-v2 + note: + type: string + showNoteWhenEmpty: + description: 'If true, will display note when empty' + type: boolean MarkdownViewProperties: type: object required: @@ -9799,6 +11134,11 @@ components: isClustered: description: Cluster close markers together type: boolean + tooltipColumns: + description: An array for which columns to display in tooltip + type: array + items: + type: string GeoTrackMapViewLayer: allOf: - $ref: '#/components/schemas/GeoViewLayerProperties' @@ -9902,9 +11242,19 @@ components: type: boolean default: true detectCoordinateFields: - description: 'If true, search results get automatically regroupped so that lon,lat and value are treated as columns' + description: >- + If true, search results get automatically regroupped so that lon,lat + and value are treated as columns type: boolean default: true + useS2CellID: + description: 'If true, S2 column is used to calculate lat/lon' + type: boolean + s2Column: + description: String to define the column + type: string + latLonColumns: + $ref: '#/components/schemas/LatLonColumns' mapStyle: description: 'Define map type - regular, satellite etc.' type: string @@ -9923,6 +11273,30 @@ components: type: array items: $ref: '#/components/schemas/GeoViewLayer' + LatLonColumns: + description: Object type to define lat/lon columns + type: object + required: + - lat + - lon + properties: + lat: + $ref: '#/components/schemas/LatLonColumn' + lon: + $ref: '#/components/schemas/LatLonColumn' + LatLonColumn: + description: Object type for key and column definitions + type: object + required: + - key + - column + properties: + key: + description: Key to determine whether the column is tag/field + type: string + column: + description: Column to look up Lat/Lon + type: string Axes: description: The viewport for a View's visualizations type: object @@ -9943,7 +11317,7 @@ components: heightRatio: type: number format: float - hide: + show: type: boolean opacity: type: number @@ -9956,7 +11330,9 @@ components: type: number format: float DecimalPlaces: - description: 'Indicates whether decimal places should be enforced, and how many digits it should show.' + description: >- + Indicates whether decimal places should be enforced, and how many digits + it should show. type: object properties: isEnforced: @@ -10013,6 +11389,7 @@ components: - $ref: '#/components/schemas/HistogramViewProperties' - $ref: '#/components/schemas/GaugeViewProperties' - $ref: '#/components/schemas/TableViewProperties' + - $ref: '#/components/schemas/SimpleTableViewProperties' - $ref: '#/components/schemas/MarkdownViewProperties' - $ref: '#/components/schemas/CheckViewProperties' - $ref: '#/components/schemas/ScatterViewProperties' @@ -10468,7 +11845,9 @@ components: type: object properties: allowed: - description: True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. + description: >- + True means that the influxdb instance has NOT had initial setup; + false means that the database has been setup. type: boolean PasswordResetBody: properties: @@ -10541,7 +11920,9 @@ components: type: object additionalProperties: type: string - description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + description: >- + Key/Value pairs associated with this label. Keys can be removed by + sending an update with an empty value. example: color: ffb3b3 description: this is a description @@ -10559,7 +11940,9 @@ components: type: object additionalProperties: type: string - description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + description: >- + Key/Value pairs associated with this label. Keys can be removed by + sending an update with an empty value. example: color: ffb3b3 description: this is a description @@ -10572,7 +11955,9 @@ components: type: object additionalProperties: type: string - description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. + description: >- + Key/Value pairs associated with this label. Keys can be removed by + sending an update with an empty value. example: color: ffb3b3 description: this is a description @@ -10830,7 +12215,9 @@ components: description: String duration before deadman triggers. type: string staleTime: - description: String duration for time that a series is considered stale and should not trigger deadman. + description: >- + String duration for time that a series is considered stale and + should not trigger deadman. type: string reportZero: description: 'If only zero values reported since time, trigger an alert' @@ -11049,10 +12436,14 @@ components: runbookLink: type: string limitEvery: - description: 'Don''t notify me more than times every seconds. If set, limit cannot be empty.' + description: >- + Don't notify me more than times every seconds. + If set, limit cannot be empty. type: integer limit: - description: 'Don''t notify me more than times every seconds. If set, limitEvery cannot be empty.' + description: >- + Don't notify me more than times every seconds. + If set, limitEvery cannot be empty. type: integer tagRules: description: List of tag rules the notification rule attempts to match. @@ -11202,7 +12593,9 @@ components: - channel properties: type: - description: The discriminator between other types of notification rules is "telegram". + description: >- + The discriminator between other types of notification rules is + "telegram". type: string enum: - telegram @@ -11210,14 +12603,19 @@ components: description: The message template as a flux interpolated string. type: string parseMode: - description: 'Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" .' + description: >- + Parse mode of the message text per + https://core.telegram.org/bots/api#formatting-options . Defaults to + "MarkdownV2" . type: string enum: - MarkdownV2 - HTML - Markdown disableWebPagePreview: - description: Disables preview of web links in the sent messages when "true". Defaults to "false" . + description: >- + Disables preview of web links in the sent messages when "true". + Defaults to "false" . type: boolean NotificationEndpointUpdate: type: object @@ -11322,7 +12720,9 @@ components: - type: object properties: url: - description: Specifies the URL of the Slack endpoint. Specify either `URL` or `Token`. + description: >- + Specifies the URL of the Slack endpoint. Specify either `URL` or + `Token`. type: string token: description: Specifies the API token string. Specify either `URL` or `Token`. @@ -11386,10 +12786,14 @@ components: - channel properties: token: - description: 'Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot .' + description: >- + Specifies the Telegram bot token. See + https://core.telegram.org/bots#creating-a-new-bot . type: string channel: - description: 'ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage .' + description: >- + ID of the telegram channel, a chat_id in + https://core.telegram.org/bots/api#sendmessage . type: string NotificationEndpointType: type: string @@ -11405,6 +12809,48 @@ components: type: string description: the mapping identifier readOnly: true + orgID: + type: string + description: the organization ID that owns this mapping. + bucketID: + type: string + description: the bucket ID used as target for the translation. + database: + type: string + description: InfluxDB v1 database + retention_policy: + type: string + description: InfluxDB v1 retention policy + default: + type: boolean + description: >- + Specify if this mapping represents the default retention policy for + the database specificed. + links: + $ref: '#/components/schemas/Links' + required: + - id + - orgID + - bucketID + - database + - retention_policy + - default + DBRPs: + properties: + content: + type: array + items: + $ref: '#/components/schemas/DBRP' + DBRPUpdate: + properties: + retention_policy: + type: string + description: InfluxDB v1 retention policy + default: + type: boolean + DBRPCreate: + type: object + properties: orgID: type: string description: the organization ID that owns this mapping. @@ -11422,38 +12868,19 @@ components: description: InfluxDB v1 retention policy default: type: boolean - description: Specify if this mapping represents the default retention policy for the database specificed. - links: - $ref: '#/components/schemas/Links' - oneOf: - - required: - - orgID - - bucketID - - database - - retention_policy - - required: - - org - - bucketID - - database - - retention_policy - DBRPs: + description: >- + Specify if this mapping represents the default retention policy for + the database specificed. + required: + - bucketID + - database + - retention_policy + DBRPGet: + type: object properties: content: - type: array - items: - $ref: '#/components/schemas/DBRP' - DBRPUpdate: - properties: - database: - type: string - description: InfluxDB v1 database - retention_policy: - type: string - description: InfluxDB v1 retention policy - default: - type: boolean - links: - $ref: '#/components/schemas/Links' + $ref: '#/components/schemas/DBRP' + required: true SchemaType: type: string enum: @@ -11481,7 +12908,9 @@ components: permissions: type: array minItems: 1 - description: List of permissions for an auth. An auth must have at least one Permission. + description: >- + List of permissions for an auth. An auth must have at least one + Permission. items: $ref: '#/components/schemas/Permission' id: @@ -11490,7 +12919,9 @@ components: token: readOnly: true type: string - description: Passed via the Authorization Header and Token Authentication type. + description: >- + Passed via the Authorization Header and Token Authentication + type. userID: readOnly: true type: string @@ -11533,7 +12964,34 @@ components: permissions: type: array minItems: 1 - description: List of permissions for an auth. An auth must have at least one Permission. + description: >- + List of permissions for an auth. An auth must have at least one + Permission. + items: + $ref: '#/components/schemas/Permission' + LegacyAuthorizationPostRequest: + required: + - orgID + - permissions + allOf: + - $ref: '#/components/schemas/AuthorizationUpdateRequest' + - type: object + properties: + orgID: + type: string + description: ID of org that authorization is scoped to. + userID: + type: string + description: ID of user that authorization is scoped to. + token: + type: string + description: Token (name) of the authorization + permissions: + type: array + minItems: 1 + description: >- + List of permissions for an auth. An auth must have at least one + Permission. items: $ref: '#/components/schemas/Permission' Authorizations: @@ -11587,19 +13045,20 @@ components: - notebooks id: type: string - nullable: true - description: If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type. + description: >- + If ID is set that is a permission for a specific resource. if it is + not set it is a permission for all resources of that resource type. name: type: string - nullable: true description: Optional name of the resource if the resource has a name field. orgID: type: string - nullable: true - description: If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type. + description: >- + If orgID is set that is a permission for all resources owned my that + org. if it is not set it is a permission for all resources of that + resource type. org: type: string - nullable: true description: Optional name of the organization of the organization with orgID. User: properties: @@ -11649,12 +13108,15 @@ components: retentionPeriodHrs: type: integer deprecated: true - description: | - Retention period *in nanoseconds* for the new bucket. This key's name has been misleading since OSS 2.0 GA, please transition to use `retentionPeriodSeconds` + description: > + Retention period *in nanoseconds* for the new bucket. This key's + name has been misleading since OSS 2.0 GA, please transition to use + `retentionPeriodSeconds` token: type: string - description: | - Authentication token to set on the initial user. If not specified, the server will generate a token. + description: > + Authentication token to set on the initial user. If not specified, + the server will generate a token. required: - username - org @@ -11888,6 +13350,344 @@ components: type: array items: $ref: '#/components/schemas/ScraperTargetResponse' + MetadataBackup: + type: object + properties: + kv: + type: string + format: binary + sql: + type: string + format: binary + buckets: + $ref: '#/components/schemas/BucketMetadataManifests' + required: + - kv + - sql + - buckets + BucketMetadataManifests: + type: array + items: + $ref: '#/components/schemas/BucketMetadataManifest' + BucketMetadataManifest: + type: object + properties: + organizationID: + type: string + organizationName: + type: string + bucketID: + type: string + bucketName: + type: string + description: + type: string + defaultRetentionPolicy: + type: string + retentionPolicies: + $ref: '#/components/schemas/RetentionPolicyManifests' + required: + - organizationID + - organizationName + - bucketID + - bucketName + - defaultRetentionPolicy + - retentionPolicies + RetentionPolicyManifests: + type: array + items: + $ref: '#/components/schemas/RetentionPolicyManifest' + RetentionPolicyManifest: + type: object + properties: + name: + type: string + replicaN: + type: integer + duration: + type: integer + format: int64 + shardGroupDuration: + type: integer + format: int64 + shardGroups: + $ref: '#/components/schemas/ShardGroupManifests' + subscriptions: + $ref: '#/components/schemas/SubscriptionManifests' + required: + - name + - replicaN + - duration + - shardGroupDuration + - shardGroups + - subscriptions + ShardGroupManifests: + type: array + items: + $ref: '#/components/schemas/ShardGroupManifest' + ShardGroupManifest: + type: object + properties: + id: + type: integer + format: int64 + startTime: + type: string + format: date-time + endTime: + type: string + format: date-time + deletedAt: + type: string + format: date-time + truncatedAt: + type: string + format: date-time + shards: + $ref: '#/components/schemas/ShardManifests' + required: + - id + - startTime + - endTime + - shards + ShardManifests: + type: array + items: + $ref: '#/components/schemas/ShardManifest' + ShardManifest: + type: object + properties: + id: + type: integer + format: int64 + shardOwners: + $ref: '#/components/schemas/ShardOwners' + required: + - id + - shardOwners + ShardOwners: + type: array + items: + $ref: '#/components/schemas/ShardOwner' + ShardOwner: + type: object + properties: + nodeID: + type: integer + format: int64 + description: ID of the node that owns a shard. + required: + - nodeID + SubscriptionManifests: + type: array + items: + $ref: '#/components/schemas/SubscriptionManifest' + SubscriptionManifest: + type: object + properties: + name: + type: string + mode: + type: string + destinations: + type: array + items: + type: string + required: + - name + - mode + - destinations + RestoredBucketMappings: + type: object + properties: + id: + description: New ID of the restored bucket + type: string + name: + type: string + shardMappings: + $ref: '#/components/schemas/BucketShardMappings' + required: + - id + - name + - shardMappings + BucketShardMappings: + type: array + items: + $ref: '#/components/schemas/BucketShardMapping' + BucketShardMapping: + type: object + properties: + oldId: + type: integer + format: int64 + newId: + type: integer + format: int64 + required: + - oldId + - newId + RemoteConnection: + type: object + properties: + id: + type: string + name: + type: string + orgID: + type: string + description: + type: string + remoteURL: + type: string + format: uri + remoteOrgID: + type: string + allowInsecureTLS: + type: boolean + default: false + required: + - id + - name + - orgID + - remoteURL + - remoteOrgID + - allowInsecureTLS + RemoteConnections: + type: object + properties: + remotes: + type: array + items: + $ref: '#/components/schemas/RemoteConnection' + RemoteConnectionCreationRequest: + type: object + properties: + name: + type: string + description: + type: string + orgID: + type: string + remoteURL: + type: string + format: uri + remoteAPIToken: + type: string + remoteOrgID: + type: string + allowInsecureTLS: + type: boolean + default: false + required: + - name + - orgID + - remoteURL + - remoteAPIToken + - remoteOrgID + - allowInsecureTLS + RemoteConnectionUpdateRequest: + type: object + properties: + name: + type: string + description: + type: string + remoteURL: + type: string + format: uri + remoteAPIToken: + type: string + remoteOrgID: + type: string + allowInsecureTLS: + type: boolean + default: false + Replication: + type: object + properties: + id: + type: string + name: + type: string + description: + type: string + orgID: + type: string + remoteID: + type: string + localBucketID: + type: string + remoteBucketID: + type: string + maxQueueSizeBytes: + type: integer + format: int64 + currentQueueSizeBytes: + type: integer + format: int64 + latestResponseCode: + type: integer + latestErrorMessage: + type: string + required: + - id + - name + - remoteID + - orgID + - localBucketID + - remoteBucketID + - maxQueueSizeBytes + - currentQueueSizeBytes + Replications: + type: object + properties: + replications: + type: array + items: + $ref: '#/components/schemas/Replication' + ReplicationCreationRequest: + type: object + properties: + name: + type: string + description: + type: string + orgID: + type: string + remoteID: + type: string + localBucketID: + type: string + remoteBucketID: + type: string + maxQueueSizeBytes: + type: integer + format: int64 + minimum: 33554430 + default: 67108860 + required: + - name + - orgID + - remoteID + - localBucketID + - remoteBucketID + - maxQueueSizeBytes + ReplicationUpdateRequest: + type: object + properties: + name: + type: string + description: + type: string + remoteID: + type: string + remoteBucketID: + type: string + maxQueueSizeBytes: + type: integer + format: int64 + minimum: 33554430 responses: ServerError: description: Non 2XX error response from server. @@ -11896,6 +13696,75 @@ components: schema: $ref: '#/components/schemas/Error' securitySchemes: + TokenAuth: + type: http + scheme: token + bearerFormat: InfluxDB Token String + description: > + InfluxDB API tokens ensure secure interaction between users and data. A + token belongs to an organization and identifies InfluxDB permissions + within the organization. + + + Include your API token in an `Authentication: Token YOUR_API_TOKEN` HTTP + header with each request. + + + ### Example + + `curl http://localhost:8086/ping + --header "Authentication: Token YOUR_API_TOKEN"` + + For more information and examples, see the following: + - [Use tokens in API requests](https://docs.influxdata.com/influxdb/v2.0/api-guide/api_intro/#authentication). + - [Manage API tokens](https://docs.influxdata.com/influxdb/v2.0/security/tokens). + - [`/authorizations`](#tag/Authorizations) endpoint. BasicAuth: type: http scheme: basic + description: > + Use Basic authentication with clients that support the InfluxDB 1.x + convention of username and password (that don't support the + `Authorization: Token` scheme). + + + Username and password schemes require the following credentials: + - **username**: 1.x username (this is separate from the UI login username) + - **password**: 1.x password or InfluxDB API token + + ### Example + + + `curl --get "http://localhost:8086/query" + --user "YOUR_1.x_USERNAME":"YOUR_TOKEN_OR_PASSWORD"` + + For more information and examples, see how to [authenticate with a + username and password + scheme](https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/) + QuerystringAuth: + type: apiKey + in: query + name: u=&p= + description: > + Use InfluxDB 1.x API parameters to provide credentials through the query + string. + + + Username and password schemes require the following credentials: + - **username**: 1.x username (this is separate from the UI login username) + - **password**: 1.x password or InfluxDB API token + + ### Example + + + `curl --get "http://localhost:8086/query" + --data-urlencode "u=YOUR_1.x_USERNAME" + --data-urlencode "p=YOUR_TOKEN_OR_PASSWORD"` + + For more information and examples, see how to [authenticate with a + username and password + scheme](https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/) +security: + - TokenAuth: [] + - BasicAuth: [] + - QuerystringAuth: [] diff --git a/api-docs/v2.0/swaggerV1Compat.yml b/api-docs/v2.0/swaggerV1Compat.yml index d0ab5fd9d..0da0e97fb 100644 --- a/api-docs/v2.0/swaggerV1Compat.yml +++ b/api-docs/v2.0/swaggerV1Compat.yml @@ -1,5 +1,4 @@ -# this is a manually maintained file for these old routes until oats#15 is resolved -openapi: "3.0.0" +openapi: 3.0.0 info: title: Influx API Service (V1 compatible endpoints) version: 0.1.0 @@ -8,7 +7,7 @@ servers: description: V1 compatible api endpoints. paths: /write: - post: # technically this functions with other methods as well + post: operationId: PostWriteV1 tags: - Write @@ -21,15 +20,17 @@ paths: schema: type: string parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/AuthUserV1" - - $ref: "#/components/parameters/AuthPassV1" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/AuthUserV1' + - $ref: '#/components/parameters/AuthPassV1' - in: query name: db schema: type: string required: true - description: The bucket to write to. If none exist a bucket will be created with a default 3 day retention policy. + description: >- + The bucket to write to. If none exist a bucket will be created with + a default 3 day retention policy. - in: query name: rp schema: @@ -42,54 +43,76 @@ paths: description: Write precision. - in: header name: Content-Encoding - description: When present, its value indicates to the database that compression is applied to the line-protocol body. + description: >- + When present, its value indicates to the database that compression + is applied to the line-protocol body. schema: type: string - description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity. + description: >- + Specifies that the line protocol in the body is encoded with gzip + or not encoded with identity. default: identity enum: - gzip - identity responses: - "204": - description: Write data is correctly formatted and accepted for writing to the bucket. - "400": - description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. + '204': + description: >- + Write data is correctly formatted and accepted for writing to the + bucket. + '400': + description: >- + Line protocol poorly formed and no points were written. Response + can be used to determine the first malformed line in the body + line-protocol. All data in body was rejected and not written. content: application/json: schema: - $ref: "#/components/schemas/LineProtocolError" - "401": - description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist. + $ref: '#/components/schemas/LineProtocolError' + '401': + description: >- + Token does not have sufficient permissions to write to this + organization and bucket or the organization and bucket do not exist. content: application/json: schema: - $ref: "#/components/schemas/Error" - "403": + $ref: '#/components/schemas/Error' + '403': description: No token was sent and they are required. content: application/json: schema: - $ref: "#/components/schemas/Error" - "413": - description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. + $ref: '#/components/schemas/Error' + '413': + description: >- + Write has been rejected because the payload is too large. Error + message returns max size supported. All data in body was rejected + and not written. content: application/json: schema: - $ref: "#/components/schemas/LineProtocolLengthError" - "429": - description: Token is temporarily over quota. The Retry-After header describes when to try the write again. + $ref: '#/components/schemas/LineProtocolLengthError' + '429': + description: >- + Token is temporarily over quota. The Retry-After header describes + when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 - "503": - description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. + '503': + description: >- + Server is temporarily unavailable to accept writes. The Retry-After + header describes when to try the write again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -98,9 +121,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /query: - post: # technically this functions with other methods as well + post: operationId: PostQueryV1 tags: - Query @@ -108,18 +131,21 @@ paths: requestBody: description: InfluxQL query to execute. content: - text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter + text/plain: schema: type: string parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/AuthUserV1" - - $ref: "#/components/parameters/AuthPassV1" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/AuthUserV1' + - $ref: '#/components/parameters/AuthPassV1' - in: header name: Accept schema: type: string - description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps. + description: >- + Specifies how query results should be encoded in the response. + **Note:** With `application/csv`, query results include epoch + timestamps instead of RFC3339 timestamps. default: application/json enum: - application/json @@ -128,10 +154,15 @@ paths: - application/x-msgpack - in: header name: Accept-Encoding - description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. + description: >- + The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to + understand. schema: type: string - description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity. + description: >- + Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. default: identity enum: - gzip @@ -148,42 +179,53 @@ paths: schema: type: string responses: - "200": + '200': description: Query results headers: Content-Encoding: - description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body + description: >- + The Content-Encoding entity header is used to compress the + media-type. When present, its value indicates which encodings + were applied to the entity-body schema: type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. + description: >- + Specifies that the response in the body is encoded with gzip + or not encoded with identity. default: identity enum: - gzip - identity Trace-Id: - description: The Trace-Id header reports the request's trace ID, if one was generated. + description: >- + The Trace-Id header reports the request's trace ID, if one was + generated. schema: type: string description: Specifies the request's trace ID. content: application/csv: schema: - $ref: "#/components/schemas/InfluxQLCSVResponse" + $ref: '#/components/schemas/InfluxQLCSVResponse' text/csv: schema: - $ref: "#/components/schemas/InfluxQLCSVResponse" + $ref: '#/components/schemas/InfluxQLCSVResponse' application/json: schema: - $ref: "#/components/schemas/InfluxQLResponse" + $ref: '#/components/schemas/InfluxQLResponse' application/x-msgpack: schema: type: string format: binary - "429": - description: Token is temporarily over quota. The Retry-After header describes when to try the read again. + '429': + description: >- + Token is temporarily over quota. The Retry-After header describes + when to try the read again. headers: Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. + description: >- + A non-negative decimal integer indicating the seconds to delay + after the response is received. schema: type: integer format: int32 @@ -192,7 +234,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' components: parameters: TraceSpan: @@ -200,8 +242,8 @@ components: name: Zap-Trace-Span description: OpenTracing span context example: - trace_id: "1" - span_id: "1" + trace_id: '1' + span_id: '1' baggage: key: value required: false @@ -260,7 +302,6 @@ components: description: Code is the machine-readable error code. readOnly: true type: string - # This set of enumerations must remain in sync with the constants defined in errors.go enum: - internal error - not found @@ -277,7 +318,9 @@ components: readOnly: true description: Message is a human-readable message. type: string - required: [code, message] + required: + - code + - message LineProtocolError: properties: code: @@ -297,18 +340,26 @@ components: type: string op: readOnly: true - description: Op describes the logical code operation during error. Useful for debugging. + description: >- + Op describes the logical code operation during error. Useful for + debugging. type: string err: readOnly: true - description: Err is a stack of errors that occurred during processing of the request. Useful for debugging. + description: >- + Err is a stack of errors that occurred during processing of the + request. Useful for debugging. type: string line: readOnly: true description: First line within sent body containing malformed data type: integer format: int32 - required: [code, message, op, err] + required: + - code + - message + - op + - err LineProtocolLengthError: properties: code: @@ -326,4 +377,7 @@ components: description: Max length in bytes for a body of line-protocol. type: integer format: int32 - required: [code, message, maxLength] + required: + - code + - message + - maxLength diff --git a/api-docs/yarn.lock b/api-docs/yarn.lock index fb57ccd13..439c07f0e 100644 --- a/api-docs/yarn.lock +++ b/api-docs/yarn.lock @@ -2,3 +2,4 @@ # yarn lockfile v1 + diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md b/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md index e4cb0a878..fb1e3d962 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md @@ -15,11 +15,7 @@ related: introduced: 0.92.0 --- -The `influxdb.cardinality()` function returns the [series cardinality](/{{< latest "influxdb" "v2" >}}/reference/glossary#series-cardinality) of data stored in InfluxDB Cloud. - -{{% cloud %}} -**InfluxDB Cloud** supports the `influxdb.cardinality()` function, but **InfluxDB OSS does not**. -{{% /cloud %}} +The `influxdb.cardinality()` function returns the [series cardinality](/{{< latest "influxdb" "v2" >}}/reference/glossary#series-cardinality) of a specified dataset. ```js import "influxdata/influxdb" diff --git a/content/influxdb/v2.0/reference/config-options.md b/content/influxdb/v2.0/reference/config-options.md index 4233c374d..75ef16aee 100644 --- a/content/influxdb/v2.0/reference/config-options.md +++ b/content/influxdb/v2.0/reference/config-options.md @@ -87,7 +87,6 @@ tls-key = "/path/to/influxdb.key" Only non-default settings need to be defined in the configuration file. {{% /note %}} - ## Configuration options To configure InfluxDB, use the following configuration options when starting the @@ -97,6 +96,7 @@ To configure InfluxDB, use the following configuration options when starting the - [bolt-path](#bolt-path) - [e2e-testing](#e2e-testing) - [engine-path](#engine-path) +- [flux-log-enabled](#flux-log-enabled) - [http-bind-address](#http-bind-address) - [http-idle-timeout](#http-idle-timeout) - [http-read-header-timeout](#http-read-header-timeout) @@ -345,6 +345,64 @@ engine-path = "/users/user/.influxdbv2/engine" --- +### flux-log-enabled + +Include option to show detailed logs for Flux queries, including the following log fields: + +- `compiler_type`: Compiler used for processing the query (will always be Flux). +- `response_size`: Size of the response, in bytes. +- `query`: The textual representation of the query. +- `err`: Errors encountered while processing the query. +- `stat_total_duration`: Total duration to process the query. +- `stat_compile_duration`: Duration to compile the query. +- `stat_execute_duration`: Duration to execute the query. +- `stat_max_allocated`: Maximum amount of memory allocated while processing the query, in - bytes. +- `stat_total_allocated`: Total amount of memory allocated while processing the query, in bytes. This includes memory that was freed and then used again. + +**Default:** `false` + +| influxd flag | Environment variable | Configuration key | +|:------------ |:-------------------- |:----------------- | +| `--flux-log-enabled` | `INFLUXD_FLUX_LOG_ENABLED` | `flux-log-enabled`| + +###### influxd flag +```sh +influxd --flux-log-enabled=true +``` + +###### Environment variable +```sh +export INFLUXD_FLUX_LOG_ENABLED=true +``` + +###### Configuration file +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[YAML](#) +[TOML](#) +[JSON](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```yml +flux-log-enabled: true +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```toml +flux-log-enabled = "true" +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```json +{ + "flux-log-enabled": "true" +} +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +--- + ### http-bind-address Bind address for the InfluxDB HTTP API. Customize the URL and port for the InfluxDB API and UI. diff --git a/content/influxdb/v2.0/reference/release-notes/influxdb.md b/content/influxdb/v2.0/reference/release-notes/influxdb.md index bd99ef975..724885406 100644 --- a/content/influxdb/v2.0/reference/release-notes/influxdb.md +++ b/content/influxdb/v2.0/reference/release-notes/influxdb.md @@ -8,6 +8,105 @@ menu: weight: 101 --- +## v2.0.9 [2021-09-27] + +This release includes several new [features](#features) and [bug fixes](#bug-fixes). + +### Features + +New features include: + +- [API updates](#api-updates) +- [Flux updates](#flux-updates) +- [Performance enhancements](#performance-enhancements) + +#### API updates + +- Add a new route `/api/v2/resources` that returns a list of known resources to the platform, including the following resource types. Makes it easier to update all-access tokens with current resources: + + - `AuthorizationsResourceType` + - `BucketsResourceType` + - `ChecksResourceType` + - `DashboardsResourceType` + - `DBRPResourceType` + - `DocumentsResourceType` + - `LabelsResourceType` + - `NotificationEndpointResourceType` + - `NotificationRuleResourceType` + - `OrgsResourceType` + - `ScraperResourceType` + - `SecretsResourceType` + - `SourcesResourceType` + - `TasksResourceType` + - `TelegrafsResourceType` + - `UsersResourceType` + - `VariablesResourceType` + - `ViewsResourceType` + + +#### Flux updates + +- Update to [Flux v0.130.0](/flux/v0.x/release-notes/#v01300-2021-09-15). +- Add support for [`influxdb.cardinality()`](/flux/v0.x/stdlib/influxdata/influxdb/cardinality/) function. +- Operational improvements: + - Add logging to Flux end-to-end tests (`TestFluxEndToEnd`) to help diagnose test failures. + - Add `--flux-log-enabled` option to [`influxd`](/influxdb/v2.0/reference/config-options/) to show detailed logs for Flux queries. + +#### Performance enhancements + +- Optimize series iteration for queries that can be answered without inspecting TSM data. +- Optimize queries with predicates that contain multiple measurements. + +### Bug fixes + +This release includes the following bug fixes and updates: + +- [API fix](#api-fix) +- [Dependency update](#dependency-update) +- [Error updates](#error-updates) +- [Limit update](#limit-update) +- [Miscellaneous operational fixes](#miscellaneous-operational-fixes) +- [Task updates](#task-updates) +- [Version maintenance](#version-maintenance) + +#### API fix + +- Correctly filter requests to `/api/v2/authorizations` by `org` and `user` parameters. + +#### Dependency update + +- Include `curl` as a dependency in `influxdb2` packages. + +#### Errors updates + +- Add message to set the Flux `content-type` when a query fails to parse as JSON. +- Discard excessive errors over `DefaultMaxSavedErrors (100)` to prevent out-of-memory crashes. +- Upgrade `golang.org/x/sys` to avoid panics on macs. + +#### Limit update + +- Implement hard limit on field size (`MaxFieldValueLength = 1048576`) while parsing line protocol. + +#### Miscellaneous operational fixes + +- Resolve the compaction queue stats flutter. +- Ensure the TSI index compacts log files that meet one of the following criteria: + - Log file hasn't been updated (no new series have been added to the shard) for 4 (or more) hours (to change this duration, specify a new [`storage-compact-full-write-cold-duration`](/influxdb/v2.0/reference/config-options/#storage-compact-full-write-cold-duration)) + - Log file is one (or more) megabytes (to update this size, specify a new [`storage-max-index-log-file-size`](/influxdb/v2.0/reference/config-options/#storage-max-index-log-file-size)) +- Repair bad port dropping return value names. +- Use consistent path separator in permission string representation. +- (Windows only) Copy snapshot files being backed up. + +#### Task updates + +- Updating an inactive task no longer schedules it. Thanks @raffs! +- Preserve comments in Flux queries when saving task definitions. + +#### Version maintenance + +- Fix `X-Influxdb-Build` and `X-Influxdb-Version` response header at `/ping`. +- Upgrade `influxql` to latest version and fix predicate handling for `SHOW TAG VALUES` meta queries. + ## v2.0.8 [2021-08-13] {{% warn %}} #### Upcoming changes to influx CLI packaging @@ -134,9 +233,8 @@ The prefix used for Prometheus metrics from the query controller has changed fro - [http-write-timeout](/influxdb/v2.0/reference/config-options/#http-write-timeout) - [http-idle-timeout](/influxdb/v2.0/reference/config-options/#http-idle-timeout) - Add `/debug/pprof/all` HTTP endpoint to gather all profiles at once. -- Include the InfluxDB 1.x `http.pprof-enabled` configuration option in the 2.0 - configuration file generated by the [InfluxDB upgrade process](/influxdb/v2.0/upgrade/v1-to-v2/automatic-upgrade/). -- Add support for [custom shard group durations](/influxdb/v2.0/reference/cli/influx/bucket/create/#create-a-bucket-with-a-custom-shard-group-duration) on buckets. +- Include the InfluxDB 1.x `http.pprof-enabled` configuration option in the 2.0 configuration file generated by the [InfluxDB upgrade process](/influxdb/v2.0/upgrade/v1-to-v2/automatic-upgrade/). +- Add support for [custom shard group durations](/influxdb/v2.0/reference/cli/influx/bucket/create#create-a-bucket-with-a-custom-shard-group-duration) on buckets. - Optimize regular expression conditions in InfluxQL subqueries. - Update Telegraf plugins in the InfluxDB UI to include additions and changes from [Telegraf 1.18](/telegraf/v1.18/about_the_project/release-notes-changelog/#v118-2021-3-17). @@ -260,7 +358,6 @@ The startup process automatically generates replacement `tsi1` indexes for shard - Support creating users without initial passwords in `influx user create`. - Fix incorrect errors when passing `--bucket-id` to `influx write`. - ## v2.0.3 General Availability [2020-12-14] ### Breaking Changes diff --git a/content/influxdb/v2.0/reference/release-notes/supported-release.md b/content/influxdb/v2.0/reference/release-notes/supported-release.md index e666acf3e..33c6984f3 100644 --- a/content/influxdb/v2.0/reference/release-notes/supported-release.md +++ b/content/influxdb/v2.0/reference/release-notes/supported-release.md @@ -3,7 +3,7 @@ title: Supported releases description: > Supported releases made to InfluxData. menu: - influxdb_2_0: + influxdb_2_0_ref: name: Supported releases parent: Release notes weight: 204