diff --git a/.gitignore b/.gitignore index 43643aa4e..f4923ef05 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules *.log /resources /content/influxdb/*/api/*.html +/api-docs/redoc-static.html* diff --git a/api-docs/cloud/swagger.yml b/api-docs/cloud/swagger.yml index c91440315..c12bd6104 100644 --- a/api-docs/cloud/swagger.yml +++ b/api-docs/cloud/swagger.yml @@ -5,7 +5,7 @@ info: 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 +- url: "/" tags: - name: Authentication description: | @@ -35,8 +35,9 @@ tags: | `204` | No content | For a `POST` request, `204` indicates that InfluxDB accepted the request and request data is valid. Asynchronous operations, such as `write`, might not have completed yet. | | `400` | Bad request | `Authorization` header is missing or malformed or the API token does not have permission for the operation. | | `401` | Unauthorized | May indicate one of the following:
  • `Authorization: Token` header is missing or malformed
  • API token value is missing from the header
  • API token does not have permission. For more information about token types and permissions, see [Manage API tokens](https://docs.influxdata.com/influxdb/cloud/security/tokens/)
  • | - | `404` | Not found | Requested resource was not found. `message` in the response body contains details about the requested resource. | + | `404` | Not found | Requested resource was not found. `message` in the response body provides details about the requested resource. | | `413` | Request entity too large | Request payload exceeds the size limit. | + | `422` | Unprocessible entity | Request data is invalid. `code` and `message` in the response body provide details about the problem. | | `429` | Too many requests | API token is temporarily over the request quota. The `Retry-After` header describes when to try the request again. | | `500` | Internal server error | | | `503` | Service unavailable | Server is temporarily unavailable to process the request. The `Retry-After` header describes when to try the request again. | @@ -64,6 +65,7 @@ x-tagGroups: - Buckets - Dashboards - Tasks + - Resources - name: Security and access endpoints tags: - Authorizations @@ -75,6 +77,7 @@ x-tagGroups: - Routes - name: All endpoints tags: + - Annotations - Authorizations - Buckets - Cells @@ -83,6 +86,7 @@ x-tagGroups: - Dashboards - Delete - DemoDataBuckets + - Invocable Scripts - Labels - Limits - NotificationEndpoints @@ -92,14 +96,16 @@ x-tagGroups: - Ping - Public Flags - Query + - Resources - Routes - Rules - Secrets - Setup - Signin - Signout - - Sources + - Streams - Tasks + - Telegraf Plugins - Telegrafs - Templates - Usage @@ -107,2117 +113,3679 @@ x-tagGroups: - Variables - Write paths: - /signin: - post: - operationId: PostSignin - 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: - - BasicAuthentication: [] - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '204': - description: Success. User authenticated. - '401': - description: Unauthorized access. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: User account is disabled. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unsuccessful authentication. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /signout: - post: - operationId: PostSignout - summary: Expire the current UI session - tags: - - Signout - description: Expires the current UI session for the user. - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '204': - description: Session successfully expired - '401': - description: Unauthorized access - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unsuccessful session expiry - content: - 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. - /: + /api/v2/: get: operationId: GetRoutes - summary: List all top level routes - tags: - - Routes parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' responses: default: - description: All routes content: application/json: schema: $ref: '#/components/schemas/Routes' - /documents/templates: - get: - operationId: GetDocumentsTemplates + description: All routes + summary: List all top level routes tags: - - Templates - summary: List all templates + - Routes + /api/v2/authorizations: + get: + operationId: GetAuthorizations parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: Specifies the name of the organization of the template. - schema: - type: string - - in: query - name: orgID - description: Specifies the organization ID of the template. - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - description: Only show authorizations that belong to a user ID. + in: query + name: userID + schema: + type: string + - description: Only show authorizations that belong to a user name. + in: query + name: user + schema: + type: string + - description: Only show authorizations that belong to an organization ID. + in: query + name: orgID + schema: + type: string + - description: Only show authorizations that belong to a organization name. + in: query + name: org + schema: + type: string + - description: Find a token by value. + in: query + name: token + schema: + type: string responses: - '200': - description: A list of template documents + "200": content: application/json: schema: - $ref: '#/components/schemas/Documents' + $ref: '#/components/schemas/Authorizations' + description: A list of authorizations default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + summary: List all authorizations + tags: + - Authorizations post: - operationId: PostDocumentsTemplates - tags: - - Templates - summary: Create a template + operationId: PostAuthorizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Template that will be created - required: true content: application/json: schema: - $ref: '#/components/schemas/DocumentCreate' - responses: - '201': - description: Template created - content: - application/json: - schema: - $ref: '#/components/schemas/Document' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/documents/templates/{templateID}': - get: - operationId: GetDocumentsTemplatesID - tags: - - Templates - summary: Retrieve a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - responses: - '200': - description: The template requested - content: - application/json: - schema: - $ref: '#/components/schemas/Document' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutDocumentsTemplatesID - tags: - - Templates - summary: Update a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - requestBody: - description: Template that will be updated + $ref: '#/components/schemas/Authorization' + description: Authorization to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentUpdate' responses: - '200': - description: The newly updated template + "201": content: application/json: schema: - $ref: '#/components/schemas/Document' + $ref: '#/components/schemas/Authorization' + description: Authorization created + "400": + $ref: '#/components/responses/ServerError' + description: Invalid request default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + summary: Create an authorization + tags: + - Authorizations + /api/v2/authorizations/{authID}: delete: - operationId: DeleteDocumentsTemplatesID - tags: - - Templates - summary: Delete a template + operationId: DeleteAuthorizationsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - responses: - '204': - description: Delete has been accepted - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/documents/templates/{templateID}/labels': - get: - operationId: GetDocumentsTemplatesIDLabels - tags: - - Templates - summary: List all labels for a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - responses: - '200': - description: A list of all labels for a template - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostDocumentsTemplatesIDLabels - tags: - - Templates - summary: Add a label to a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The identifier of the authorization to delete. + in: path + name: authID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' + schema: + type: string responses: - '201': - description: The label added to the template - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' + "204": + description: Authorization deleted default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/documents/templates/{templateID}/labels/{labelID}': - delete: - operationId: DeleteDocumentsTemplatesIDLabelsID + summary: Delete an authorization tags: - - Templates - summary: Delete a label from a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. - responses: - '204': - description: Delete has been accepted - '404': - description: Template not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /dbrps: + - Authorizations get: - operationId: GetDBRPs - tags: - - DBRPs - summary: List database retention policy mappings + operationId: GetAuthorizationsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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 - schema: - type: string - - in: query - name: bucketID - description: Specifies the bucket ID to filter on - schema: - type: string - - in: query - name: default - description: Specifies filtering on default - schema: - type: boolean - - in: query - name: db - description: Specifies the database to filter on - schema: - type: string - - in: query - name: rp - description: Specifies the retention policy to filter on - schema: - type: string - responses: - '200': - description: Success. Returns a list of database retention policy mappings. - content: - application/json: - schema: - $ref: '#/components/schemas/DBRPs' - '400': - description: Bad request. The request has one or more invalid parameters. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostDBRP - tags: - - DBRPs - summary: Add a database retention policy mapping - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: The database retention policy mapping to add + - $ref: '#/components/parameters/TraceSpan' + - description: The identifier of the authorization to get. + in: path + name: authID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DBRPCreate' + schema: + type: string responses: - '201': - description: Created. Returns the created database retention policy mapping. + "200": content: application/json: schema: - $ref: '#/components/schemas/DBRP' - '400': - description: Bad request. The mapping in the request has one or more invalid IDs. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/Authorization' + description: Authorization details default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dbrps/{dbrpID}': - get: - operationId: GetDBRPsID + summary: Retrieve an authorization tags: - - DBRPs - summary: Retrieve a database retention policy mapping - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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: - type: string - required: true - description: The database retention policy mapping ID - responses: - '200': - description: The database retention policy requested - content: - application/json: - schema: - $ref: '#/components/schemas/DBRPGet' - '400': - description: if any of the IDs passed is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - Authorizations patch: - operationId: PatchDBRPID - tags: - - DBRPs - summary: Update a database retention policy mapping - requestBody: - description: Database retention policy update to apply + description: Update an authorization's status to `active` or `inactive`. + operationId: PatchAuthorizationsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The identifier of the authorization to update. + in: path + name: authID required: true + schema: + type: string + requestBody: content: application/json: schema: - $ref: '#/components/schemas/DBRPUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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: - type: string - required: true - description: The database retention policy mapping. + $ref: '#/components/schemas/AuthorizationUpdateRequest' + description: The updated Authorization object. + required: true responses: - '200': - description: An updated mapping + "200": content: application/json: schema: - $ref: '#/components/schemas/DBRPGet' - '400': - description: if any of the IDs passed is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: The mapping was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/Authorization' + description: The updated authorization. default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteDBRPID + summary: Update authorization status tags: - - DBRPs - summary: Delete a database retention policy - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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: - type: string - required: true - description: The database retention policy mapping - responses: - '204': - description: Delete has been accepted - '400': - description: if any of the IDs passed is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /telegraf/plugins: + - Authorizations + /api/v2/buckets: get: - operationId: GetTelegrafPlugins - tags: - - Telegraf Plugins - summary: List all Telegraf plugins + operationId: GetBuckets parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: type - description: The type of plugin desired. - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/After' + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The organization ID. + in: query + name: orgID + schema: + type: string + - description: Only returns buckets with a specific name. + in: query + name: name + schema: + type: string + - description: Only returns buckets with a specific ID. + in: query + name: id + schema: + type: string responses: - '200': - description: A list of Telegraf plugins. + "200": content: application/json: schema: - $ref: '#/components/schemas/TelegrafPlugins' + $ref: '#/components/schemas/Buckets' + description: A list of buckets default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /telegrafs: - get: - operationId: GetTelegrafs - tags: - - Telegrafs - summary: List all Telegraf configurations - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID the Telegraf config belongs to. - schema: - type: string - responses: - '200': - description: A list of Telegraf configurations - content: - application/json: - schema: - $ref: '#/components/schemas/Telegrafs' - default: description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + summary: List all buckets + tags: + - Buckets post: - operationId: PostTelegrafs - tags: - - Telegrafs - summary: Create a Telegraf configuration + operationId: PostBuckets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Telegraf configuration to create - required: true content: application/json: schema: - $ref: '#/components/schemas/TelegrafRequest' - responses: - '201': - description: Telegraf configuration created - content: - application/json: - schema: - $ref: '#/components/schemas/Telegraf' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}': - get: - operationId: GetTelegrafsID - tags: - - Telegrafs - summary: Retrieve a Telegraf configuration - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. - - in: header - name: Accept - required: false - schema: - type: string - default: application/toml - enum: - - application/toml - - application/json - - application/octet-stream - responses: - '200': - description: Telegraf configuration details - content: - application/toml: - example: |- - [agent] - interval = "10s" - schema: - type: string - application/json: - schema: - $ref: '#/components/schemas/Telegraf' - application/octet-stream: - example: |- - [agent] - interval = "10s" - schema: - type: string - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutTelegrafsID - tags: - - Telegrafs - summary: Update a Telegraf configuration - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. - requestBody: - description: Telegraf configuration update to apply + $ref: '#/components/schemas/PostBucketRequest' + description: Bucket to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TelegrafRequest' responses: - '200': - description: An updated Telegraf configurations + "201": content: application/json: schema: - $ref: '#/components/schemas/Telegraf' - default: - description: Unexpected error + $ref: '#/components/schemas/Bucket' + description: Bucket created + "422": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Request body failed validation + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a bucket + tags: + - Buckets + /api/v2/buckets/{bucketID}: delete: - operationId: DeleteTelegrafsID - tags: - - Telegrafs - summary: Delete a Telegraf configuration + operationId: DeleteBucketsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the bucket to delete. + in: path + name: bucketID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - default: - description: Unexpected error + "404": content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/labels': - get: - operationId: GetTelegrafsIDLabels + description: Bucket not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a bucket tags: - - Telegrafs - summary: List all labels for a Telegraf config + - Buckets + get: + operationId: GetBucketsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '200': - description: A list of all labels for a Telegraf config + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Bucket' + description: Bucket details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a bucket + tags: + - Buckets + patch: + operationId: PatchBucketsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchBucketRequest' + description: Bucket update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Bucket' + description: An updated bucket + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a bucket + tags: + - Buckets + /api/v2/buckets/{bucketID}/labels: + get: + operationId: GetBucketsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string + responses: + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a bucket default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostTelegrafsIDLabels + description: Unexpected error + summary: List all labels for a bucket tags: - - Telegrafs - summary: Add a label to a Telegraf config + - Buckets + post: + operationId: PostBucketsIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The label added to the Telegraf config + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The newly added label default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/labels/{labelID}': + description: Unexpected error + summary: Add a label to a bucket + tags: + - Buckets + /api/v2/buckets/{bucketID}/labels/{labelID}: delete: - operationId: DeleteTelegrafsIDLabelsID - tags: - - Telegrafs - summary: Delete a label from a Telegraf config + operationId: DeleteBucketsIDLabelsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': - description: Telegraf config not found + "404": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Bucket not found default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/members': - get: - operationId: GetTelegrafsIDMembers + description: Unexpected error + summary: Delete a label from a bucket tags: - - Telegrafs - summary: List all users with member privileges for a Telegraf config + - Buckets + /api/v2/buckets/{bucketID}/members: + get: + operationId: GetBucketsIDMembers parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '200': - description: A list of Telegraf config members + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceMembers' + description: A list of bucket members default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostTelegrafsIDMembers + description: Unexpected error + summary: List all users with member privileges for a bucket tags: - - Telegrafs - summary: Add a member to a Telegraf config + - Buckets + post: + operationId: PostBucketsIDMembers parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. - requestBody: - description: User to add as member + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true responses: - '201': - description: Member added to Telegraf config + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceMember' + description: Member added to bucket default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/members/{userID}': - delete: - operationId: DeleteTelegrafsIDMembersID + description: Unexpected error + summary: Add a member to a bucket tags: - - Telegrafs - summary: Remove a member from a Telegraf config + - Buckets + /api/v2/buckets/{bucketID}/members/{userID}: + delete: + operationId: DeleteBucketsIDMembersID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '204': + "204": description: Member removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/owners': - get: - operationId: GetTelegrafsIDOwners + description: Unexpected error + summary: Remove a member from a bucket tags: - - Telegrafs - summary: List all owners of a Telegraf configuration + - Buckets + /api/v2/buckets/{bucketID}/owners: + get: + operationId: GetBucketsIDOwners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '200': - description: Returns Telegraf configuration owners as a ResourceOwners list + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceOwners' + description: A list of bucket owners default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostTelegrafsIDOwners + description: Unexpected error + summary: List all owners of a bucket tags: - - Telegrafs - summary: Add an owner to a Telegraf configuration + - Buckets + post: + operationId: PostBucketsIDOwners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. - requestBody: - description: User to add as owner + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true responses: - '201': - description: Telegraf configuration owner was added. Returns a ResourceOwner that references the User. + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceOwner' + description: Bucket owner added default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/owners/{userID}': - delete: - operationId: DeleteTelegrafsIDOwnersID + description: Unexpected error + summary: Add an owner to a bucket tags: - - Telegrafs - summary: Remove an owner from a Telegraf config + - Buckets + /api/v2/buckets/{bucketID}/owners/{userID}: + delete: + operationId: DeleteBucketsIDOwnersID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '204': + "204": description: Owner removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/variables/{variableID}/labels': - get: - operationId: GetVariablesIDLabels + description: Unexpected error + summary: Remove an owner from a bucket tags: - - Variables - summary: List all labels for a variable + - Buckets + /api/v2/buckets/{bucketID}/schema/measurements: + get: + operationId: getMeasurementSchemas parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - schema: - type: string - required: true - description: The variable ID. + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The identifier of the organization. + in: query + name: orgID + schema: + type: string + - description: The name of the measurement to return schemas for. + in: query + name: name + schema: + type: string + - description: The identifier of the bucket. + in: path + name: bucketID + required: true + schema: + type: string responses: - '200': - description: A list of all labels for a variable + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementSchemaList' + description: A list of measurement schemas returning summary information. + headers: + ETag: + description: The current version of the bucket schema + schema: + type: string + "404": + $ref: '#/components/responses/ServerError' + description: Bucket not found + summary: List all measurement schemas of a bucket + tags: + - Bucket Schemas + post: + operationId: createMeasurementSchema + parameters: + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The identifier of the organization. + in: query + name: orgID + schema: + type: string + - description: The identifier of the bucket. + in: path + name: bucketID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementSchemaCreateRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementSchema' + description: The created measurement schema. + headers: + ETag: + description: The current version of the measurement schema + schema: + type: string + "400": + content: + application/json: + examples: + badNameExample: + 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. + summary: Invalid name + value: + code: invalid + message: name is invalid + duplicateColumnNamesExample: + description: The error returned when the request body contains duplicate + column names. + summary: Duplicate column names + value: + code: invalid + message: Duplicate column names + missingColumnsExample: + description: The error returned when the request body is missing + the columns property. + summary: Missing columns + value: + code: invalid + message: columns is required + missingFieldExample: + description: The error returned when the request body is missing + at least one field type column. + summary: Missing field + value: + code: invalid + message: At least one field column is required + missingTimestampExample: + description: The error returned when the request body is missing + a timestamp type column. + summary: Missing timestamp + value: + code: invalid + message: Timestamp column is required + schema: + $ref: '#/components/schemas/Error' + description: Client error with create request + summary: Create a measurement schema for a bucket + tags: + - Bucket Schemas + summary: Bucket schemas + /api/v2/buckets/{bucketID}/schema/measurements/{measurementID}: + get: + operationId: getMeasurementSchema + parameters: + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The identifier of the organization. + in: query + name: orgID + schema: + type: string + - description: The identifier of the bucket. + in: path + name: bucketID + required: true + schema: + type: string + - description: The identifier of the measurement. + in: path + name: measurementID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementSchema' + description: Schema definition for a single measurement + headers: + ETag: + description: The current version of the measurement schema + schema: + type: string + summary: Retrieve measurement schema information + tags: + - Bucket Schemas + patch: + operationId: updateMeasurementSchema + parameters: + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The identifier of the organization. + in: query + name: orgID + schema: + type: string + - description: The identifier of the bucket. + in: path + name: bucketID + required: true + schema: + type: string + - description: The identifier of the measurement. + in: path + name: measurementID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementSchemaUpdateRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MeasurementSchema' + description: The updated measurement schema + "400": + content: + application/json: + examples: + missingColumnsExample: + description: The error returned when the request body does not contain + all the columns from the source. + summary: Deleted columns + value: + code: invalid + message: Unable to delete columns from schema + schema: + $ref: '#/components/schemas/Error' + description: Client error updating measurement schema + summary: Update a measurement schema + tags: + - Bucket Schemas + summary: Bucket Schema + /api/v2/checks: + get: + operationId: GetChecks + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - description: Only show checks that belong to a specific organization ID. + in: query + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Checks' + description: A list of checks + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all checks + tags: + - Checks + post: + operationId: CreateCheck + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostCheck' + description: Check to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: Check created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add new check + tags: + - Checks + /api/v2/checks/{checkID}: + delete: + operationId: DeleteChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a check + tags: + - Checks + get: + operationId: GetChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: The check requested + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a check + tags: + - Checks + patch: + operationId: PatchChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CheckPatch' + description: Check update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: An updated check + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a check + tags: + - Checks + put: + operationId: PutChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: Check update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: An updated check + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a check + tags: + - Checks + /api/v2/checks/{checkID}/labels: + get: + operationId: GetChecksIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a check default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostVariablesIDLabels + description: Unexpected error + summary: List all labels for a check tags: - - Variables - summary: Add a label to a variable + - Checks + post: + operationId: PostChecksIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - schema: - type: string - required: true - description: The variable ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The newly added label + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The label was added to the check default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/variables/{variableID}/labels/{labelID}': + description: Unexpected error + summary: Add a label to a check + tags: + - Checks + /api/v2/checks/{checkID}/labels/{labelID}: delete: - operationId: DeleteVariablesIDLabelsID - tags: - - Variables - summary: Delete a label from a variable + operationId: DeleteChecksIDLabelsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - schema: - type: string - required: true - description: The variable ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': - description: Variable not found + "404": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Check or label not found default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /delete: + description: Unexpected error + summary: Delete label from a check + tags: + - Checks + /api/v2/checks/{checkID}/query: + get: + operationId: GetChecksIDQuery + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FluxResponse' + description: The check query requested + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Check not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a check query + tags: + - Checks + /api/v2/dashboards: + get: + operationId: GetDashboards + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Descending' + - description: The non-zero number of dashboards to return + in: query + name: limit + schema: + default: 20 + maximum: 100 + minimum: -1 + type: integer + - description: A user identifier. Returns only dashboards where this user has + the `owner` role. + in: query + name: owner + schema: + type: string + - description: The column to sort by. + in: query + name: sortBy + schema: + enum: + - ID + - CreatedAt + - UpdatedAt + type: string + - description: A list of dashboard identifiers. Returns only the listed dashboards. + If both `id` and `owner` are specified, only `id` is used. + in: query + name: id + schema: + items: + type: string + type: array + - description: The identifier of the organization. + in: query + name: orgID + schema: + type: string + - description: The name of the organization. + in: query + name: org + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboards' + description: All dashboards + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all dashboards + tags: + - Dashboards post: - operationId: PostDelete - tags: - - Delete - summary: Delete data + operationId: PostDashboards + parameters: + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Deletes data from an InfluxDB bucket. - required: true content: application/json: schema: - $ref: '#/components/schemas/DeletePredicateRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: Specifies the organization to delete data from. - schema: - type: string - description: Only points from this organization are deleted. - - in: query - name: bucket - description: Specifies the bucket to delete data from. - schema: - type: string - description: Only points from this bucket are deleted. - - in: query - name: orgID - description: Specifies the organization ID of the resource. - schema: - type: string - - in: query - name: bucketID - description: Specifies the bucket ID to delete data from. - schema: - type: string - description: Only points from this bucket ID are deleted. - responses: - '204': - description: delete has been accepted - '400': - description: Invalid request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: no token was sent or does not have sufficient permissions. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: the bucket or organization is not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /labels: - post: - operationId: PostLabels - tags: - - Labels - summary: Create a label - requestBody: - description: Label to create + $ref: '#/components/schemas/CreateDashboardRequest' + description: Dashboard to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelCreateRequest' responses: - '201': - description: Added label - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - operationId: GetLabels - tags: - - Labels - summary: List all labels - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID. - schema: - type: string - responses: - '200': - description: A list of labels - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/labels/{labelID}': - get: - operationId: GetLabelsID - tags: - - Labels - summary: Retrieve a label - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to update. - responses: - '200': - description: A label - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchLabelsID - tags: - - Labels - summary: Update a label - requestBody: - description: Label update - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to update. - responses: - '200': - description: Updated label - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - '404': - description: Label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteLabelsID - tags: - - Labels - summary: Delete a label - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}': - get: - operationId: GetDashboardsID - tags: - - Dashboards - summary: Retrieve a Dashboard - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: query - name: include - required: false - schema: - type: string - enum: - - properties - description: Includes the cell view properties in the response if set to `properties` - responses: - '200': - description: Retrieve a single dashboard + "201": content: application/json: schema: oneOf: - - $ref: '#/components/schemas/Dashboard' - - $ref: '#/components/schemas/DashboardWithViewProperties' - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' + description: Added dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - patch: - operationId: PatchDashboardsID + description: Unexpected error + summary: Create a dashboard tags: - - Dashboards - summary: Update a dashboard - requestBody: - description: Patching of a dashboard - required: true - content: - application/json: - schema: - type: object - title: PatchDashboardRequest - properties: - name: - description: 'optional, when provided will replace the name' - type: string - description: - description: 'optional, when provided will replace the description' - type: string - cells: - description: 'optional, when provided will replace all existing cells with the cells provided' - $ref: '#/components/schemas/CellWithViewProperties' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - responses: - '200': - description: Updated dashboard - content: - application/json: - schema: - $ref: '#/components/schemas/Dashboard' - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - Dashboards + /api/v2/dashboards/{dashboardID}: delete: operationId: DeleteDashboardsID - tags: - - Dashboards - summary: Delete a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - responses: - '204': - description: Delete has been accepted - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/cells': - put: - operationId: PutDashboardsIDCells - tags: - - 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. - requestBody: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a dashboard + tags: + - Dashboards + get: + operationId: GetDashboardsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID + required: true + schema: + type: string + - description: Includes the cell view properties in the response if set to `properties` + in: query + name: include + required: false + schema: + enum: + - properties + type: string + responses: + "200": + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' + description: Retrieve a single dashboard + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a Dashboard + tags: + - Dashboards + patch: + operationId: PatchDashboardsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID + required: true + schema: + type: string + requestBody: content: application/json: schema: - $ref: '#/components/schemas/Cells' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. + properties: + cells: + $ref: '#/components/schemas/CellWithViewProperties' + description: optional, when provided will replace all existing cells + with the cells provided + description: + description: optional, when provided will replace the description + type: string + name: + description: optional, when provided will replace the name + type: string + title: PatchDashboardRequest + type: object + description: Patching of a dashboard + required: true responses: - '201': - description: Replaced dashboard cells + "200": content: application/json: schema: $ref: '#/components/schemas/Dashboard' - '404': + description: Updated dashboard + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/cells: post: operationId: PostDashboardsIDCells - tags: - - Cells - - Dashboards - summary: Create a dashboard cell - requestBody: - description: Cell that will be added + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCell' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. + description: Cell that will be added + required: true responses: - '201': - description: Cell successfully added + "201": content: application/json: schema: $ref: '#/components/schemas/Cell' - '404': + description: Cell successfully added + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/cells/{cellID}': - patch: - operationId: PatchDashboardsIDCellsID + description: Unexpected error + summary: Create a dashboard cell tags: - - 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. - requestBody: + - Cells + - Dashboards + put: + description: Replaces all cells in a dashboard. This is used primarily to update + the positional information of all cells. + operationId: PutDashboardsIDCells + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cells' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: Replaced dashboard cells + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Replace cells in a dashboard + tags: + - Cells + - Dashboards + /api/v2/dashboards/{dashboardID}/cells/{cellID}: + delete: + operationId: DeleteDashboardsIDCellsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to delete. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The ID of the cell to delete. + in: path + name: cellID + required: true + schema: + type: string + responses: + "204": + description: Cell successfully deleted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Cell or dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a dashboard cell + tags: + - Cells + - Dashboards + patch: + description: Updates the non positional information related to a cell. Updates + to a single cell's positional data could cause grid conflicts. + operationId: PatchDashboardsIDCellsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The ID of the cell to update. + in: path + name: cellID + required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/CellUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: path - name: cellID - schema: - type: string - required: true - description: The ID of the cell to update. + required: true responses: - '200': - description: Updated dashboard cell + "200": content: application/json: schema: $ref: '#/components/schemas/Cell' - '404': + description: Updated dashboard cell + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - operationId: DeleteDashboardsIDCellsID + description: Unexpected error + summary: Update the non-positional information related to a cell tags: - - Cells - - Dashboards - summary: Delete a dashboard cell - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to delete. - - in: path - name: cellID - schema: - type: string - required: true - description: The ID of the cell to delete. - responses: - '204': - description: Cell successfully deleted - '404': - description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/cells/{cellID}/view': + - Cells + - Dashboards + /api/v2/dashboards/{dashboardID}/cells/{cellID}/view: get: operationId: GetDashboardsIDCellsIDView - tags: - - Cells - - Dashboards - - Views - summary: Retrieve the view for a cell parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - - in: path - name: cellID - schema: - type: string - required: true - description: The cell ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The cell ID. + in: path + name: cellID + required: true + schema: + type: string responses: - '200': - description: A dashboard cells view + "200": content: application/json: schema: $ref: '#/components/schemas/View' - '404': + description: A dashboard cells view + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve the view for a cell + tags: + - Cells + - Dashboards + - Views patch: operationId: PatchDashboardsIDCellsIDView - tags: - - Cells - - Dashboards - - Views - summary: Update the view for a cell - requestBody: + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + - description: The ID of the cell to update. + in: path + name: cellID + required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/View' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: path - name: cellID - schema: - type: string - required: true - description: The ID of the cell to update. + required: true responses: - '200': - description: Updated cell view + "200": content: application/json: schema: $ref: '#/components/schemas/View' - '404': + description: Updated cell view + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/labels': + description: Unexpected error + summary: Update the view for a cell + tags: + - Cells + - Dashboards + - Views + /api/v2/dashboards/{dashboardID}/labels: get: operationId: GetDashboardsIDLabels - tags: - - Dashboards - summary: List all labels for a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '200': - description: A list of all labels for a dashboard + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a dashboard + tags: + - Dashboards post: operationId: PostDashboardsIDLabels - tags: - - Dashboards - summary: Add a label to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The label added to the dashboard + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The label added to the dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/labels/{labelID}': + description: Unexpected error + summary: Add a label to a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/labels/{labelID}: delete: operationId: DeleteDashboardsIDLabelsID - tags: - - Dashboards - summary: Delete a label from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/members': + description: Unexpected error + summary: Delete a label from a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/members: get: operationId: GetDashboardsIDMembers - tags: - - Dashboards - summary: List all dashboard members parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '200': - description: A list of users who have member privileges for a dashboard + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceMembers' + description: A list of users who have member privileges for a dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all dashboard members + tags: + - Dashboards post: operationId: PostDashboardsIDMembers - tags: - - Dashboards - summary: Add a member to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - requestBody: - description: User to add as member + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true responses: - '201': - description: Added to dashboard members + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceMember' + description: Added to dashboard members default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/members/{userID}': + description: Unexpected error + summary: Add a member to a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/members/{userID}: delete: operationId: DeleteDashboardsIDMembersID - tags: - - Dashboards - summary: Remove a member from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '204': + "204": description: Member removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/owners': + description: Unexpected error + summary: Remove a member from a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/owners: get: operationId: GetDashboardsIDOwners - tags: - - Dashboards - summary: List all dashboard owners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '200': - description: A list of users who have owner privileges for a dashboard + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceOwners' + description: A list of users who have owner privileges for a dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all dashboard owners + tags: + - Dashboards post: operationId: PostDashboardsIDOwners - tags: - - Dashboards - summary: Add an owner to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - requestBody: - description: User to add as owner + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true responses: - '201': - description: Added to dashboard owners + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceOwner' + description: Added to dashboard owners default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/owners/{userID}': + description: Unexpected error + summary: Add an owner to a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/owners/{userID}: delete: operationId: DeleteDashboardsIDOwnersID - tags: - - Dashboards - summary: Remove an owner from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '204': + "204": description: Owner removed default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Unexpected error + summary: Remove an owner from a dashboard + tags: + - Dashboards + /api/v2/dbrps: + get: + operationId: GetDBRPs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID to filter on + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name to filter on + in: query + name: org + schema: + type: string + - description: Specifies the mapping ID to filter on + in: query + name: id + schema: + type: string + - description: Specifies the bucket ID to filter on + in: query + name: bucketID + schema: + type: string + - description: Specifies filtering on default + in: query + name: default + schema: + type: boolean + - description: Specifies the database to filter on + in: query + name: db + schema: + type: string + - description: Specifies the retention policy to filter on + in: query + name: rp + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DBRPs' + description: Success. Returns a list of database retention policy mappings. + "400": content: application/json: schema: $ref: '#/components/schemas/Error' - /query/ast: - post: - operationId: PostQueryAst - description: Analyzes flux query and generates a query specification. + description: Bad request. The request has one or more invalid parameters. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List database retention policy mappings tags: - - Query - summary: Generate an Abstract Syntax Tree (AST) from a query + - DBRPs + post: + operationId: PostDBRP parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Type - schema: - type: string - enum: - - application/json + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Analyzed Flux query to generate abstract syntax tree. content: application/json: schema: - $ref: '#/components/schemas/LanguageRequest' + $ref: '#/components/schemas/DBRPCreate' + description: The database retention policy mapping to add + required: true responses: - '200': - description: Abstract syntax tree of the flux query. + "201": content: application/json: schema: - $ref: '#/components/schemas/ASTResponse' - default: - description: Any response other than 200 is an internal server error + $ref: '#/components/schemas/DBRP' + description: Created. Returns the created database retention policy mapping. + "400": content: application/json: schema: $ref: '#/components/schemas/Error' - /query/suggestions: + description: Bad request. The mapping in the request has one or more invalid + IDs. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a database retention policy mapping + tags: + - DBRPs + /api/v2/dbrps/{dbrpID}: + delete: + operationId: DeleteDBRPID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID of the mapping + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name of the mapping + in: query + name: org + schema: + type: string + - description: The database retention policy mapping + in: path + name: dbrpID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: if any of the IDs passed is invalid + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a database retention policy + tags: + - DBRPs get: - operationId: GetQuerySuggestions - tags: - - Query - summary: Retrieve query suggestions + operationId: GetDBRPsID parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID of the mapping + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name of the mapping + in: query + name: org + schema: + type: string + - description: The database retention policy mapping ID + in: path + name: dbrpID + required: true + schema: + type: string responses: - '200': - description: Suggestions for next functions in call chain + "200": content: application/json: schema: - $ref: '#/components/schemas/FluxSuggestions' - default: - description: Any response other than 200 is an internal server error + $ref: '#/components/schemas/DBRPGet' + description: The database retention policy requested + "400": content: application/json: schema: $ref: '#/components/schemas/Error' - '/query/suggestions/{name}': - get: - operationId: GetQuerySuggestionsName - tags: - - Query - summary: Retrieve query suggestions for a branching suggestion - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: name - schema: - type: string - required: true - description: The name of the branching suggestion. - responses: - '200': - description: Suggestions for next functions in call chain - content: - application/json: - schema: - $ref: '#/components/schemas/FluxSuggestion' + description: if any of the IDs passed is invalid default: - description: Any response other than 200 is an internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /query/analyze: - post: - operationId: PostQueryAnalyze + description: Unexpected error + summary: Retrieve a database retention policy mapping tags: - - Query - summary: Analyze an InfluxQL or Flux query + - DBRPs + patch: + operationId: PatchDBRPID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Type - schema: - type: string - enum: - - application/json + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID of the mapping + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name of the mapping + in: query + name: org + schema: + type: string + - description: The database retention policy mapping. + in: path + name: dbrpID + required: true + schema: + type: string requestBody: - description: Flux or InfluxQL query to analyze content: application/json: schema: - $ref: '#/components/schemas/Query' + $ref: '#/components/schemas/DBRPUpdate' + description: Database retention policy update to apply + required: true responses: - '200': - description: Query analyze results. Errors will be empty if the query is valid. + "200": content: application/json: schema: - $ref: '#/components/schemas/AnalyzeQueryResponse' + $ref: '#/components/schemas/DBRPGet' + description: An updated mapping + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: if any of the IDs passed is invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The mapping was not found default: - description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a database retention policy mapping + tags: + - DBRPs + /api/v2/delete: + post: + operationId: PostDelete + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization to delete data from. + in: query + name: org + schema: + description: Only points from this organization are deleted. + type: string + - description: Specifies the bucket to delete data from. + in: query + name: bucket + schema: + description: Only points from this bucket are deleted. + type: string + - description: Specifies the organization ID of the resource. + in: query + name: orgID + schema: + type: string + - description: Specifies the bucket ID to delete data from. + in: query + name: bucketID + schema: + description: Only points from this bucket ID are deleted. + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletePredicateRequest' + description: Deletes data from an InfluxDB bucket. + required: true + responses: + "204": + description: delete has been accepted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid request. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: no token was sent or does not have sufficient permissions. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: the bucket or organization is not found. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: internal server error + summary: Delete data + tags: + - Delete + /api/v2/experimental/sampledata/buckets: + get: + operationId: GetDemoDataBuckets + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DemoDataBuckets' + description: A list of demo data buckets + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: List of Demo Data Buckets + tags: + - DemoDataBuckets + /api/v2/experimental/sampledata/buckets/{bucketID}/members: + delete: + operationId: DeleteDemoDataBucketMembers + parameters: + - description: bucket id + in: path + name: bucketID + required: true + schema: + type: string + responses: + "200": + description: if sampledata route is not available gateway responds with + 200 + "204": + description: A list of demo data buckets + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List of Demo Data Buckets + tags: + - DemoDataBuckets + post: + operationId: GetDemoDataBucketMembers + parameters: + - description: bucket id + in: path + name: bucketID + required: true + schema: + type: string + responses: + "200": + description: if sampledata route is not available gateway responds with + 200 + "204": + description: A list of demo data buckets + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List of Demo Data Buckets + tags: + - DemoDataBuckets + /api/v2/flags: + get: + operationId: GetFlags + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Flags' + description: Feature flags for the currently authenticated user + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Return the feature flags for the currently authenticated user + tags: + - Users + /api/v2/labels: + get: + operationId: GetLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: query + name: orgID + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of labels + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels + tags: + - Labels + post: + operationId: PostLabels + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelCreateRequest' + description: Label to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: Added label + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a label + tags: + - Labels + /api/v2/labels/{labelID}: + delete: + operationId: DeleteLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label + tags: + - Labels + get: + operationId: GetLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the label to update. + in: path + name: labelID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: A label + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a label + tags: + - Labels + patch: + operationId: PatchLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the label to update. + in: path + name: labelID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelUpdate' + description: Label update + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: Updated label + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a label + tags: + - Labels + /api/v2/maps/mapToken: + get: + operationId: getMapboxToken + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Token' + description: A temp token for Mapbox + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + /api/v2/me: + get: + operationId: GetMe + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserResponse' + description: The currently authenticated user. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve the currently authenticated user + tags: + - Users + /api/v2/me/password: + put: + operationId: PutMePassword + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordResetBody' + description: New password + required: true + responses: + "204": + description: Password successfully updated + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful authentication + security: + - BasicAuthentication: [] + summary: Update a password + tags: + - Users + /api/v2/notificationEndpoints: + get: + operationId: GetNotificationEndpoints + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - description: Only show notification endpoints that belong to specific organization + ID. + in: query + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoints' + description: A list of notification endpoints + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all notification endpoints + tags: + - NotificationEndpoints + post: + operationId: CreateNotificationEndpoint + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostNotificationEndpoint' + description: Notification endpoint to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: Notification endpoint created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationEndpoints/{endpointID}: + delete: + operationId: DeleteNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The endpoint was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a notification endpoint + tags: + - NotificationEndpoints + get: + operationId: GetNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: The notification endpoint requested + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a notification endpoint + tags: + - NotificationEndpoints + patch: + operationId: PatchNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpointUpdate' + description: Check update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: An updated notification endpoint + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification endpoint was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification endpoint + tags: + - NotificationEndpoints + put: + operationId: PutNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: A new notification endpoint to replace the existing endpoint + with + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: An updated notification endpoint + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification endpoint was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationEndpoints/{endpointID}/labels: + get: + operationId: GetNotificationEndpointsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a notification endpoint + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a notification endpoint + tags: + - NotificationEndpoints + post: + operationId: PostNotificationEndpointIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: The label was added to the notification endpoint + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationEndpoints/{endpointID}/labels/{labelID}: + delete: + operationId: DeleteNotificationEndpointsIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Endpoint or label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label from a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationRules: + get: + operationId: GetNotificationRules + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - description: Only show notification rules that belong to a specific organization + ID. + in: query + name: orgID + required: true + schema: + type: string + - description: Only show notifications that belong to the specific check ID. + in: query + name: checkID + schema: + type: string + - description: Only return notification rules that "would match" statuses which + contain the tag key value pairs provided. + in: query + name: tag + schema: + example: env:prod + pattern: ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRules' + description: A list of notification rules + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all notification rules + tags: + - NotificationRules + post: + operationId: CreateNotificationRule + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostNotificationRule' + description: Notification rule to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: Notification rule created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}: + delete: + operationId: DeleteNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a notification rule + tags: + - NotificationRules + get: + operationId: GetNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: The notification rule requested + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a notification rule + tags: + - NotificationRules + patch: + operationId: PatchNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRuleUpdate' + description: Notification rule update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: An updated notification rule + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification rule was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification rule + tags: + - NotificationRules + put: + operationId: PutNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: Notification rule update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: An updated notification rule + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification rule was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}/labels: + get: + operationId: GetNotificationRulesIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a notification rule + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a notification rule + tags: + - NotificationRules + post: + operationId: PostNotificationRuleIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: The label was added to the notification rule + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}/labels/{labelID}: + delete: + operationId: DeleteNotificationRulesIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Rule or label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete label from a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}/query: + get: + operationId: GetNotificationRulesIDQuery + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FluxResponse' + description: The notification rule query requested + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Notification rule not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a notification rule query + tags: + - Rules + /api/v2/orgs: + get: + operationId: GetOrgs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Descending' + - description: Filter organizations to a specific organization name. + in: query + name: org + schema: + type: string + - description: Filter organizations to a specific organization ID. + in: query + name: orgID + schema: + type: string + - description: Filter organizations to a specific user ID. + in: query + name: userID + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organizations' + description: A list of organizations + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all organizations + tags: + - Organizations + post: + operationId: PostOrgs + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostOrganizationRequest' + description: Organization to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: Organization created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create an organization + tags: + - Organizations + /api/v2/orgs/{orgID}: + delete: + operationId: DeleteOrgsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the organization to delete. + in: path + name: orgID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Organization not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete an organization + tags: + - Organizations + get: + operationId: GetOrgsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the organization to get. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: Organization details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve an organization + tags: + - Organizations + patch: + operationId: PatchOrgsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the organization to get. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchOrganizationRequest' + description: Organization update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: Organization updated + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/limits: + get: + parameters: + - description: The identifier of the organization. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + description: These are org limits similar to those configured in/by + quartz. + properties: + limits: + $ref: '#/components/schemas/Limit' + links: + $ref: '#/components/schemas/Links' + type: object + description: The Limits defined for the organization. + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Retrieve limits for an organization + tags: + - Limits + /api/v2/orgs/{orgID}/members: + get: + operationId: GetOrgsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMembers' + description: A list of organization members + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Organization not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all members of an organization + tags: + - Organizations + post: + operationId: PostOrgsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMember' + description: Added to organization created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a member to an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/members/{userID}: + delete: + operationId: DeleteOrgsIDMembersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "204": + description: Member removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove a member from an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/owners: + get: + operationId: GetOrgsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwners' + description: A list of organization owners + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Organization not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all owners of an organization + tags: + - Organizations + post: + operationId: PostOrgsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwner' + description: Organization owner added + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add an owner to an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/owners/{userID}: + delete: + operationId: DeleteOrgsIDOwnersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "204": + description: Owner removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove an owner from an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/secrets: + get: + operationId: GetOrgsIDSecrets + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SecretKeysResponse' + description: A list of all secret keys + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all secret keys for an organization + tags: + - Secrets + patch: + operationId: PatchOrgsIDSecrets + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Secrets' + description: Secret key value pairs to update/add + required: true + responses: + "204": + description: Keys successfully patched + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update secrets in an organization + tags: + - Secrets + /api/v2/orgs/{orgID}/secrets/{secretID}: + delete: + operationId: DeleteOrgsIDSecretsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + - description: The secret ID. + in: path + name: secretID + required: true + schema: + type: string + responses: + "204": + description: Keys successfully deleted + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Delete a secret from an organization + tags: + - Secrets + /api/v2/orgs/{orgID}/secrets/delete: + post: + deprecated: true + operationId: PostOrgsIDSecrets + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SecretKeys' + description: Secret key to delete + required: true + responses: + "204": + description: Keys successfully patched + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete secrets from an organization + tags: + - Secrets + /api/v2/orgs/{orgID}/usage: + get: + parameters: + - description: The identifier of the organization. + in: path + name: orgID + required: true + schema: + type: string + - description: start time + in: query + name: start + required: true + schema: + type: timestamp + - description: stop time + in: query + name: stop + required: false + schema: + type: timestamp + - description: return raw usage data + in: query + name: raw + required: false + schema: + default: false + type: boolean + responses: + "200": + content: + text/csv: + schema: + 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 + type: string + description: Usage data headers: - X-Influx-Error: - description: Error string describing the problem + 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: + default: identity + description: Specifies that the response in the body is encoded with + gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Retrieve usage for an organization + tags: + - Usage + /ping: + get: + operationId: GetPing + responses: + "204": + description: OK + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. schema: type: string - X-Influx-Reference: - description: Reference code unique to the error type + X-Influxdb-Version: + description: The version of InfluxDB. schema: type: integer - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /query: - post: - operationId: PostQuery + servers: + - url: "" + summary: Checks the status of InfluxDB instance and version of InfluxDB. tags: - - Query - summary: Query data + - Ping + head: + operationId: HeadPing + responses: + "204": + description: OK + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: The version of InfluxDB. + schema: + type: integer + servers: + - url: "" + summary: Checks the status of InfluxDB instance and version of InfluxDB. + tags: + - Ping + /api/v2/query: + post: description: | Retrieves data from InfluxDB buckets. @@ -2229,1231 +3797,1905 @@ paths: - [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/). + operationId: PostQuery 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: header - name: Content-Type - schema: - type: string - enum: - - application/json - - application/vnd.flux - - in: query - name: org - 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.' - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - description: The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to understand. + in: header + name: Accept-Encoding + schema: + default: identity + description: Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - in: header + name: Content-Type + schema: + enum: + - application/json + - application/vnd.flux + type: string + - 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. + in: query + name: org + schema: + type: string + - description: Specifies the ID of the organization executing the query. If + both `orgID` and `org` are specified, `org` takes precedence. + in: query + name: orgID + schema: + type: string requestBody: - description: Flux query or specification to execute content: application/json: schema: oneOf: - - $ref: '#/components/schemas/Query' - - $ref: '#/components/schemas/InfluxQLQuery' + - $ref: '#/components/schemas/Query' + - $ref: '#/components/schemas/InfluxQLQuery' application/vnd.flux: schema: type: string + description: Flux query or specification to execute responses: - '200': + "200": + content: + application/vnd.influx.arrow: + schema: + format: binary + type: string + text/csv: + schema: + 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 + type: string 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. default: identity + description: Specifies that the response in the body is encoded with + gzip or not encoded with identity. enum: - - gzip - - identity + - gzip + - identity + type: string 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: - 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 - 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. + "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: + format: int32 + type: integer + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Error processing query + summary: Query data + tags: + - Query + /api/v2/query/analyze: + post: + operationId: PostQueryAnalyze + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Content-Type + schema: + enum: + - application/json + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Query' + description: Flux or InfluxQL query to analyze + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnalyzeQueryResponse' + description: Query analyze results. Errors will be empty if the query is + valid. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error + headers: + X-Influx-Error: + description: Error string describing the problem + schema: + type: string + X-Influx-Reference: + description: Reference code unique to the error type schema: type: integer - format: int32 - default: - description: Error processing query - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /buckets: - get: - operationId: GetBuckets + summary: Analyze an InfluxQL or Flux query tags: - - Buckets - summary: List all buckets - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/After' - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string - - in: query - name: name - description: Only returns buckets with a specific name. - schema: - type: string - - in: query - name: id - description: Only returns buckets with a specific ID. - schema: - type: string - responses: - '200': - description: A list of buckets - content: - application/json: - schema: - $ref: '#/components/schemas/Buckets' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - Query + /api/v2/query/ast: post: - operationId: PostBuckets - tags: - - Buckets - summary: Create a bucket + description: Analyzes flux query and generates a query specification. + operationId: PostQueryAst parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Content-Type + schema: + enum: + - application/json + type: string requestBody: - description: Bucket to create - required: true content: application/json: schema: - $ref: '#/components/schemas/PostBucketRequest' + $ref: '#/components/schemas/LanguageRequest' + description: Analyzed Flux query to generate abstract syntax tree. responses: - '201': - description: Bucket created + "200": content: application/json: schema: - $ref: '#/components/schemas/Bucket' - '422': - description: Request body failed validation - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/ASTResponse' + description: Abstract syntax tree of the flux query. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}': + description: Any response other than 200 is an internal server error + summary: Generate an Abstract Syntax Tree (AST) from a query + tags: + - Query + /api/v2/query/suggestions: get: - operationId: GetBucketsID - tags: - - Buckets - summary: Retrieve a bucket + operationId: GetQuerySuggestions parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + - $ref: '#/components/parameters/TraceSpan' responses: - '200': - description: Bucket details + "200": content: application/json: schema: - $ref: '#/components/schemas/Bucket' + $ref: '#/components/schemas/FluxSuggestions' + description: Suggestions for next functions in call chain default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - patch: - operationId: PatchBucketsID + description: Any response other than 200 is an internal server error + summary: Retrieve query suggestions tags: - - Buckets - summary: Update a bucket - requestBody: - description: Bucket update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PatchBucketRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - responses: - '200': - description: An updated bucket - content: - application/json: - schema: - $ref: '#/components/schemas/Bucket' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteBucketsID - tags: - - Buckets - summary: Delete a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The ID of the bucket to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Bucket not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/labels': + - Query + /api/v2/query/suggestions/{name}: get: - operationId: GetBucketsIDLabels - tags: - - Buckets - summary: List all labels for a bucket + operationId: GetQuerySuggestionsName parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - responses: - '200': - description: A list of all labels for a bucket - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostBucketsIDLabels - tags: - - Buckets - summary: Add a label to a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The name of the branching suggestion. + in: path + name: name required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' + schema: + type: string responses: - '201': - description: The newly added label + "200": content: application/json: schema: - $ref: '#/components/schemas/LabelResponse' + $ref: '#/components/schemas/FluxSuggestion' + description: Suggestions for next functions in call chain default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/labels/{labelID}': - delete: - operationId: DeleteBucketsIDLabelsID + description: Any response other than 200 is an internal server error + summary: Retrieve query suggestions for a branching suggestion tags: - - Buckets - summary: Delete a label from a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Bucket not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/members': - get: - operationId: GetBucketsIDMembers - tags: - - Buckets - summary: List all users with member privileges for a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - responses: - '200': - description: A list of bucket members - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMembers' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostBucketsIDMembers - tags: - - Buckets - summary: Add a member to a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - requestBody: - description: User to add as member - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Member added to bucket - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMember' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/members/{userID}': - delete: - operationId: DeleteBucketsIDMembersID - tags: - - Buckets - summary: Remove a member from a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - responses: - '204': - description: Member removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/owners': - get: - operationId: GetBucketsIDOwners - tags: - - Buckets - summary: List all owners of a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - responses: - '200': - description: A list of bucket owners - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwners' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostBucketsIDOwners - tags: - - Buckets - summary: Add an owner to a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - requestBody: - description: User to add as owner - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Bucket owner added - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwner' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/owners/{userID}': - delete: - operationId: DeleteBucketsIDOwnersID - tags: - - Buckets - summary: Remove an owner from a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - responses: - '204': - description: Owner removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /orgs: - get: - operationId: GetOrgs - tags: - - Organizations - summary: List all organizations - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Descending' - - in: query - name: org - schema: - type: string - description: Filter organizations to a specific organization name. - - in: query - name: orgID - schema: - type: string - description: Filter organizations to a specific organization ID. - - in: query - name: userID - schema: - type: string - description: Filter organizations to a specific user ID. - responses: - '200': - description: A list of organizations - content: - application/json: - schema: - $ref: '#/components/schemas/Organizations' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostOrgs - tags: - - Organizations - summary: Create an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Organization to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostOrganizationRequest' - responses: - '201': - description: Organization created - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}': - get: - operationId: GetOrgsID - tags: - - Organizations - summary: Retrieve an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The ID of the organization to get. - responses: - '200': - description: Organization details - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchOrgsID - tags: - - Organizations - summary: Update an organization - requestBody: - description: Organization update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PatchOrganizationRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The ID of the organization to get. - responses: - '200': - description: Organization updated - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteOrgsID - tags: - - Organizations - summary: Delete an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The ID of the organization to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Organization not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/secrets': - get: - operationId: GetOrgsIDSecrets - tags: - - Secrets - summary: List all secret keys for an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '200': - description: A list of all secret keys - content: - application/json: - schema: - $ref: '#/components/schemas/SecretKeysResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchOrgsIDSecrets - tags: - - Secrets - summary: Update secrets in an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - requestBody: - description: Secret key value pairs to update/add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Secrets' - responses: - '204': - description: Keys successfully patched - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/members': - get: - operationId: GetOrgsIDMembers - tags: - - Organizations - summary: List all members of an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '200': - description: A list of organization members - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMembers' - '404': - description: Organization not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostOrgsIDMembers - tags: - - Organizations - summary: Add a member to an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - requestBody: - description: User to add as member - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Added to organization created - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMember' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/members/{userID}': - delete: - operationId: DeleteOrgsIDMembersID - tags: - - Organizations - summary: Remove a member from an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '204': - description: Member removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/owners': - get: - operationId: GetOrgsIDOwners - tags: - - Organizations - summary: List all owners of an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '200': - description: A list of organization owners - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwners' - '404': - description: Organization not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostOrgsIDOwners - tags: - - Organizations - summary: Add an owner to an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - requestBody: - description: User to add as owner - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Organization owner added - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwner' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/owners/{userID}': - delete: - operationId: DeleteOrgsIDOwnersID - tags: - - Organizations - summary: Remove an owner from an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '204': - description: Owner removed - default: - description: Unexpected error - content: - 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: + - Query + /api/v2/resources: get: operationId: GetResources - tags: - - resource list - summary: List all known resources parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' responses: - '200': - description: All resources targets + "200": content: application/json: schema: - type: array items: type: string + type: array + description: All resources targets default: - description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /stacks: + description: Internal server error + summary: List all known resources + tags: + - Resources + /api/v2/scripts: + get: + operationId: GetScripts + parameters: + - description: The number of scripts to return. + in: query + name: limit + required: false + schema: + type: integer + - description: The offset for pagination. + in: query + name: offset + required: false + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Scripts' + description: The list of scripts. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: List scripts + tags: + - Invocable Scripts + post: + operationId: PostScripts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScriptCreateRequest' + description: The script to create. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Script' + description: The created script. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Create a script + tags: + - Invocable Scripts + /api/v2/scripts/{scriptID}: + delete: + description: Deletes a script and all associated records. + operationId: DeleteScriptsID + parameters: + - description: The ID of the script to delete. + in: path + name: scriptID + required: true + schema: + type: string + responses: + "204": + description: The script is deleted. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Delete a script + tags: + - Invocable Scripts + get: + description: Uses script ID to retrieve details of an invocable script. + operationId: GetScriptsID + parameters: + - description: The script ID. + in: path + name: scriptID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Script' + description: The requested script object. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Retrieve a script + tags: + - Invocable Scripts + patch: + description: | + Updates properties (`name`, `description`, and `script`) of an invocable script. + operationId: PatchScriptsID + parameters: + - description: The script ID. + in: path + name: scriptID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScriptUpdateRequest' + description: Script update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Script' + description: The updated script. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Update a script + tags: + - Invocable Scripts + /api/v2/scripts/{scriptID}/invoke: + post: + description: Invokes a script and substitutes `params` keys referenced in the + script with `params` key-values sent in the request body. + operationId: PostScriptsIDInvoke + parameters: + - in: path + name: scriptID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScriptInvocationParams' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScriptHTTPResponseData' + description: The result of the script execution. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Invoke a script + tags: + - Invocable Scripts + /api/v2/setup: + get: + description: Check if setup is allowed. Returns `true` if no default user, organization, + or bucket have been created. + operationId: GetSetup + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IsOnboarding' + description: Setup is allowed, true or false + summary: Retrieve setup status + tags: + - Setup + post: + description: Post an onboarding request to create an initial user, organization, + and bucket. + operationId: PostSetup + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingRequest' + description: Source to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingResponse' + description: The created default user, bucket, and organization + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Create an initial user, organization, and bucket + tags: + - Setup + /api/v2/setup/user: + post: + description: Post an onboarding request to create a new user, organization, + and bucket. + operationId: PostSetupUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingRequest' + description: Source to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingResponse' + description: The created default user, bucket, and organization. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Create a new user, organization, and bucket + tags: + - Setup + /api/v2/signin: + post: + description: Authenticates ***Basic Auth*** credentials for a user. If successful, + creates a new UI session for the user. + operationId: PostSignin + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "204": + description: Success. User authenticated. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: User account is disabled. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful authentication. + security: + - BasicAuthentication: [] + summary: Create a user session. + tags: + - Signin + /api/v2/signout: + post: + description: Expires the current UI session for the user. + operationId: PostSignout + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "204": + description: Session successfully expired + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized access + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful session expiry + summary: Expire the current UI session + tags: + - Signout + /api/v2/stacks: get: operationId: ListStacks - tags: - - Templates - summary: List installed templates parameters: - - in: query - name: orgID - required: true - schema: - type: string - description: The organization ID of the stacks - - in: query - name: name - schema: - type: string - description: A collection of names to filter the list by. - - in: query - name: stackID - schema: - type: string - description: A collection of stackIDs to filter the list by. + - description: The organization ID of the stacks + in: query + name: orgID + required: true + schema: + type: string + - description: A collection of names to filter the list by. + in: query + name: name + schema: + type: string + - description: A collection of stackIDs to filter the list by. + in: query + name: stackID + schema: + type: string responses: - '200': - description: Success. Returns the list of stacks. + "200": content: application/json: schema: - type: object properties: stacks: - type: array items: $ref: '#/components/schemas/Stack' + type: array + type: object + description: Success. Returns the list of stacks. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List installed templates + tags: + - Templates post: operationId: CreateStack - tags: - - Templates - summary: Create a new stack requestBody: - description: The stack to create. - required: true content: application/json: schema: - type: object - title: PostStackRequest properties: + description: + type: string + name: + type: string orgID: type: string - name: - type: string - description: - type: string urls: - type: array items: type: string + type: array + title: PostStackRequest + type: object + description: The stack to create. + required: true responses: - '201': - description: Success. Returns the newly created stack. + "201": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Success. Returns the newly created stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/stacks/{stack_id}': + description: Unexpected error + summary: Create a new stack + tags: + - Templates + /api/v2/stacks/{stack_id}: + delete: + operationId: DeleteStack + parameters: + - description: The identifier of the stack. + in: path + name: stack_id + required: true + schema: + type: string + - description: The identifier of the organization. + in: query + name: orgID + required: true + schema: + type: string + responses: + "204": + description: The stack and its associated resources were deleted. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a stack and associated resources + tags: + - Templates get: operationId: ReadStack - tags: - - Templates - summary: Retrieve a stack parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. + - description: The identifier of the stack. + in: path + name: stack_id + required: true + schema: + type: string responses: - '200': - description: Returns the stack. + "200": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Returns the stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a stack + tags: + - Templates patch: operationId: UpdateStack - tags: - - Templates - summary: Update a stack parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. - requestBody: - description: The stack to update. + - description: The identifier of the stack. + in: path + name: stack_id required: true + schema: + type: string + requestBody: content: application/json: schema: - type: object - title: PatchStackRequest properties: - name: - type: string - nullable: true - description: - type: string - nullable: true - templateURLs: - type: array - items: - type: string - nullable: true additionalResources: - type: array items: - type: object properties: - resourceID: - type: string kind: type: string + resourceID: + type: string templateMetaName: type: string required: - - kind - - resourceID + - kind + - resourceID + type: object + type: array + description: + nullable: true + type: string + name: + nullable: true + type: string + templateURLs: + items: + type: string + nullable: true + type: array + title: PatchStackRequest + type: object + description: The stack to update. + required: true responses: - '200': - description: Returns the updated stack. + "200": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Returns the updated stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - operationId: DeleteStack + description: Unexpected error + summary: Update a stack tags: - - Templates - summary: Delete a stack and associated resources - parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. - - in: query - name: orgID - required: true - schema: - type: string - description: The identifier of the organization. - responses: - '204': - description: The stack and its associated resources were deleted. - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/stacks/{stack_id}/uninstall': + - Templates + /api/v2/stacks/{stack_id}/uninstall: post: operationId: UninstallStack - tags: - - Templates - summary: Uninstall a stack parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. + - description: The identifier of the stack. + in: path + name: stack_id + required: true + schema: + type: string responses: - '200': - description: Returns the uninstalled stack. + "200": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Returns the uninstalled stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /templates/apply: - post: - operationId: ApplyTemplate + description: Unexpected error + summary: Uninstall a stack tags: - - Templates - summary: Apply or dry-run a template - description: Applies or performs a dry-run of template in an organization. + - Templates + /api/v2/tasks: + get: + operationId: GetTasks + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Returns task with a specific name. + in: query + name: name + schema: + type: string + - description: Return tasks after a specified ID. + in: query + name: after + schema: + type: string + - description: Filter tasks to a specific user ID. + in: query + name: user + schema: + type: string + - description: Filter tasks to a specific organization name. + in: query + name: org + schema: + type: string + - description: Filter tasks to a specific organization ID. + in: query + name: orgID + schema: + type: string + - description: Filter tasks by a status--"inactive" or "active". + in: query + name: status + schema: + enum: + - active + - inactive + type: string + - description: The non-zero number of tasks to return + in: query + name: limit + schema: + default: 100 + maximum: 500 + minimum: -1 + type: integer + - description: Type of task, unset by default. + in: query + name: type + required: false + schema: + default: "" + enum: + - basic + - system + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks' + description: A list of tasks + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all tasks + tags: + - Tasks + post: + operationId: PostTasks + parameters: + - $ref: '#/components/parameters/TraceSpan' requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskCreateRequest' + description: Task to create required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + description: Task created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a new task + tags: + - Tasks + /api/v2/tasks/{taskID}: + delete: + description: Deletes a task and all associated records + operationId: DeleteTasksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the task to delete. + in: path + name: taskID + required: true + schema: + type: string + responses: + "204": + description: Task deleted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a task + tags: + - Tasks + get: + operationId: GetTasksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + description: Task details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a task + tags: + - Tasks + patch: + description: Update a task. This will cancel all queued runs. + operationId: PatchTasksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskUpdateRequest' + description: Task update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + description: Task updated + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a task + tags: + - Tasks + /api/v2/tasks/{taskID}/labels: + get: + operationId: GetTasksIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a task + tags: + - Tasks + post: + operationId: PostTasksIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: A list of all labels for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a task + tags: + - Tasks + /api/v2/tasks/{taskID}/labels/{labelID}: + delete: + operationId: DeleteTasksIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The label ID. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Task not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label from a task + tags: + - Tasks + /api/v2/tasks/{taskID}/logs: + get: + operationId: GetTasksIDLogs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Logs' + description: All logs for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve all logs for a task + tags: + - Tasks + /api/v2/tasks/{taskID}/members: + get: + operationId: GetTasksIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMembers' + description: A list of users who have member privileges for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all task members + tags: + - Tasks + post: + operationId: PostTasksIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMember' + description: Added to task members + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a member to a task + tags: + - Tasks + /api/v2/tasks/{taskID}/members/{userID}: + delete: + operationId: DeleteTasksIDMembersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "204": + description: Member removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove a member from a task + tags: + - Tasks + /api/v2/tasks/{taskID}/owners: + get: + operationId: GetTasksIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwners' + description: A list of users who have owner privileges for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all owners of a task + tags: + - Tasks + post: + operationId: PostTasksIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwner' + description: Added to task owners + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add an owner to a task + tags: + - Tasks + /api/v2/tasks/{taskID}/owners/{userID}: + delete: + operationId: DeleteTasksIDOwnersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "204": + description: Owner removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove an owner from a task + tags: + - Tasks + /api/v2/tasks/{taskID}/runs: + get: + operationId: GetTasksIDRuns + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the task to get runs for. + in: path + name: taskID + required: true + schema: + type: string + - description: Returns runs after a specific ID. + in: query + name: after + schema: + type: string + - description: The number of runs to return + in: query + name: limit + schema: + default: 100 + maximum: 500 + minimum: 1 + type: integer + - description: Filter runs to those scheduled after this time, RFC3339 + in: query + name: afterTime + schema: + format: date-time + type: string + - description: Filter runs to those scheduled before this time, RFC3339 + in: query + name: beforeTime + schema: + format: date-time + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Runs' + description: A list of task runs + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List runs for a task + tags: + - Tasks + post: + operationId: PostTasksIDRuns + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunManually' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Run' + description: Run scheduled to start + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Manually start a task run, overriding the current schedule + tags: + - Tasks + /api/v2/tasks/{taskID}/runs/{runID}: + delete: + operationId: DeleteTasksIDRunsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The run ID. + in: path + name: runID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Cancel a running task + tags: + - Tasks + get: + operationId: GetTasksIDRunsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The run ID. + in: path + name: runID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Run' + description: The run record + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a single run for a task + tags: + - Tasks + /api/v2/tasks/{taskID}/runs/{runID}/logs: + get: + operationId: GetTasksIDRunsIDLogs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: ID of task to get logs for. + in: path + name: taskID + required: true + schema: + type: string + - description: ID of run to get logs for. + in: path + name: runID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Logs' + description: All logs for a run + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve all logs for a run + tags: + - Tasks + /api/v2/tasks/{taskID}/runs/{runID}/retry: + post: + operationId: PostTasksIDRunsIDRetry + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The run ID. + in: path + name: runID + required: true + schema: + type: string + requestBody: + content: + application/json; charset=utf-8: + schema: + type: object + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Run' + description: Run that has been queued + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retry a task run + tags: + - Tasks + /api/v2/telegraf/plugins: + get: + operationId: GetTelegrafPlugins + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The type of plugin desired. + in: query + name: type + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TelegrafPlugins' + description: A list of Telegraf plugins. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all Telegraf plugins + tags: + - Telegraf Plugins + /api/v2/telegrafs: + get: + operationId: GetTelegrafs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID the Telegraf config belongs to. + in: query + name: orgID + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegrafs' + description: A list of Telegraf configurations + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all Telegraf configurations + tags: + - Telegrafs + post: + operationId: PostTelegrafs + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TelegrafRequest' + description: Telegraf configuration to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegraf' + description: Telegraf configuration created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a Telegraf configuration + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}: + delete: + operationId: DeleteTelegrafsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a Telegraf configuration + tags: + - Telegrafs + get: + operationId: GetTelegrafsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + - in: header + name: Accept + required: false + schema: + default: application/toml + enum: + - application/toml + - application/json + - application/octet-stream + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegraf' + application/octet-stream: + example: |- + [agent] + interval = "10s" + schema: + type: string + application/toml: + example: |- + [agent] + interval = "10s" + schema: + type: string + description: Telegraf configuration details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a Telegraf configuration + tags: + - Telegrafs + put: + operationId: PutTelegrafsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TelegrafRequest' + description: Telegraf configuration update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegraf' + description: An updated Telegraf configurations + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a Telegraf configuration + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/labels: + get: + operationId: GetTelegrafsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a Telegraf config + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a Telegraf config + tags: + - Telegrafs + post: + operationId: PostTelegrafsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: The label added to the Telegraf config + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/labels/{labelID}: + delete: + operationId: DeleteTelegrafsIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + - description: The label ID. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Telegraf config not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label from a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/members: + get: + operationId: GetTelegrafsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMembers' + description: A list of Telegraf config members + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all users with member privileges for a Telegraf config + tags: + - Telegrafs + post: + operationId: PostTelegrafsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMember' + description: Member added to Telegraf config + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a member to a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/members/{userID}: + delete: + operationId: DeleteTelegrafsIDMembersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "204": + description: Member removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove a member from a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/owners: + get: + operationId: GetTelegrafsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwners' + description: Returns Telegraf configuration owners as a ResourceOwners list + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all owners of a Telegraf configuration + tags: + - Telegrafs + post: + operationId: PostTelegrafsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwner' + description: Telegraf configuration owner was added. Returns a ResourceOwner + that references the User. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add an owner to a Telegraf configuration + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/owners/{userID}: + delete: + operationId: DeleteTelegrafsIDOwnersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "204": + description: Owner removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove an owner from a Telegraf config + tags: + - Telegrafs + /api/v2/templates/apply: + post: + description: Applies or performs a dry-run of template in an organization. + operationId: ApplyTemplate + requestBody: content: application/json: schema: @@ -3464,45 +5706,45 @@ paths: text/yml: schema: $ref: '#/components/schemas/TemplateApply' + required: true responses: - '200': + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateSummary' 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. + "201": content: application/json: schema: $ref: '#/components/schemas/TemplateSummary' - '201': 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: - $ref: '#/components/schemas/TemplateSummary' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /templates/export: + description: Unexpected error + summary: Apply or dry-run a template + tags: + - Templates + /api/v2/templates/export: post: operationId: ExportTemplate - tags: - - Templates - summary: Export a new template requestBody: - description: Export resources as an InfluxDB template. - required: false content: application/json: schema: oneOf: - - $ref: '#/components/schemas/TemplateExportByID' - - $ref: '#/components/schemas/TemplateExportByName' + - $ref: '#/components/schemas/TemplateExportByID' + - $ref: '#/components/schemas/TemplateExportByName' + description: Export resources as an InfluxDB template. + required: false responses: - '200': - description: The template was created successfully. Returns the newly created template. + "200": content: application/json: schema: @@ -3510,2686 +5752,422 @@ paths: application/x-yaml: schema: $ref: '#/components/schemas/Template' + description: The template was created successfully. Returns the newly created + template. default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}': - get: - operationId: GetTasksID + summary: Export a new template tags: - - Tasks - summary: Retrieve a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: Task details - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchTasksID - tags: - - Tasks - summary: Update a task - description: Update a task. This will cancel all queued runs. - requestBody: - description: Task update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TaskUpdateRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: Task updated - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteTasksID - tags: - - Tasks - summary: Delete a task - description: Deletes a task and all associated records - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The ID of the task to delete. - responses: - '204': - description: Task deleted - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs': - get: - operationId: GetTasksIDRuns - tags: - - Tasks - summary: List runs for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The ID of the task to get runs for. - - in: query - name: after - schema: - type: string - description: Returns runs after a specific ID. - - in: query - name: limit - schema: - type: integer - minimum: 1 - maximum: 500 - default: 100 - description: The number of runs to return - - in: query - name: afterTime - schema: - type: string - format: date-time - description: 'Filter runs to those scheduled after this time, RFC3339' - - in: query - name: beforeTime - schema: - type: string - format: date-time - description: 'Filter runs to those scheduled before this time, RFC3339' - responses: - '200': - description: A list of task runs - content: - application/json: - schema: - $ref: '#/components/schemas/Runs' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDRuns - tags: - - Tasks - summary: 'Manually start a task run, overriding the current schedule' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunManually' - responses: - '201': - description: Run scheduled to start - content: - application/json: - schema: - $ref: '#/components/schemas/Run' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs/{runID}': - get: - operationId: GetTasksIDRunsID - tags: - - Tasks - summary: Retrieve a single run for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: runID - schema: - type: string - required: true - description: The run ID. - responses: - '200': - description: The run record - content: - application/json: - schema: - $ref: '#/components/schemas/Run' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteTasksIDRunsID - tags: - - Tasks - summary: Cancel a running task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: runID - schema: - type: string - required: true - description: The run ID. - responses: - '204': - description: Delete has been accepted - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs/{runID}/retry': - post: - operationId: PostTasksIDRunsIDRetry - tags: - - Tasks - summary: Retry a task run - requestBody: - content: - application/json; charset=utf-8: - schema: - type: object - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: runID - schema: - type: string - required: true - description: The run ID. - responses: - '200': - description: Run that has been queued - content: - application/json: - schema: - $ref: '#/components/schemas/Run' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/logs': - get: - operationId: GetTasksIDLogs - tags: - - Tasks - summary: Retrieve all logs for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: All logs for a task - content: - application/json: - schema: - $ref: '#/components/schemas/Logs' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs/{runID}/logs': - get: - operationId: GetTasksIDRunsIDLogs - tags: - - Tasks - summary: Retrieve all logs for a run - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: ID of task to get logs for. - - in: path - name: runID - schema: - type: string - required: true - description: ID of run to get logs for. - responses: - '200': - description: All logs for a run - content: - application/json: - schema: - $ref: '#/components/schemas/Logs' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/labels': - get: - operationId: GetTasksIDLabels - tags: - - Tasks - summary: List all labels for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: A list of all labels for a task - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDLabels - tags: - - Tasks - summary: Add a label to a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: A list of all labels for a task - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/labels/{labelID}': - delete: - operationId: DeleteTasksIDLabelsID - tags: - - Tasks - summary: Delete a label from a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. - responses: - '204': - description: Delete has been accepted - '404': - description: Task not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /flags: - get: - operationId: GetFlags - tags: - - Users - summary: Return the feature flags for the currently authenticated user - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: Feature flags for the currently authenticated user - content: - application/json: - schema: - $ref: '#/components/schemas/Flags' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /me: - get: - operationId: GetMe - tags: - - Users - summary: Retrieve the currently authenticated user - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: The currently authenticated user. - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /me/password: - put: - operationId: PutMePassword - tags: - - Users - summary: Update a password - security: - - BasicAuthentication: [] - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: New password - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PasswordResetBody' - responses: - '204': - description: Password successfully updated - default: - description: Unsuccessful authentication - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/members': - get: - operationId: GetTasksIDMembers - tags: - - Tasks - summary: List all task members - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: A list of users who have member privileges for a task - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMembers' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDMembers - tags: - - Tasks - summary: Add a member to a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - requestBody: - description: User to add as member - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Added to task members - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMember' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/members/{userID}': - delete: - operationId: DeleteTasksIDMembersID - tags: - - Tasks - summary: Remove a member from a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '204': - description: Member removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/owners': - get: - operationId: GetTasksIDOwners - tags: - - Tasks - summary: List all owners of a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: A list of users who have owner privileges for a task - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwners' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDOwners - tags: - - Tasks - summary: Add an owner to a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - requestBody: - description: User to add as owner - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Added to task owners - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwner' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/owners/{userID}': - delete: - operationId: DeleteTasksIDOwnersID - tags: - - Tasks - summary: Remove an owner from a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '204': - description: Owner removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/users/{userID}/password': - post: - operationId: PostUsersIDPassword - tags: - - Users - summary: Update a password - security: - - BasicAuthentication: [] - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The user ID. - requestBody: - description: New password - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PasswordResetBody' - responses: - '204': - description: Password successfully updated - default: - description: Unsuccessful authentication - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /checks: - get: - operationId: GetChecks - tags: - - Checks - summary: List all checks - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: query - name: orgID - required: true - description: Only show checks that belong to a specific organization ID. - schema: - type: string - responses: - '200': - description: A list of checks - content: - application/json: - schema: - $ref: '#/components/schemas/Checks' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: CreateCheck - tags: - - Checks - summary: Add new check - requestBody: - description: Check to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostCheck' - responses: - '201': - description: Check created - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}': - get: - operationId: GetChecksID - tags: - - Checks - summary: Retrieve a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: The check requested - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutChecksID - tags: - - Checks - summary: Update a check - requestBody: - description: Check update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: An updated check - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchChecksID - tags: - - Checks - summary: Update a check - requestBody: - description: Check update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CheckPatch' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: An updated check - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteChecksID - tags: - - Checks - summary: Delete a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '204': - description: Delete has been accepted - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}/labels': - get: - operationId: GetChecksIDLabels - tags: - - Checks - summary: List all labels for a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: A list of all labels for a check - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostChecksIDLabels - tags: - - Checks - summary: Add a label to a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: The label was added to the check - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}/labels/{labelID}': - delete: - operationId: DeleteChecksIDLabelsID - tags: - - Checks - summary: Delete label from a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Check or label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /notificationRules: - get: - operationId: GetNotificationRules - tags: - - NotificationRules - summary: List all notification rules - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: query - name: orgID - required: true - description: Only show notification rules that belong to a specific organization ID. - schema: - type: string - - in: query - name: checkID - description: Only show notifications that belong to the specific check ID. - schema: - type: string - - in: query - name: tag - 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_]+$' - example: 'env:prod' - responses: - '200': - description: A list of notification rules - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRules' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: CreateNotificationRule - tags: - - NotificationRules - summary: Add a notification rule - requestBody: - description: Notification rule to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostNotificationRule' - responses: - '201': - description: Notification rule created - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}/query': - get: - operationId: GetChecksIDQuery - tags: - - Checks - summary: Retrieve a check query - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: The check query requested - content: - application/json: - schema: - $ref: '#/components/schemas/FluxResponse' - '400': - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: Check not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}': - get: - operationId: GetNotificationRulesID - tags: - - NotificationRules - summary: Retrieve a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: The notification rule requested - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutNotificationRulesID - tags: - - NotificationRules - summary: Update a notification rule - requestBody: - description: Notification rule update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: An updated notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - '404': - description: The notification rule was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchNotificationRulesID - tags: - - NotificationRules - summary: Update a notification rule - requestBody: - description: Notification rule update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRuleUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: An updated notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - '404': - description: The notification rule was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteNotificationRulesID - tags: - - NotificationRules - summary: Delete a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '204': - description: Delete has been accepted - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}/labels': - get: - operationId: GetNotificationRulesIDLabels - tags: - - NotificationRules - summary: List all labels for a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: A list of all labels for a notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostNotificationRuleIDLabels - tags: - - NotificationRules - summary: Add a label to a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: The label was added to the notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}/labels/{labelID}': - delete: - operationId: DeleteNotificationRulesIDLabelsID - tags: - - NotificationRules - summary: Delete label from a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Rule or label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}/query': - get: - operationId: GetNotificationRulesIDQuery - tags: - - Rules - summary: Retrieve a notification rule query - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: The notification rule query requested - content: - application/json: - schema: - $ref: '#/components/schemas/FluxResponse' - '400': - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: Notification rule not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /notificationEndpoints: - get: - operationId: GetNotificationEndpoints - tags: - - NotificationEndpoints - summary: List all notification endpoints - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: query - name: orgID - required: true - description: Only show notification endpoints that belong to specific organization ID. - schema: - type: string - responses: - '200': - description: A list of notification endpoints - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoints' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: CreateNotificationEndpoint - tags: - - NotificationEndpoints - summary: Add a notification endpoint - requestBody: - description: Notification endpoint to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostNotificationEndpoint' - responses: - '201': - description: Notification endpoint created - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationEndpoints/{endpointID}': - get: - operationId: GetNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Retrieve a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: The notification endpoint requested - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Update a notification endpoint - requestBody: - description: A new notification endpoint to replace the existing endpoint with - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: An updated notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - '404': - description: The notification endpoint was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Update a notification endpoint - requestBody: - description: Check update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpointUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: An updated notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - '404': - description: The notification endpoint was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Delete a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '204': - description: Delete has been accepted - '404': - description: The endpoint was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationEndpoints/{endpointID}/labels': - get: - operationId: GetNotificationEndpointsIDLabels - tags: - - NotificationEndpoints - summary: List all labels for a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: A list of all labels for a notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostNotificationEndpointIDLabels - tags: - - NotificationEndpoints - summary: Add a label to a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: The label was added to the notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationEndpoints/{endpointID}/labels/{labelID}': - delete: - operationId: DeleteNotificationEndpointsIDLabelsID - tags: - - NotificationEndpoints - summary: Delete a label from a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Endpoint or label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /users: + - Templates + /api/v2/users: get: operationId: GetUsers - tags: - - Users - summary: List all users parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' responses: - '200': - description: A list of users + "200": content: application/json: schema: $ref: '#/components/schemas/Users' + description: A list of users default: - description: Unexpected error $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: List all users + tags: + - Users post: operationId: PostUsers - tags: - - Users - summary: Create a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' description: User to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/User' responses: - '201': + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserResponse' description: User created - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' default: - description: Unexpected error $ref: '#/components/responses/ServerError' - '/users/{userID}': - get: - operationId: GetUsersID + description: Unexpected error + summary: Create a user tags: - - Users - summary: Retrieve a user - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The user ID. - responses: - '200': - description: User details - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - patch: - operationId: PatchUsersID - tags: - - Users - summary: Update a user - requestBody: - description: User update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/User' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the user to update. - responses: - '200': - description: User updated - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' + - Users + /api/v2/users/{userID}: delete: operationId: DeleteUsersID - tags: - - Users - summary: Delete a user parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the user to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the user to delete. + in: path + name: userID + required: true + schema: + type: string responses: - '204': + "204": description: User deleted default: - description: Unexpected error $ref: '#/components/responses/ServerError' - /setup: + description: Unexpected error + summary: Delete a user + tags: + - Users get: - operationId: GetSetup - tags: - - Setup - summary: Retrieve setup status - description: 'Check if setup is allowed. Returns `true` if no default user, organization, or bucket have been created.' + operationId: GetUsersID parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: 'Setup is allowed, true or false' - content: - application/json: - schema: - $ref: '#/components/schemas/IsOnboarding' - post: - operationId: PostSetup - tags: - - Setup - summary: '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: - description: Source to create + - $ref: '#/components/parameters/TraceSpan' + - description: The user ID. + in: path + name: userID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/OnboardingRequest' + schema: + type: string responses: - '201': - description: 'The created default user, bucket, and organization' + "200": content: application/json: schema: - $ref: '#/components/schemas/OnboardingResponse' + $ref: '#/components/schemas/UserResponse' + description: User details default: - description: Unexpected error $ref: '#/components/responses/ServerError' - /setup/user: - post: - operationId: PostSetupUser - tags: - - Setup - summary: '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 - content: - application/json: - schema: - $ref: '#/components/schemas/OnboardingRequest' - responses: - '201': - description: 'The created default user, bucket, and organization.' - content: - application/json: - schema: - $ref: '#/components/schemas/OnboardingResponse' - default: description: Unexpected error - $ref: '#/components/responses/ServerError' - /authorizations: - get: - operationId: GetAuthorizations + summary: Retrieve a user tags: - - Authorizations - summary: List all authorizations - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: userID - schema: - type: string - description: Only show authorizations that belong to a user ID. - - in: query - name: user - schema: - type: string - description: Only show authorizations that belong to a user name. - - in: query - name: orgID - schema: - type: string - description: Only show authorizations that belong to an organization ID. - - in: query - name: org - schema: - type: string - description: Only show authorizations that belong to a organization name. - - in: query - name: token - schema: - type: string - description: Find a token by value. - responses: - '200': - description: A list of authorizations - content: - application/json: - schema: - $ref: '#/components/schemas/Authorizations' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - post: - operationId: PostAuthorizations - tags: - - Authorizations - summary: Create an authorization - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Authorization to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Authorization' - responses: - '201': - description: 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' - /experimental/sampledata/buckets: - get: - operationId: GetDemoDataBuckets - tags: - - DemoDataBuckets - summary: List of Demo Data Buckets - responses: - '200': - description: A list of demo data buckets - content: - application/json: - schema: - $ref: '#/components/schemas/DemoDataBuckets' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - '/experimental/sampledata/buckets/{bucketID}/members': - post: - operationId: GetDemoDataBucketMembers - tags: - - DemoDataBuckets - summary: List of Demo Data Buckets - parameters: - - 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 - '204': - description: A list of demo data buckets - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteDemoDataBucketMembers - tags: - - DemoDataBuckets - summary: List of Demo Data Buckets - parameters: - - 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 - '204': - description: A list of demo data buckets - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/authorizations/{authID}': - get: - operationId: GetAuthorizationsID - tags: - - Authorizations - summary: Retrieve an authorization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: authID - schema: - type: string - required: true - description: The identifier of the authorization to get. - responses: - '200': - description: Authorization details - content: - application/json: - schema: - $ref: '#/components/schemas/Authorization' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' + - Users patch: - operationId: PatchAuthorizationsID - tags: - - Authorizations - summary: Update authorization status - description: Update an authorization's status to `active` or `inactive`. - requestBody: - description: The updated Authorization object. + operationId: PatchUsersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the user to update. + in: path + name: userID required: true + schema: + type: string + requestBody: content: application/json: schema: - $ref: '#/components/schemas/AuthorizationUpdateRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: authID - schema: - type: string - required: true - description: The identifier of the authorization to update. + $ref: '#/components/schemas/User' + description: User update to apply + required: true responses: - '200': - description: The updated authorization. + "200": content: application/json: schema: - $ref: '#/components/schemas/Authorization' + $ref: '#/components/schemas/UserResponse' + description: User updated default: - description: Unexpected error $ref: '#/components/responses/ServerError' - delete: - operationId: DeleteAuthorizationsID + description: Unexpected error + summary: Update a user tags: - - Authorizations - summary: Delete an authorization + - Users + /api/v2/users/{userID}/password: + post: + operationId: PostUsersIDPassword parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: authID - schema: - type: string - required: true - description: The identifier of the authorization to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The user ID. + in: path + name: userID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordResetBody' + description: New password + required: true responses: - '204': - description: Authorization deleted + "204": + description: Password successfully updated default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - /variables: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful authentication + security: + - BasicAuthentication: [] + summary: Update a password + tags: + - Users + /api/v2/variables: get: operationId: GetVariables - tags: - - Variables - summary: List all variables parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The organization ID. + in: query + name: orgID + schema: + type: string responses: - '200': - description: A list of variables for an organization. + "200": content: application/json: schema: $ref: '#/components/schemas/Variables' - '400': + description: A list of variables for an organization. + "400": + $ref: '#/components/responses/ServerError' description: Invalid request - $ref: '#/components/responses/ServerError' default: - description: Internal server error $ref: '#/components/responses/ServerError' + description: Internal server error + summary: List all variables + tags: + - Variables post: operationId: PostVariables - summary: Create a variable - tags: - - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' description: Variable to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' responses: - '201': + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' description: Variable created - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' default: - description: Internal server error $ref: '#/components/responses/ServerError' - '/variables/{variableID}': - get: - operationId: GetVariablesID + description: Internal server error + summary: Create a variable tags: - - Variables - summary: Retrieve a variable - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. - responses: - '200': - description: Variable found - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' - '404': - description: Variable not found - $ref: '#/components/responses/ServerError' - default: - description: Internal server error - $ref: '#/components/responses/ServerError' + - Variables + /api/v2/variables/{variableID}: delete: operationId: DeleteVariablesID - tags: - - Variables - summary: Delete a variable parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string responses: - '204': + "204": description: Variable deleted default: - description: Internal server error $ref: '#/components/responses/ServerError' + description: Internal server error + summary: Delete a variable + tags: + - Variables + get: + operationId: GetVariablesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + description: Variable found + "404": + $ref: '#/components/responses/ServerError' + description: Variable not found + default: + $ref: '#/components/responses/ServerError' + description: Internal server error + summary: Retrieve a variable + tags: + - Variables patch: operationId: PatchVariablesID - summary: Update a variable - tags: - - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' description: Variable update to apply required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' responses: - '200': - description: Variable updated + "200": content: application/json: schema: $ref: '#/components/schemas/Variable' + description: Variable updated default: - description: Internal server error $ref: '#/components/responses/ServerError' + description: Internal server error + summary: Update a variable + tags: + - Variables put: operationId: PutVariablesID - summary: Replace a variable - tags: - - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. - requestBody: - description: Variable to replace + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/Variable' + description: Variable to replace + required: true responses: - '200': - description: Variable updated + "200": content: application/json: schema: $ref: '#/components/schemas/Variable' + description: Variable updated default: + $ref: '#/components/responses/ServerError' description: Internal server error - $ref: '#/components/responses/ServerError' - '/buckets/{bucketID}/schema/measurements': - summary: APIs for bucket schema + summary: Replace a variable + tags: + - Variables + /api/v2/variables/{variableID}/labels: get: - summary: List all measurement schemas of a bucket - operationId: getMeasurementSchemas + operationId: GetVariablesIDLabels parameters: - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The identifier of the organization. - schema: - type: string - - in: query - name: name - description: The name of a measurement. Return schemas for this measurement only. - schema: - type: string - - in: path - name: bucketID - description: The identifier of the bucket. - schema: - type: string - required: true - tags: - - Bucket Schemas - responses: - '200': - description: A list of measurement schemas returning summary information - headers: - ETag: - description: The current version of the bucket schema - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/MeasurementSchemaList' - '404': - description: Bucket not found - $ref: '#/components/responses/ServerError' - post: - summary: Create a measurement schema for a bucket - operationId: createMeasurementSchema - parameters: - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The identifier of the organization. - schema: - type: string - - in: path - name: bucketID - description: The identifier of the bucket. - schema: - type: string - required: true - tags: - - Bucket Schemas - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MeasurementSchemaCreateRequest' - responses: - '201': - description: The created measurement schema - headers: - ETag: - description: The current version of the measurement schema - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/MeasurementSchema' - '400': - description: Client error with create request - content: - application/json: - 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.' - value: - code: invalid - message: name is invalid - missingColumnsExample: - summary: Missing columns - 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. - 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. - 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. - value: - code: invalid - message: At least one field column is required - schema: - $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/schema/measurements/{measurementID}': - summary: APIs for tables - get: - summary: Retrieve measurement schema information - operationId: getMeasurementSchema - parameters: - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The identifier of the organization. - schema: - type: string - - in: path - name: bucketID - description: The identifier of the bucket. - schema: - type: string - required: true - - in: path - name: measurementID - description: The identifier of the measurement. - schema: - type: string - required: true - tags: - - Bucket Schemas - responses: - '200': - description: Schema definition for a single measurement - headers: - ETag: - description: The current version of the measurement schema - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/MeasurementSchema' - patch: - summary: Update a measurement schema - operationId: updateMeasurementSchema - parameters: - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The identifier of the organization. - schema: - type: string - - in: path - name: bucketID - description: The identifier of the bucket. - schema: - type: string - required: true - - in: path - name: measurementID - description: The identifier of the measurement. - schema: - type: string - required: true - tags: - - Bucket Schemas - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MeasurementSchemaUpdateRequest' - responses: - '200': - description: The updated measurement schema - content: - application/json: - schema: - $ref: '#/components/schemas/MeasurementSchema' - '400': - description: Client error updating measurement schema - content: - application/json: - examples: - missingColumnsExample: - summary: Deleted columns - 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 - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/limits': - get: - tags: - - Limits - summary: Retrieve limits for an organization - parameters: - - in: path - name: orgID - description: The identifier of the organization. - required: true - schema: - type: string - responses: - '200': - description: The Limits defined for the organization. - content: - application/json: - schema: - type: object - description: These are org limits similar to those configured in/by quartz. - properties: - links: - $ref: '#/components/schemas/Links' - limits: - $ref: '#/components/schemas/Limit' - default: - description: unexpected error - $ref: '#/components/responses/ServerError' - '/orgs/{orgID}/usage': - get: - tags: - - Usage - summary: Retrieve usage for an organization - parameters: - - in: path - name: orgID - description: The identifier of the organization. - required: true - schema: - type: string - - in: query - name: start - description: start time - required: true - schema: - type: timestamp - - in: query - name: stop - description: stop time - required: false - schema: - type: timestamp - - in: query - name: raw - description: return raw usage data - required: false - schema: - type: boolean - default: false - responses: - '200': - 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' - 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: - 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 - 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 + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateDashboardRequest' + schema: + type: string responses: - '201': - description: Added dashboard + "200": content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/Dashboard' - - $ref: '#/components/schemas/DashboardWithViewProperties' + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a variable default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - get: - operationId: GetDashboards + description: Unexpected error + summary: List all labels for a variable 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' + - Variables post: - operationId: PostTasks - tags: - - Tasks - summary: Create a new task + operationId: PostVariablesIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Task to create + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID required: true + schema: + type: string + requestBody: content: application/json: schema: - $ref: '#/components/schemas/TaskCreateRequest' + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: Task created + "201": content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/LabelResponse' + description: The newly added label default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /write: - post: - operationId: PostWrite + description: Unexpected error + summary: Add a label to a variable tags: - - Write - summary: Write data + - Variables + /api/v2/variables/{variableID}/labels/{labelID}: + delete: + operationId: DeleteVariablesIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string + - description: The label ID to delete. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Variable not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label from a variable + tags: + - Variables + /api/v2/write: + post: description: | Writes data to a bucket. @@ -6204,126 +6182,141 @@ paths: - 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: Data in line protocol format. + operationId: PostWrite + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: When present, the header value tells the database that compression + is applied to the line protocol in the request body. + in: header + name: Content-Encoding + schema: + default: identity + description: The header value specifies that the line protocol in the request + body is encoded with gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - description: The header value indicates the format of the data in the request + body. + in: header + name: Content-Type + schema: + default: text/plain; charset=utf-8 + description: | + `text/plain` specifies line protocol. `UTF-8` is the default character set. + enum: + - text/plain + - text/plain; charset=utf-8 + - application/vnd.influx.arrow + type: string + - 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`. + in: header + name: Content-Length + schema: + description: The length in decimal number of octets. + type: integer + - description: The header value specifies the response format. + in: header + name: Accept + schema: + default: application/json + description: The response format for errors. + enum: + - application/json + type: string + - 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. + in: query + name: org required: true + schema: + description: Organization name or ID. + type: string + - description: The parameter value specifies the ID of the destination organization + for writes. If both `orgID` and `org` are specified, `org` takes precedence. + in: query + name: orgID + schema: + type: string + - description: The destination bucket for writes. + in: query + name: bucket + required: true + schema: + description: All points within batch are written to this bucket. + type: string + - description: The precision for the unix timestamps within the body line-protocol. + in: query + name: precision + schema: + $ref: '#/components/schemas/WritePrecision' + requestBody: content: text/plain: schema: - type: string format: byte - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Encoding - 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: 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: The header value indicates the format of the data in the request body. - schema: - type: string - description: | - `text/plain` specifies line protocol. `UTF-8` is the default character set. - default: text/plain; charset=utf-8 - enum: - - text/plain - - text/plain; charset=utf-8 - - application/vnd.influx.arrow - - in: header - name: Content-Length - 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: The header value specifies the response format. - schema: - type: string - description: The response format for errors. - default: application/json - enum: - - application/json - - in: query - name: org - 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: Organization name or ID. - - in: query - name: orgID - 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 - name: bucket - description: The destination bucket for writes. - required: true - schema: - type: string - description: All points within batch are written to this bucket. - - in: query - name: precision - description: The precision for the unix timestamps within the body line-protocol. - schema: - $ref: '#/components/schemas/WritePrecision' + type: string + description: Data in line protocol format. + required: true responses: - '204': - 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: 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. + "204": + 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": content: application/json: - schema: - $ref: '#/components/schemas/LineProtocolError' examples: measurementSchemaFieldTypeConflict: summary: Field type conflict thrown by an explicit bucket schema value: code: invalid - message: 'partial write error (2 written): unable to parse ''air_sensor,service=S1,sensor=L1 temperature="90.5",humidity=70.0 1632850122'': schema: field type for field "temperature" not permitted by schema; got String but expected Float' - '401': - 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. + message: 'partial write error (2 written): unable to parse ''air_sensor,service=S1,sensor=L1 + temperature="90.5",humidity=70.0 1632850122'': schema: field + type for field "temperature" not permitted by schema; got String + but expected Float' + schema: + $ref: '#/components/schemas/LineProtocolError' + 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. + "401": content: application/json: - schema: - $ref: '#/components/schemas/Error' examples: tokenNotAuthorized: summary: Token is not authorized to access the organization or resource value: code: unauthorized message: unauthorized access - '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' + 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. + "404": + content: + application/json: examples: resource-not-found: summary: Not found error value: code: not found message: bucket "air_sensor" not found - '413': - description: Request entity too large. The payload exceeded the 50MB size limit. InfluxDB rejected the batch and did not write any data. + schema: + $ref: '#/components/schemas/Error' + 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. + "413": content: text/html: - schema: - type: string examples: dataExceedsSizeLimit: summary: Cloud response @@ -6336,671 +6329,1091 @@ paths:
    nginx
    - '429': - description: The token is temporarily over quota. The Retry-After header describes when to try the write again. + schema: + type: string + description: Request entity too large. The payload exceeded the 50MB size + limit. InfluxDB rejected the batch and did not write any data. + "429": + 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 - '500': - description: Internal server error. + type: integer + "500": content: application/json: - schema: - $ref: '#/components/schemas/Error' examples: internalError: summary: Internal error example value: code: internal error - '503': - description: The server is temporarily unavailable to accept writes. The `Retry-After` header describes when to try the write again. + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + "503": + 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 + type: integer default: $ref: '#/components/responses/ServerError' + summary: Write data + tags: + - Write + /api/v2private/annotations: + delete: + operationId: deleteAnnotations + parameters: + - $ref: '#/components/parameters/AnnotationDeleteFilter' + responses: + "204": + $ref: '#/components/responses/NoContent' + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Delete annotation + tags: + - Annotations + get: + operationId: listAnnotations + parameters: + - $ref: '#/components/parameters/AnnotationListFilter' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationList' + description: Optionally filtered list of annotations + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: List annotations + tags: + - Annotations + post: + operationId: createAnnotations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationCreateList' + description: Annotations to create + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationEventList' + description: Annotations created + "204": + $ref: '#/components/responses/NoContent' + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Create annotations + tags: + - Annotations + /api/v2private/annotations/{annotationID}: + delete: + operationId: deleteAnnotation + parameters: + - description: The identifier of the annotation. + in: path + name: annotationID + required: true + schema: + type: string + responses: + "204": + $ref: '#/components/responses/NoContent' + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Delete an annotation by ID + tags: + - Annotations + get: + parameters: + - description: The identifier of the annotation. + in: path + name: annotationID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationEvent' + description: The annotation details + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "404": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Retrieve an annotation + tags: + - Annotations + put: + operationId: updateAnnotation + parameters: + - description: The identifier of the annotation. + in: path + name: annotationID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationCreate' + description: Annotation to store + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationEvent' + description: The updated annotation + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "404": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Update an annotation + tags: + - Annotations + /api/v2private/flags: + get: + responses: + "200": + content: + application/json: + schema: + additionalProperties: true + type: object + description: Pre-authentication exposed feature flags + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Retrieve public/preauth feature flags + tags: + - Public Flags + /api/v2private/limitevents: + get: + parameters: + - description: only show events belonging to specified organization + in: query + name: orgID + required: true + schema: + type: string + - description: limit to only events at or after start time + in: query + name: start + schema: + format: date-time + type: string + - description: limit to only events before stop time + in: query + name: stop + schema: + format: date-time + type: string + - in: query + name: limit + schema: + default: 100 + maximum: 100 + minimum: 1 + type: integer + - in: query + name: offset + schema: + minimum: 0 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LimitEvents' + description: A list of limit events + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: List all limit events + tags: + - Limits + /api/v2private/oauth/clientConfig: + get: + parameters: + - description: optional parameter to redirect the user to after a successful + login. + in: query + name: redirectTo + required: false + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthClientConfig' + description: Required OAuth client variables + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Retrieve required OAuth client variables + tags: + - OAuth + /api/v2private/orgs/{orgID}/limits: + get: + parameters: + - description: The identifier of the organization. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Limit' + description: A limit + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Retrieve limits for an organization + tags: + - Limits + put: + parameters: + - description: The identifier of the organization. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Limit' + description: limit that will be updated + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Limit' + description: The updated or created limit + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Create or update limits for an organization + tags: + - Limits + /api/v2private/orgs/{orgID}/limits/status: + get: + parameters: + - description: The identifier of the organization. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LimitStatuses' + description: Current limit status + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Get current limit status for an org + tags: + - Limits + /api/v2private/orgs/{orgID}/settings: + get: + parameters: + - description: org to get settings for + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrgSettings' + description: Current settings for org + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Get settings for an org + put: + parameters: + - description: org to create settings for + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrgSettings' + description: Org settings that will be updated + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrgSettings' + description: The updated or created settings + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: Create or update settings for an org + /api/v2private/setup/user: + post: + description: Post an onboarding request to create a new user, organization, + and bucket. + operationId: PostSetupUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingRequest' + description: Source to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingResponse' + description: The created default user, bucket, and organization. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Create a new user, organization, and bucket + tags: + - Setup + /api/v2private/streams: + delete: + operationId: deleteStream + parameters: + - $ref: '#/components/parameters/StreamDeleteFilter' + responses: + "204": + $ref: '#/components/responses/NoContent' + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Delete stream + tags: + - Streams + get: + operationId: getStreams + parameters: + - $ref: '#/components/parameters/StreamListFilter' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StreamList' + description: Optionally filtered list of streams + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Get streams + tags: + - Streams + put: + operationId: createUpdateStream + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Stream' + description: Stream to create or update + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ReadStream' + description: Stream as created/updated + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Create or update stream + tags: + - Streams + /api/v2private/streams/{streamID}: + delete: + operationId: deleteStreamByID + parameters: + - description: stream to delete + in: path + name: streamID + required: true + schema: + type: string + responses: + "204": + $ref: '#/components/responses/NoContent' + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Delete stream by ID + tags: + - Streams + put: + operationId: updateStream + parameters: + - description: stream to update + in: path + name: streamID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Stream' + description: Stream to update + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ReadStream' + description: Stream as updated + "400": + $ref: '#/components/responses/ServerError' + "401": + $ref: '#/components/responses/ServerError' + "404": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + summary: Update stream + tags: + - Streams + /api/v2private/tenants: + post: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationRequest' + description: the parameters for the org to be created, including limits + required: true + responses: + "201": + content: + application/json: + schema: + properties: + orgID: + description: the influxDB ID of the created organization + type: string + userID: + description: the influxDB ID of the created IDPE User + type: string + type: object + description: The created organization and the initial bucket + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidRequestError' + description: The requested changes were invalid + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedRequestError' + description: Credentials not provided + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ForbiddenRequestError' + description: Insufficient credentials to create an organization + default: + $ref: '#/components/responses/ServerError' + description: unexpected error + summary: This is a temporary, experimental, soon to be depricated API for Quartz components: parameters: - TraceSpan: - in: header - name: Zap-Trace-Span - description: OpenTracing span context - example: - trace_id: '1' - span_id: '1' - baggage: - key: value + After: + description: | + The last resource ID from which to seek from (but not including). This is to be used instead of `offset`. + in: query + name: after required: false schema: type: string - Offset: + AnnotationDeleteFilter: + description: Annotations to delete in: query - name: offset + name: AnnotationDeleteFilter + required: true + schema: + $ref: '#/components/schemas/AnnotationDeleteFilter' + AnnotationListFilter: + description: Filter for returned annotations + in: query + name: AnnotationListFilter required: false schema: - type: integer - minimum: 0 - Limit: - in: query - name: limit - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - default: 20 + $ref: '#/components/schemas/AnnotationListFilter' Descending: in: query name: descending required: false schema: - type: boolean default: false + type: boolean + Limit: + in: query + name: limit + required: false + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + Offset: + in: query + name: offset + required: false + schema: + minimum: 0 + type: integer SortBy: in: query name: sortBy required: false schema: type: string - After: + StreamDeleteFilter: + description: Stream to delete in: query - name: after + name: StreamDeleteFilter + required: true + schema: + $ref: '#/components/schemas/StreamDeleteFilter' + StreamListFilter: + description: Filter for returned streams + in: query + name: StreamListFilter + required: false + schema: + $ref: '#/components/schemas/StreamListFilter' + TraceSpan: + description: OpenTracing span context + example: + baggage: + key: value + span_id: "1" + trace_id: "1" + in: header + name: Zap-Trace-Span 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`. schemas: - LanguageRequest: - description: Flux query to be analyzed. - type: object - required: - - query + ASTResponse: + description: Contains the AST for the supplied Flux query properties: - query: - description: Flux query script to be analyzed - type: string - Query: - description: Query influx using the Flux language + ast: + $ref: '#/components/schemas/Package' type: object - required: - - query + AddResourceMemberRequestBody: properties: - extern: - $ref: '#/components/schemas/File' - query: - description: Query script to execute. + id: type: string - type: - description: The type of query. Must be "flux". + name: type: string - enum: - - flux - params: + required: + - id + type: object + AnalyzeQueryResponse: + properties: + errors: + items: + properties: + character: + type: integer + column: + type: integer + line: + type: integer + message: + type: string + type: object + type: array + type: object + Annotation: + properties: + endTime: + format: date-time + type: string + message: + type: string + startTime: + format: date-time + type: string + stickers: + additionalProperties: + type: string 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) - 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. + summary: type: string - format: date-time - InfluxQLQuery: - description: Query influx using the InfluxQL language type: object - required: - - query + AnnotationCreate: + allOf: + - $ref: '#/components/schemas/Annotation' + - properties: + stream: + type: string + type: object + AnnotationCreateList: + items: + $ref: '#/components/schemas/AnnotationCreate' + type: array + AnnotationDeleteFilter: properties: - query: - description: InfluxQL query execute. + endTime: + format: date-time type: string + startTime: + format: date-time + type: string + stickers: + additionalProperties: + type: string + type: object + stream: + type: string + streamID: + type: string + required: + - stream + - startTime + - endTime + type: object + AnnotationEvent: + allOf: + - $ref: '#/components/schemas/Annotation' + - properties: + id: + type: string + stream: + type: string + type: object + AnnotationEventList: + items: + $ref: '#/components/schemas/AnnotationEvent' + type: array + AnnotationList: + items: + properties: + annotations: + items: + $ref: '#/components/schemas/AnnotationResponse' + type: array + stream: + type: string + type: object + type: array + AnnotationListFilter: + allOf: + - $ref: '#/components/schemas/BasicFilter' + - properties: + stickerIncludes: + additionalProperties: + type: string + type: object + streamIncludes: + items: + type: string + type: array + type: object + AnnotationResponse: + properties: + endTime: + format: date-time + type: string + id: + type: string + message: + type: string + startTime: + format: date-time + type: string + stickers: + additionalProperties: + type: string + type: object + summary: + type: string + type: object + ArrayExpression: + description: Used to create and directly specify the elements of an array object + properties: + elements: + description: Elements of the array + items: + $ref: '#/components/schemas/Expression' + type: array type: - description: The type of query. Must be "influxql". + $ref: '#/components/schemas/NodeType' + type: object + Authorization: + allOf: + - $ref: '#/components/schemas/AuthorizationUpdateRequest' + - properties: + createdAt: + format: date-time + readOnly: true + type: string + id: + readOnly: true + type: string + links: + example: + self: /api/v2/authorizations/1 + user: /api/v2/users/12 + properties: + self: + $ref: '#/components/schemas/Link' + readOnly: true + user: + $ref: '#/components/schemas/Link' + readOnly: true + readOnly: true + type: object + org: + description: Name of the org token is scoped to. + readOnly: true + type: string + orgID: + description: ID of org that authorization is scoped to. + type: string + permissions: + description: List of permissions for an auth. An auth must have at least + one Permission. + items: + $ref: '#/components/schemas/Permission' + minItems: 1 + type: array + token: + description: Passed via the Authorization Header and Token Authentication + type. + readOnly: true + type: string + updatedAt: + format: date-time + readOnly: true + type: string + user: + description: Name of user that created and owns the token. + readOnly: true + type: string + userID: + description: ID of user that created and owns the token. + readOnly: true + type: string + type: object + required: + - orgID + - permissions + AuthorizationUpdateRequest: + properties: + description: + description: A description of the token. type: string + status: + default: active + description: If inactive the token is inactive and requests using the token + will be rejected. enum: - - influxql - bucket: - description: Bucket is to be used instead of the database and retention policy specified in the InfluxQL query. + - active + - inactive type: string - Package: - description: Represents a complete package source tree. - type: object + Authorizations: properties: - type: - $ref: '#/components/schemas/NodeType' - path: - description: Package import path - type: string - package: - description: Package name - type: string - files: - description: Package files - type: array + authorizations: items: - $ref: '#/components/schemas/File' - File: - description: Represents a source from a single file - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - name: - description: The name of the file. - type: string - package: - $ref: '#/components/schemas/PackageClause' - imports: - description: A list of package imports + $ref: '#/components/schemas/Authorization' type: array - items: - $ref: '#/components/schemas/ImportDeclaration' - body: - description: List of Flux statements - type: array - items: - $ref: '#/components/schemas/Statement' - PackageClause: - description: Defines a package identifier + links: + $ref: '#/components/schemas/Links' + readOnly: true type: object + Axes: + description: The viewport for a View's visualizations properties: - type: - $ref: '#/components/schemas/NodeType' - name: - $ref: '#/components/schemas/Identifier' - ImportDeclaration: - description: Declares a package import - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - as: - $ref: '#/components/schemas/Identifier' - path: - $ref: '#/components/schemas/StringLiteral' - DeletePredicateRequest: - description: The delete predicate request. - type: object + x: + $ref: '#/components/schemas/Axis' + "y": + $ref: '#/components/schemas/Axis' required: - - start - - stop - properties: - start: - description: RFC3339Nano - type: string - format: date-time - stop: - description: RFC3339Nano - type: string - format: date-time - predicate: - description: InfluxQL-like delete statement - example: tag1="value1" and (tag2="value2" and tag3!="value3") - type: string - Node: - oneOf: - - $ref: '#/components/schemas/Expression' - - $ref: '#/components/schemas/Block' - NodeType: - description: Type of AST node - type: string - Block: - description: A set of statements + - x + - "y" type: object + Axis: + description: The description of a particular axis for a visualization. properties: - type: - $ref: '#/components/schemas/NodeType' - body: - description: Block body - type: array + base: + description: Base represents the radix for formatting axis values. + enum: + - "" + - "2" + - "10" + type: string + bounds: + 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: - $ref: '#/components/schemas/Statement' - Statement: - oneOf: - - $ref: '#/components/schemas/BadStatement' - - $ref: '#/components/schemas/VariableAssignment' - - $ref: '#/components/schemas/MemberAssignment' - - $ref: '#/components/schemas/ExpressionStatement' - - $ref: '#/components/schemas/ReturnStatement' - - $ref: '#/components/schemas/OptionStatement' - - $ref: '#/components/schemas/BuiltinStatement' - - $ref: '#/components/schemas/TestStatement' - BadStatement: - description: A placeholder for statements for which no correct statement nodes can be created + type: string + maxItems: 2 + minItems: 0 + type: array + label: + description: Label is a description of this Axis + type: string + prefix: + description: Prefix represents a label prefix for formatting axis values. + type: string + scale: + $ref: '#/components/schemas/AxisScale' + suffix: + description: Suffix represents a label suffix for formatting axis values. + type: string type: object + AxisScale: + description: 'Scale is the axis formatting scale. Supported: "log", "linear"' + enum: + - log + - linear + type: string + BadStatement: + description: A placeholder for statements for which no correct statement nodes + can be created properties: - type: - $ref: '#/components/schemas/NodeType' text: description: Raw source text type: string - VariableAssignment: - description: Represents the declaration of a variable - type: object - properties: type: $ref: '#/components/schemas/NodeType' - id: - $ref: '#/components/schemas/Identifier' - init: - $ref: '#/components/schemas/Expression' - MemberAssignment: - description: Object property assignment type: object + BandViewProperties: properties: - type: - $ref: '#/components/schemas/NodeType' - member: - $ref: '#/components/schemas/MemberExpression' - 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 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - expression: - $ref: '#/components/schemas/Expression' - ReturnStatement: - description: Defines an expression to return - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - argument: - $ref: '#/components/schemas/Expression' - OptionStatement: - description: A single variable declaration - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - assignment: - oneOf: - - $ref: '#/components/schemas/VariableAssignment' - - $ref: '#/components/schemas/MemberAssignment' - BuiltinStatement: - description: Declares a builtin identifier and its type - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - id: - $ref: '#/components/schemas/Identifier' - TestStatement: - description: Declares a Flux test case - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - assignment: - $ref: '#/components/schemas/VariableAssignment' - Expression: - oneOf: - - $ref: '#/components/schemas/ArrayExpression' - - $ref: '#/components/schemas/DictExpression' - - $ref: '#/components/schemas/FunctionExpression' - - $ref: '#/components/schemas/BinaryExpression' - - $ref: '#/components/schemas/CallExpression' - - $ref: '#/components/schemas/ConditionalExpression' - - $ref: '#/components/schemas/LogicalExpression' - - $ref: '#/components/schemas/MemberExpression' - - $ref: '#/components/schemas/IndexExpression' - - $ref: '#/components/schemas/ObjectExpression' - - $ref: '#/components/schemas/ParenExpression' - - $ref: '#/components/schemas/PipeExpression' - - $ref: '#/components/schemas/UnaryExpression' - - $ref: '#/components/schemas/BooleanLiteral' - - $ref: '#/components/schemas/DateTimeLiteral' - - $ref: '#/components/schemas/DurationLiteral' - - $ref: '#/components/schemas/FloatLiteral' - - $ref: '#/components/schemas/IntegerLiteral' - - $ref: '#/components/schemas/PipeLiteral' - - $ref: '#/components/schemas/RegexpLiteral' - - $ref: '#/components/schemas/StringLiteral' - - $ref: '#/components/schemas/UnsignedIntegerLiteral' - - $ref: '#/components/schemas/Identifier' - ArrayExpression: - description: Used to create and directly specify the elements of an array object - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - elements: - description: Elements of the array - type: array + axes: + $ref: '#/components/schemas/Axes' + colors: + description: Colors define color encoding of data into a visualization items: - $ref: '#/components/schemas/Expression' - DictExpression: - description: Used to create and directly specify the elements of a dictionary - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - elements: - description: Elements of the dictionary + $ref: '#/components/schemas/DashboardColor' type: array - items: - $ref: '#/components/schemas/DictItem' - DictItem: - description: A key-value pair in a dictionary - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - key: - $ref: '#/components/schemas/Expression' - val: - $ref: '#/components/schemas/Expression' - FunctionExpression: - description: Function expression - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - params: - description: Function parameters - type: array - items: - $ref: '#/components/schemas/Property' - body: - $ref: '#/components/schemas/Node' - BinaryExpression: - description: uses binary operators to act on two operands in an expression - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - operator: - type: string - left: - $ref: '#/components/schemas/Expression' - right: - $ref: '#/components/schemas/Expression' - CallExpression: - description: Represents a function call - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - callee: - $ref: '#/components/schemas/Expression' - arguments: - description: Function arguments - type: array - items: - $ref: '#/components/schemas/Expression' - ConditionalExpression: - description: 'Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`' - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - test: - $ref: '#/components/schemas/Expression' - alternate: - $ref: '#/components/schemas/Expression' - consequent: - $ref: '#/components/schemas/Expression' - LogicalExpression: - description: Represents the rule conditions that collectively evaluate to either true or false - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - operator: - type: string - left: - $ref: '#/components/schemas/Expression' - right: - $ref: '#/components/schemas/Expression' - MemberExpression: - description: Represents accessing a property of an object - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - object: - $ref: '#/components/schemas/Expression' - property: - $ref: '#/components/schemas/PropertyKey' - IndexExpression: - description: Represents indexing into an array - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - array: - $ref: '#/components/schemas/Expression' - index: - $ref: '#/components/schemas/Expression' - ObjectExpression: - description: Allows the declaration of an anonymous object within a declaration - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - properties: - description: Object properties - type: array - items: - $ref: '#/components/schemas/Property' - ParenExpression: - description: Represents an expression wrapped in parenthesis - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - expression: - $ref: '#/components/schemas/Expression' - PipeExpression: - description: Call expression with pipe argument - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - argument: - $ref: '#/components/schemas/Expression' - call: - $ref: '#/components/schemas/CallExpression' - UnaryExpression: - description: Uses operators to act on a single operand in an expression - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - operator: - type: string - argument: - $ref: '#/components/schemas/Expression' - BooleanLiteral: - description: Represents boolean values - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: boolean - DateTimeLiteral: - description: Represents an instant in time with nanosecond precision using the syntax of golang's RFC3339 Nanosecond variant - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - 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 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - values: - description: Duration values - type: array - items: - $ref: '#/components/schemas/Duration' - FloatLiteral: - description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: number - IntegerLiteral: - description: Represents integer numbers - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: string - PipeLiteral: - 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 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: string - StringLiteral: - description: Expressions begin and end with double quote marks - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: string - UnsignedIntegerLiteral: - description: Represents integer numbers - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - 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. - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - magnitude: - type: integer - unit: - type: string - Property: - description: The value associated with a key - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - key: - $ref: '#/components/schemas/PropertyKey' - value: - $ref: '#/components/schemas/Expression' - PropertyKey: - oneOf: - - $ref: '#/components/schemas/Identifier' - - $ref: '#/components/schemas/StringLiteral' - Identifier: - description: A valid Flux identifier - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - 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' - type: object - properties: - header: - description: 'If true, the results will contain a header row' - type: boolean - default: true - delimiter: - description: 'Separator between cells; the default is ,' - type: string - default: ',' - maxLength: 1 - minLength: 1 - annotations: - description: 'https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns' - type: array - uniqueItems: true + generateXAxisTicks: items: type: string - enum: - - group - - datatype - - default - commentPrefix: - description: Character prefixed to comment strings - type: string - default: '#' - maxLength: 1 - minLength: 0 - dateTimeFormat: - description: Format of timestamps - type: string - default: RFC3339 + type: array + generateYAxisTicks: + items: + type: string + type: array + geom: + $ref: '#/components/schemas/XYGeom' + hoverDimension: enum: - - RFC3339 - - RFC3339Nano - AuthorizationUpdateRequest: - properties: - status: - description: If inactive the token is inactive and requests using the token will be rejected. - default: active + - auto + - x + - "y" + - xy type: string + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + lowerColumn: + type: string + mainColumn: + type: string + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: enum: - - active - - inactive - description: + - chronograf-v2 type: string - description: A description of the token. - PostBucketRequest: - properties: - orgID: + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + timeFormat: type: string - name: + type: + enum: + - band type: string - description: + upperColumn: type: string - rp: + xColumn: type: string - retentionRules: - $ref: '#/components/schemas/RetentionRules' - schemaType: - $ref: '#/components/schemas/SchemaType' - default: implicit + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yColumn: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer required: - - orgID - - name - - retentionRules + - type + - geom + - queries + - shape + - axes + - colors + - note + - showNoteWhenEmpty + type: object + BasicFilter: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + type: object + BinaryExpression: + description: uses binary operators to act on two operands in an expression + properties: + left: + $ref: '#/components/schemas/Expression' + operator: + type: string + right: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Block: + description: A set of statements + properties: + body: + description: Block body + items: + $ref: '#/components/schemas/Statement' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + BooleanLiteral: + description: Represents boolean values + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: boolean + type: object Bucket: properties: - links: - type: object + createdAt: + format: date-time readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: example: labels: /api/v2/buckets/1/labels members: /api/v2/buckets/1/members @@ -7010,5162 +7423,5970 @@ components: write: /api/v2/write?org=2&bucket=1 properties: labels: + $ref: '#/components/schemas/Link' description: URL to retrieve labels for this bucket - $ref: '#/components/schemas/Link' members: + $ref: '#/components/schemas/Link' description: URL to retrieve members that can read this bucket - $ref: '#/components/schemas/Link' org: + $ref: '#/components/schemas/Link' description: URL to retrieve parent organization for this bucket - $ref: '#/components/schemas/Link' owners: - description: URL to retrieve owners that can read and write to this bucket. $ref: '#/components/schemas/Link' + description: URL to retrieve owners that can read and write to this + bucket. self: + $ref: '#/components/schemas/Link' description: URL for this bucket - $ref: '#/components/schemas/Link' write: - description: URL to write line protocol for this bucket $ref: '#/components/schemas/Link' - id: + description: URL to write line protocol for this bucket readOnly: true - type: string - type: - readOnly: true - type: string - default: user - enum: - - user - - system + type: object name: type: string - description: - type: string orgID: type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' rp: type: string schemaType: $ref: '#/components/schemas/SchemaType' default: implicit - createdAt: - type: string - format: date-time + type: + default: user + enum: + - user + - system readOnly: true + type: string updatedAt: - type: string format: date-time readOnly: true - retentionRules: - $ref: '#/components/schemas/RetentionRules' - labels: - $ref: '#/components/schemas/Labels' + type: string required: - - name - - retentionRules + - name + - retentionRules Buckets: - type: object properties: - links: - readOnly: true - $ref: '#/components/schemas/Links' buckets: - type: array items: $ref: '#/components/schemas/Bucket' - RetentionRules: - type: array - description: Rules to expire or retain data. No rules means data never expires. - items: - $ref: '#/components/schemas/RetentionRule' - PatchBucketRequest: + type: array + links: + $ref: '#/components/schemas/Links' + readOnly: true type: object - description: Updates to an existing bucket resource. + BuilderAggregateFunctionType: + enum: + - filter + - group + type: string + BuilderConfig: + properties: + aggregateWindow: + properties: + fillValues: + type: boolean + period: + type: string + type: object + buckets: + items: + type: string + type: array + functions: + items: + $ref: '#/components/schemas/BuilderFunctionsType' + type: array + tags: + items: + $ref: '#/components/schemas/BuilderTagsType' + type: array + type: object + BuilderFunctionsType: properties: name: type: string - description: + type: object + BuilderTagsType: + properties: + aggregateFunctionType: + $ref: '#/components/schemas/BuilderAggregateFunctionType' + key: type: string - retentionRules: - $ref: '#/components/schemas/PatchRetentionRules' - PatchRetentionRules: - type: array - description: Updates to rules to expire or retain data. No rules means no updates. - items: - $ref: '#/components/schemas/PatchRetentionRule' - PatchRetentionRule: - type: object - description: Updates to a rule to expire or retain data. - properties: - type: - type: string - default: expire - enum: - - expire - everySeconds: - type: integer - format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. - example: 86400 - minimum: 0 - shardGroupDurationSeconds: - type: integer - format: int64 - description: Shard duration measured in seconds. - required: - - type - RetentionRule: - type: object - properties: - type: - type: string - default: expire - enum: - - expire - everySeconds: - type: integer - format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. - example: 86400 - minimum: 0 - shardGroupDurationSeconds: - type: integer - format: int64 - description: Shard duration measured in seconds. - required: - - type - - everySeconds - Link: - type: string - format: uri - readOnly: true - description: URI of resource. - Links: - type: object - properties: - next: - $ref: '#/components/schemas/Link' - self: - $ref: '#/components/schemas/Link' - prev: - $ref: '#/components/schemas/Link' - required: - - self - Logs: - type: object - properties: - events: - readOnly: true - type: array + values: items: - $ref: '#/components/schemas/LogEvent' - LogEvent: + type: string + type: array type: object + BuiltinStatement: + description: Declares a builtin identifier and its type properties: - time: - readOnly: true - description: 'Time event occurred, RFC3339Nano.' - type: string - format: date-time - message: - readOnly: true - description: A description of the event that occurred. - type: string - example: Halt and catch fire - runID: - readOnly: true - description: the ID of the task that logged - type: string - Organization: + id: + $ref: '#/components/schemas/Identifier' + type: + $ref: '#/components/schemas/NodeType' + type: object + CallExpression: + description: Represents a function call properties: + arguments: + description: Function arguments + items: + $ref: '#/components/schemas/Expression' + type: array + callee: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Cell: + properties: + h: + format: int32 + type: integer + id: + type: string links: - type: object - readOnly: true - example: - self: /api/v2/orgs/1 - members: /api/v2/orgs/1/members - owners: /api/v2/orgs/1/owners - labels: /api/v2/orgs/1/labels - secrets: /api/v2/orgs/1/secrets - buckets: /api/v2/buckets?org=myorg - tasks: /api/v2/tasks?org=myorg - dashboards: /api/v2/dashboards?org=myorg properties: self: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' + type: string + view: + type: string + type: object + viewID: + description: The reference to a view from the views API. + type: string + w: + format: int32 + type: integer + x: + format: int32 + type: integer + "y": + format: int32 + type: integer + type: object + CellUpdate: + properties: + h: + format: int32 + type: integer + w: + format: int32 + type: integer + x: + format: int32 + type: integer + "y": + format: int32 + type: integer + type: object + CellWithViewProperties: + allOf: + - $ref: '#/components/schemas/Cell' + - properties: + name: + type: string + properties: + $ref: '#/components/schemas/ViewProperties' + type: object + type: object + Cells: + items: + $ref: '#/components/schemas/Cell' + type: array + CellsWithViewProperties: + items: + $ref: '#/components/schemas/CellWithViewProperties' + type: array + Check: + allOf: + - $ref: '#/components/schemas/CheckDiscriminator' + CheckBase: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + description: An optional description of the check. + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + lastRunError: + readOnly: true + type: string + lastRunStatus: + enum: + - failed + - success + - canceled + readOnly: true + type: string + latestCompleted: + description: Timestamp of latest scheduled, completed run, RFC3339. + format: date-time + readOnly: true + type: string + links: + example: + labels: /api/v2/checks/1/labels + members: /api/v2/checks/1/members + owners: /api/v2/checks/1/owners + query: /api/v2/checks/1/query + self: /api/v2/checks/1 + properties: labels: $ref: '#/components/schemas/Link' - secrets: + description: URL to retrieve labels for this check + members: $ref: '#/components/schemas/Link' - buckets: + description: URL to retrieve members for this check + owners: $ref: '#/components/schemas/Link' - tasks: + description: URL to retrieve owners for this check + query: $ref: '#/components/schemas/Link' - dashboards: + description: URL to retrieve flux script for this check + self: $ref: '#/components/schemas/Link' + description: URL for this check + readOnly: true + type: object + name: + type: string + orgID: + description: The ID of the organization that owns this check. + type: string + ownerID: + description: The ID of creator used to create this check. + readOnly: true + type: string + query: + $ref: '#/components/schemas/DashboardQuery' + status: + $ref: '#/components/schemas/TaskStatusType' + taskID: + description: The ID of the task associated with this check. + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - name + - orgID + - query + CheckDiscriminator: + discriminator: + mapping: + custom: '#/components/schemas/CustomCheck' + deadman: '#/components/schemas/DeadmanCheck' + threshold: '#/components/schemas/ThresholdCheck' + propertyName: type + oneOf: + - $ref: '#/components/schemas/DeadmanCheck' + - $ref: '#/components/schemas/ThresholdCheck' + - $ref: '#/components/schemas/CustomCheck' + CheckPatch: + properties: + description: + type: string + name: + type: string + status: + enum: + - active + - inactive + type: string + type: object + CheckStatusLevel: + description: The state to record if check matches a criteria. + enum: + - UNKNOWN + - OK + - INFO + - CRIT + - WARN + type: string + CheckViewProperties: + properties: + check: + $ref: '#/components/schemas/Check' + checkID: + type: string + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + type: + enum: + - check + type: string + required: + - type + - shape + - checkID + - queries + - colors + type: object + Checks: + properties: + checks: + items: + $ref: '#/components/schemas/Check' + type: array + links: + $ref: '#/components/schemas/Links' + ColumnDataType: + enum: + - integer + - float + - boolean + - string + - unsigned + type: string + ColumnSemanticType: + enum: + - timestamp + - tag + - field + nullable: false + type: string + ConditionalExpression: + description: Selects one of two expressions, `Alternate` or `Consequent`, depending + on a third boolean expression, `Test` + properties: + alternate: + $ref: '#/components/schemas/Expression' + consequent: + $ref: '#/components/schemas/Expression' + test: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + ConstantVariableProperties: + properties: + type: + enum: + - constant + type: string + values: + items: + type: string + type: array + CreateCell: + properties: + h: + format: int32 + type: integer + name: + type: string + usingView: + description: Makes a copy of the provided view. + type: string + w: + format: int32 + type: integer + x: + format: int32 + type: integer + "y": + format: int32 + type: integer + type: object + CreateDashboardRequest: + properties: + description: + description: The user-facing description of the dashboard. + type: string + name: + description: The user-facing name of the dashboard. + type: string + orgID: + description: The ID of the organization that owns the dashboard. + type: string + required: + - orgID + - name + CustomCheck: + allOf: + - $ref: '#/components/schemas/CheckBase' + - properties: + type: + enum: + - custom + type: string + required: + - type + type: object + DBRP: + properties: + bucketID: + description: the bucket ID used as target for the translation. + type: string + database: + description: InfluxDB v1 database + type: string + default: + description: Specify if this mapping represents the default retention policy + for the database specificed. + type: boolean + id: + description: the mapping identifier + readOnly: true + type: string + links: + $ref: '#/components/schemas/Links' + orgID: + description: the organization ID that owns this mapping. + type: string + retention_policy: + description: InfluxDB v1 retention policy + type: string + required: + - id + - orgID + - bucketID + - database + - retention_policy + - default + type: object + DBRPCreate: + properties: + bucketID: + description: the bucket ID used as target for the translation. + type: string + database: + description: InfluxDB v1 database + type: string + default: + description: Specify if this mapping represents the default retention policy + for the database specificed. + type: boolean + org: + description: the organization that owns this mapping. + type: string + orgID: + description: the organization ID that owns this mapping. + type: string + retention_policy: + description: InfluxDB v1 retention policy + type: string + required: + - bucketID + - database + - retention_policy + type: object + DBRPGet: + properties: + content: + $ref: '#/components/schemas/DBRP' + required: true + type: object + DBRPUpdate: + properties: + default: + type: boolean + retention_policy: + description: InfluxDB v1 retention policy + type: string + DBRPs: + properties: + content: + items: + $ref: '#/components/schemas/DBRP' + type: array + Dashboard: + allOf: + - $ref: '#/components/schemas/CreateDashboardRequest' + - properties: + cells: + $ref: '#/components/schemas/Cells' + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + example: + cells: /api/v2/dashboards/1/cells + labels: /api/v2/dashboards/1/labels + members: /api/v2/dashboards/1/members + org: /api/v2/labels/1 + owners: /api/v2/dashboards/1/owners + self: /api/v2/dashboards/1 + properties: + cells: + $ref: '#/components/schemas/Link' + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + org: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + type: object + meta: + properties: + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + type: object + type: object + type: object + DashboardColor: + description: Defines an encoding of data value into color space. + properties: + hex: + description: The hex number of the color + maxLength: 7 + minLength: 7 + type: string + id: + description: The unique ID of the view color. + type: string + name: + description: The user-facing name of the hex color. + type: string + type: + description: Type is how the color is used. + enum: + - min + - max + - threshold + - scale + - text + - background + type: string + value: + description: The data value mapped to this color. + format: float + type: number + required: + - id + - type + - hex + - name + - value + type: object + DashboardQuery: + properties: + builderConfig: + $ref: '#/components/schemas/BuilderConfig' + editMode: + $ref: '#/components/schemas/QueryEditMode' + name: + type: string + text: + description: The text of the Flux query. + type: string + type: object + DashboardWithViewProperties: + allOf: + - $ref: '#/components/schemas/CreateDashboardRequest' + - properties: + cells: + $ref: '#/components/schemas/CellsWithViewProperties' + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + example: + cells: /api/v2/dashboards/1/cells + labels: /api/v2/dashboards/1/labels + members: /api/v2/dashboards/1/members + org: /api/v2/labels/1 + owners: /api/v2/dashboards/1/owners + self: /api/v2/dashboards/1 + properties: + cells: + $ref: '#/components/schemas/Link' + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + org: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + type: object + meta: + properties: + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + type: object + type: object + type: object + Dashboards: + properties: + dashboards: + items: + $ref: '#/components/schemas/Dashboard' + type: array + links: + $ref: '#/components/schemas/Links' + type: object + DateTimeLiteral: + description: Represents an instant in time with nanosecond precision using the + syntax of golang's RFC3339 Nanosecond variant + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + format: date-time + type: string + type: object + DeadmanCheck: + allOf: + - $ref: '#/components/schemas/CheckBase' + - properties: + every: + description: Check repetition interval. + type: string + level: + $ref: '#/components/schemas/CheckStatusLevel' + offset: + description: Duration to delay after the schedule, before executing check. + type: string + reportZero: + description: If only zero values reported since time, trigger an alert + type: boolean + staleTime: + description: String duration for time that a series is considered stale + and should not trigger deadman. + type: string + statusMessageTemplate: + description: The template used to generate and write a status message. + type: string + tags: + description: List of tags to write to each status. + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + timeSince: + description: String duration before deadman triggers. + type: string + type: + enum: + - deadman + type: string + required: + - type + type: object + DecimalPlaces: + description: Indicates whether decimal places should be enforced, and how many + digits it should show. + properties: + digits: + description: The number of digits after decimal to display + format: int32 + type: integer + isEnforced: + description: Indicates whether decimal point setting should be enforced + type: boolean + type: object + DeletePredicateRequest: + description: The delete predicate request. + properties: + predicate: + description: InfluxQL-like delete statement + example: tag1="value1" and (tag2="value2" and tag3!="value3") + type: string + start: + description: RFC3339Nano + format: date-time + type: string + stop: + description: RFC3339Nano + format: date-time + type: string + required: + - start + - stop + type: object + DemoDataBucket: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + example: + labels: /api/v2/buckets/1/labels + members: /api/v2/buckets/1/members + org: /api/v2/orgs/2 + owners: /api/v2/buckets/1/owners + self: /api/v2/buckets/1 + write: /api/v2/write?org=2&bucket=1 + properties: + labels: + $ref: '#/components/schemas/Link' + description: URL to retrieve labels for this bucket + members: + $ref: '#/components/schemas/Link' + description: URL to retrieve members that can read this bucket + org: + $ref: '#/components/schemas/Link' + description: URL to retrieve parent organization for this bucket + owners: + $ref: '#/components/schemas/Link' + description: URL to retrieve owners that can read and write to this + bucket. + self: + $ref: '#/components/schemas/Link' + description: URL for this bucket + write: + $ref: '#/components/schemas/Link' + description: URL to write line protocol for this bucket + readOnly: true + type: object + name: + type: string + orgID: + type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' + rp: + type: string + schemaType: + $ref: '#/components/schemas/SchemaType' + default: implicit + type: + default: demodata + readOnly: true + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - name + - retentionRules + DemoDataBuckets: + properties: + buckets: + items: + $ref: '#/components/schemas/DemoDataBucket' + type: array + links: + $ref: '#/components/schemas/Links' + readOnly: true + type: object + Dialect: + description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions + properties: + annotations: + description: https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + items: + enum: + - group + - datatype + - default + type: string + type: array + uniqueItems: true + commentPrefix: + default: '#' + description: Character prefixed to comment strings + maxLength: 1 + minLength: 0 + type: string + dateTimeFormat: + default: RFC3339 + description: Format of timestamps + enum: + - RFC3339 + - RFC3339Nano + type: string + delimiter: + default: ',' + description: Separator between cells; the default is , + maxLength: 1 + minLength: 1 + type: string + header: + default: true + description: If true, the results will contain a header row + type: boolean + type: object + DictExpression: + description: Used to create and directly specify the elements of a dictionary + properties: + elements: + description: Elements of the dictionary + items: + $ref: '#/components/schemas/DictItem' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + DictItem: + description: A key/value pair in a dictionary + properties: + key: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + val: + $ref: '#/components/schemas/Expression' + type: object + 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. + properties: + magnitude: + type: integer + type: + $ref: '#/components/schemas/NodeType' + unit: + type: string + type: object + DurationLiteral: + description: Represents the elapsed time between two instants as an int64 nanosecond + count with syntax of golang's time.Duration + properties: + type: + $ref: '#/components/schemas/NodeType' + values: + description: Duration values + items: + $ref: '#/components/schemas/Duration' + type: array + type: object + Error: + properties: + code: + description: code is the machine-readable error code. + enum: + - internal error + - not found + - conflict + - invalid + - unprocessable entity + - empty value + - unavailable + - forbidden + - too many requests + - unauthorized + - method not allowed + - request too large + - unsupported media type + readOnly: true + type: string + err: + description: err is a stack of errors that occurred during processing of + the request. Useful for debugging. + readOnly: true + type: string + message: + description: message is a human-readable message. + readOnly: true + type: string + op: + description: op describes the logical code operation during error. Useful + for debugging. + readOnly: true + type: string + required: + - code + - message + Expression: + oneOf: + - $ref: '#/components/schemas/ArrayExpression' + - $ref: '#/components/schemas/DictExpression' + - $ref: '#/components/schemas/FunctionExpression' + - $ref: '#/components/schemas/BinaryExpression' + - $ref: '#/components/schemas/CallExpression' + - $ref: '#/components/schemas/ConditionalExpression' + - $ref: '#/components/schemas/LogicalExpression' + - $ref: '#/components/schemas/MemberExpression' + - $ref: '#/components/schemas/IndexExpression' + - $ref: '#/components/schemas/ObjectExpression' + - $ref: '#/components/schemas/ParenExpression' + - $ref: '#/components/schemas/PipeExpression' + - $ref: '#/components/schemas/UnaryExpression' + - $ref: '#/components/schemas/BooleanLiteral' + - $ref: '#/components/schemas/DateTimeLiteral' + - $ref: '#/components/schemas/DurationLiteral' + - $ref: '#/components/schemas/FloatLiteral' + - $ref: '#/components/schemas/IntegerLiteral' + - $ref: '#/components/schemas/PipeLiteral' + - $ref: '#/components/schemas/RegexpLiteral' + - $ref: '#/components/schemas/StringLiteral' + - $ref: '#/components/schemas/UnsignedIntegerLiteral' + - $ref: '#/components/schemas/Identifier' + ExpressionStatement: + description: May consist of an expression that does not return a value and is + executed solely for its side-effects + properties: + expression: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Field: + properties: + alias: + 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 + items: + $ref: '#/components/schemas/Field' + type: array + type: + description: '`type` describes the field type. `func` is a function. `field` + is a field reference.' + enum: + - func + - field + - integer + - number + - regex + - wildcard + type: string + value: + description: value is the value of the field. Meaning of the value is implied + by the `type` key + type: string + type: object + File: + description: Represents a source from a single file + properties: + body: + description: List of Flux statements + items: + $ref: '#/components/schemas/Statement' + type: array + imports: + description: A list of package imports + items: + $ref: '#/components/schemas/ImportDeclaration' + type: array + name: + description: The name of the file. + type: string + package: + $ref: '#/components/schemas/PackageClause' + type: + $ref: '#/components/schemas/NodeType' + type: object + Flags: + additionalProperties: true + type: object + FloatLiteral: + description: Represents floating point numbers according to the double representations + defined by the IEEE-754-1985 + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: number + type: object + FluxResponse: + description: Rendered flux that backs the check or notification. + properties: + flux: + type: string + FluxSuggestion: + properties: + name: + type: string + params: + additionalProperties: + type: string + type: object + type: object + FluxSuggestions: + properties: + funcs: + items: + $ref: '#/components/schemas/FluxSuggestion' + type: array + type: object + ForbiddenRequestError: + properties: + code: + description: returns error code 403 + enum: + - forbidden + readOnly: true + type: string + message: + description: message is a human-readable message. + readOnly: true + type: string + FunctionExpression: + description: Function expression + properties: + body: + $ref: '#/components/schemas/Node' + params: + description: Function parameters + items: + $ref: '#/components/schemas/Property' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + GaugeViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + note: + type: string + prefix: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + suffix: + type: string + tickPrefix: + type: string + tickSuffix: + type: string + type: + enum: + - gauge + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - prefix + - tickPrefix + - suffix + - tickSuffix + - decimalPlaces + type: object + GeoCircleViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - properties: + colorDimension: + $ref: '#/components/schemas/Axis' + colorField: + description: Circle color field + type: string + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + interpolateColors: + description: Interpolate circle color based on displayed value + type: boolean + radius: + description: Maximum radius size in pixels + type: integer + radiusDimension: + $ref: '#/components/schemas/Axis' + radiusField: + description: Radius field + type: string + required: + - radiusField + - radiusDimension + - colorField + - colorDimension + - colors + type: object + GeoHeatMapViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - properties: + blur: + description: Blur for heatmap points + type: integer + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + intensityDimension: + $ref: '#/components/schemas/Axis' + intensityField: + description: Intensity field + type: string + radius: + description: Radius size in pixels + type: integer + required: + - intensityField + - intensityDimension + - radius + - blur + - colors + type: object + GeoPointMapViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - properties: + colorDimension: + $ref: '#/components/schemas/Axis' + colorField: + description: Marker color field + type: string + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + isClustered: + description: Cluster close markers together + type: boolean + tooltipColumns: + description: An array for which columns to display in tooltip + items: + type: string + type: array + required: + - colorField + - colorDimension + - colors + type: object + GeoTrackMapViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - required: + - trackWidth + - speed + - randomColors + - trackPointVisualization + type: object + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + randomColors: + description: Assign different colors to different tracks + type: boolean + speed: + description: Speed of the track animation + type: integer + trackWidth: + description: Width of the track + type: integer + GeoViewLayer: + oneOf: + - $ref: '#/components/schemas/GeoCircleViewLayer' + - $ref: '#/components/schemas/GeoHeatMapViewLayer' + - $ref: '#/components/schemas/GeoPointMapViewLayer' + - $ref: '#/components/schemas/GeoTrackMapViewLayer' + type: object + GeoViewLayerProperties: + properties: + type: + enum: + - heatmap + - circleMap + - pointMap + - trackMap + type: string + required: + - type + type: object + GeoViewProperties: + properties: + allowPanAndZoom: + default: true + description: If true, map zoom and pan controls are enabled on the dashboard + view + type: boolean + center: + description: Coordinates of the center of the map + properties: + lat: + description: Latitude of the center of the map + format: double + type: number + lon: + description: Longitude of the center of the map + format: double + type: number + required: + - lat + - lon + type: object + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + detectCoordinateFields: + default: true + description: If true, search results get automatically regroupped so that + lon,lat and value are treated as columns + type: boolean + latLonColumns: + $ref: '#/components/schemas/LatLonColumns' + layers: + description: List of individual layers shown in the map + items: + $ref: '#/components/schemas/GeoViewLayer' + type: array + mapStyle: + description: Define map type - regular, satellite etc. + type: string + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + s2Column: + description: String to define the column + type: string + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + type: + enum: + - geo + type: string + useS2CellID: + description: If true, S2 column is used to calculate lat/lon + type: boolean + zoom: + description: Zoom level used for initial display of the map + format: double + maximum: 28 + minimum: 1 + type: number + required: + - type + - shape + - queries + - note + - showNoteWhenEmpty + - center + - zoom + - allowPanAndZoom + - detectCoordinateFields + - layers + type: object + GreaterThreshold: + allOf: + - $ref: '#/components/schemas/ThresholdBase' + - properties: + type: + enum: + - greater + type: string + value: + format: float + type: number + required: + - type + - value + type: object + HTTPNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + authMethod: + enum: + - none + - basic + - bearer + type: string + contentTemplate: + type: string + headers: + additionalProperties: + type: string + description: Customized headers. + type: object + method: + enum: + - POST + - GET + - PUT + type: string + password: + type: string + token: + type: string + url: + type: string + username: + type: string + required: + - url + - authMethod + - method + type: object + type: object + HTTPNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/HTTPNotificationRuleBase' + HTTPNotificationRuleBase: + properties: + type: + enum: + - http + type: string + url: + type: string + required: + - type + type: object + HealthCheck: + properties: + checks: + items: + $ref: '#/components/schemas/HealthCheck' + type: array + commit: + type: string + message: + type: string + name: + type: string + status: + enum: + - pass + - fail + type: string + version: + type: string + required: + - name + - status + type: object + HeatmapViewProperties: + properties: + binSize: + type: number + colors: + description: Colors define color encoding of data into a visualization + items: + type: string + type: array + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + timeFormat: + type: string + type: + enum: + - heatmap + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + type: number + maxItems: 2 + type: array + xPrefix: + type: string + xSuffix: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yAxisLabel: + type: string + yColumn: + type: string + yDomain: + items: + type: number + maxItems: 2 + type: array + yPrefix: + type: string + ySuffix: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - yColumn + - xDomain + - yDomain + - xAxisLabel + - yAxisLabel + - xPrefix + - yPrefix + - xSuffix + - ySuffix + - binSize + type: object + HistogramViewProperties: + properties: + binCount: + type: integer + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + fillColumns: + items: + type: string + type: array + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + position: + enum: + - overlaid + - stacked + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + type: + enum: + - histogram + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + format: float + type: number + type: array + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - fillColumns + - xDomain + - xAxisLabel + - position + - binCount + type: object + Identifier: + description: A valid Flux identifier + properties: + name: + type: string + type: + $ref: '#/components/schemas/NodeType' + type: object + ImportDeclaration: + description: Declares a package import + properties: + as: + $ref: '#/components/schemas/Identifier' + path: + $ref: '#/components/schemas/StringLiteral' + type: + $ref: '#/components/schemas/NodeType' + type: object + IndexExpression: + description: Represents indexing into an array + properties: + array: + $ref: '#/components/schemas/Expression' + index: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + InfluxQLQuery: + description: Query influx using the InfluxQL language + properties: + bucket: + description: Bucket is to be used instead of the database and retention + policy specified in the InfluxQL query. + type: string + query: + description: InfluxQL query execute. + type: string + type: + description: The type of query. Must be "influxql". + enum: + - influxql + type: string + required: + - query + type: object + IntegerLiteral: + description: Represents integer numbers + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: string + type: object + InvalidRequestError: + properties: + code: + description: returns error code 400 + enum: + - invalid + readOnly: true + type: string + message: + description: message is a human-readable message. + readOnly: true + type: string + IsOnboarding: + properties: + allowed: + description: True means that the influxdb instance has NOT had initial setup; + false means that the database has been setup. + type: boolean + type: object + Label: + properties: id: readOnly: true type: string name: type: string + orgID: + readOnly: true + type: string + properties: + additionalProperties: + type: string + 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 + type: object + type: object + LabelCreateRequest: + properties: + name: + type: string + orgID: + type: string + properties: + additionalProperties: + type: string + 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 + type: object + required: + - orgID + - name + type: object + LabelMapping: + properties: + labelID: + type: string + type: object + LabelResponse: + properties: + label: + $ref: '#/components/schemas/Label' + links: + $ref: '#/components/schemas/Links' + type: object + LabelUpdate: + properties: + name: + type: string + properties: + additionalProperties: + type: string + 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 + type: object + type: object + Labels: + items: + $ref: '#/components/schemas/Label' + type: array + LabelsResponse: + properties: + labels: + $ref: '#/components/schemas/Labels' + links: + $ref: '#/components/schemas/Links' + type: object + LanguageRequest: + description: Flux query to be analyzed. + properties: + query: + description: Flux query script to be analyzed + type: string + required: + - query + type: object + LatLonColumn: + description: Object type for key and column definitions + properties: + column: + description: Column to look up Lat/Lon + type: string + key: + description: Key to determine whether the column is tag/field + type: string + required: + - key + - column + type: object + LatLonColumns: + description: Object type to define lat/lon columns + properties: + lat: + $ref: '#/components/schemas/LatLonColumn' + lon: + $ref: '#/components/schemas/LatLonColumn' + required: + - lat + - lon + type: object + LesserThreshold: + allOf: + - $ref: '#/components/schemas/ThresholdBase' + - properties: + type: + enum: + - lesser + type: string + value: + format: float + type: number + required: + - type + - value + type: object + Limit: + description: These are org limits similar to those configured in/by quartz. + properties: + bucket: + properties: + maxBuckets: + type: integer + maxRetentionDuration: + description: Max bucket retention duration in nanoseconds. 0 is unlimited. + type: integer + required: + - maxBuckets + - maxRetentionDuration + type: object + check: + properties: + maxChecks: + type: integer + required: + - maxChecks + type: object + dashboard: + properties: + maxDashboards: + type: integer + required: + - maxDashboards + type: object + features: + properties: + allowDelete: + description: allow delete predicate endpoint + type: boolean + type: object + notificationEndpoint: + properties: + blockedNotificationEndpoints: + description: comma separated list of notification endpoints + example: http,pagerduty + type: string + required: + - blockNotificationEndpoints + type: object + notificationRule: + properties: + blockedNotificationRules: + description: comma separated list of notification rules + example: http,pagerduty + type: string + maxNotifications: + type: integer + required: + - maxNotifications + - blockNotificationRules + type: object + orgID: + type: string + rate: + properties: + cardinality: + description: Allowed organization total cardinality. 0 is unlimited. + type: integer + concurrentDeleteRequests: + description: Allowed organization concurrent outstanding delete requests. + type: integer + concurrentReadRequests: + description: Allowed concurrent queries. 0 is unlimited. + type: integer + concurrentWriteRequests: + description: Allowed concurrent writes. 0 is unlimited. + type: integer + deleteRequestsPerSecond: + description: Allowed organization delete request rate. + type: integer + readKBs: + description: Query limit in kb/sec. 0 is unlimited. + type: integer + writeKBs: + description: Write limit in kb/sec. 0 is unlimited. + type: integer + required: + - readKBs + - concurrentReadRequests + - writeKBs + - concurrentWriteRequests + - cardinality + type: object + task: + properties: + maxTasks: + type: integer + required: + - maxTasks + type: object + required: + - rate + - bucket + - task + - dashboard + - check + - notificationRule + - notificationEndpoint + type: object + LimitEvent: + properties: + orgID: + type: string + timestamp: + format: date-time + readOnly: true + type: string + type: + enum: + - limited_quota + - limited_write + - limited_query + - limited_cardinality + type: string + type: object + LimitEvents: + properties: + events: + items: + $ref: '#/components/schemas/LimitEvent' + type: array + links: + $ref: '#/components/schemas/Links' + type: object + LimitStatus: + properties: + status: + enum: + - ok + - exceeded + type: string + required: + - status + type: object + LimitStatuses: + properties: + cardinality: + $ref: '#/components/schemas/LimitStatus' + read: + $ref: '#/components/schemas/LimitStatus' + write: + $ref: '#/components/schemas/LimitStatus' + required: + - read + - write + - cardinality + type: object + LinePlusSingleStatProperties: + properties: + axes: + $ref: '#/components/schemas/Axes' + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + hoverDimension: + enum: + - auto + - x + - "y" + - xy + type: string + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + position: + enum: + - overlaid + - stacked + type: string + prefix: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shadeBelow: + type: boolean + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + suffix: + type: string + timeFormat: + type: string + type: + enum: + - line-plus-single-stat + type: string + xColumn: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yColumn: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer + required: + - type + - queries + - shape + - axes + - colors + - note + - showNoteWhenEmpty + - prefix + - suffix + - decimalPlaces + - position + type: object + LineProtocolError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - internal error + - not found + - conflict + - invalid + - empty value + - unavailable + readOnly: true + type: string + err: + description: Err is a stack of errors that occurred during processing of + the request. Useful for debugging. + readOnly: true + type: string + line: + description: First line within sent body containing malformed data + format: int32 + readOnly: true + type: integer + message: + description: Message is a human-readable message. + readOnly: true + type: string + op: + description: Op describes the logical code operation during error. Useful + for debugging. + readOnly: true + type: string + required: + - code + - message + - op + - err + LineProtocolLengthError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - invalid + readOnly: true + type: string + maxLength: + description: Max length in bytes for a body of line-protocol. + format: int32 + readOnly: true + type: integer + message: + description: Message is a human-readable message. + readOnly: true + type: string + required: + - code + - message + - maxLength + Link: + description: URI of resource. + format: uri + readOnly: true + type: string + Links: + properties: + next: + $ref: '#/components/schemas/Link' + prev: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + required: + - self + type: object + LogEvent: + properties: + message: + description: A description of the event that occurred. + example: Halt and catch fire + readOnly: true + type: string + runID: + description: the ID of the task that logged + readOnly: true + type: string + time: + description: Time event occurred, RFC3339Nano. + format: date-time + readOnly: true + type: string + type: object + LogicalExpression: + description: Represents the rule conditions that collectively evaluate to either + true or false + properties: + left: + $ref: '#/components/schemas/Expression' + operator: + type: string + right: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Logs: + properties: + events: + items: + $ref: '#/components/schemas/LogEvent' + readOnly: true + type: array + type: object + MapVariableProperties: + properties: + type: + enum: + - map + type: string + values: + additionalProperties: + type: string + type: object + MarkdownViewProperties: + properties: + note: + type: string + shape: + enum: + - chronograf-v2 + type: string + type: + enum: + - markdown + type: string + required: + - type + - shape + - note + type: object + MeasurementSchema: + description: The schema definition for a single measurement + example: + bucketID: ba3c5e7f9b0a0010 + columns: + - name: time + type: timestamp + - name: host + type: tag + - name: region + type: tag + - dataType: float + name: usage_user + type: field + - dataType: float + name: usage_user + type: field + createdAt: "2021-01-21T00:48:40.993Z" + id: 1a3c5e7f9b0a8642 + name: cpu + orgID: 0a3c5e7f9b0a0001 + updatedAt: "2021-01-21T00:48:40.993Z" + properties: + bucketID: + description: ID of the bucket that the measurement schema is associated + with. + type: string + columns: + description: An ordered collection of column definitions + items: + $ref: '#/components/schemas/MeasurementSchemaColumn' + type: array + createdAt: + format: date-time + readOnly: true + type: string + id: + readOnly: true + type: string + name: + nullable: false + type: string + orgID: + description: ID of organization that the measurement schema is associated + with. + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - id + - name + - columns + - createdAt + - updatedAt + type: object + MeasurementSchemaColumn: + description: Definition of a measurement column + example: + name: time + type: timestamp + properties: + dataType: + $ref: '#/components/schemas/ColumnDataType' + name: + type: string + type: + $ref: '#/components/schemas/ColumnSemanticType' + required: + - name + - type + type: object + MeasurementSchemaCreateRequest: + description: Create a new measurement schema + example: + columns: + - name: time + type: timestamp + - name: host + type: tag + - name: region + type: tag + - dataType: float + name: usage_user + type: field + - dataType: float + name: usage_user + type: field + name: cpu + properties: + columns: + description: An ordered collection of column definitions + items: + $ref: '#/components/schemas/MeasurementSchemaColumn' + type: array + name: + type: string + required: + - name + - columns + type: object + MeasurementSchemaList: + description: A list of measurement schemas returning summary information + example: + measurementSchemas: + - bucketID: ba3c5e7f9b0a0010 + createdAt: "2021-01-21T00:48:40.993Z" + id: 1a3c5e7f9b0a8642 + name: cpu + orgID: 0a3c5e7f9b0a0001 + updatedAt: "2021-01-21T00:48:40.993Z" + - bucketID: ba3c5e7f9b0a0010 + createdAt: "2021-01-21T00:48:40.993Z" + id: 1a3c5e7f9b0a8643 + name: memory + orgID: 0a3c5e7f9b0a0001 + updatedAt: "2021-01-21T00:48:40.993Z" + - bucketID: ba3c5e7f9b0a0010 + createdAt: "2021-01-21T00:48:40.993Z" + id: 1a3c5e7f9b0a8644 + name: disk + orgID: 0a3c5e7f9b0a0001 + updatedAt: "2021-01-21T00:48:40.993Z" + properties: + measurementSchemas: + items: + $ref: '#/components/schemas/MeasurementSchema' + type: array + required: + - measurementSchemas + type: object + MeasurementSchemaUpdateRequest: + description: Update an existing measurement schema + example: + columns: + - name: time + type: timestamp + - name: host + type: tag + - name: region + type: tag + - dataType: float + name: usage_user + type: field + - dataType: float + name: usage_user + type: field + properties: + columns: + description: An ordered collection of column definitions + items: + $ref: '#/components/schemas/MeasurementSchemaColumn' + type: array + required: + - columns + type: object + MemberAssignment: + description: Object property assignment + properties: + init: + $ref: '#/components/schemas/Expression' + member: + $ref: '#/components/schemas/MemberExpression' + type: + $ref: '#/components/schemas/NodeType' + type: object + MemberExpression: + description: Represents accessing a property of an object + properties: + object: + $ref: '#/components/schemas/Expression' + property: + $ref: '#/components/schemas/PropertyKey' + type: + $ref: '#/components/schemas/NodeType' + type: object + MosaicViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + type: string + type: array + fillColumns: + items: + type: string + type: array + generateXAxisTicks: + items: + type: string + type: array + hoverDimension: + enum: + - auto + - x + - "y" + - xy + type: string + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + timeFormat: + type: string + type: + enum: + - mosaic + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + type: number + maxItems: 2 + type: array + xPrefix: + type: string + xSuffix: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yAxisLabel: + type: string + yDomain: + items: + type: number + maxItems: 2 + type: array + yLabelColumnSeparator: + type: string + yLabelColumns: + items: + type: string + type: array + yPrefix: + type: string + ySeriesColumns: + items: + type: string + type: array + ySuffix: + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - ySeriesColumns + - fillColumns + - xDomain + - yDomain + - xAxisLabel + - yAxisLabel + - xPrefix + - yPrefix + - xSuffix + - ySuffix + type: object + Node: + oneOf: + - $ref: '#/components/schemas/Expression' + - $ref: '#/components/schemas/Block' + NodeType: + description: Type of AST node + type: string + NotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointDiscriminator' + NotificationEndpointBase: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + description: An optional description of the notification endpoint. + type: string + id: + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + example: + labels: /api/v2/notificationEndpoints/1/labels + members: /api/v2/notificationEndpoints/1/members + owners: /api/v2/notificationEndpoints/1/owners + self: /api/v2/notificationEndpoints/1 + properties: + labels: + $ref: '#/components/schemas/Link' + description: URL to retrieve labels for this endpoint. + members: + $ref: '#/components/schemas/Link' + description: URL to retrieve members for this endpoint. + owners: + $ref: '#/components/schemas/Link' + description: URL to retrieve owners for this endpoint. + self: + $ref: '#/components/schemas/Link' + description: URL for this endpoint. + readOnly: true + type: object + name: + type: string + orgID: + type: string + status: + default: active + description: The status of the endpoint. + enum: + - active + - inactive + type: string + type: + $ref: '#/components/schemas/NotificationEndpointType' + updatedAt: + format: date-time + readOnly: true + type: string + userID: + type: string + required: + - type + - name + type: object + NotificationEndpointDiscriminator: + discriminator: + mapping: + http: '#/components/schemas/HTTPNotificationEndpoint' + pagerduty: '#/components/schemas/PagerDutyNotificationEndpoint' + slack: '#/components/schemas/SlackNotificationEndpoint' + telegram: '#/components/schemas/TelegramNotificationEndpoint' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SlackNotificationEndpoint' + - $ref: '#/components/schemas/PagerDutyNotificationEndpoint' + - $ref: '#/components/schemas/HTTPNotificationEndpoint' + - $ref: '#/components/schemas/TelegramNotificationEndpoint' + NotificationEndpointType: + enum: + - slack + - pagerduty + - http + - telegram + type: string + NotificationEndpointUpdate: + properties: description: type: string - createdAt: + name: type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true status: - description: If inactive the organization is inactive. - default: active - type: string enum: - - active - - inactive - required: - - name - Organizations: + - active + - inactive + type: string type: object + NotificationEndpoints: + properties: + links: + $ref: '#/components/schemas/Links' + notificationEndpoints: + items: + $ref: '#/components/schemas/NotificationEndpoint' + type: array + NotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleDiscriminator' + NotificationRuleBase: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + description: An optional description of the notification rule. + type: string + endpointID: + type: string + every: + description: The notification repetition interval. + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + lastRunError: + readOnly: true + type: string + lastRunStatus: + enum: + - failed + - success + - canceled + readOnly: true + type: string + latestCompleted: + description: Timestamp of latest scheduled, completed run, RFC3339. + format: date-time + readOnly: true + type: string + limit: + description: Don't notify me more than times every + seconds. If set, limitEvery cannot be empty. + type: integer + limitEvery: + description: Don't notify me more than times every + seconds. If set, limit cannot be empty. + type: integer + links: + example: + labels: /api/v2/notificationRules/1/labels + members: /api/v2/notificationRules/1/members + owners: /api/v2/notificationRules/1/owners + query: /api/v2/notificationRules/1/query + self: /api/v2/notificationRules/1 + properties: + labels: + $ref: '#/components/schemas/Link' + description: URL to retrieve labels for this notification rule. + members: + $ref: '#/components/schemas/Link' + description: URL to retrieve members for this notification rule. + owners: + $ref: '#/components/schemas/Link' + description: URL to retrieve owners for this notification rule. + query: + $ref: '#/components/schemas/Link' + description: URL to retrieve flux script for this notification rule. + self: + $ref: '#/components/schemas/Link' + description: URL for this endpoint. + readOnly: true + type: object + name: + description: Human-readable name describing the notification rule. + type: string + offset: + description: Duration to delay after the schedule, before executing check. + type: string + orgID: + description: The ID of the organization that owns this notification rule. + type: string + ownerID: + description: The ID of creator used to create this notification rule. + readOnly: true + type: string + runbookLink: + type: string + sleepUntil: + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + statusRules: + description: List of status rules the notification rule attempts to match. + items: + $ref: '#/components/schemas/StatusRule' + minItems: 1 + type: array + tagRules: + description: List of tag rules the notification rule attempts to match. + items: + $ref: '#/components/schemas/TagRule' + type: array + taskID: + description: The ID of the task associated with this notification rule. + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - orgID + - status + - name + - statusRules + - endpointID + type: object + NotificationRuleDiscriminator: + discriminator: + mapping: + http: '#/components/schemas/HTTPNotificationRule' + pagerduty: '#/components/schemas/PagerDutyNotificationRule' + slack: '#/components/schemas/SlackNotificationRule' + smtp: '#/components/schemas/SMTPNotificationRule' + telegram: '#/components/schemas/TelegramNotificationRule' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SlackNotificationRule' + - $ref: '#/components/schemas/SMTPNotificationRule' + - $ref: '#/components/schemas/PagerDutyNotificationRule' + - $ref: '#/components/schemas/HTTPNotificationRule' + - $ref: '#/components/schemas/TelegramNotificationRule' + NotificationRuleUpdate: + properties: + description: + type: string + name: + type: string + status: + enum: + - active + - inactive + type: string + type: object + NotificationRules: + properties: + links: + $ref: '#/components/schemas/Links' + notificationRules: + items: + $ref: '#/components/schemas/NotificationRule' + type: array + OAuthClientConfig: + properties: + clientID: + type: string + domain: + format: uri + type: string + redirectURL: + format: uri + type: string + state: + type: string + required: + - clientID + - domain + - redirectURL + - state + type: object + ObjectExpression: + description: Allows the declaration of an anonymous object within a declaration + properties: + properties: + description: Object properties + items: + $ref: '#/components/schemas/Property' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + OnboardingRequest: + properties: + bucket: + type: string + limit: + $ref: '#/components/schemas/Limit' + org: + type: string + password: + type: string + retentionPeriodHrs: + deprecated: true + type: integer + retentionPeriodSeconds: + type: integer + username: + type: string + required: + - username + - org + - bucket + type: object + OnboardingResponse: + properties: + auth: + allOf: + - properties: + description: + description: A description of the token. + type: string + status: + default: active + description: If inactive the token is inactive and requests using + the token will be rejected. + enum: + - active + - inactive + type: string + - properties: + createdAt: + format: date-time + readOnly: true + type: string + id: + readOnly: true + type: string + links: + example: + self: /api/v2/authorizations/1 + user: /api/v2/users/12 + properties: + self: + $ref: '#/components/schemas/Link' + readOnly: true + user: + $ref: '#/components/schemas/Link' + readOnly: true + readOnly: true + type: object + org: + description: Name of the org token is scoped to. + readOnly: true + type: string + orgID: + description: ID of org that authorization is scoped to. + type: string + permissions: + description: List of permissions for an auth. An auth must have at + least one Permission. + items: + properties: + action: + enum: + - read + - write + type: string + resource: + properties: + id: + 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. + nullable: true + type: string + name: + description: Optional name of the resource if the resource + has a name field. + nullable: true + type: string + org: + description: Optional name of the organization of the organization + with orgID. + nullable: true + type: string + orgID: + 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. + nullable: true + type: string + type: + enum: + - authorizations + - buckets + - dashboards + - orgs + - tasks + - telegrafs + - users + - variables + - secrets + - labels + - views + - documents + - notificationRules + - notificationEndpoints + - checks + - dbrp + - flows + - annotations + - functions + type: string + required: + - type + type: object + required: + - action + - resource + minItems: 1 + type: array + token: + description: Passed via the Authorization Header and Token Authentication + type. + readOnly: true + type: string + updatedAt: + format: date-time + readOnly: true + type: string + user: + description: Name of user that created and owns the token. + readOnly: true + type: string + userID: + description: ID of user that created and owns the token. + readOnly: true + type: string + type: object + required: + - orgID + - permissions + bucket: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + labels: + items: + properties: + id: + readOnly: true + type: string + name: + type: string + orgID: + readOnly: true + type: string + properties: + additionalProperties: + type: string + 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 + type: object + type: object + type: array + links: + example: + labels: /api/v2/buckets/1/labels + members: /api/v2/buckets/1/members + org: /api/v2/orgs/2 + owners: /api/v2/buckets/1/owners + self: /api/v2/buckets/1 + write: /api/v2/write?org=2&bucket=1 + properties: + labels: + $ref: '#/components/schemas/Link' + description: URL to retrieve labels for this bucket + members: + $ref: '#/components/schemas/Link' + description: URL to retrieve members that can read this bucket + org: + $ref: '#/components/schemas/Link' + description: URL to retrieve parent organization for this bucket + owners: + $ref: '#/components/schemas/Link' + description: URL to retrieve owners that can read and write to this + bucket. + self: + $ref: '#/components/schemas/Link' + description: URL for this bucket + write: + $ref: '#/components/schemas/Link' + description: URL to write line protocol for this bucket + readOnly: true + type: object + name: + type: string + orgID: + type: string + retentionRules: + description: Rules to expire or retain data. No rules means data never + expires. + items: + properties: + everySeconds: + description: Duration in seconds for how long data will be kept + in the database. 0 means infinite. + example: 86400 + format: int64 + minimum: 0 + type: integer + shardGroupDurationSeconds: + description: Shard duration measured in seconds. + format: int64 + type: integer + type: + default: expire + enum: + - expire + type: string + required: + - type + - everySeconds + type: object + type: array + rp: + type: string + schemaType: + default: implicit + enum: + - implicit + - explicit + type: string + type: + default: user + enum: + - user + - system + readOnly: true + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - name + - retentionRules + org: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + links: + example: + buckets: /api/v2/buckets?org=myorg + dashboards: /api/v2/dashboards?org=myorg + labels: /api/v2/orgs/1/labels + members: /api/v2/orgs/1/members + owners: /api/v2/orgs/1/owners + secrets: /api/v2/orgs/1/secrets + self: /api/v2/orgs/1 + tasks: /api/v2/tasks?org=myorg + properties: + buckets: + $ref: '#/components/schemas/Link' + dashboards: + $ref: '#/components/schemas/Link' + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + secrets: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + tasks: + $ref: '#/components/schemas/Link' + readOnly: true + type: object + name: + type: string + status: + default: active + description: If inactive the organization is inactive. + enum: + - active + - inactive + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - name + user: + properties: + id: + readOnly: true + type: string + links: + example: + self: /api/v2/users/1 + properties: + self: + format: uri + type: string + readOnly: true + type: object + name: + type: string + oauthID: + type: string + status: + default: active + description: If inactive the user is inactive. + enum: + - active + - inactive + type: string + required: + - name + type: object + OptionStatement: + description: A single variable declaration + properties: + assignment: + oneOf: + - $ref: '#/components/schemas/VariableAssignment' + - $ref: '#/components/schemas/MemberAssignment' + type: + $ref: '#/components/schemas/NodeType' + type: object + OrgSetting: + properties: + key: + type: string + value: + type: string + type: object + OrgSettings: + properties: + orgID: + description: the influxDB ID of the created organization + type: string + settings: + items: + $ref: '#/components/schemas/OrgSetting' + type: array + type: object + Organization: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + links: + example: + buckets: /api/v2/buckets?org=myorg + dashboards: /api/v2/dashboards?org=myorg + labels: /api/v2/orgs/1/labels + members: /api/v2/orgs/1/members + owners: /api/v2/orgs/1/owners + secrets: /api/v2/orgs/1/secrets + self: /api/v2/orgs/1 + tasks: /api/v2/tasks?org=myorg + properties: + buckets: + $ref: '#/components/schemas/Link' + dashboards: + $ref: '#/components/schemas/Link' + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + secrets: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + tasks: + $ref: '#/components/schemas/Link' + readOnly: true + type: object + name: + type: string + status: + default: active + description: If inactive the organization is inactive. + enum: + - active + - inactive + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - name + OrganizationRequest: + properties: + bucket: + description: the name of the bucket to be created + type: string + limit: + $ref: '#/components/schemas/Limit' + org: + description: the name of the organization to be added + type: string + retentionSeconds: + description: length of time to retain data in seconds + type: integer + username: + description: username of the Quartz user to be added in IDPE + example: user@email.com + type: string + type: object + Organizations: properties: links: $ref: '#/components/schemas/Links' orgs: - type: array items: $ref: '#/components/schemas/Organization' - PostOrganizationRequest: + type: array type: object + Package: + description: Represents a complete package source tree. + properties: + files: + description: Package files + items: + $ref: '#/components/schemas/File' + type: array + package: + description: Package name + type: string + path: + description: Package import path + type: string + type: + $ref: '#/components/schemas/NodeType' + type: object + PackageClause: + description: Defines a package identifier properties: name: + $ref: '#/components/schemas/Identifier' + type: + $ref: '#/components/schemas/NodeType' + type: object + PagerDutyNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + clientURL: + type: string + routingKey: + type: string + required: + - routingKey + type: object + type: object + PagerDutyNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/PagerDutyNotificationRuleBase' + PagerDutyNotificationRuleBase: + properties: + messageTemplate: type: string - description: + type: + enum: + - pagerduty type: string required: - - name - PatchOrganizationRequest: + - type + - messageTemplate type: object + ParenExpression: + description: Represents an expression wrapped in parenthesis properties: - name: + expression: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + PasswordResetBody: + properties: + password: type: string - description: New name to set on the organization + required: + - password + PatchBucketRequest: + description: Updates to an existing bucket resource. + properties: description: type: string - description: New description to set on the organization - TemplateApply: + name: + type: string + retentionRules: + $ref: '#/components/schemas/PatchRetentionRules' type: object + PatchOrganizationRequest: properties: - dryRun: - type: boolean + description: + description: New description to set on the organization + type: string + name: + description: New name to set on the organization + type: string + type: object + PatchRetentionRule: + description: Updates to a rule to expire or retain data. + properties: + everySeconds: + description: Duration in seconds for how long data will be kept in the database. + 0 means infinite. + example: 86400 + format: int64 + minimum: 0 + type: integer + shardGroupDurationSeconds: + description: Shard duration measured in seconds. + format: int64 + type: integer + type: + default: expire + enum: + - expire + type: string + required: + - type + type: object + PatchRetentionRules: + description: Updates to rules to expire or retain data. No rules means no updates. + items: + $ref: '#/components/schemas/PatchRetentionRule' + type: array + Permission: + properties: + action: + enum: + - read + - write + type: string + resource: + $ref: '#/components/schemas/Resource' + required: + - action + - resource + PipeExpression: + description: Call expression with pipe argument + properties: + argument: + $ref: '#/components/schemas/Expression' + call: + $ref: '#/components/schemas/CallExpression' + type: + $ref: '#/components/schemas/NodeType' + type: object + PipeLiteral: + description: Represents a specialized literal value, indicating the left hand + value of a pipe expression + properties: + type: + $ref: '#/components/schemas/NodeType' + type: object + PostBucketRequest: + properties: + description: + type: string + name: + type: string orgID: type: string - stackID: + retentionRules: + $ref: '#/components/schemas/RetentionRules' + rp: type: string - template: + schemaType: + $ref: '#/components/schemas/SchemaType' + default: implicit + required: + - orgID + - name + - retentionRules + PostCheck: + allOf: + - $ref: '#/components/schemas/CheckDiscriminator' + PostNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointDiscriminator' + PostNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleDiscriminator' + PostOrganizationRequest: + properties: + description: + type: string + name: + type: string + required: + - name + type: object + Property: + description: The value associated with a key + properties: + key: + $ref: '#/components/schemas/PropertyKey' + type: + $ref: '#/components/schemas/NodeType' + value: + $ref: '#/components/schemas/Expression' + type: object + PropertyKey: + oneOf: + - $ref: '#/components/schemas/Identifier' + - $ref: '#/components/schemas/StringLiteral' + Query: + description: Query influx using the Flux language + properties: + dialect: + $ref: '#/components/schemas/Dialect' + extern: + $ref: '#/components/schemas/File' + now: + description: Specifies the time that should be reported as "now" in the + query. Default is the server's now time. + format: date-time + type: string + params: + 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) type: object + query: + description: Query script to execute. + type: string + type: + description: The type of query. Must be "flux". + enum: + - flux + type: string + required: + - query + type: object + QueryEditMode: + enum: + - builder + - advanced + type: string + QueryVariableProperties: + properties: + type: + enum: + - query + type: string + values: properties: - contentType: + language: type: string - sources: - type: array - items: - type: string - contents: - $ref: '#/components/schemas/Template' - templates: - type: array + query: + type: string + type: object + RangeThreshold: + allOf: + - $ref: '#/components/schemas/ThresholdBase' + - properties: + max: + format: float + type: number + min: + format: float + type: number + type: + enum: + - range + type: string + within: + type: boolean + required: + - type + - min + - max + - within + type: object + ReadStream: + properties: + createdAt: + format: date-time + type: string + description: + type: string + id: + type: string + stream: + type: string + updatedAt: + format: date-time + type: string + type: object + Ready: + properties: + started: + example: "2019-03-13T10:09:33.891196-04:00" + format: date-time + type: string + status: + enum: + - ready + type: string + up: + example: 14m45.911966424s + type: string + type: object + RegexpLiteral: + description: Expressions begin and end with `/` and are regular expressions + with syntax accepted by RE2 + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: string + type: object + RenamableField: + description: Describes a field that can be renamed and made visible or invisible. + properties: + displayName: + description: The name that a field is renamed to by the user. + type: string + internalName: + description: The calculated name of a field. + readOnly: true + type: string + visible: + description: Indicates whether this field should be visible on the table. + type: boolean + type: object + Resource: + properties: + id: + 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. + nullable: true + type: string + name: + description: Optional name of the resource if the resource has a name field. + nullable: true + type: string + org: + description: Optional name of the organization of the organization with + orgID. + nullable: true + type: string + orgID: + 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. + nullable: true + type: string + type: + enum: + - authorizations + - buckets + - dashboards + - orgs + - tasks + - telegrafs + - users + - variables + - secrets + - labels + - views + - documents + - notificationRules + - notificationEndpoints + - checks + - dbrp + - flows + - annotations + - functions + type: string + required: + - type + type: object + ResourceMember: + allOf: + - $ref: '#/components/schemas/UserResponse' + - properties: + role: + default: member + enum: + - member + type: string + type: object + ResourceMembers: + properties: + links: + properties: + self: + format: uri + type: string + type: object + users: items: - type: object + $ref: '#/components/schemas/ResourceMember' + type: array + type: object + ResourceOwner: + allOf: + - $ref: '#/components/schemas/UserResponse' + - properties: + role: + default: owner + enum: + - owner + type: string + type: object + ResourceOwners: + properties: + links: + properties: + self: + format: uri + type: string + type: object + users: + items: + $ref: '#/components/schemas/ResourceOwner' + type: array + type: object + RetentionRule: + properties: + everySeconds: + description: Duration in seconds for how long data will be kept in the database. + 0 means infinite. + example: 86400 + format: int64 + minimum: 0 + type: integer + shardGroupDurationSeconds: + description: Shard duration measured in seconds. + format: int64 + type: integer + type: + default: expire + enum: + - expire + type: string + required: + - type + - everySeconds + type: object + RetentionRules: + description: Rules to expire or retain data. No rules means data never expires. + items: + $ref: '#/components/schemas/RetentionRule' + type: array + ReturnStatement: + description: Defines an expression to return + properties: + argument: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Routes: + properties: + authorizations: + format: uri + type: string + buckets: + format: uri + type: string + dashboards: + format: uri + type: string + external: + properties: + statusFeed: + format: uri + type: string + type: object + flags: + format: uri + type: string + me: + format: uri + type: string + orgs: + format: uri + type: string + query: + properties: + analyze: + format: uri + type: string + ast: + format: uri + type: string + self: + format: uri + type: string + suggestions: + format: uri + type: string + type: object + setup: + format: uri + type: string + signin: + format: uri + type: string + signout: + format: uri + type: string + sources: + format: uri + type: string + system: + properties: + debug: + format: uri + type: string + health: + format: uri + type: string + metrics: + format: uri + type: string + type: object + tasks: + format: uri + type: string + telegrafs: + format: uri + type: string + users: + format: uri + type: string + variables: + format: uri + type: string + write: + format: uri + type: string + RuleStatusLevel: + description: The state to record if check matches a criteria. + enum: + - UNKNOWN + - OK + - INFO + - CRIT + - WARN + - ANY + type: string + Run: + properties: + finishedAt: + description: Time run finished executing, RFC3339Nano. + format: date-time + readOnly: true + type: string + id: + readOnly: true + type: string + links: + example: + retry: /api/v2/tasks/1/runs/1/retry + self: /api/v2/tasks/1/runs/1 + task: /api/v2/tasks/1 + properties: + retry: + format: uri + type: string + self: + format: uri + type: string + task: + format: uri + type: string + readOnly: true + type: object + log: + description: An array of logs associated with the run. + items: + $ref: '#/components/schemas/LogEvent' + readOnly: true + type: array + requestedAt: + description: Time run was manually requested, RFC3339Nano. + format: date-time + readOnly: true + type: string + scheduledFor: + description: Time used for run's "now" option, RFC3339. + format: date-time + type: string + startedAt: + description: Time run started executing, RFC3339Nano. + format: date-time + readOnly: true + type: string + status: + enum: + - scheduled + - started + - failed + - success + - canceled + readOnly: true + type: string + taskID: + readOnly: true + type: string + RunManually: + properties: + scheduledFor: + description: Time used for run's "now" option, RFC3339. Default is the + server's now time. + format: date-time + nullable: true + type: string + Runs: + properties: + links: + $ref: '#/components/schemas/Links' + runs: + items: + $ref: '#/components/schemas/Run' + type: array + type: object + SMTPNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/SMTPNotificationRuleBase' + SMTPNotificationRuleBase: + properties: + bodyTemplate: + type: string + subjectTemplate: + type: string + to: + type: string + type: + enum: + - smtp + type: string + required: + - type + - subjectTemplate + - to + type: object + ScatterViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + type: string + type: array + fillColumns: + items: + type: string + type: array + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + symbolColumns: + items: + type: string + type: array + timeFormat: + type: string + type: + enum: + - scatter + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + type: number + maxItems: 2 + type: array + xPrefix: + type: string + xSuffix: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yAxisLabel: + type: string + yColumn: + type: string + yDomain: + items: + type: number + maxItems: 2 + type: array + yPrefix: + type: string + ySuffix: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - yColumn + - fillColumns + - symbolColumns + - xDomain + - yDomain + - xAxisLabel + - yAxisLabel + - xPrefix + - yPrefix + - xSuffix + - ySuffix + type: object + SchemaType: + enum: + - implicit + - explicit + type: string + Script: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + language: + $ref: '#/components/schemas/ScriptLanguage' + name: + type: string + orgID: + type: string + script: + description: script to be executed + type: string + updatedAt: + format: date-time + readOnly: true + type: string + url: + description: invocation endpoint address + type: string + required: + - name + - orgID + - script + ScriptCreateRequest: + properties: + language: + $ref: '#/components/schemas/ScriptLanguage' + name: + description: The name of the script. The name must be unique within the + organization. + type: string + script: + description: The script to execute. + type: string + required: + - name + - orgID + - script + - language + - description + type: object + ScriptHTTPResponseData: + description: The data sent in the response body when a script is invoked by + an HTTP request. User defined and dynamic. + type: string + ScriptInvocationParams: + properties: + params: + type: object + type: object + ScriptLanguage: + enum: + - flux + type: string + ScriptUpdateRequest: + properties: + description: + type: string + name: + type: string + script: + description: script is script to be executed + type: string + type: object + Scripts: + properties: + scripts: + items: + $ref: '#/components/schemas/Script' + type: array + type: object + SecretKeys: + properties: + secrets: + items: + type: string + type: array + type: object + SecretKeysResponse: + allOf: + - $ref: '#/components/schemas/SecretKeys' + - properties: + links: properties: - contentType: + org: type: string - sources: + self: + type: string + readOnly: true + type: object + type: object + Secrets: + additionalProperties: + type: string + example: + apikey: abc123xyz + SimpleTableViewProperties: + properties: + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showAll: + type: boolean + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + type: + enum: + - simple-table + type: string + required: + - type + - showAll + - queries + - shape + - note + - showNoteWhenEmpty + type: object + SingleStatViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + note: + type: string + prefix: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + suffix: + type: string + tickPrefix: + type: string + tickSuffix: + type: string + type: + enum: + - single-stat + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - prefix + - tickPrefix + - suffix + - tickSuffix + - decimalPlaces + type: object + SlackNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + token: + description: Specifies the API token string. Specify either `URL` or `Token`. + type: string + url: + description: Specifies the URL of the Slack endpoint. Specify either `URL` + or `Token`. + type: string + type: object + type: object + SlackNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/SlackNotificationRuleBase' + SlackNotificationRuleBase: + properties: + channel: + type: string + messageTemplate: + type: string + type: + enum: + - slack + type: string + required: + - type + - messageTemplate + type: object + Stack: + properties: + createdAt: + format: date-time + readOnly: true + type: string + events: + items: + properties: + description: + type: string + eventType: + type: string + name: + type: string + resources: + items: + properties: + apiVersion: + type: string + associations: + items: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + metaName: + type: string + type: object + type: array + kind: + $ref: '#/components/schemas/TemplateKind' + links: + properties: + self: + type: string + type: object + resourceID: + type: string + templateMetaName: + type: string + type: object type: array + sources: items: type: string - contents: - $ref: '#/components/schemas/Template' - envRefs: - type: object - additionalProperties: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - secrets: - type: object - additionalProperties: - type: string - remotes: - type: array - items: + type: array + updatedAt: + format: date-time + readOnly: true + type: string + urls: + items: + type: string + type: array type: object - properties: - url: - type: string - contentType: - type: string - required: - - url - actions: type: array - items: - oneOf: - - type: object - properties: - action: - type: string - enum: - - skipKind - properties: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - required: - - kind - - type: object - properties: - action: - type: string - enum: - - skipResource - properties: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - resourceTemplateName: - type: string - required: - - kind - - resourceTemplateName - TemplateKind: - type: string - enum: - - Bucket - - Check - - CheckDeadman - - CheckThreshold - - Dashboard - - Label - - NotificationEndpoint - - NotificationEndpointHTTP - - NotificationEndpointPagerDuty - - NotificationEndpointSlack - - NotificationRule - - Task - - Telegraf - - Variable - TemplateExportByID: - type: object - properties: - stackID: + id: type: string - orgIDs: - type: array - items: - type: object - properties: - orgID: - type: string - resourceFilters: - type: object - properties: - byLabel: - type: array - items: - type: string - byResourceKind: - type: array - items: - $ref: '#/components/schemas/TemplateKind' - resources: - 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: - stackID: + orgID: type: string - orgIDs: - type: array - items: - type: object - properties: - orgID: - type: string - resourceFilters: - type: object - properties: - byLabel: - type: array - items: - type: string - byResourceKind: - type: array - items: - $ref: '#/components/schemas/TemplateKind' - resources: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - name: - type: string - required: - - name - - kind - Template: - type: array + type: object + Statement: + oneOf: + - $ref: '#/components/schemas/BadStatement' + - $ref: '#/components/schemas/VariableAssignment' + - $ref: '#/components/schemas/MemberAssignment' + - $ref: '#/components/schemas/ExpressionStatement' + - $ref: '#/components/schemas/ReturnStatement' + - $ref: '#/components/schemas/OptionStatement' + - $ref: '#/components/schemas/BuiltinStatement' + - $ref: '#/components/schemas/TestStatement' + StaticLegend: + description: StaticLegend represents the options specific to the static legend + properties: + colorizeRows: + type: boolean + heightRatio: + format: float + type: number + opacity: + format: float + type: number + orientationThreshold: + type: integer + show: + type: boolean + valueAxis: + type: string + widthRatio: + format: float + type: number + type: object + StatusRule: + properties: + count: + type: integer + currentLevel: + $ref: '#/components/schemas/RuleStatusLevel' + period: + type: string + previousLevel: + $ref: '#/components/schemas/RuleStatusLevel' + type: object + Stream: + properties: + description: + type: string + stream: + type: string + type: object + StreamDeleteFilter: + properties: + stream: + type: string + type: object + StreamList: items: + $ref: '#/components/schemas/ReadStream' + type: array + StreamListFilter: + allOf: + - $ref: '#/components/schemas/BasicFilter' + - properties: + allStreams: + type: boolean + streamIncludes: + items: + type: string + type: array type: object + StringLiteral: + description: Expressions begin and end with double quote marks + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: string + type: object + TableViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + fieldOptions: + description: fieldOptions represent the fields retrieved by the query with + customization options + items: + $ref: '#/components/schemas/RenamableField' + type: array + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + tableOptions: + properties: + fixFirstColumn: + description: fixFirstColumn indicates whether the first column of the + table should be locked + type: boolean + sortBy: + $ref: '#/components/schemas/RenamableField' + verticalTimeAxis: + description: verticalTimeAxis describes the orientation of the table + by indicating whether the time axis will be displayed vertically + type: boolean + wrapping: + description: Wrapping describes the text wrapping style to be used in + table views + enum: + - truncate + - wrap + - single-line + type: string + type: object + timeFormat: + description: timeFormat describes the display format for time values according + to moment.js date formatting + type: string + type: + enum: + - table + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - tableOptions + - fieldOptions + - timeFormat + - decimalPlaces + type: object + TagRule: + properties: + key: + type: string + operator: + enum: + - equal + - notequal + - equalregex + - notequalregex + type: string + value: + type: string + type: object + Task: + properties: + authorizationID: + description: The ID of the authorization used when this task communicates + with the query engine. + type: string + createdAt: + format: date-time + readOnly: true + type: string + cron: + description: A task repetition schedule in the form '* * * * * *'; parsed + from Flux. + type: string + description: + description: An optional description of the task. + type: string + every: + description: A simple task repetition schedule; parsed from Flux. + type: string + flux: + description: The Flux script to run for this task. + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + lastRunError: + readOnly: true + type: string + lastRunStatus: + enum: + - failed + - success + - canceled + readOnly: true + type: string + latestCompleted: + description: Timestamp of latest scheduled, completed run, RFC3339. + format: date-time + readOnly: true + type: string + links: + example: + labels: /api/v2/tasks/1/labels + logs: /api/v2/tasks/1/logs + members: /api/v2/tasks/1/members + owners: /api/v2/tasks/1/owners + runs: /api/v2/tasks/1/runs + self: /api/v2/tasks/1 + properties: + labels: + $ref: '#/components/schemas/Link' + logs: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + runs: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + readOnly: true + type: object + name: + description: The name of the task. + 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. + type: string + org: + description: The name of the organization that owns this Task. + type: string + orgID: + description: The ID of the organization that owns this Task. + type: string + ownerID: + description: The ID of the user who owns this Task. + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + type: + description: The type of task, this can be used for filtering tasks on list + actions. + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - id + - name + - orgID + - flux + type: object + TaskCreateRequest: + properties: + description: + description: An optional description of the task. + type: string + flux: + description: The Flux script to run for this task. + type: string + org: + description: The name of the organization that owns this Task. + type: string + orgID: + description: The ID of the organization that owns this Task. + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + required: + - flux + type: object + TaskStatusType: + enum: + - active + - inactive + type: string + TaskUpdateRequest: + properties: + cron: + description: Override the 'cron' option in the flux script. + type: string + description: + description: An optional description of the task. + type: string + every: + description: Override the 'every' option in the flux script. + type: string + flux: + description: The Flux script to run for this task. + type: string + name: + description: Override the 'name' option in the flux script. + type: string + offset: + description: Override the 'offset' option in the flux script. + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + type: object + Tasks: + properties: + links: + $ref: '#/components/schemas/Links' + readOnly: true + tasks: + items: + $ref: '#/components/schemas/Task' + type: array + type: object + Telegraf: + allOf: + - $ref: '#/components/schemas/TelegrafRequest' + - properties: + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + readOnly: true + links: + example: + lables: /api/v2/telegrafs/1/labels + members: /api/v2/telegrafs/1/members + owners: /api/v2/telegrafs/1/owners + self: /api/v2/telegrafs/1 + properties: + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + readOnly: true + type: object + type: object + type: object + TelegrafPlugin: + properties: + config: + type: string + description: + type: string + name: + type: string + type: + type: string + type: object + TelegrafPlugins: + properties: + os: + type: string + plugins: + items: + $ref: '#/components/schemas/TelegrafPlugin' + type: array + version: + type: string + type: object + TelegrafRequest: + properties: + config: + type: string + description: + type: string + metadata: + properties: + buckets: + items: + type: string + type: array + type: object + name: + type: string + orgID: + type: string + type: object + Telegrafs: + properties: + configurations: + items: + $ref: '#/components/schemas/Telegraf' + type: array + type: object + TelegramNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + channel: + description: ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage + . + type: string + token: + description: Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot + . + type: string + required: + - token + - channel + type: object + type: object + TelegramNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/TelegramNotificationRuleBase' + TelegramNotificationRuleBase: + properties: + disableWebPagePreview: + description: Disables preview of web links in the sent messages when "true". + Defaults to "false" . + type: boolean + messageTemplate: + 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" . + enum: + - MarkdownV2 + - HTML + - Markdown + type: string + type: + description: The discriminator between other types of notification rules + is "telegram". + enum: + - telegram + type: string + required: + - type + - messageTemplate + - channel + type: object + Template: + items: properties: apiVersion: type: string kind: $ref: '#/components/schemas/TemplateKind' meta: - type: object properties: name: type: string + type: object spec: type: object - TemplateEnvReferences: - type: array - items: type: object + type: array + TemplateApply: + properties: + actions: + items: + oneOf: + - properties: + action: + enum: + - skipKind + type: string + properties: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + required: + - kind + type: object + type: object + - properties: + action: + enum: + - skipResource + type: string + properties: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + resourceTemplateName: + type: string + required: + - kind + - resourceTemplateName + type: object + type: object + type: array + dryRun: + type: boolean + envRefs: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + type: object + orgID: + type: string + remotes: + items: + properties: + contentType: + type: string + url: + type: string + required: + - url + type: object + type: array + secrets: + additionalProperties: + type: string + type: object + stackID: + type: string + template: + properties: + contentType: + type: string + contents: + $ref: '#/components/schemas/Template' + sources: + items: + type: string + type: array + type: object + templates: + items: + properties: + contentType: + type: string + contents: + $ref: '#/components/schemas/Template' + sources: + items: + type: string + type: array + type: object + type: array + type: object + TemplateChart: + properties: + height: + type: integer properties: - resourceField: - type: string - description: Field the environment reference corresponds too + $ref: '#/components/schemas/ViewProperties' + width: + type: integer + xPos: + type: integer + yPos: + type: integer + type: object + TemplateEnvReferences: + items: + properties: + defaultValue: + description: Default value that will be provided for the reference when + no value is provided + nullable: true + oneOf: + - type: string + - type: integer + - type: number + - type: boolean envRefKey: + description: Key identified as environment reference and is the key identified + in the template + type: string + resourceField: + description: Field the environment reference corresponds too type: string - description: Key identified as environment reference and is the key identified in the template value: description: Value provided to fulfill reference nullable: true oneOf: - - type: string - - type: integer - - type: number - - type: boolean - defaultValue: - description: Default value that will be provided for the reference when no value is provided - nullable: true - oneOf: - - type: string - - type: integer - - type: number - - type: boolean + - type: string + - type: integer + - type: number + - type: boolean required: - - resourceField - - envRefKey - TemplateSummary: - type: object + - resourceField + - envRefKey + type: object + type: array + TemplateExportByID: properties: - sources: - type: array + orgIDs: items: - type: string + properties: + orgID: + type: string + resourceFilters: + properties: + byLabel: + items: + type: string + type: array + byResourceKind: + items: + $ref: '#/components/schemas/TemplateKind' + type: array + type: object + type: object + type: array + resources: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + name: + description: if defined with id, name is used for resource exported + by id. if defined independently, resources strictly matching name + are exported + type: string + required: + - id + - kind + type: object + type: array stackID: type: string - summary: - type: object + type: object + TemplateExportByName: + properties: + orgIDs: + items: + properties: + orgID: + type: string + resourceFilters: + properties: + byLabel: + items: + type: string + type: array + byResourceKind: + items: + $ref: '#/components/schemas/TemplateKind' + type: array + type: object + type: object + type: array + resources: + items: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + name: + type: string + required: + - name + - kind + type: object + type: array + stackID: + type: string + type: object + TemplateKind: + enum: + - Bucket + - Check + - CheckDeadman + - CheckThreshold + - Dashboard + - Label + - NotificationEndpoint + - NotificationEndpointHTTP + - NotificationEndpointPagerDuty + - NotificationEndpointSlack + - NotificationRule + - Task + - Telegraf + - Variable + type: string + TemplateSummary: + properties: + diff: properties: buckets: - type: array items: - type: object properties: id: type: string - orgID: - type: string kind: $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - name: - type: string - description: - type: string - retentionPeriod: - type: integer - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - checks: - type: array - items: - allOf: - - $ref: '#/components/schemas/CheckDiscriminator' - - type: object + new: properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: + description: type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - dashboards: - type: array - items: + name: + type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' + type: object + old: + properties: + description: + type: string + name: + type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' + type: object + stateStatus: + type: string + templateMetaName: + type: string type: object + type: array + checks: + items: properties: id: type: string - orgID: + kind: + $ref: '#/components/schemas/TemplateKind' + new: + $ref: '#/components/schemas/CheckDiscriminator' + old: + $ref: '#/components/schemas/CheckDiscriminator' + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + dashboards: + items: + properties: + id: type: string kind: $ref: '#/components/schemas/TemplateKind' + new: + properties: + charts: + items: + $ref: '#/components/schemas/TemplateChart' + type: array + description: + type: string + name: + type: string + type: object + old: + properties: + charts: + items: + $ref: '#/components/schemas/TemplateChart' + type: array + description: + type: string + name: + type: string + type: object + stateStatus: + type: string templateMetaName: type: string - name: - type: string - description: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - charts: - type: array - items: - $ref: '#/components/schemas/TemplateChart' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - labels: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - labelMappings: - type: array - items: type: object + type: array + labelMappings: + items: properties: - status: - type: string - resourceTemplateMetaName: - type: string - resourceName: - type: string - resourceID: - type: string - resourceType: - type: string - labelTemplateMetaName: + labelID: type: string labelName: type: string - labelID: + labelTemplateMetaName: + type: string + resourceID: + type: string + resourceName: + type: string + resourceTemplateMetaName: + type: string + resourceType: + type: string + status: type: string - missingEnvRefs: - type: array - items: - type: string - missingSecrets: - type: array - items: - type: string - notificationEndpoints: - type: array - items: - allOf: - - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - notificationRules: - type: array - items: type: object + type: array + labels: + items: properties: + id: + type: string kind: $ref: '#/components/schemas/TemplateKind' + new: + properties: + color: + type: string + description: + type: string + name: + type: string + type: object + old: + properties: + color: + type: string + description: + type: string + name: + type: string + type: object + stateStatus: + type: string templateMetaName: type: string - name: + type: object + type: array + notificationEndpoints: + items: + properties: + id: type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + $ref: '#/components/schemas/NotificationEndpointDiscriminator' + old: + $ref: '#/components/schemas/NotificationEndpointDiscriminator' + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + notificationRules: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + description: + type: string + endpointID: + type: string + endpointName: + type: string + endpointType: + type: string + every: + type: string + messageTemplate: + type: string + name: + type: string + offset: + type: string + status: + type: string + statusRules: + items: + properties: + currentLevel: + type: string + previousLevel: + type: string + type: object + type: array + tagRules: + items: + properties: + key: + type: string + operator: + type: string + value: + type: string + type: object + type: array + type: object + old: + properties: + description: + type: string + endpointID: + type: string + endpointName: + type: string + endpointType: + type: string + every: + type: string + messageTemplate: + type: string + name: + type: string + offset: + type: string + status: + type: string + statusRules: + items: + properties: + currentLevel: + type: string + previousLevel: + type: string + type: object + type: array + tagRules: + items: + properties: + key: + type: string + operator: + type: string + value: + type: string + type: object + type: array + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + tasks: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + cron: + type: string + description: + type: string + every: + type: string + name: + type: string + offset: + type: string + query: + type: string + status: + type: string + type: object + old: + properties: + cron: + type: string + description: + type: string + every: + type: string + name: + type: string + offset: + type: string + query: + type: string + status: + type: string + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + telegrafConfigs: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + $ref: '#/components/schemas/TelegrafRequest' + old: + $ref: '#/components/schemas/TelegrafRequest' + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + variables: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + args: + $ref: '#/components/schemas/VariableProperties' + description: + type: string + name: + type: string + type: object + old: + properties: + args: + $ref: '#/components/schemas/VariableProperties' + description: + type: string + name: + type: string + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + type: object + errors: + items: + properties: + fields: + items: + type: string + type: array + indexes: + items: + type: integer + type: array + kind: + $ref: '#/components/schemas/TemplateKind' + reason: + type: string + type: object + type: array + sources: + items: + type: string + type: array + stackID: + type: string + summary: + properties: + buckets: + items: + properties: description: type: string - endpointTemplateMetaName: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + name: + type: string + orgID: + type: string + retentionPeriod: + type: integer + templateMetaName: + type: string + type: object + type: array + checks: + items: + allOf: + - $ref: '#/components/schemas/CheckDiscriminator' + - properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + templateMetaName: + type: string + type: object + type: array + dashboards: + items: + properties: + charts: + items: + $ref: '#/components/schemas/TemplateChart' + type: array + description: + type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + name: + type: string + orgID: + type: string + templateMetaName: + type: string + type: object + type: array + labelMappings: + items: + properties: + labelID: + type: string + labelName: + type: string + labelTemplateMetaName: + type: string + resourceID: + type: string + resourceName: + type: string + resourceTemplateMetaName: + type: string + resourceType: + type: string + status: + type: string + type: object + type: array + labels: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + missingEnvRefs: + items: + type: string + type: array + missingSecrets: + items: + type: string + type: array + notificationEndpoints: + items: + allOf: + - $ref: '#/components/schemas/NotificationEndpointDiscriminator' + - properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + templateMetaName: + type: string + type: object + type: array + notificationRules: + items: + properties: + description: type: string endpointID: type: string + endpointTemplateMetaName: + type: string endpointType: type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' every: type: string - offset: - type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array messageTemplate: type: string + name: + type: string + offset: + type: string status: type: string statusRules: - type: array items: - type: object properties: currentLevel: type: string previousLevel: type: string - tagRules: - type: array - items: type: object + type: array + tagRules: + items: properties: key: type: string - value: - type: string operator: type: string - labelAssociations: + value: + type: string + type: object type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - tasks: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string - id: - type: string - name: - type: string + type: object + type: array + tasks: + items: + properties: cron: type: string description: type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' every: type: string + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + name: + type: string offset: type: string query: type: string status: type: string - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - telegrafConfigs: - type: array - items: - allOf: - - $ref: '#/components/schemas/TelegrafRequest' - - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - variables: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string + type: object + type: array + telegrafConfigs: + items: + allOf: + - $ref: '#/components/schemas/TelegrafRequest' + - properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + templateMetaName: + type: string + type: object + type: array + variables: + items: + properties: + arguments: + $ref: '#/components/schemas/VariableProperties' + description: + type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' id: type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + name: + type: string orgID: type: string - name: + templateMetaName: type: string - description: - type: string - arguments: - $ref: '#/components/schemas/VariableProperties' - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - diff: + type: object + type: array type: object - properties: - buckets: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - retentionRules: - $ref: '#/components/schemas/RetentionRules' - old: - type: object - properties: - name: - type: string - description: - type: string - retentionRules: - $ref: '#/components/schemas/RetentionRules' - checks: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - $ref: '#/components/schemas/CheckDiscriminator' - old: - $ref: '#/components/schemas/CheckDiscriminator' - dashboards: - type: array - items: - type: object - properties: - stateStatus: - type: string - id: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - charts: - type: array - items: - $ref: '#/components/schemas/TemplateChart' - old: - type: object - properties: - name: - type: string - description: - type: string - charts: - type: array - items: - $ref: '#/components/schemas/TemplateChart' - labels: - type: array - items: - type: object - properties: - stateStatus: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - color: - type: string - description: - type: string - old: - type: object - properties: - name: - type: string - color: - type: string - description: - type: string - labelMappings: - type: array - items: - type: object - properties: - status: - type: string - resourceType: - type: string - resourceID: - type: string - resourceTemplateMetaName: - type: string - resourceName: - type: string - labelID: - type: string - labelTemplateMetaName: - type: string - labelName: - type: string - notificationEndpoints: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - old: - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - notificationRules: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - endpointName: - type: string - endpointID: - type: string - endpointType: - type: string - every: - type: string - offset: - type: string - messageTemplate: - type: string - status: - type: string - statusRules: - type: array - items: - type: object - properties: - currentLevel: - type: string - previousLevel: - type: string - tagRules: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string - old: - type: object - properties: - name: - type: string - description: - type: string - endpointName: - type: string - endpointID: - type: string - endpointType: - type: string - every: - type: string - offset: - type: string - messageTemplate: - type: string - status: - type: string - statusRules: - type: array - items: - type: object - properties: - currentLevel: - type: string - previousLevel: - type: string - tagRules: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string - tasks: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - cron: - type: string - description: - type: string - every: - type: string - offset: - type: string - query: - type: string - status: - type: string - old: - type: object - properties: - name: - type: string - cron: - type: string - description: - type: string - every: - type: string - offset: - type: string - query: - type: string - status: - type: string - telegrafConfigs: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - $ref: '#/components/schemas/TelegrafRequest' - old: - $ref: '#/components/schemas/TelegrafRequest' - variables: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - args: - $ref: '#/components/schemas/VariableProperties' - old: - type: object - properties: - name: - type: string - description: - type: string - args: - $ref: '#/components/schemas/VariableProperties' - errors: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - reason: - type: string - fields: - type: array - items: - type: string - indexes: - type: array - items: - type: integer - TemplateSummaryLabel: type: object + TemplateSummaryLabel: properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' id: type: string - orgID: - type: string kind: $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string name: type: string + orgID: + type: string properties: - type: object properties: color: type: string description: type: string - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - TemplateChart: - type: object - properties: - xPos: - type: integer - yPos: - type: integer - height: - type: integer - width: - type: integer - properties: - $ref: '#/components/schemas/ViewProperties' - Stack: - type: object - properties: - id: - type: string - orgID: - type: string - createdAt: - type: string - format: date-time - readOnly: true - events: - type: array - items: - type: object - properties: - eventType: - type: string - name: - type: string - description: - type: string - sources: - type: array - items: - type: string - resources: - type: array - items: - type: object - properties: - apiVersion: - type: string - resourceID: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - associations: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - metaName: - type: string - links: - type: object - properties: - self: - type: string - urls: - type: array - items: - type: string - updatedAt: - type: string - format: date-time - readOnly: true - Runs: - type: object - properties: - links: - $ref: '#/components/schemas/Links' - runs: - type: array - items: - $ref: '#/components/schemas/Run' - Run: - properties: - id: - readOnly: true - type: string - taskID: - readOnly: true - type: string - status: - readOnly: true - type: string - enum: - - scheduled - - started - - failed - - success - - canceled - scheduledFor: - description: 'Time used for run''s "now" option, RFC3339.' - type: string - format: date-time - log: - description: An array of logs associated with the run. - type: array - readOnly: true - items: - $ref: '#/components/schemas/LogEvent' - startedAt: - readOnly: true - description: 'Time run started executing, RFC3339Nano.' - type: string - format: date-time - finishedAt: - readOnly: true - description: 'Time run finished executing, RFC3339Nano.' - type: string - format: date-time - requestedAt: - readOnly: true - description: 'Time run was manually requested, RFC3339Nano.' - type: string - format: date-time - links: type: object - readOnly: true - example: - self: /api/v2/tasks/1/runs/1 - task: /api/v2/tasks/1 - retry: /api/v2/tasks/1/runs/1/retry - properties: - self: - type: string - format: uri - task: - type: string - format: uri - retry: - type: string - format: uri - RunManually: - properties: - scheduledFor: - nullable: true - description: 'Time used for run''s "now" option, RFC3339. Default is the server''s now time.' + templateMetaName: type: string - format: date-time - Tasks: type: object + TestStatement: + description: Declares a Flux test case properties: - links: - readOnly: true - $ref: '#/components/schemas/Links' - tasks: - type: array - items: - $ref: '#/components/schemas/Task' - Task: - type: object - properties: - id: - readOnly: true - type: string + assignment: + $ref: '#/components/schemas/VariableAssignment' type: - 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. - type: string - org: - description: The name of the organization that owns this Task. - type: string - 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 - status: - $ref: '#/components/schemas/TaskStatusType' - labels: - $ref: '#/components/schemas/Labels' - authorizationID: - 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. - type: string - every: - description: A simple task repetition schedule; parsed from Flux. - type: string - cron: - 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.' - type: string - latestCompleted: - description: 'Timestamp of latest scheduled, completed run, RFC3339.' - type: string - format: date-time - readOnly: true - lastRunStatus: - readOnly: true - type: string - enum: - - failed - - success - - canceled - lastRunError: - readOnly: true - type: string - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - links: - type: object - readOnly: true - example: - self: /api/v2/tasks/1 - owners: /api/v2/tasks/1/owners - members: /api/v2/tasks/1/members - labels: /api/v2/tasks/1/labels - runs: /api/v2/tasks/1/runs - logs: /api/v2/tasks/1/logs - properties: - self: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - runs: - $ref: '#/components/schemas/Link' - logs: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - required: - - id - - name - - orgID - - flux - TaskStatusType: - type: string - enum: - - active - - inactive - UserResponse: - properties: - id: - readOnly: true - type: string - oauthID: - type: string - name: - type: string - status: - description: If inactive the user is inactive. - default: active - type: string - enum: - - active - - inactive - links: - type: object - readOnly: true - example: - self: /api/v2/users/1 - properties: - self: - type: string - format: uri - required: - - name - Flags: + $ref: '#/components/schemas/NodeType' type: object - additionalProperties: true - ResourceMember: - allOf: - - $ref: '#/components/schemas/UserResponse' - - type: object - properties: - role: - type: string - default: member - enum: - - member - ResourceMembers: - type: object - properties: - links: - type: object - properties: - self: - type: string - format: uri - users: - type: array - items: - $ref: '#/components/schemas/ResourceMember' - ResourceOwner: - allOf: - - $ref: '#/components/schemas/UserResponse' - - type: object - properties: - role: - type: string - default: owner - enum: - - owner - ResourceOwners: - type: object - properties: - links: - type: object - properties: - self: - type: string - format: uri - users: - type: array - items: - $ref: '#/components/schemas/ResourceOwner' - FluxSuggestions: - type: object - properties: - funcs: - type: array - items: - $ref: '#/components/schemas/FluxSuggestion' - FluxSuggestion: - type: object - properties: - name: - type: string - params: - type: object - additionalProperties: - type: string - Routes: - properties: - authorizations: - type: string - format: uri - buckets: - type: string - format: uri - dashboards: - type: string - format: uri - external: - type: object - properties: - statusFeed: - type: string - format: uri - variables: - type: string - format: uri - me: - type: string - format: uri - flags: - type: string - format: uri - orgs: - type: string - format: uri - query: - type: object - properties: - self: - type: string - format: uri - ast: - type: string - format: uri - analyze: - type: string - format: uri - suggestions: - type: string - format: uri - setup: - type: string - format: uri - signin: - type: string - format: uri - signout: - type: string - format: uri - sources: - type: string - format: uri - system: - type: object - properties: - metrics: - type: string - format: uri - debug: - type: string - format: uri - health: - type: string - format: uri - tasks: - type: string - format: uri - telegrafs: - type: string - format: uri - users: - type: string - format: uri - write: - type: string - format: uri - Error: - properties: - code: - description: code is the machine-readable error code. - readOnly: true - type: string - enum: - - internal error - - not found - - conflict - - invalid - - unprocessable entity - - empty value - - unavailable - - forbidden - - too many requests - - unauthorized - - method not allowed - - request too large - - unsupported media type - message: - readOnly: true - description: message is a human-readable message. - type: string - op: - readOnly: true - 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. - type: string - required: - - code - - message - LineProtocolError: - properties: - code: - description: Code is the machine-readable error code. - readOnly: true - type: string - enum: - - internal error - - not found - - conflict - - invalid - - empty value - - unavailable - message: - readOnly: true - description: Message is a human-readable message. - type: string - op: - readOnly: true - 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. - type: string - line: - readOnly: true - description: First line within sent body containing malformed data - type: integer - format: int32 - required: - - code - - message - - op - - err - LineProtocolLengthError: - properties: - code: - description: Code is the machine-readable error code. - readOnly: true - type: string - enum: - - invalid - message: - readOnly: true - description: Message is a human-readable message. - type: string - maxLength: - readOnly: true - description: Max length in bytes for a body of line-protocol. - type: integer - format: int32 - required: - - code - - message - - maxLength - Field: - type: object - properties: - value: - 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.' - type: string - enum: - - func - - field - - integer - - number - - regex - - wildcard - alias: - 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 - type: array - items: - $ref: '#/components/schemas/Field' - BuilderConfig: - type: object - properties: - buckets: - type: array - items: - type: string - tags: - type: array - items: - $ref: '#/components/schemas/BuilderTagsType' - functions: - type: array - items: - $ref: '#/components/schemas/BuilderFunctionsType' - aggregateWindow: - type: object - properties: - period: - type: string - fillValues: - type: boolean - BuilderTagsType: - type: object - properties: - key: - type: string - values: - type: array - items: - type: string - aggregateFunctionType: - $ref: '#/components/schemas/BuilderAggregateFunctionType' - BuilderAggregateFunctionType: - type: string - enum: - - filter - - group - BuilderFunctionsType: - type: object - properties: - name: - type: string - DashboardQuery: - type: object - properties: - text: - type: string - description: The text of the Flux query. - editMode: - $ref: '#/components/schemas/QueryEditMode' - name: - type: string - builderConfig: - $ref: '#/components/schemas/BuilderConfig' - QueryEditMode: - type: string - enum: - - builder - - advanced - Axis: - type: object - description: The description of a particular axis for a visualization. - properties: - bounds: - 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' - items: - type: string - label: - description: Label is a description of this Axis - type: string - prefix: - description: Prefix represents a label prefix for formatting axis values. - type: string - suffix: - description: Suffix represents a label suffix for formatting axis values. - type: string - base: - description: Base represents the radix for formatting axis values. - type: string - enum: - - '' - - '2' - - '10' - scale: - $ref: '#/components/schemas/AxisScale' - AxisScale: - description: 'Scale is the axis formatting scale. Supported: "log", "linear"' - type: string - enum: - - log - - linear - DashboardColor: - type: object - description: Defines an encoding of data value into color space. - required: - - id - - type - - hex - - name - - value - properties: - id: - description: The unique ID of the view color. - type: string - type: - description: Type is how the color is used. - type: string - enum: - - min - - max - - threshold - - scale - - text - - background - hex: - description: The hex number of the color - type: string - maxLength: 7 - minLength: 7 - name: - description: The user-facing name of the hex color. - type: string - value: - description: The data value mapped to this color. - type: number - format: float - RenamableField: - description: Describes a field that can be renamed and made visible or invisible. - type: object - properties: - internalName: - description: The calculated name of a field. - readOnly: true - type: string - displayName: - description: The name that a field is renamed to by the user. - type: string - visible: - description: Indicates whether this field should be visible on the table. - type: boolean - XYViewProperties: - type: object - required: - - type - - geom - - queries - - shape - - axes - - colors - - note - - showNoteWhenEmpty - - position - properties: - timeFormat: - type: string - type: - type: string - enum: - - xy - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - axes: - $ref: '#/components/schemas/Axes' - staticLegend: - $ref: '#/components/schemas/StaticLegend' - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - shadeBelow: - type: boolean - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - position: - type: string - enum: - - overlaid - - stacked - geom: - $ref: '#/components/schemas/XYGeom' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - XYGeom: - type: string - enum: - - line - - step - - stacked - - bar - - monotoneX - BandViewProperties: - type: object - required: - - type - - geom - - queries - - shape - - axes - - colors - - note - - showNoteWhenEmpty - properties: - timeFormat: - type: string - type: - type: string - enum: - - band - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - axes: - $ref: '#/components/schemas/Axes' - staticLegend: - $ref: '#/components/schemas/StaticLegend' - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - upperColumn: - type: string - mainColumn: - type: string - lowerColumn: - type: string - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - geom: - $ref: '#/components/schemas/XYGeom' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - LinePlusSingleStatProperties: - type: object - required: - - type - - queries - - shape - - axes - - colors - - note - - showNoteWhenEmpty - - prefix - - suffix - - decimalPlaces - - position - properties: - timeFormat: - type: string - type: - type: string - enum: - - line-plus-single-stat - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - axes: - $ref: '#/components/schemas/Axes' - staticLegend: - $ref: '#/components/schemas/StaticLegend' - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - shadeBelow: - type: boolean - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - position: - type: string - enum: - - overlaid - - stacked - prefix: - type: string - suffix: - type: string - decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - MosaicViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - ySeriesColumns - - fillColumns - - xDomain - - yDomain - - xAxisLabel - - yAxisLabel - - xPrefix - - yPrefix - - xSuffix - - ySuffix - properties: - timeFormat: - type: string - type: - type: string - enum: - - mosaic - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - type: string - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yLabelColumnSeparator: - type: string - yLabelColumns: - type: array - items: - type: string - ySeriesColumns: - type: array - items: - type: string - fillColumns: - type: array - items: - type: string - xDomain: - type: array - items: - type: number - maxItems: 2 - yDomain: - type: array - items: - type: number - maxItems: 2 - xAxisLabel: - type: string - yAxisLabel: - type: string - xPrefix: - type: string - xSuffix: - type: string - yPrefix: - type: string - ySuffix: - type: string - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - ScatterViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - yColumn - - fillColumns - - symbolColumns - - xDomain - - yDomain - - xAxisLabel - - yAxisLabel - - xPrefix - - yPrefix - - xSuffix - - ySuffix - properties: - timeFormat: - type: string - type: - type: string - enum: - - scatter - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - type: string - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - fillColumns: - type: array - items: - type: string - symbolColumns: - type: array - items: - type: string - xDomain: - type: array - items: - type: number - maxItems: 2 - yDomain: - type: array - items: - type: number - maxItems: 2 - xAxisLabel: - type: string - yAxisLabel: - type: string - xPrefix: - type: string - xSuffix: - type: string - yPrefix: - type: string - ySuffix: - type: string - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - HeatmapViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - yColumn - - xDomain - - yDomain - - xAxisLabel - - yAxisLabel - - xPrefix - - yPrefix - - xSuffix - - ySuffix - - binSize - properties: - timeFormat: - type: string - type: - type: string - enum: - - heatmap - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - type: string - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - xDomain: - type: array - items: - type: number - maxItems: 2 - yDomain: - type: array - items: - type: number - maxItems: 2 - xAxisLabel: - type: string - yAxisLabel: - type: string - xPrefix: - type: string - xSuffix: - type: string - yPrefix: - type: string - ySuffix: - type: string - binSize: - type: number - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - SingleStatViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - prefix - - tickPrefix - - suffix - - tickSuffix - - decimalPlaces - properties: - type: - type: string - enum: - - single-stat - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - prefix: - type: string - tickPrefix: - type: string - suffix: - type: string - tickSuffix: - type: string - staticLegend: - $ref: '#/components/schemas/StaticLegend' - decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' - HistogramViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - fillColumns - - xDomain - - xAxisLabel - - position - - binCount - properties: - type: - type: string - enum: - - histogram - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - fillColumns: - type: array - items: - type: string - xDomain: - type: array - items: - type: number - format: float - xAxisLabel: - type: string - position: - type: string - enum: - - overlaid - - stacked - binCount: - type: integer - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - GaugeViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - prefix - - tickPrefix - - suffix - - tickSuffix - - decimalPlaces - properties: - type: - type: string - enum: - - gauge - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - prefix: - type: string - tickPrefix: - type: string - suffix: - type: string - tickSuffix: - type: string - decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' - TableViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - tableOptions - - fieldOptions - - timeFormat - - decimalPlaces - properties: - type: - type: string - enum: - - table - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - tableOptions: - type: object - properties: - verticalTimeAxis: - 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 - type: string - enum: - - truncate - - wrap - - single-line - fixFirstColumn: - 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 - type: array - items: - $ref: '#/components/schemas/RenamableField' - timeFormat: - 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: - - type - - shape - - note - properties: - type: - type: string - enum: - - markdown - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - CheckViewProperties: - type: object - required: - - type - - shape - - checkID - - queries - - colors - properties: - type: - type: string - enum: - - check - shape: - type: string - enum: - - chronograf-v2 - checkID: - type: string - check: - $ref: '#/components/schemas/Check' - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - GeoViewLayer: - type: object - oneOf: - - $ref: '#/components/schemas/GeoCircleViewLayer' - - $ref: '#/components/schemas/GeoHeatMapViewLayer' - - $ref: '#/components/schemas/GeoPointMapViewLayer' - - $ref: '#/components/schemas/GeoTrackMapViewLayer' - GeoViewLayerProperties: - type: object - required: - - type - properties: - type: - type: string - enum: - - heatmap - - circleMap - - pointMap - - trackMap - GeoCircleViewLayer: - allOf: - - $ref: '#/components/schemas/GeoViewLayerProperties' - - type: object - required: - - radiusField - - radiusDimension - - colorField - - colorDimension - - colors - properties: - radiusField: - type: string - description: Radius field - radiusDimension: - $ref: '#/components/schemas/Axis' - colorField: - type: string - description: Circle color field - colorDimension: - $ref: '#/components/schemas/Axis' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - radius: - description: Maximum radius size in pixels - type: integer - interpolateColors: - description: Interpolate circle color based on displayed value - type: boolean - GeoPointMapViewLayer: - allOf: - - $ref: '#/components/schemas/GeoViewLayerProperties' - - type: object - required: - - colorField - - colorDimension - - colors - properties: - colorField: - type: string - description: Marker color field - colorDimension: - $ref: '#/components/schemas/Axis' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - 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' - - type: object - required: - - trackWidth - - speed - - randomColors - - trackPointVisualization - properties: - trackWidth: - description: Width of the track - type: integer - speed: - description: Speed of the track animation - type: integer - randomColors: - description: Assign different colors to different tracks - type: boolean - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - GeoHeatMapViewLayer: - allOf: - - $ref: '#/components/schemas/GeoViewLayerProperties' - - type: object - required: - - intensityField - - intensityDimension - - radius - - blur - - colors - properties: - intensityField: - type: string - description: Intensity field - intensityDimension: - $ref: '#/components/schemas/Axis' - radius: - description: Radius size in pixels - type: integer - blur: - description: Blur for heatmap points - type: integer - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - GeoViewProperties: - type: object - required: - - type - - shape - - queries - - note - - showNoteWhenEmpty - - center - - zoom - - allowPanAndZoom - - detectCoordinateFields - - layers - properties: - type: - type: string - enum: - - geo - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - shape: - type: string - enum: - - chronograf-v2 - center: - description: Coordinates of the center of the map - type: object - required: - - lat - - lon - properties: - lat: - description: Latitude of the center of the map - type: number - format: double - lon: - description: Longitude of the center of the map - type: number - format: double - zoom: - description: Zoom level used for initial display of the map - type: number - format: double - minimum: 1 - maximum: 28 - allowPanAndZoom: - description: 'If true, map zoom and pan controls are enabled on the dashboard view' - type: boolean - default: true - detectCoordinateFields: - 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 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - layers: - description: List of individual layers shown in the map - 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 - required: - - x - - 'y' - properties: - x: - $ref: '#/components/schemas/Axis' - 'y': - $ref: '#/components/schemas/Axis' - StaticLegend: - description: StaticLegend represents the options specific to the static legend - type: object - properties: - colorizeRows: - type: boolean - heightRatio: - type: number - format: float - show: - type: boolean - opacity: - type: number - format: float - orientationThreshold: - type: integer - valueAxis: - type: string - widthRatio: - type: number - format: float - DecimalPlaces: - description: 'Indicates whether decimal places should be enforced, and how many digits it should show.' - type: object - properties: - isEnforced: - description: Indicates whether decimal point setting should be enforced - type: boolean - digits: - description: The number of digits after decimal to display - type: integer - format: int32 - ConstantVariableProperties: - properties: - type: - type: string - enum: - - constant - values: - type: array - items: - type: string - MapVariableProperties: - properties: - type: - type: string - enum: - - map - values: - type: object - additionalProperties: - type: string - QueryVariableProperties: - properties: - type: - type: string - enum: - - query - values: - type: object - properties: - query: - type: string - language: - type: string - VariableProperties: - type: object - oneOf: - - $ref: '#/components/schemas/QueryVariableProperties' - - $ref: '#/components/schemas/ConstantVariableProperties' - - $ref: '#/components/schemas/MapVariableProperties' - ViewProperties: - oneOf: - - $ref: '#/components/schemas/LinePlusSingleStatProperties' - - $ref: '#/components/schemas/XYViewProperties' - - $ref: '#/components/schemas/SingleStatViewProperties' - - $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' - - $ref: '#/components/schemas/HeatmapViewProperties' - - $ref: '#/components/schemas/MosaicViewProperties' - - $ref: '#/components/schemas/BandViewProperties' - - $ref: '#/components/schemas/GeoViewProperties' - View: - required: - - name - - properties - properties: - links: - type: object - readOnly: true - properties: - self: - type: string - id: - readOnly: true - type: string - name: - type: string - properties: - $ref: '#/components/schemas/ViewProperties' - Views: - type: object - properties: - links: - type: object - properties: - self: - type: string - views: - type: array - items: - $ref: '#/components/schemas/View' - CellUpdate: - type: object - properties: - x: - type: integer - format: int32 - 'y': - type: integer - format: int32 - w: - type: integer - format: int32 - h: - type: integer - format: int32 - CreateCell: - type: object - properties: - name: - type: string - x: - type: integer - format: int32 - 'y': - type: integer - format: int32 - w: - type: integer - format: int32 - h: - type: integer - format: int32 - usingView: - type: string - description: Makes a copy of the provided view. - AnalyzeQueryResponse: - type: object - properties: - errors: - type: array - items: - type: object - properties: - line: - type: integer - column: - type: integer - character: - type: integer - message: - type: string - CellWithViewProperties: - type: object - allOf: - - $ref: '#/components/schemas/Cell' - - type: object - properties: - name: - type: string - properties: - $ref: '#/components/schemas/ViewProperties' - Cell: - type: object - properties: - id: - type: string - links: - type: object - properties: - self: - type: string - view: - type: string - x: - type: integer - format: int32 - 'y': - type: integer - format: int32 - w: - type: integer - format: int32 - h: - type: integer - format: int32 - viewID: - type: string - description: The reference to a view from the views API. - CellsWithViewProperties: - type: array - items: - $ref: '#/components/schemas/CellWithViewProperties' - Cells: - type: array - items: - $ref: '#/components/schemas/Cell' - Secrets: - additionalProperties: - type: string - example: - apikey: abc123xyz - SecretKeys: - type: object - properties: - secrets: - type: array - items: - type: string - SecretKeysResponse: - allOf: - - $ref: '#/components/schemas/SecretKeys' - - type: object - properties: - links: - readOnly: true - type: object - properties: - self: - type: string - org: - type: string - CreateDashboardRequest: - properties: - orgID: - type: string - description: The ID of the organization that owns the dashboard. - name: - type: string - description: The user-facing name of the dashboard. - description: - type: string - description: The user-facing description of the dashboard. - required: - - orgID - - name - DashboardWithViewProperties: - type: object - allOf: - - $ref: '#/components/schemas/CreateDashboardRequest' - - type: object - properties: - links: - type: object - example: - self: /api/v2/dashboards/1 - cells: /api/v2/dashboards/1/cells - owners: /api/v2/dashboards/1/owners - members: /api/v2/dashboards/1/members - labels: /api/v2/dashboards/1/labels - org: /api/v2/labels/1 - properties: - self: - $ref: '#/components/schemas/Link' - cells: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - org: - $ref: '#/components/schemas/Link' - id: - readOnly: true - type: string - meta: - type: object - properties: - createdAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - cells: - $ref: '#/components/schemas/CellsWithViewProperties' - labels: - $ref: '#/components/schemas/Labels' - Dashboard: - type: object - allOf: - - $ref: '#/components/schemas/CreateDashboardRequest' - - type: object - properties: - links: - type: object - example: - self: /api/v2/dashboards/1 - cells: /api/v2/dashboards/1/cells - owners: /api/v2/dashboards/1/owners - members: /api/v2/dashboards/1/members - labels: /api/v2/dashboards/1/labels - org: /api/v2/labels/1 - properties: - self: - $ref: '#/components/schemas/Link' - cells: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - org: - $ref: '#/components/schemas/Link' - id: - readOnly: true - type: string - meta: - type: object - properties: - createdAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - cells: - $ref: '#/components/schemas/Cells' - labels: - $ref: '#/components/schemas/Labels' - Dashboards: - type: object - properties: - links: - $ref: '#/components/schemas/Links' - dashboards: - type: array - items: - $ref: '#/components/schemas/Dashboard' - DocumentMeta: - type: object - properties: - name: - type: string - type: - type: string - templateID: - type: string - description: - type: string - version: - type: string - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - required: - - name - - version - Document: - type: object - properties: - id: - type: string - readOnly: true - meta: - $ref: '#/components/schemas/DocumentMeta' - content: - type: object - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/documents/templates/1 - properties: - self: - description: The document URL. - $ref: '#/components/schemas/Link' - required: - - id - - meta - - content - DocumentCreate: - type: object - properties: - meta: - $ref: '#/components/schemas/DocumentMeta' - content: - type: object - org: - type: string - description: The organization Name. Specify either `orgID` or `org`. - orgID: - type: string - description: The organization Name. Specify either `orgID` or `org`. - labels: - type: array - description: An array of label IDs to be added as labels to the document. - items: - type: string - required: - - meta - - content - DocumentUpdate: - type: object - properties: - meta: - $ref: '#/components/schemas/DocumentMeta' - content: - type: object - DocumentListEntry: - type: object - properties: - id: - type: string - readOnly: true - meta: - $ref: '#/components/schemas/DocumentMeta' - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/documents/templates/1 - properties: - self: - description: The document URL. - $ref: '#/components/schemas/Link' - required: - - id - - meta - Documents: - type: object - properties: - documents: - type: array - items: - $ref: '#/components/schemas/DocumentListEntry' - TelegrafRequest: - type: object - properties: - name: - type: string - description: - type: string - metadata: - type: object - properties: - buckets: - type: array - items: - type: string - config: - type: string - orgID: - type: string - Telegraf: - type: object - allOf: - - $ref: '#/components/schemas/TelegrafRequest' - - type: object - properties: - id: - type: string - readOnly: true - links: - type: object - readOnly: true - example: - self: /api/v2/telegrafs/1 - lables: /api/v2/telegrafs/1/labels - owners: /api/v2/telegrafs/1/owners - members: /api/v2/telegrafs/1/members - properties: - self: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - labels: - readOnly: true - $ref: '#/components/schemas/Labels' - Telegrafs: - type: object - properties: - configurations: - type: array - items: - $ref: '#/components/schemas/Telegraf' - TelegrafPlugin: - type: object - properties: - type: - type: string - name: - type: string - description: - type: string - config: - type: string - TelegrafPlugins: - type: object - properties: - version: - type: string - os: - type: string - plugins: - type: array - items: - $ref: '#/components/schemas/TelegrafPlugin' - IsOnboarding: - type: object - properties: - allowed: - description: True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. - type: boolean - PasswordResetBody: - properties: - password: - type: string - required: - - password - AddResourceMemberRequestBody: - type: object - properties: - id: - type: string - name: - type: string - required: - - id - Ready: - type: object - properties: - status: - type: string - enum: - - ready - started: - type: string - format: date-time - example: '2019-03-13T10:09:33.891196-04:00' - up: - type: string - example: 14m45.911966424s - HealthCheck: - type: object - required: - - name - - status - properties: - name: - type: string - message: - type: string - checks: - type: array - items: - $ref: '#/components/schemas/HealthCheck' - status: - type: string - enum: - - pass - - fail - version: - type: string - commit: - type: string - Labels: - type: array - items: - $ref: '#/components/schemas/Label' - Label: - type: object - properties: - id: - readOnly: true - type: string - orgID: - readOnly: true - type: string - name: - type: string - properties: - 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. - example: - color: ffb3b3 - description: this is a description - LabelCreateRequest: - type: object - required: - - orgID - - name - properties: - orgID: - type: string - name: - type: string - properties: - 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. - example: - color: ffb3b3 - description: this is a description - LabelUpdate: - type: object - properties: - name: - type: string - properties: - 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. - example: - color: ffb3b3 - description: this is a description - LabelMapping: - type: object - properties: - labelID: - type: string - LabelsResponse: - type: object - properties: - labels: - $ref: '#/components/schemas/Labels' - links: - $ref: '#/components/schemas/Links' - LabelResponse: - type: object - properties: - label: - $ref: '#/components/schemas/Label' - links: - $ref: '#/components/schemas/Links' - ASTResponse: - description: Contains the AST for the supplied Flux query - type: object - properties: - ast: - $ref: '#/components/schemas/Package' - WritePrecision: - type: string - enum: - - ms - - s - - us - - ns - TaskCreateRequest: - type: object - properties: - orgID: - description: The ID of the organization that owns this Task. - type: string - org: - description: The name of the organization that owns this Task. - type: string - status: - $ref: '#/components/schemas/TaskStatusType' - flux: - description: The Flux script to run for this task. - type: string - description: - description: An optional description of the task. - type: string - required: - - flux - TaskUpdateRequest: - type: object - properties: - status: - $ref: '#/components/schemas/TaskStatusType' - flux: - description: The Flux script to run for this task. - type: string - name: - description: Override the 'name' option in the flux script. - type: string - every: - description: Override the 'every' option in the flux script. - type: string - cron: - description: Override the 'cron' option in the flux script. - type: string - offset: - description: Override the 'offset' option in the flux script. - type: string - description: - description: An optional description of the task. - type: string - FluxResponse: - description: Rendered flux that backs the check or notification. - properties: - flux: - type: string - CheckPatch: - type: object - properties: - name: - type: string - description: - type: string - status: - type: string - enum: - - active - - inactive - CheckDiscriminator: - oneOf: - - $ref: '#/components/schemas/DeadmanCheck' - - $ref: '#/components/schemas/ThresholdCheck' - - $ref: '#/components/schemas/CustomCheck' - discriminator: - propertyName: type - mapping: - deadman: '#/components/schemas/DeadmanCheck' - threshold: '#/components/schemas/ThresholdCheck' - custom: '#/components/schemas/CustomCheck' - Check: - allOf: - - $ref: '#/components/schemas/CheckDiscriminator' - PostCheck: - allOf: - - $ref: '#/components/schemas/CheckDiscriminator' - Checks: - properties: - checks: - type: array - items: - $ref: '#/components/schemas/Check' - links: - $ref: '#/components/schemas/Links' - CheckBase: - properties: - id: - readOnly: true - type: string - name: - type: string - orgID: - description: The ID of the organization that owns this check. - type: string - taskID: - description: The ID of the task associated with this check. - type: string - ownerID: - description: The ID of creator used to create this check. - type: string - readOnly: true - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - query: - $ref: '#/components/schemas/DashboardQuery' - status: - $ref: '#/components/schemas/TaskStatusType' - description: - description: An optional description of the check. - type: string - latestCompleted: - description: 'Timestamp of latest scheduled, completed run, RFC3339.' - type: string - format: date-time - readOnly: true - lastRunStatus: - readOnly: true - type: string - enum: - - failed - - success - - canceled - lastRunError: - readOnly: true - type: string - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/checks/1 - labels: /api/v2/checks/1/labels - members: /api/v2/checks/1/members - owners: /api/v2/checks/1/owners - query: /api/v2/checks/1/query - properties: - self: - description: URL for this check - $ref: '#/components/schemas/Link' - labels: - description: URL to retrieve labels for this check - $ref: '#/components/schemas/Link' - members: - description: URL to retrieve members for this check - $ref: '#/components/schemas/Link' - owners: - description: URL to retrieve owners for this check - $ref: '#/components/schemas/Link' - query: - description: URL to retrieve flux script for this check - $ref: '#/components/schemas/Link' - required: - - name - - orgID - - query - ThresholdCheck: - allOf: - - $ref: '#/components/schemas/CheckBase' - - type: object - required: - - type - properties: - type: - type: string - enum: - - threshold - thresholds: - type: array - items: - $ref: '#/components/schemas/Threshold' - every: - description: Check repetition interval. - type: string - offset: - description: 'Duration to delay after the schedule, before executing check.' - type: string - tags: - description: List of tags to write to each status. - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - statusMessageTemplate: - description: The template used to generate and write a status message. - type: string Threshold: - oneOf: - - $ref: '#/components/schemas/GreaterThreshold' - - $ref: '#/components/schemas/LesserThreshold' - - $ref: '#/components/schemas/RangeThreshold' discriminator: - propertyName: type mapping: greater: '#/components/schemas/GreaterThreshold' lesser: '#/components/schemas/LesserThreshold' range: '#/components/schemas/RangeThreshold' - DeadmanCheck: - allOf: - - $ref: '#/components/schemas/CheckBase' - - type: object - required: - - type - properties: - type: - type: string - enum: - - deadman - timeSince: - 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. - type: string - reportZero: - description: 'If only zero values reported since time, trigger an alert' - type: boolean - level: - $ref: '#/components/schemas/CheckStatusLevel' - every: - description: Check repetition interval. - type: string - offset: - description: 'Duration to delay after the schedule, before executing check.' - type: string - tags: - description: List of tags to write to each status. - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - statusMessageTemplate: - description: The template used to generate and write a status message. - type: string - CustomCheck: - allOf: - - $ref: '#/components/schemas/CheckBase' - - type: object - properties: - type: - type: string - enum: - - custom - required: - - type + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreaterThreshold' + - $ref: '#/components/schemas/LesserThreshold' + - $ref: '#/components/schemas/RangeThreshold' ThresholdBase: properties: + allValues: + description: If true, only alert if all values meet threshold. + type: boolean level: $ref: '#/components/schemas/CheckStatusLevel' - allValues: - description: 'If true, only alert if all values meet threshold.' - type: boolean - GreaterThreshold: + ThresholdCheck: allOf: - - $ref: '#/components/schemas/ThresholdBase' - - type: object - required: - - type - - value - properties: - type: - type: string - enum: - - greater - value: - type: number - format: float - LesserThreshold: - allOf: - - $ref: '#/components/schemas/ThresholdBase' - - type: object - required: - - type - - value - properties: - type: - type: string - enum: - - lesser - value: - type: number - format: float - RangeThreshold: - allOf: - - $ref: '#/components/schemas/ThresholdBase' - - type: object - required: - - type - - min - - max - - within - properties: - type: - type: string - enum: - - range - min: - type: number - format: float - max: - type: number - format: float - within: - type: boolean - CheckStatusLevel: - description: The state to record if check matches a criteria. - type: string - enum: - - UNKNOWN - - OK - - INFO - - CRIT - - WARN - RuleStatusLevel: - description: The state to record if check matches a criteria. - type: string - enum: - - UNKNOWN - - OK - - INFO - - CRIT - - WARN - - ANY - NotificationRuleUpdate: + - $ref: '#/components/schemas/CheckBase' + - properties: + every: + description: Check repetition interval. + type: string + offset: + description: Duration to delay after the schedule, before executing check. + type: string + statusMessageTemplate: + description: The template used to generate and write a status message. + type: string + tags: + description: List of tags to write to each status. + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + thresholds: + items: + $ref: '#/components/schemas/Threshold' + type: array + type: + enum: + - threshold + type: string + required: + - type + type: object + Token: + properties: + token: + type: string type: object + UnaryExpression: + description: Uses operators to act on a single operand in an expression properties: - name: - type: string - description: - type: string - status: - type: string - enum: - - active - - inactive - NotificationRuleDiscriminator: - oneOf: - - $ref: '#/components/schemas/SlackNotificationRule' - - $ref: '#/components/schemas/SMTPNotificationRule' - - $ref: '#/components/schemas/PagerDutyNotificationRule' - - $ref: '#/components/schemas/HTTPNotificationRule' - - $ref: '#/components/schemas/TelegramNotificationRule' - discriminator: - propertyName: type - mapping: - slack: '#/components/schemas/SlackNotificationRule' - smtp: '#/components/schemas/SMTPNotificationRule' - pagerduty: '#/components/schemas/PagerDutyNotificationRule' - http: '#/components/schemas/HTTPNotificationRule' - telegram: '#/components/schemas/TelegramNotificationRule' - NotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleDiscriminator' - PostNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleDiscriminator' - NotificationRules: - properties: - notificationRules: - type: array - items: - $ref: '#/components/schemas/NotificationRule' - links: - $ref: '#/components/schemas/Links' - NotificationRuleBase: - type: object - required: - - orgID - - status - - name - - statusRules - - endpointID - properties: - latestCompleted: - description: 'Timestamp of latest scheduled, completed run, RFC3339.' - type: string - format: date-time - readOnly: true - lastRunStatus: - readOnly: true - type: string - enum: - - failed - - success - - canceled - lastRunError: - readOnly: true - type: string - id: - readOnly: true - type: string - endpointID: - type: string - orgID: - description: The ID of the organization that owns this notification rule. - type: string - taskID: - description: The ID of the task associated with this notification rule. - type: string - ownerID: - description: The ID of creator used to create this notification rule. - type: string - readOnly: true - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - status: - $ref: '#/components/schemas/TaskStatusType' - name: - description: Human-readable name describing the notification rule. - type: string - sleepUntil: - type: string - every: - description: The notification repetition interval. - type: string - offset: - description: 'Duration to delay after the schedule, before executing check.' - type: string - runbookLink: - type: string - limitEvery: - 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.' - type: integer - tagRules: - description: List of tag rules the notification rule attempts to match. - type: array - items: - $ref: '#/components/schemas/TagRule' - description: - description: An optional description of the notification rule. - type: string - statusRules: - description: List of status rules the notification rule attempts to match. - type: array - minItems: 1 - items: - $ref: '#/components/schemas/StatusRule' - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/notificationRules/1 - labels: /api/v2/notificationRules/1/labels - members: /api/v2/notificationRules/1/members - owners: /api/v2/notificationRules/1/owners - query: /api/v2/notificationRules/1/query - properties: - self: - description: URL for this endpoint. - $ref: '#/components/schemas/Link' - labels: - description: URL to retrieve labels for this notification rule. - $ref: '#/components/schemas/Link' - members: - description: URL to retrieve members for this notification rule. - $ref: '#/components/schemas/Link' - owners: - description: URL to retrieve owners for this notification rule. - $ref: '#/components/schemas/Link' - query: - description: URL to retrieve flux script for this notification rule. - $ref: '#/components/schemas/Link' - TagRule: - type: object - properties: - key: - type: string - value: - type: string + argument: + $ref: '#/components/schemas/Expression' operator: type: string - enum: - - equal - - notequal - - equalregex - - notequalregex - StatusRule: + type: + $ref: '#/components/schemas/NodeType' type: object + UnauthorizedRequestError: properties: - currentLevel: - $ref: '#/components/schemas/RuleStatusLevel' - previousLevel: - $ref: '#/components/schemas/RuleStatusLevel' - count: - type: integer - period: + code: + description: returns error code 401 + enum: + - unauthorized + readOnly: true type: string - HTTPNotificationRuleBase: - type: object - required: - - type + message: + description: message is a human-readable message. + readOnly: true + type: string + UnsignedIntegerLiteral: + description: Represents integer numbers properties: type: + $ref: '#/components/schemas/NodeType' + value: type: string - enum: - - http - url: - type: string - HTTPNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/HTTPNotificationRuleBase' - SlackNotificationRuleBase: type: object - required: - - type - - messageTemplate - properties: - type: - type: string - enum: - - slack - channel: - type: string - messageTemplate: - type: string - SlackNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/SlackNotificationRuleBase' - SMTPNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/SMTPNotificationRuleBase' - SMTPNotificationRuleBase: - type: object - required: - - type - - subjectTemplate - - to - properties: - type: - type: string - enum: - - smtp - subjectTemplate: - type: string - bodyTemplate: - type: string - to: - type: string - PagerDutyNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/PagerDutyNotificationRuleBase' - PagerDutyNotificationRuleBase: - type: object - required: - - type - - messageTemplate - properties: - type: - type: string - enum: - - pagerduty - messageTemplate: - type: string - TelegramNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/TelegramNotificationRuleBase' - TelegramNotificationRuleBase: - type: object - required: - - type - - messageTemplate - - channel - properties: - type: - description: The discriminator between other types of notification rules is "telegram". - type: string - enum: - - telegram - messageTemplate: - 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" .' - type: string - enum: - - MarkdownV2 - - HTML - - Markdown - disableWebPagePreview: - description: Disables preview of web links in the sent messages when "true". Defaults to "false" . - type: boolean - NotificationEndpointUpdate: - type: object - properties: - name: - type: string - description: - type: string - status: - type: string - enum: - - active - - inactive - NotificationEndpointDiscriminator: - oneOf: - - $ref: '#/components/schemas/SlackNotificationEndpoint' - - $ref: '#/components/schemas/PagerDutyNotificationEndpoint' - - $ref: '#/components/schemas/HTTPNotificationEndpoint' - - $ref: '#/components/schemas/TelegramNotificationEndpoint' - discriminator: - propertyName: type - mapping: - slack: '#/components/schemas/SlackNotificationEndpoint' - pagerduty: '#/components/schemas/PagerDutyNotificationEndpoint' - http: '#/components/schemas/HTTPNotificationEndpoint' - telegram: '#/components/schemas/TelegramNotificationEndpoint' - NotificationEndpoint: - allOf: - - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - PostNotificationEndpoint: - allOf: - - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - NotificationEndpoints: - properties: - notificationEndpoints: - type: array - items: - $ref: '#/components/schemas/NotificationEndpoint' - links: - $ref: '#/components/schemas/Links' - NotificationEndpointBase: - type: object - required: - - type - - name - properties: - id: - type: string - orgID: - type: string - userID: - type: string - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - description: - description: An optional description of the notification endpoint. - type: string - name: - type: string - status: - description: The status of the endpoint. - default: active - type: string - enum: - - active - - inactive - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/notificationEndpoints/1 - labels: /api/v2/notificationEndpoints/1/labels - members: /api/v2/notificationEndpoints/1/members - owners: /api/v2/notificationEndpoints/1/owners - properties: - self: - description: URL for this endpoint. - $ref: '#/components/schemas/Link' - labels: - description: URL to retrieve labels for this endpoint. - $ref: '#/components/schemas/Link' - members: - description: URL to retrieve members for this endpoint. - $ref: '#/components/schemas/Link' - owners: - description: URL to retrieve owners for this endpoint. - $ref: '#/components/schemas/Link' - type: - $ref: '#/components/schemas/NotificationEndpointType' - SlackNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - properties: - url: - 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`. - type: string - PagerDutyNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - required: - - routingKey - properties: - clientURL: - type: string - routingKey: - type: string - HTTPNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - required: - - url - - authMethod - - method - properties: - url: - type: string - username: - type: string - password: - type: string - token: - type: string - method: - type: string - enum: - - POST - - GET - - PUT - authMethod: - type: string - enum: - - none - - basic - - bearer - contentTemplate: - type: string - headers: - type: object - description: Customized headers. - additionalProperties: - type: string - TelegramNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - required: - - token - - channel - properties: - token: - 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 .' - type: string - NotificationEndpointType: - type: string - enum: - - slack - - pagerduty - - http - - telegram - DBRP: - type: object - properties: - id: - 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. - org: - type: string - description: the organization 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. - required: - - bucketID - - database - - retention_policy - DBRPGet: - type: object - properties: - content: - $ref: '#/components/schemas/DBRP' - required: true - SchemaType: - type: string - enum: - - implicit - - explicit - DemoDataBucket: - properties: - links: - type: object - readOnly: true - example: - labels: /api/v2/buckets/1/labels - members: /api/v2/buckets/1/members - org: /api/v2/orgs/2 - owners: /api/v2/buckets/1/owners - self: /api/v2/buckets/1 - write: /api/v2/write?org=2&bucket=1 - properties: - labels: - description: URL to retrieve labels for this bucket - $ref: '#/components/schemas/Link' - members: - description: URL to retrieve members that can read this bucket - $ref: '#/components/schemas/Link' - org: - description: URL to retrieve parent organization for this bucket - $ref: '#/components/schemas/Link' - owners: - description: URL to retrieve owners that can read and write to this bucket. - $ref: '#/components/schemas/Link' - self: - description: URL for this bucket - $ref: '#/components/schemas/Link' - write: - description: URL to write line protocol for this bucket - $ref: '#/components/schemas/Link' - id: - readOnly: true - type: string - type: - readOnly: true - type: string - default: demodata - name: - type: string - description: - type: string - orgID: - type: string - rp: - type: string - schemaType: - $ref: '#/components/schemas/SchemaType' - default: implicit - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - retentionRules: - $ref: '#/components/schemas/RetentionRules' - labels: - $ref: '#/components/schemas/Labels' - required: - - name - - retentionRules - DemoDataBuckets: - type: object - properties: - links: - readOnly: true - $ref: '#/components/schemas/Links' - buckets: - type: array - items: - $ref: '#/components/schemas/DemoDataBucket' - Resource: - type: object - required: - - type - properties: - type: - type: string - enum: - - authorizations - - buckets - - dashboards - - orgs - - tasks - - telegrafs - - users - - variables - - secrets - - labels - - views - - documents - - notificationRules - - notificationEndpoints - - checks - - dbrp - - flows - - annotations - - functions - 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. - 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. - org: - type: string - nullable: true - description: Optional name of the organization of the organization with orgID. - Permission: - required: - - action - - resource - properties: - action: - type: string - enum: - - read - - write - resource: - $ref: '#/components/schemas/Resource' - Authorization: - required: - - orgID - - permissions - allOf: - - $ref: '#/components/schemas/AuthorizationUpdateRequest' - - type: object - properties: - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - orgID: - type: string - description: ID of org that authorization is scoped to. - 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' - id: - readOnly: true - type: string - token: - readOnly: true - type: string - description: Passed via the Authorization Header and Token Authentication type. - userID: - readOnly: true - type: string - description: ID of user that created and owns the token. - user: - readOnly: true - type: string - description: Name of user that created and owns the token. - org: - readOnly: true - type: string - description: Name of the org token is scoped to. - links: - type: object - readOnly: true - example: - self: /api/v2/authorizations/1 - user: /api/v2/users/12 - properties: - self: - readOnly: true - $ref: '#/components/schemas/Link' - user: - readOnly: true - $ref: '#/components/schemas/Link' - Authorizations: - type: object - properties: - links: - readOnly: true - $ref: '#/components/schemas/Links' - authorizations: - type: array - items: - $ref: '#/components/schemas/Authorization' User: properties: id: readOnly: true type: string - oauthID: - type: string name: type: string - status: - description: If inactive the user is inactive. - default: active + oauthID: type: string - enum: - - active - - inactive - role: - type: string - enum: - - owner - - member org_id: type: string + role: + enum: + - owner + - member + type: string + status: + default: active + description: If inactive the user is inactive. + enum: + - active + - inactive + type: string required: - - name - Users: - type: object + - name + UserResponse: properties: - links: - type: object - properties: - self: - type: string - format: uri - users: - type: array - items: - $ref: '#/components/schemas/UserResponse' - OnboardingRequest: - type: object - properties: - username: - type: string - password: - type: string - org: - type: string - bucket: - type: string - retentionPeriodHrs: - type: integer - deprecated: true - retentionPeriodSeconds: - type: integer - limit: - $ref: '#/components/schemas/Limit' - required: - - username - - org - - bucket - OnboardingResponse: - type: object - properties: - user: - $ref: '#/components/schemas/UserResponse' - org: - $ref: '#/components/schemas/Organization' - bucket: - $ref: '#/components/schemas/Bucket' - auth: - $ref: '#/components/schemas/Authorization' - Limit: - type: object - description: These are org limits similar to those configured in/by quartz. - properties: - orgID: - type: string - rate: - type: object - properties: - readKBs: - type: integer - description: Query limit in kb/sec. 0 is unlimited. - concurrentReadRequests: - type: integer - description: Allowed concurrent queries. 0 is unlimited. - writeKBs: - type: integer - description: Write limit in kb/sec. 0 is unlimited. - concurrentWriteRequests: - type: integer - description: Allowed concurrent writes. 0 is unlimited. - 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 - - writeKBs - - concurrentWriteRequests - - cardinality - bucket: - type: object - properties: - maxBuckets: - type: integer - maxRetentionDuration: - type: integer - description: Max bucket retention duration in nanoseconds. 0 is unlimited. - required: - - maxBuckets - - maxRetentionDuration - task: - type: object - properties: - maxTasks: - type: integer - required: - - maxTasks - dashboard: - type: object - properties: - maxDashboards: - type: integer - required: - - maxDashboards - check: - type: object - properties: - maxChecks: - type: integer - required: - - maxChecks - notificationRule: - type: object - properties: - maxNotifications: - type: integer - blockedNotificationRules: - type: string - description: comma separated list of notification rules - example: 'http,pagerduty' - required: - - maxNotifications - - blockNotificationRules - notificationEndpoint: - type: object - properties: - blockedNotificationEndpoints: - type: string - description: comma separated list of notification endpoints - example: 'http,pagerduty' - required: - - blockNotificationEndpoints - features: - type: object - properties: - allowDelete: - type: boolean - description: allow delete predicate endpoint - required: - - rate - - bucket - - task - - dashboard - - check - - notificationRule - - notificationEndpoint - Variable: - type: object - required: - - name - - orgID - - arguments - properties: - links: - type: object - readOnly: true - properties: - self: - type: string - format: uri - org: - type: string - format: uri - labels: - type: string - format: uri id: readOnly: true type: string - orgID: - type: string + links: + example: + self: /api/v2/users/1 + properties: + self: + format: uri + type: string + readOnly: true + type: object name: type: string - description: + oauthID: type: string - selected: - type: array + status: + default: active + description: If inactive the user is inactive. + enum: + - active + - inactive + type: string + required: + - name + Users: + properties: + links: + properties: + self: + format: uri + type: string + type: object + users: items: - type: string - sort_order: - type: integer - labels: - $ref: '#/components/schemas/Labels' + $ref: '#/components/schemas/UserResponse' + type: array + type: object + Variable: + properties: arguments: $ref: '#/components/schemas/VariableProperties' createdAt: - type: string format: date-time - updatedAt: type: string - format: date-time - Variables: - type: object - example: - variables: - - id: '1221432' - name: ':ok:' - selected: - - hello - arguments: - type: constant - values: - - howdy - - hello - - hi - - yo - - oy - - id: '1221432' - name: ':ok:' - selected: - - c - arguments: - type: map - values: - a: fdjaklfdjkldsfjlkjdsa - b: dfaksjfkljekfajekdljfas - c: fdjksajfdkfeawfeea - - id: '1221432' - name: ':ok:' - selected: - - host - arguments: - type: query - query: 'from(bucket: "foo") |> showMeasurements()' - language: flux - properties: - variables: - type: array - items: - $ref: '#/components/schemas/Variable' - ColumnDataType: - type: string - enum: - - integer - - float - - boolean - - string - - unsigned - ColumnSemanticType: - type: string - nullable: false - enum: - - timestamp - - tag - - field - MeasurementSchema: - description: The schema definition for a single measurement - type: object - example: - id: 1a3c5e7f9b0a8642 - orgID: 0a3c5e7f9b0a0001 - bucketID: ba3c5e7f9b0a0010 - name: cpu - columns: - - name: time - type: timestamp - - name: host - type: tag - - name: region - type: tag - - name: usage_user - type: field - dataType: float - - name: usage_user - type: field - dataType: float - createdAt: '2021-01-21T00:48:40.993Z' - updatedAt: '2021-01-21T00:48:40.993Z' - required: - - id - - name - - columns - - createdAt - - updatedAt - properties: + description: + type: string id: - type: string readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + properties: + labels: + format: uri + type: string + org: + format: uri + type: string + self: + format: uri + type: string + readOnly: true + type: object + name: + type: string orgID: type: string - description: ID of organization that the measurement schema is associated with. - bucketID: - type: string - description: ID of the bucket that the measurement schema is associated with. - name: - type: string - nullable: false - columns: - description: An ordered collection of column definitions - type: array + selected: items: - $ref: '#/components/schemas/MeasurementSchemaColumn' - createdAt: - type: string - format: date-time - readOnly: true + type: string + type: array + sort_order: + type: integer updatedAt: - type: string format: date-time - readOnly: true - MeasurementSchemaColumn: - description: Definition of a measurement column - example: - name: time - type: timestamp - type: object + type: string required: - - name - - type + - name + - orgID + - arguments + type: object + VariableAssignment: + description: Represents the declaration of a variable properties: + id: + $ref: '#/components/schemas/Identifier' + init: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + VariableProperties: + oneOf: + - $ref: '#/components/schemas/QueryVariableProperties' + - $ref: '#/components/schemas/ConstantVariableProperties' + - $ref: '#/components/schemas/MapVariableProperties' + type: object + Variables: + example: + variables: + - arguments: + type: constant + values: + - howdy + - hello + - hi + - yo + - oy + id: "1221432" + name: ':ok:' + selected: + - hello + - arguments: + type: map + values: + a: fdjaklfdjkldsfjlkjdsa + b: dfaksjfkljekfajekdljfas + c: fdjksajfdkfeawfeea + id: "1221432" + name: ':ok:' + selected: + - c + - arguments: + language: flux + query: 'from(bucket: "foo") |> showMeasurements()' + type: query + id: "1221432" + name: ':ok:' + selected: + - host + properties: + variables: + items: + $ref: '#/components/schemas/Variable' + type: array + type: object + View: + properties: + id: + readOnly: true + type: string + links: + properties: + self: + type: string + readOnly: true + type: object name: type: string + properties: + $ref: '#/components/schemas/ViewProperties' + required: + - name + - properties + ViewProperties: + oneOf: + - $ref: '#/components/schemas/LinePlusSingleStatProperties' + - $ref: '#/components/schemas/XYViewProperties' + - $ref: '#/components/schemas/SingleStatViewProperties' + - $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' + - $ref: '#/components/schemas/HeatmapViewProperties' + - $ref: '#/components/schemas/MosaicViewProperties' + - $ref: '#/components/schemas/BandViewProperties' + - $ref: '#/components/schemas/GeoViewProperties' + Views: + properties: + links: + properties: + self: + type: string + type: object + views: + items: + $ref: '#/components/schemas/View' + type: array + type: object + WritePrecision: + enum: + - ms + - s + - us + - ns + type: string + XYGeom: + enum: + - line + - step + - stacked + - bar + - monotoneX + type: string + XYViewProperties: + properties: + axes: + $ref: '#/components/schemas/Axes' + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + geom: + $ref: '#/components/schemas/XYGeom' + hoverDimension: + enum: + - auto + - x + - "y" + - xy + type: string + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + position: + enum: + - overlaid + - stacked + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shadeBelow: + type: boolean + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + timeFormat: + type: string type: - $ref: '#/components/schemas/ColumnSemanticType' - dataType: - $ref: '#/components/schemas/ColumnDataType' - MeasurementSchemaCreateRequest: - description: Create a new measurement schema - type: object - example: - name: cpu - columns: - - name: time - type: timestamp - - name: host - type: tag - - name: region - type: tag - - name: usage_user - type: field - dataType: float - - name: usage_user - type: field - dataType: float - required: - - name - - columns - properties: - name: + enum: + - xy type: string - columns: - description: An ordered collection of column definitions - type: array - items: - $ref: '#/components/schemas/MeasurementSchemaColumn' - MeasurementSchemaList: - description: A list of measurement schemas returning summary information - example: - measurementSchemas: - - id: 1a3c5e7f9b0a8642 - orgID: 0a3c5e7f9b0a0001 - bucketID: ba3c5e7f9b0a0010 - name: cpu - createdAt: '2021-01-21T00:48:40.993Z' - updatedAt: '2021-01-21T00:48:40.993Z' - - id: 1a3c5e7f9b0a8643 - orgID: 0a3c5e7f9b0a0001 - bucketID: ba3c5e7f9b0a0010 - name: memory - createdAt: '2021-01-21T00:48:40.993Z' - updatedAt: '2021-01-21T00:48:40.993Z' - - id: 1a3c5e7f9b0a8644 - orgID: 0a3c5e7f9b0a0001 - bucketID: ba3c5e7f9b0a0010 - name: disk - createdAt: '2021-01-21T00:48:40.993Z' - updatedAt: '2021-01-21T00:48:40.993Z' - type: object + xColumn: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yColumn: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer required: - - measurementSchemas - properties: - measurementSchemas: - type: array - items: - $ref: '#/components/schemas/MeasurementSchema' - MeasurementSchemaUpdateRequest: - description: Update an existing measurement schema + - type + - geom + - queries + - shape + - axes + - colors + - note + - showNoteWhenEmpty + - position type: object - example: - columns: - - name: time - type: timestamp - - name: host - type: tag - - name: region - type: tag - - name: usage_user - type: field - dataType: float - - name: usage_user - type: field - dataType: float - required: - - columns - properties: - columns: - description: An ordered collection of column definitions - type: array - items: - $ref: '#/components/schemas/MeasurementSchemaColumn' responses: + NoContent: + description: No content ServerError: - description: Non 2XX error response from server. content: application/json: schema: $ref: '#/components/schemas/Error' + description: Non 2XX error response from server. securitySchemes: TokenAuthentication: type: http diff --git a/api-docs/cloud/swaggerV1Compat.yml b/api-docs/cloud/swaggerV1Compat.yml index 0da0e97fb..d0ab5fd9d 100644 --- a/api-docs/cloud/swaggerV1Compat.yml +++ b/api-docs/cloud/swaggerV1Compat.yml @@ -1,4 +1,5 @@ -openapi: 3.0.0 +# this is a manually maintained file for these old routes until oats#15 is resolved +openapi: "3.0.0" info: title: Influx API Service (V1 compatible endpoints) version: 0.1.0 @@ -7,7 +8,7 @@ servers: description: V1 compatible api endpoints. paths: /write: - post: + post: # technically this functions with other methods as well operationId: PostWriteV1 tags: - Write @@ -20,17 +21,15 @@ 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: @@ -43,76 +42,54 @@ 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 @@ -121,9 +98,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" /query: - post: + post: # technically this functions with other methods as well operationId: PostQueryV1 tags: - Query @@ -131,21 +108,18 @@ paths: requestBody: description: InfluxQL query to execute. content: - text/plain: + text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter 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 @@ -154,15 +128,10 @@ 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 @@ -179,53 +148,42 @@ 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 @@ -234,7 +192,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" components: parameters: TraceSpan: @@ -242,8 +200,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 @@ -302,6 +260,7 @@ 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 @@ -318,9 +277,7 @@ components: readOnly: true description: Message is a human-readable message. type: string - required: - - code - - message + required: [code, message] LineProtocolError: properties: code: @@ -340,26 +297,18 @@ 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: @@ -377,7 +326,4 @@ 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/getswagger.sh b/api-docs/getswagger.sh index 8d658b95a..0a23ad8cc 100755 --- a/api-docs/getswagger.sh +++ b/api-docs/getswagger.sh @@ -89,12 +89,12 @@ function showArgs { function updateCloud { echo "Updating Cloud swagger..." - curl ${verbose} ${baseUrl}/contracts/cloud.yml -s -o cloud/swagger.yml + curl ${verbose} ${baseUrl}/contracts/ref/cloud.yml -s -o cloud/swagger.yml } function updateOSS { echo "Updating OSS ${ossVersion} swagger..." - mkdir -p ${ossVersion} && curl ${verbose} ${baseUrl}/contracts/oss.yml -s -o $_/swagger.yml + mkdir -p ${ossVersion} && curl ${verbose} ${baseUrl}/contracts/ref/oss.yml -s -o $_/swagger.yml } function updateV1Compat { diff --git a/api-docs/redoc-static.html b/api-docs/redoc-static.html deleted file mode 100644 index b62c578cf..000000000 --- a/api-docs/redoc-static.html +++ /dev/null @@ -1,2312 +0,0 @@ - - - - - - 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 ef7e62d9c..d71a78080 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -5,7 +5,7 @@ info: 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 +- url: "/" tags: - name: Authentication description: | @@ -35,8 +35,9 @@ tags: | `204` | No content | For a `POST` request, `204` indicates that InfluxDB accepted the request and request data is valid. Asynchronous operations, such as `write`, might not have completed yet. | | `400` | Bad request | `Authorization` header is missing or malformed or the API token does not have permission for the operation. | | `401` | Unauthorized | May indicate one of the following:
  • `Authorization: Token` header is missing or malformed
  • API token value is missing from the header
  • API token does not have permission. For more information about token types and permissions, see [Manage API tokens](https://docs.influxdata.com/influxdb/v2.0/security/tokens/)
  • | - | `404` | Not found | Requested resource was not found. `message` in the response body contains details about the requested resource. | + | `404` | Not found | Requested resource was not found. `message` in the response body provides details about the requested resource. | | `413` | Request entity too large | Request payload exceeds the size limit. | + | `422` | Unprocessible entity | Request data is invalid. `code` and `message` in the response body provide details about the problem. | | `429` | Too many requests | API token is temporarily over the request quota. The `Retry-After` header describes when to try the request again. | | `500` | Internal server error | | | `503` | Service unavailable | Server is temporarily unavailable to process the request. The `Retry-After` header describes when to try the request again. | @@ -64,6 +65,7 @@ x-tagGroups: - Buckets - Dashboards - Tasks + - Resources - name: Security and access endpoints tags: - Authorizations @@ -96,2132 +98,3650 @@ x-tagGroups: - Ready - RemoteConnections - Replications + - Resources - Restore - Routes - Rules + - Scraper Targets - Secrets - Setup - Signin - Signout - Sources - Tasks + - Telegraf Plugins - Telegrafs - Templates - Users - Variables - Write paths: - /signin: - post: - operationId: PostSignin - 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: - - BasicAuthentication: [] - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '204': - description: Success. User authenticated. - '401': - description: Unauthorized access. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: User account is disabled. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unsuccessful authentication. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /signout: - post: - operationId: PostSignout - summary: Expire the current UI session - tags: - - Signout - description: Expires the current UI session for the user. - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '204': - description: Session successfully expired - '401': - description: Unauthorized access - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unsuccessful session expiry - content: - 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. - /: + /api/v2/: get: operationId: GetRoutes - summary: List all top level routes - tags: - - Routes parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' responses: default: - description: All routes content: application/json: schema: $ref: '#/components/schemas/Routes' - /documents/templates: - get: - operationId: GetDocumentsTemplates + description: All routes + summary: List all top level routes tags: - - Templates - summary: List all templates + - Routes + /api/v2/authorizations: + get: + operationId: GetAuthorizations parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: Specifies the name of the organization of the template. - schema: - type: string - - in: query - name: orgID - description: Specifies the organization ID of the template. - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - description: Only show authorizations that belong to a user ID. + in: query + name: userID + schema: + type: string + - description: Only show authorizations that belong to a user name. + in: query + name: user + schema: + type: string + - description: Only show authorizations that belong to an organization ID. + in: query + name: orgID + schema: + type: string + - description: Only show authorizations that belong to a organization name. + in: query + name: org + schema: + type: string responses: - '200': - description: A list of template documents + "200": content: application/json: schema: - $ref: '#/components/schemas/Documents' + $ref: '#/components/schemas/Authorizations' + description: A list of authorizations default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + summary: List all authorizations + tags: + - Authorizations post: - operationId: PostDocumentsTemplates - tags: - - Templates - summary: Create a template + operationId: PostAuthorizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Template that will be created - required: true content: application/json: schema: - $ref: '#/components/schemas/DocumentCreate' - responses: - '201': - description: Template created - content: - application/json: - schema: - $ref: '#/components/schemas/Document' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/documents/templates/{templateID}': - get: - operationId: GetDocumentsTemplatesID - tags: - - Templates - summary: Retrieve a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - responses: - '200': - description: The template requested - content: - application/json: - schema: - $ref: '#/components/schemas/Document' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutDocumentsTemplatesID - tags: - - Templates - summary: Update a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - requestBody: - description: Template that will be updated + $ref: '#/components/schemas/AuthorizationPostRequest' + description: Authorization to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentUpdate' responses: - '200': - description: The newly updated template + "201": content: application/json: schema: - $ref: '#/components/schemas/Document' + $ref: '#/components/schemas/Authorization' + description: Authorization created + "400": + $ref: '#/components/responses/ServerError' + description: Invalid request default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + summary: Create an authorization + tags: + - Authorizations + /api/v2/authorizations/{authID}: delete: - operationId: DeleteDocumentsTemplatesID - tags: - - Templates - summary: Delete a template + operationId: DeleteAuthorizationsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - responses: - '204': - description: Delete has been accepted - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/documents/templates/{templateID}/labels': - get: - operationId: GetDocumentsTemplatesIDLabels - tags: - - Templates - summary: List all labels for a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - responses: - '200': - description: A list of all labels for a template - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostDocumentsTemplatesIDLabels - tags: - - Templates - summary: Add a label to a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the authorization to delete. + in: path + name: authID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' + schema: + type: string responses: - '201': - description: The label added to the template - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' + "204": + description: Authorization deleted default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/documents/templates/{templateID}/labels/{labelID}': - delete: - operationId: DeleteDocumentsTemplatesIDLabelsID + summary: Delete an authorization tags: - - Templates - summary: Delete a label from a template - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: templateID - schema: - type: string - required: true - description: The template ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. - responses: - '204': - description: Delete has been accepted - '404': - description: Template not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /dbrps: + - Authorizations get: - operationId: GetDBRPs - tags: - - DBRPs - summary: List database retention policy mappings + operationId: GetAuthorizationsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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 - schema: - type: string - - in: query - name: bucketID - description: Specifies the bucket ID to filter on - schema: - type: string - - in: query - name: default - description: Specifies filtering on default - schema: - type: boolean - - in: query - name: db - description: Specifies the database to filter on - schema: - type: string - - in: query - name: rp - description: Specifies the retention policy to filter on - schema: - type: string - responses: - '200': - description: Success. Returns a list of database retention policy mappings. - content: - application/json: - schema: - $ref: '#/components/schemas/DBRPs' - '400': - description: Bad request. The request has one or more invalid parameters. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostDBRP - tags: - - DBRPs - summary: Add a database retention policy mapping - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: The database retention policy mapping to add + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the authorization to get. + in: path + name: authID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DBRPCreate' + schema: + type: string responses: - '201': - description: Created. Returns the created database retention policy mapping. + "200": content: application/json: schema: - $ref: '#/components/schemas/DBRP' - '400': - description: Bad request. The mapping in the request has one or more invalid IDs. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/Authorization' + description: Authorization details default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dbrps/{dbrpID}': - get: - operationId: GetDBRPsID + summary: Retrieve an authorization tags: - - DBRPs - summary: Retrieve a database retention policy mapping - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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: - type: string - required: true - description: The database retention policy mapping ID - responses: - '200': - description: The database retention policy requested - content: - application/json: - schema: - $ref: '#/components/schemas/DBRPGet' - '400': - description: if any of the IDs passed is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - Authorizations patch: - operationId: PatchDBRPID - tags: - - DBRPs - summary: Update a database retention policy mapping - requestBody: - description: Database retention policy update to apply + operationId: PatchAuthorizationsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the authorization to update. + in: path + name: authID required: true + schema: + type: string + requestBody: content: application/json: schema: - $ref: '#/components/schemas/DBRPUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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: - type: string - required: true - description: The database retention policy mapping. - responses: - '200': - description: An updated mapping - content: - application/json: - schema: - $ref: '#/components/schemas/DBRPGet' - '400': - description: if any of the IDs passed is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: The mapping was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteDBRPID - tags: - - DBRPs - summary: Delete a database retention policy - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - 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: - type: string - required: true - description: The database retention policy mapping - responses: - '204': - description: Delete has been accepted - '400': - description: if any of the IDs passed is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /telegraf/plugins: - get: - operationId: GetTelegrafPlugins - tags: - - Telegraf Plugins - summary: List all Telegraf plugins - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: type - description: The type of plugin desired. - schema: - type: string - responses: - '200': - description: A list of Telegraf plugins. - content: - application/json: - schema: - $ref: '#/components/schemas/TelegrafPlugins' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /telegrafs: - get: - operationId: GetTelegrafs - tags: - - Telegrafs - summary: List all Telegraf configurations - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID the Telegraf config belongs to. - schema: - type: string - responses: - '200': - description: A list of Telegraf configurations - content: - application/json: - schema: - $ref: '#/components/schemas/Telegrafs' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTelegrafs - tags: - - Telegrafs - summary: Create a Telegraf configuration - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Telegraf configuration to create + $ref: '#/components/schemas/AuthorizationUpdateRequest' + description: Authorization to update required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TelegrafRequest' responses: - '201': - description: Telegraf configuration created + "200": content: application/json: schema: - $ref: '#/components/schemas/Telegraf' + $ref: '#/components/schemas/Authorization' + description: The active or inactive authorization default: + $ref: '#/components/responses/ServerError' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}': - get: - operationId: GetTelegrafsID + summary: Update an authorization to be active or inactive tags: - - Telegrafs - summary: Retrieve a Telegraf configuration + - Authorizations + /api/v2/backup/kv: + get: + deprecated: true + operationId: GetBackupKV parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. - - in: header - name: Accept - required: false - schema: - type: string - default: application/toml - enum: - - application/toml - - application/json - - application/octet-stream + - $ref: '#/components/parameters/TraceSpan' responses: - '200': - description: Telegraf configuration details + "200": content: - application/toml: - example: |- - [agent] - interval = "10s" - schema: - type: string - application/json: - schema: - $ref: '#/components/schemas/Telegraf' application/octet-stream: - example: |- - [agent] - interval = "10s" schema: + format: binary + type: string + description: Snapshot of KV metadata + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + 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. + tags: + - Backup + /api/v2/backup/metadata: + get: + operationId: GetBackupMetadata + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to understand. + in: header + name: Accept-Encoding + schema: + default: identity + description: Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + responses: + "200": + content: + multipart/mixed: + schema: + $ref: '#/components/schemas/MetadataBackup' + 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: + default: identity + description: Specifies that the response in the body is encoded with + gzip or not encoded with identity. + enum: + - gzip + - identity type: string default: + $ref: '#/components/responses/ServerError' description: Unexpected error + summary: Download snapshot of all metadata in the server + tags: + - Backup + /api/v2/backup/shards/{shardID}: + get: + operationId: GetBackupShardId + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to understand. + in: header + name: Accept-Encoding + schema: + default: identity + description: Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - description: The shard ID. + in: path + name: shardID + required: true + schema: + format: int64 + type: integer + - description: Earliest time to include in the snapshot. RFC3339 format. + in: query + name: since + schema: + format: date-time + type: string + responses: + "200": + content: + application/octet-stream: + schema: + format: binary + type: string + 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: + default: identity + description: Specifies that the response in the body is encoded with + gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + "404": content: application/json: schema: $ref: '#/components/schemas/Error' - put: - operationId: PutTelegrafsID + description: Shard not found. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Download snapshot of all TSM data in a shard tags: - - Telegrafs - summary: Update a Telegraf configuration + - Backup + /api/v2/buckets: + get: + operationId: GetBuckets parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/After' + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The organization ID. + in: query + name: orgID + schema: + type: string + - description: Only returns buckets with a specific name. + in: query + name: name + schema: + type: string + - description: Only returns buckets with a specific ID. + in: query + name: id + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Buckets' + description: A list of buckets + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all buckets + tags: + - Buckets + post: + operationId: PostBuckets + parameters: + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Telegraf configuration update to apply - required: true content: application/json: schema: - $ref: '#/components/schemas/TelegrafRequest' + $ref: '#/components/schemas/PostBucketRequest' + description: Bucket to create + required: true responses: - '200': - description: An updated Telegraf configurations + "201": content: application/json: schema: - $ref: '#/components/schemas/Telegraf' - default: - description: Unexpected error + $ref: '#/components/schemas/Bucket' + description: Bucket created + "422": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Request body failed validation + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a bucket + tags: + - Buckets + /api/v2/buckets/{bucketID}: delete: - operationId: DeleteTelegrafsID - tags: - - Telegrafs - summary: Delete a Telegraf configuration + operationId: DeleteBucketsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the bucket to delete. + in: path + name: bucketID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - default: - description: Unexpected error + "404": content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/labels': - get: - operationId: GetTelegrafsIDLabels + description: Bucket not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a bucket tags: - - Telegrafs - summary: List all labels for a Telegraf config + - Buckets + get: + operationId: GetBucketsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '200': - description: A list of all labels for a Telegraf config + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Bucket' + description: Bucket details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a bucket + tags: + - Buckets + patch: + operationId: PatchBucketsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchBucketRequest' + description: Bucket update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Bucket' + description: An updated bucket + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a bucket + tags: + - Buckets + /api/v2/buckets/{bucketID}/labels: + get: + operationId: GetBucketsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string + responses: + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a bucket default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostTelegrafsIDLabels + description: Unexpected error + summary: List all labels for a bucket tags: - - Telegrafs - summary: Add a label to a Telegraf config + - Buckets + post: + operationId: PostBucketsIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The label added to the Telegraf config + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The newly added label default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/labels/{labelID}': + description: Unexpected error + summary: Add a label to a bucket + tags: + - Buckets + /api/v2/buckets/{bucketID}/labels/{labelID}: delete: - operationId: DeleteTelegrafsIDLabelsID - tags: - - Telegrafs - summary: Delete a label from a Telegraf config + operationId: DeleteBucketsIDLabelsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': - description: Telegraf config not found + "404": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Bucket not found default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/members': - get: - operationId: GetTelegrafsIDMembers + description: Unexpected error + summary: Delete a label from a bucket tags: - - Telegrafs - summary: List all users with member privileges for a Telegraf config + - Buckets + /api/v2/buckets/{bucketID}/members: + get: + operationId: GetBucketsIDMembers parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '200': - description: A list of Telegraf config members + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceMembers' + description: A list of bucket members default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostTelegrafsIDMembers + description: Unexpected error + summary: List all users with member privileges for a bucket tags: - - Telegrafs - summary: Add a member to a Telegraf config + - Buckets + post: + operationId: PostBucketsIDMembers parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. - requestBody: - description: User to add as member + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true responses: - '201': - description: Member added to Telegraf config + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceMember' + description: Member added to bucket default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/members/{userID}': - delete: - operationId: DeleteTelegrafsIDMembersID + description: Unexpected error + summary: Add a member to a bucket tags: - - Telegrafs - summary: Remove a member from a Telegraf config + - Buckets + /api/v2/buckets/{bucketID}/members/{userID}: + delete: + operationId: DeleteBucketsIDMembersID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '204': + "204": description: Member removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/owners': - get: - operationId: GetTelegrafsIDOwners + description: Unexpected error + summary: Remove a member from a bucket tags: - - Telegrafs - summary: List all owners of a Telegraf configuration + - Buckets + /api/v2/buckets/{bucketID}/owners: + get: + operationId: GetBucketsIDOwners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '200': - description: Returns Telegraf configuration owners as a ResourceOwners list + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceOwners' + description: A list of bucket owners default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostTelegrafsIDOwners + description: Unexpected error + summary: List all owners of a bucket tags: - - Telegrafs - summary: Add an owner to a Telegraf configuration + - Buckets + post: + operationId: PostBucketsIDOwners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf configuration ID. - requestBody: - description: User to add as owner + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true responses: - '201': - description: Telegraf configuration owner was added. Returns a ResourceOwner that references the User. + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceOwner' + description: Bucket owner added default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/telegrafs/{telegrafID}/owners/{userID}': - delete: - operationId: DeleteTelegrafsIDOwnersID + description: Unexpected error + summary: Add an owner to a bucket tags: - - Telegrafs - summary: Remove an owner from a Telegraf config + - Buckets + /api/v2/buckets/{bucketID}/owners/{userID}: + delete: + operationId: DeleteBucketsIDOwnersID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: telegrafID - schema: - type: string - required: true - description: The Telegraf config ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string responses: - '204': + "204": description: Owner removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/variables/{variableID}/labels': - get: - operationId: GetVariablesIDLabels + description: Unexpected error + summary: Remove an owner from a bucket tags: - - Variables - summary: List all labels for a variable + - Buckets + /api/v2/checks: + get: + operationId: GetChecks parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - schema: - type: string - required: true - description: The variable ID. + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - description: Only show checks that belong to a specific organization ID. + in: query + name: orgID + required: true + schema: + type: string responses: - '200': - description: A list of all labels for a variable + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Checks' + description: A list of checks + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all checks + tags: + - Checks + post: + operationId: CreateCheck + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostCheck' + description: Check to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: Check created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add new check + tags: + - Checks + /api/v2/checks/{checkID}: + delete: + operationId: DeleteChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a check + tags: + - Checks + get: + operationId: GetChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: The check requested + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a check + tags: + - Checks + patch: + operationId: PatchChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CheckPatch' + description: Check update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: An updated check + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a check + tags: + - Checks + put: + operationId: PutChecksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: Check update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + description: An updated check + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a check + tags: + - Checks + /api/v2/checks/{checkID}/labels: + get: + operationId: GetChecksIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a check default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostVariablesIDLabels + description: Unexpected error + summary: List all labels for a check tags: - - Variables - summary: Add a label to a variable + - Checks + post: + operationId: PostChecksIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - schema: - type: string - required: true - description: The variable ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The newly added label + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The label was added to the check default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/variables/{variableID}/labels/{labelID}': + description: Unexpected error + summary: Add a label to a check + tags: + - Checks + /api/v2/checks/{checkID}/labels/{labelID}: delete: - operationId: DeleteVariablesIDLabelsID - tags: - - Variables - summary: Delete a label from a variable + operationId: DeleteChecksIDLabelsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - schema: - type: string - required: true - description: The variable ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': - description: Variable not found + "404": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Check or label not found default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /delete: + description: Unexpected error + summary: Delete label from a check + tags: + - Checks + /api/v2/checks/{checkID}/query: + get: + operationId: GetChecksIDQuery + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The check ID. + in: path + name: checkID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FluxResponse' + description: The check query requested + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Check not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a check query + tags: + - Checks + /api/v2/dashboards: + get: + operationId: GetDashboards + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Descending' + - description: A user identifier. Returns only dashboards where this user has + the `owner` role. + in: query + name: owner + schema: + type: string + - description: The column to sort by. + in: query + name: sortBy + schema: + enum: + - ID + - CreatedAt + - UpdatedAt + type: string + - description: A list of dashboard identifiers. Returns only the listed dashboards. + If both `id` and `owner` are specified, only `id` is used. + in: query + name: id + schema: + items: + type: string + type: array + - description: The identifier of the organization. + in: query + name: orgID + schema: + type: string + - description: The name of the organization. + in: query + name: org + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboards' + description: All dashboards + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all dashboards + tags: + - Dashboards post: - operationId: PostDelete - tags: - - Delete - summary: Delete data + operationId: PostDashboards + parameters: + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Deletes data from an InfluxDB bucket. - required: true content: application/json: schema: - $ref: '#/components/schemas/DeletePredicateRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: Specifies the organization to delete data from. - schema: - type: string - description: Only points from this organization are deleted. - - in: query - name: bucket - description: Specifies the bucket to delete data from. - schema: - type: string - description: Only points from this bucket are deleted. - - in: query - name: orgID - description: Specifies the organization ID of the resource. - schema: - type: string - - in: query - name: bucketID - description: Specifies the bucket ID to delete data from. - schema: - type: string - description: Only points from this bucket ID are deleted. - responses: - '204': - description: delete has been accepted - '400': - description: Invalid request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: no token was sent or does not have sufficient permissions. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: the bucket or organization is not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /labels: - post: - operationId: PostLabels - tags: - - Labels - summary: Create a label - requestBody: - description: Label to create + $ref: '#/components/schemas/CreateDashboardRequest' + description: Dashboard to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelCreateRequest' responses: - '201': - description: Added label - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - operationId: GetLabels - tags: - - Labels - summary: List all labels - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID. - schema: - type: string - responses: - '200': - description: A list of labels - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/labels/{labelID}': - get: - operationId: GetLabelsID - tags: - - Labels - summary: Retrieve a label - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to update. - responses: - '200': - description: A label - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchLabelsID - tags: - - Labels - summary: Update a label - requestBody: - description: Label update - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to update. - responses: - '200': - description: Updated label - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - '404': - description: Label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteLabelsID - tags: - - Labels - summary: Delete a label - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}': - get: - operationId: GetDashboardsID - tags: - - Dashboards - summary: Retrieve a Dashboard - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: query - name: include - required: false - schema: - type: string - enum: - - properties - description: Includes the cell view properties in the response if set to `properties` - responses: - '200': - description: Retrieve a single dashboard + "201": content: application/json: schema: oneOf: - - $ref: '#/components/schemas/Dashboard' - - $ref: '#/components/schemas/DashboardWithViewProperties' - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' + description: Added dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - patch: - operationId: PatchDashboardsID + description: Unexpected error + summary: Create a dashboard tags: - - Dashboards - summary: Update a dashboard - requestBody: - description: Patching of a dashboard - required: true - content: - application/json: - schema: - type: object - title: PatchDashboardRequest - properties: - name: - description: 'optional, when provided will replace the name' - type: string - description: - description: 'optional, when provided will replace the description' - type: string - cells: - description: 'optional, when provided will replace all existing cells with the cells provided' - $ref: '#/components/schemas/CellWithViewProperties' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - responses: - '200': - description: Updated dashboard - content: - application/json: - schema: - $ref: '#/components/schemas/Dashboard' - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - Dashboards + /api/v2/dashboards/{dashboardID}: delete: operationId: DeleteDashboardsID - tags: - - Dashboards - summary: Delete a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - responses: - '204': - description: Delete has been accepted - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/cells': - put: - operationId: PutDashboardsIDCells - tags: - - 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. - requestBody: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a dashboard + tags: + - Dashboards + get: + operationId: GetDashboardsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID + required: true + schema: + type: string + - description: Includes the cell view properties in the response if set to `properties` + in: query + name: include + required: false + schema: + enum: + - properties + type: string + responses: + "200": + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' + description: Retrieve a single dashboard + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a Dashboard + tags: + - Dashboards + patch: + operationId: PatchDashboardsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID + required: true + schema: + type: string + requestBody: content: application/json: schema: - $ref: '#/components/schemas/Cells' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. + properties: + cells: + $ref: '#/components/schemas/CellWithViewProperties' + description: optional, when provided will replace all existing cells + with the cells provided + description: + description: optional, when provided will replace the description + type: string + name: + description: optional, when provided will replace the name + type: string + title: PatchDashboardRequest + type: object + description: Patching of a dashboard + required: true responses: - '201': - description: Replaced dashboard cells + "200": content: application/json: schema: $ref: '#/components/schemas/Dashboard' - '404': + description: Updated dashboard + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/cells: post: operationId: PostDashboardsIDCells - tags: - - Cells - - Dashboards - summary: Create a dashboard cell - requestBody: - description: Cell that will be added + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCell' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. + description: Cell that will be added + required: true responses: - '201': - description: Cell successfully added + "201": content: application/json: schema: $ref: '#/components/schemas/Cell' - '404': + description: Cell successfully added + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/cells/{cellID}': - patch: - operationId: PatchDashboardsIDCellsID + description: Unexpected error + summary: Create a dashboard cell tags: - - 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. - requestBody: + - Cells + - Dashboards + put: + description: Replaces all cells in a dashboard. This is used primarily to update + the positional information of all cells. + operationId: PutDashboardsIDCells + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cells' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: Replaced dashboard cells + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Replace cells in a dashboard + tags: + - Cells + - Dashboards + /api/v2/dashboards/{dashboardID}/cells/{cellID}: + delete: + operationId: DeleteDashboardsIDCellsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to delete. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The ID of the cell to delete. + in: path + name: cellID + required: true + schema: + type: string + responses: + "204": + description: Cell successfully deleted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Cell or dashboard not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a dashboard cell + tags: + - Cells + - Dashboards + patch: + description: Updates the non positional information related to a cell. Updates + to a single cell's positional data could cause grid conflicts. + operationId: PatchDashboardsIDCellsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The ID of the cell to update. + in: path + name: cellID + required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/CellUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: path - name: cellID - schema: - type: string - required: true - description: The ID of the cell to update. + required: true responses: - '200': - description: Updated dashboard cell + "200": content: application/json: schema: $ref: '#/components/schemas/Cell' - '404': + description: Updated dashboard cell + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - operationId: DeleteDashboardsIDCellsID + description: Unexpected error + summary: Update the non-positional information related to a cell tags: - - Cells - - Dashboards - summary: Delete a dashboard cell - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to delete. - - in: path - name: cellID - schema: - type: string - required: true - description: The ID of the cell to delete. - responses: - '204': - description: Cell successfully deleted - '404': - description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/cells/{cellID}/view': + - Cells + - Dashboards + /api/v2/dashboards/{dashboardID}/cells/{cellID}/view: get: operationId: GetDashboardsIDCellsIDView - tags: - - Cells - - Dashboards - - Views - summary: Retrieve the view for a cell parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - - in: path - name: cellID - schema: - type: string - required: true - description: The cell ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The cell ID. + in: path + name: cellID + required: true + schema: + type: string responses: - '200': - description: A dashboard cells view + "200": content: application/json: schema: $ref: '#/components/schemas/View' - '404': + description: A dashboard cells view + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve the view for a cell + tags: + - Cells + - Dashboards + - Views patch: operationId: PatchDashboardsIDCellsIDView - tags: - - Cells - - Dashboards - - Views - summary: Update the view for a cell - requestBody: + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the dashboard to update. + in: path + name: dashboardID required: true + schema: + type: string + - description: The ID of the cell to update. + in: path + name: cellID + required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/View' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: path - name: cellID - schema: - type: string - required: true - description: The ID of the cell to update. + required: true responses: - '200': - description: Updated cell view + "200": content: application/json: schema: $ref: '#/components/schemas/View' - '404': + description: Updated cell view + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Cell or dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/labels': + description: Unexpected error + summary: Update the view for a cell + tags: + - Cells + - Dashboards + - Views + /api/v2/dashboards/{dashboardID}/labels: get: operationId: GetDashboardsIDLabels - tags: - - Dashboards - summary: List all labels for a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '200': - description: A list of all labels for a dashboard + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a dashboard + tags: + - Dashboards post: operationId: PostDashboardsIDLabels - tags: - - Dashboards - summary: Add a label to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The label added to the dashboard + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The label added to the dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/labels/{labelID}': + description: Unexpected error + summary: Add a label to a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/labels/{labelID}: delete: operationId: DeleteDashboardsIDLabelsID - tags: - - Dashboards - summary: Delete a label from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Dashboard not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/members': + description: Unexpected error + summary: Delete a label from a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/members: get: operationId: GetDashboardsIDMembers - tags: - - Dashboards - summary: List all dashboard members parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '200': - description: A list of users who have member privileges for a dashboard + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceMembers' + description: A list of users who have member privileges for a dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all dashboard members + tags: + - Dashboards post: operationId: PostDashboardsIDMembers - tags: - - Dashboards - summary: Add a member to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - requestBody: - description: User to add as member + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true responses: - '201': - description: Added to dashboard members + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceMember' + description: Added to dashboard members default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/members/{userID}': + description: Unexpected error + summary: Add a member to a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/members/{userID}: delete: operationId: DeleteDashboardsIDMembersID - tags: - - Dashboards - summary: Remove a member from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '204': + "204": description: Member removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/owners': + description: Unexpected error + summary: Remove a member from a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/owners: get: operationId: GetDashboardsIDOwners - tags: - - Dashboards - summary: List all dashboard owners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '200': - description: A list of users who have owner privileges for a dashboard + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceOwners' + description: A list of users who have owner privileges for a dashboard default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all dashboard owners + tags: + - Dashboards post: operationId: PostDashboardsIDOwners - tags: - - Dashboards - summary: Add an owner to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. - requestBody: - description: User to add as owner + - $ref: '#/components/parameters/TraceSpan' + - description: The dashboard ID. + in: path + name: dashboardID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true responses: - '201': - description: Added to dashboard owners + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceOwner' + description: Added to dashboard owners default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/dashboards/{dashboardID}/owners/{userID}': + description: Unexpected error + summary: Add an owner to a dashboard + tags: + - Dashboards + /api/v2/dashboards/{dashboardID}/owners/{userID}: delete: operationId: DeleteDashboardsIDOwnersID - tags: - - Dashboards - summary: Remove an owner from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: dashboardID - schema: - type: string - required: true - description: The dashboard ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The dashboard ID. + in: path + name: dashboardID + required: true + schema: + type: string responses: - '204': + "204": description: Owner removed default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Unexpected error + summary: Remove an owner from a dashboard + tags: + - Dashboards + /api/v2/dbrps: + get: + operationId: GetDBRPs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID to filter on + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name to filter on + in: query + name: org + schema: + type: string + - description: Specifies the mapping ID to filter on + in: query + name: id + schema: + type: string + - description: Specifies the bucket ID to filter on + in: query + name: bucketID + schema: + type: string + - description: Specifies filtering on default + in: query + name: default + schema: + type: boolean + - description: Specifies the database to filter on + in: query + name: db + schema: + type: string + - description: Specifies the retention policy to filter on + in: query + name: rp + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DBRPs' + description: Success. Returns a list of database retention policy mappings. + "400": content: application/json: schema: $ref: '#/components/schemas/Error' - /query/ast: - post: - operationId: PostQueryAst - description: Analyzes flux query and generates a query specification. + description: Bad request. The request has one or more invalid parameters. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List database retention policy mappings tags: - - Query - summary: Generate an Abstract Syntax Tree (AST) from a query + - DBRPs + post: + operationId: PostDBRP parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Type - schema: - type: string - enum: - - application/json + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Analyzed Flux query to generate abstract syntax tree. content: application/json: schema: - $ref: '#/components/schemas/LanguageRequest' + $ref: '#/components/schemas/DBRPCreate' + description: The database retention policy mapping to add + required: true responses: - '200': - description: Abstract syntax tree of the flux query. + "201": content: application/json: schema: - $ref: '#/components/schemas/ASTResponse' - default: - description: Any response other than 200 is an internal server error + $ref: '#/components/schemas/DBRP' + description: Created. Returns the created database retention policy mapping. + "400": content: application/json: schema: $ref: '#/components/schemas/Error' - /query/suggestions: + description: Bad request. The mapping in the request has one or more invalid + IDs. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a database retention policy mapping + tags: + - DBRPs + /api/v2/dbrps/{dbrpID}: + delete: + operationId: DeleteDBRPID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID of the mapping + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name of the mapping + in: query + name: org + schema: + type: string + - description: The database retention policy mapping + in: path + name: dbrpID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: if any of the IDs passed is invalid + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a database retention policy + tags: + - DBRPs get: - operationId: GetQuerySuggestions - tags: - - Query - summary: Retrieve query suggestions + operationId: GetDBRPsID parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID of the mapping + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name of the mapping + in: query + name: org + schema: + type: string + - description: The database retention policy mapping ID + in: path + name: dbrpID + required: true + schema: + type: string responses: - '200': - description: Suggestions for next functions in call chain + "200": content: application/json: schema: - $ref: '#/components/schemas/FluxSuggestions' - default: - description: Any response other than 200 is an internal server error + $ref: '#/components/schemas/DBRPGet' + description: The database retention policy requested + "400": content: application/json: schema: $ref: '#/components/schemas/Error' - '/query/suggestions/{name}': - get: - operationId: GetQuerySuggestionsName - tags: - - Query - summary: Retrieve query suggestions for a branching suggestion - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: name - schema: - type: string - required: true - description: The name of the branching suggestion. - responses: - '200': - description: Suggestions for next functions in call chain - content: - application/json: - schema: - $ref: '#/components/schemas/FluxSuggestion' + description: if any of the IDs passed is invalid default: - description: Any response other than 200 is an internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /query/analyze: - post: - operationId: PostQueryAnalyze + description: Unexpected error + summary: Retrieve a database retention policy mapping tags: - - Query - summary: Analyze an InfluxQL or Flux query + - DBRPs + patch: + operationId: PatchDBRPID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Type - schema: - type: string - enum: - - application/json + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization ID of the mapping + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name of the mapping + in: query + name: org + schema: + type: string + - description: The database retention policy mapping. + in: path + name: dbrpID + required: true + schema: + type: string requestBody: - description: Flux or InfluxQL query to analyze content: application/json: schema: - $ref: '#/components/schemas/Query' + $ref: '#/components/schemas/DBRPUpdate' + description: Database retention policy update to apply + required: true responses: - '200': - description: Query analyze results. Errors will be empty if the query is valid. + "200": content: application/json: schema: - $ref: '#/components/schemas/AnalyzeQueryResponse' + $ref: '#/components/schemas/DBRPGet' + description: An updated mapping + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: if any of the IDs passed is invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The mapping was not found default: - description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a database retention policy mapping + tags: + - DBRPs + /api/v2/delete: + post: + operationId: PostDelete + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the organization to delete data from. + in: query + name: org + schema: + description: Only points from this organization are deleted. + type: string + - description: Specifies the bucket to delete data from. + in: query + name: bucket + schema: + description: Only points from this bucket are deleted. + type: string + - description: Specifies the organization ID of the resource. + in: query + name: orgID + schema: + type: string + - description: Specifies the bucket ID to delete data from. + in: query + name: bucketID + schema: + description: Only points from this bucket ID are deleted. + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletePredicateRequest' + description: Deletes data from an InfluxDB bucket. + required: true + responses: + "204": + description: delete has been accepted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid request. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: no token was sent or does not have sufficient permissions. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: the bucket or organization is not found. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: internal server error + summary: Delete data + tags: + - Delete + /api/v2/flags: + get: + operationId: GetFlags + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Flags' + description: Feature flags for the currently authenticated user + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Return the feature flags for the currently authenticated user + tags: + - Users + /api/v2/health: + get: + operationId: GetHealth + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheck' + description: The instance is healthy + "503": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheck' + description: The instance is unhealthy + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + servers: + - url: "" + summary: Get the health of an instance + tags: + - Health + /api/v2/labels: + get: + operationId: GetLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: query + name: orgID + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of labels + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels + tags: + - Labels + post: + operationId: PostLabels + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelCreateRequest' + description: Label to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: Added label + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a label + tags: + - Labels + /api/v2/labels/{labelID}: + delete: + operationId: DeleteLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label + tags: + - Labels + get: + operationId: GetLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the label to update. + in: path + name: labelID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: A label + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a label + tags: + - Labels + patch: + operationId: PatchLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the label to update. + in: path + name: labelID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelUpdate' + description: Label update + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: Updated label + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a label + tags: + - Labels + /api/v2/legacy/authorizations: + get: + operationId: GetLegacyAuthorizations + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Only show legacy authorizations that belong to a user ID. + in: query + name: userID + schema: + type: string + - description: Only show legacy authorizations that belong to a user name. + in: query + name: user + schema: + type: string + - description: Only show legacy authorizations that belong to an organization + ID. + in: query + name: orgID + schema: + type: string + - description: Only show legacy authorizations that belong to a organization + name. + in: query + name: org + schema: + type: string + - description: Only show legacy authorizations with a specified token (auth + name). + in: query + name: token + schema: + type: string + - description: Only show legacy authorizations with a specified auth ID. + in: query + name: authID + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Authorizations' + description: A list of legacy authorizations + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: List all legacy authorizations + tags: + - Legacy Authorizations + post: + operationId: PostLegacyAuthorizations + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyAuthorizationPostRequest' + description: Legacy authorization to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + description: Legacy authorization created + "400": + $ref: '#/components/responses/ServerError' + description: Invalid request + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Create a legacy authorization + tags: + - Legacy Authorizations + servers: + - url: /private + /api/v2/legacy/authorizations/{authID}: + delete: + operationId: DeleteLegacyAuthorizationsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the legacy authorization to delete. + in: path + name: authID + required: true + schema: + type: string + responses: + "204": + description: Legacy authorization deleted + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Delete a legacy authorization + tags: + - Legacy Authorizations + get: + operationId: GetLegacyAuthorizationsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the legacy authorization to get. + in: path + name: authID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + description: Legacy authorization details + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Retrieve a legacy authorization + tags: + - Legacy Authorizations + patch: + operationId: PatchLegacyAuthorizationsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the legacy authorization to update. + in: path + name: authID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthorizationUpdateRequest' + description: Legacy authorization to update + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + description: The active or inactive legacy authorization + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Update a legacy authorization to be active or inactive + tags: + - Legacy Authorizations + servers: + - url: /private + /api/v2/legacy/authorizations/{authID}/password: + post: + operationId: PostLegacyAuthorizationsIDPassword + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the legacy authorization to update. + in: path + name: authID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordResetBody' + description: New password + required: true + responses: + "204": + description: Legacy authorization password set + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Set a legacy authorization password + tags: + - Legacy Authorizations + servers: + - url: /private + /api/v2/maps/mapToken: + get: + operationId: getMapboxToken + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Token' + description: A temp token for Mapbox + "401": + $ref: '#/components/responses/ServerError' + "500": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + /api/v2/me: + get: + operationId: GetMe + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserResponse' + description: The currently authenticated user. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve the currently authenticated user + tags: + - Users + /api/v2/me/password: + put: + operationId: PutMePassword + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordResetBody' + description: New password + required: true + responses: + "204": + description: Password successfully updated + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful authentication + security: + - BasicAuthentication: [] + summary: Update a password + tags: + - Users + /api/v2/notificationEndpoints: + get: + operationId: GetNotificationEndpoints + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - description: Only show notification endpoints that belong to specific organization + ID. + in: query + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoints' + description: A list of notification endpoints + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all notification endpoints + tags: + - NotificationEndpoints + post: + operationId: CreateNotificationEndpoint + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostNotificationEndpoint' + description: Notification endpoint to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: Notification endpoint created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationEndpoints/{endpointID}: + delete: + operationId: DeleteNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The endpoint was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a notification endpoint + tags: + - NotificationEndpoints + get: + operationId: GetNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: The notification endpoint requested + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a notification endpoint + tags: + - NotificationEndpoints + patch: + operationId: PatchNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpointUpdate' + description: Check update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: An updated notification endpoint + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification endpoint was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification endpoint + tags: + - NotificationEndpoints + put: + operationId: PutNotificationEndpointsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: A new notification endpoint to replace the existing endpoint + with + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationEndpoint' + description: An updated notification endpoint + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification endpoint was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationEndpoints/{endpointID}/labels: + get: + operationId: GetNotificationEndpointsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a notification endpoint + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a notification endpoint + tags: + - NotificationEndpoints + post: + operationId: PostNotificationEndpointIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: The label was added to the notification endpoint + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationEndpoints/{endpointID}/labels/{labelID}: + delete: + operationId: DeleteNotificationEndpointsIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification endpoint ID. + in: path + name: endpointID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Endpoint or label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label from a notification endpoint + tags: + - NotificationEndpoints + /api/v2/notificationRules: + get: + operationId: GetNotificationRules + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - description: Only show notification rules that belong to a specific organization + ID. + in: query + name: orgID + required: true + schema: + type: string + - description: Only show notifications that belong to the specific check ID. + in: query + name: checkID + schema: + type: string + - description: Only return notification rules that "would match" statuses which + contain the tag key value pairs provided. + in: query + name: tag + schema: + example: env:prod + pattern: ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRules' + description: A list of notification rules + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all notification rules + tags: + - NotificationRules + post: + operationId: CreateNotificationRule + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostNotificationRule' + description: Notification rule to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: Notification rule created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}: + delete: + operationId: DeleteNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The check was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a notification rule + tags: + - NotificationRules + get: + operationId: GetNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: The notification rule requested + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a notification rule + tags: + - NotificationRules + patch: + operationId: PatchNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRuleUpdate' + description: Notification rule update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: An updated notification rule + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification rule was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification rule + tags: + - NotificationRules + put: + operationId: PutNotificationRulesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: Notification rule update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationRule' + description: An updated notification rule + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The notification rule was not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}/labels: + get: + operationId: GetNotificationRulesIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a notification rule + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a notification rule + tags: + - NotificationRules + post: + operationId: PostNotificationRuleIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: The label was added to the notification rule + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}/labels/{labelID}: + delete: + operationId: DeleteNotificationRulesIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + - description: The ID of the label to delete. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Rule or label not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete label from a notification rule + tags: + - NotificationRules + /api/v2/notificationRules/{ruleID}/query: + get: + operationId: GetNotificationRulesIDQuery + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The notification rule ID. + in: path + name: ruleID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FluxResponse' + description: The notification rule query requested + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Invalid request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Notification rule not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a notification rule query + tags: + - Rules + /api/v2/orgs: + get: + operationId: GetOrgs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Descending' + - description: Filter organizations to a specific organization name. + in: query + name: org + schema: + type: string + - description: Filter organizations to a specific organization ID. + in: query + name: orgID + schema: + type: string + - description: Filter organizations to a specific user ID. + in: query + name: userID + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organizations' + description: A list of organizations + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all organizations + tags: + - Organizations + post: + operationId: PostOrgs + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostOrganizationRequest' + description: Organization to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: Organization created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create an organization + tags: + - Organizations + /api/v2/orgs/{orgID}: + delete: + operationId: DeleteOrgsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the organization to delete. + in: path + name: orgID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Organization not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete an organization + tags: + - Organizations + get: + operationId: GetOrgsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the organization to get. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: Organization details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve an organization + tags: + - Organizations + patch: + operationId: PatchOrgsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the organization to get. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchOrganizationRequest' + description: Organization update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + description: Organization updated + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/members: + get: + operationId: GetOrgsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMembers' + description: A list of organization members + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Organization not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all members of an organization + tags: + - Organizations + post: + operationId: PostOrgsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMember' + description: Added to organization created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a member to an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/members/{userID}: + delete: + operationId: DeleteOrgsIDMembersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "204": + description: Member removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove a member from an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/owners: + get: + operationId: GetOrgsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwners' + description: A list of organization owners + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Organization not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all owners of an organization + tags: + - Organizations + post: + operationId: PostOrgsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwner' + description: Organization owner added + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add an owner to an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/owners/{userID}: + delete: + operationId: DeleteOrgsIDOwnersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "204": + description: Owner removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove an owner from an organization + tags: + - Organizations + /api/v2/orgs/{orgID}/secrets: + get: + operationId: GetOrgsIDSecrets + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SecretKeysResponse' + description: A list of all secret keys + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all secret keys for an organization + tags: + - Secrets + patch: + operationId: PatchOrgsIDSecrets + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Secrets' + description: Secret key value pairs to update/add + required: true + responses: + "204": + description: Keys successfully patched + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update secrets in an organization + tags: + - Secrets + /api/v2/orgs/{orgID}/secrets/{secretID}: + delete: + operationId: DeleteOrgsIDSecretsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + - description: The secret ID. + in: path + name: secretID + required: true + schema: + type: string + responses: + "204": + description: Keys successfully deleted + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Delete a secret from an organization + tags: + - Secrets + /api/v2/orgs/{orgID}/secrets/delete: + post: + deprecated: true + operationId: PostOrgsIDSecrets + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: path + name: orgID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SecretKeys' + description: Secret key to delete + required: true + responses: + "204": + description: Keys successfully patched + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete secrets from an organization + tags: + - Secrets + /ping: + get: + operationId: GetPing + responses: + "204": + description: OK headers: - X-Influx-Error: - description: Error string describing the problem + X-Influxdb-Build: + description: The type of InfluxDB build. schema: type: string - X-Influx-Reference: - description: Reference code unique to the error type + X-Influxdb-Version: + description: The version of InfluxDB. schema: type: integer - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /query: - post: - operationId: PostQuery + servers: + - url: "" + summary: Checks the status of InfluxDB instance and version of InfluxDB. tags: - - Query - summary: Query data + - Ping + head: + operationId: HeadPing + responses: + "204": + description: OK + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: The version of InfluxDB. + schema: + type: integer + servers: + - url: "" + summary: Checks the status of InfluxDB instance and version of InfluxDB. + tags: + - Ping + /api/v2/query: + post: description: | Retrieves data from InfluxDB buckets. @@ -2233,1231 +3753,2937 @@ paths: - [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/). + operationId: PostQuery 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: header - name: Content-Type - schema: - type: string - enum: - - application/json - - application/vnd.flux - - in: query - name: org - 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.' - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - description: The Accept-Encoding request HTTP header advertises which content + encoding, usually a compression algorithm, the client is able to understand. + in: header + name: Accept-Encoding + schema: + default: identity + description: Specifies that the query response in the body should be encoded + with gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - in: header + name: Content-Type + schema: + enum: + - application/json + - application/vnd.flux + type: string + - 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. + in: query + name: org + schema: + type: string + - description: Specifies the ID of the organization executing the query. If + both `orgID` and `org` are specified, `org` takes precedence. + in: query + name: orgID + schema: + type: string requestBody: - description: Flux query or specification to execute content: application/json: schema: oneOf: - - $ref: '#/components/schemas/Query' - - $ref: '#/components/schemas/InfluxQLQuery' + - $ref: '#/components/schemas/Query' + - $ref: '#/components/schemas/InfluxQLQuery' application/vnd.flux: schema: type: string + description: Flux query or specification to execute responses: - '200': + "200": + content: + application/vnd.influx.arrow: + schema: + format: binary + type: string + text/csv: + schema: + 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 + type: string 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. default: identity + description: Specifies that the response in the body is encoded with + gzip or not encoded with identity. enum: - - gzip - - identity + - gzip + - identity + type: string 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: - 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 - 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. + "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: + format: int32 + type: integer + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Error processing query + summary: Query data + tags: + - Query + /api/v2/query/analyze: + post: + operationId: PostQueryAnalyze + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Content-Type + schema: + enum: + - application/json + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Query' + description: Flux or InfluxQL query to analyze + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnalyzeQueryResponse' + description: Query analyze results. Errors will be empty if the query is + valid. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error + headers: + X-Influx-Error: + description: Error string describing the problem + schema: + type: string + X-Influx-Reference: + description: Reference code unique to the error type schema: type: integer - format: int32 - default: - description: Error processing query - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /buckets: - get: - operationId: GetBuckets + summary: Analyze an InfluxQL or Flux query tags: - - Buckets - summary: List all buckets - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/After' - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string - - in: query - name: name - description: Only returns buckets with a specific name. - schema: - type: string - - in: query - name: id - description: Only returns buckets with a specific ID. - schema: - type: string - responses: - '200': - description: A list of buckets - content: - application/json: - schema: - $ref: '#/components/schemas/Buckets' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + - Query + /api/v2/query/ast: post: - operationId: PostBuckets - tags: - - Buckets - summary: Create a bucket + description: Analyzes flux query and generates a query specification. + operationId: PostQueryAst parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' + - in: header + name: Content-Type + schema: + enum: + - application/json + type: string requestBody: - description: Bucket to create - required: true content: application/json: schema: - $ref: '#/components/schemas/PostBucketRequest' + $ref: '#/components/schemas/LanguageRequest' + description: Analyzed Flux query to generate abstract syntax tree. responses: - '201': - description: Bucket created + "200": content: application/json: schema: - $ref: '#/components/schemas/Bucket' - '422': - description: Request body failed validation - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/ASTResponse' + description: Abstract syntax tree of the flux query. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}': + description: Any response other than 200 is an internal server error + summary: Generate an Abstract Syntax Tree (AST) from a query + tags: + - Query + /api/v2/query/suggestions: get: - operationId: GetBucketsID - tags: - - Buckets - summary: Retrieve a bucket + operationId: GetQuerySuggestions parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + - $ref: '#/components/parameters/TraceSpan' responses: - '200': - description: Bucket details + "200": content: application/json: schema: - $ref: '#/components/schemas/Bucket' + $ref: '#/components/schemas/FluxSuggestions' + description: Suggestions for next functions in call chain default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - patch: - operationId: PatchBucketsID + description: Any response other than 200 is an internal server error + summary: Retrieve query suggestions tags: - - Buckets - summary: Update a bucket - requestBody: - description: Bucket update to apply + - Query + /api/v2/query/suggestions/{name}: + get: + operationId: GetQuerySuggestionsName + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The name of the branching suggestion. + in: path + name: name required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FluxSuggestion' + description: Suggestions for next functions in call chain + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Any response other than 200 is an internal server error + summary: Retrieve query suggestions for a branching suggestion + tags: + - Query + /api/v2/ready: + get: + operationId: GetReady + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Ready' + description: The instance is ready + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + servers: + - url: "" + summary: Get the readiness of an instance at startup + tags: + - Ready + /api/v2/remotes: + get: + operationId: GetRemoteConnections + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: query + name: orgID + required: true + schema: + type: string + - in: query + name: name + schema: + type: string + - in: query + name: remoteURL + schema: + format: uri + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnections' + description: List of remote connections + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: List all remote connections + tags: + - RemoteConnections + post: + operationId: PostRemoteConnection + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: If true, validate the remote connection, but don't save it. + in: query + name: validate + schema: + default: false + type: boolean + requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchBucketRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + $ref: '#/components/schemas/RemoteConnectionCreationRequest' + required: true responses: - '200': - description: An updated bucket + "201": content: application/json: schema: - $ref: '#/components/schemas/Bucket' + $ref: '#/components/schemas/RemoteConnection' + description: Remote connection saved + "204": + description: Remote connection validated, but not saved + "400": + $ref: '#/components/responses/ServerError' default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/responses/ServerError' + summary: Register a new remote connection + tags: + - RemoteConnections + /api/v2/remotes/{remoteID}: delete: - operationId: DeleteBucketsID - tags: - - Buckets - summary: Delete a bucket + operationId: DeleteRemoteConnectionByID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The ID of the bucket to delete. + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + required: true + schema: + type: string responses: - '204': - description: Delete has been accepted - '404': - description: Bucket not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + "204": + description: Remote connection info deleted. + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: Delete a remote connection + tags: + - RemoteConnections + get: + operationId: GetRemoteConnectionByID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnection' + description: Remote connection + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: Retrieve a remote connection + tags: + - RemoteConnections + patch: + operationId: PatchRemoteConnectionByID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + required: true + schema: + type: string + - description: If true, validate the updated information, but don't save it. + in: query + name: validate + schema: + default: false + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnectionUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteConnection' + description: Updated information saved + "204": + description: Updated connection validated, but not saved + "400": + $ref: '#/components/responses/ServerError' + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: Update a remote connection + tags: + - RemoteConnections + /api/v2/remotes/{remoteID}/validate: + post: + operationId: PostValidateRemoteConnectionByID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: remoteID + required: true + schema: + type: string + responses: + "204": + description: Remote connection is valid + "400": + $ref: '#/components/responses/ServerError' + description: Remote connection failed validation + default: + $ref: '#/components/responses/ServerError' + summary: Validate a remote connection + tags: + - RemoteConnections + /api/v2/replications: + get: + operationId: GetReplications + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID. + in: query + name: orgID + 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": + content: + application/json: + schema: + $ref: '#/components/schemas/Replications' + description: List of replications + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: List all replications + tags: + - Replications + post: + operationId: PostReplication + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: If true, validate the replication, but don't save it. + in: query + name: validate + schema: + default: false + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReplicationCreationRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Replication' + description: Replication saved + "204": + description: Replication validated, but not saved + "400": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: Register a new replication + tags: + - Replications + /api/v2/replications/{replicationID}: + delete: + operationId: DeleteReplicationByID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + required: true + schema: + type: string + responses: + "204": + description: Replication deleted. + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: Delete a replication + tags: + - Replications + get: + operationId: GetReplicationByID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Replication' + description: Replication + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: Retrieve a replication + tags: + - Replications + patch: + operationId: PatchReplicationByID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + required: true + schema: + type: string + - description: If true, validate the updated information, but don't save it. + in: query + name: validate + schema: + default: false + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReplicationUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Replication' + description: Updated information saved + "204": + description: Updated replication validated, but not saved + "400": + $ref: '#/components/responses/ServerError' + "404": + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/ServerError' + summary: Update a replication + tags: + - Replications + /api/v2/replications/{replicationID}/validate: + post: + operationId: PostValidateReplicationByID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: replicationID + required: true + schema: + type: string + responses: + "204": + description: Replication is valid + "400": + $ref: '#/components/responses/ServerError' + description: Replication failed validation + default: + $ref: '#/components/responses/ServerError' + summary: Validate a replication + tags: + - Replications + /api/v2/resources: + get: + operationId: GetResources + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All resources targets default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/labels': - get: - operationId: GetBucketsIDLabels + description: Internal server error + summary: List all known resources tags: - - Buckets - summary: List all labels for a bucket + - Resources + /api/v2/restore/bucket/{bucketID}: + post: + deprecated: true + operationId: PostRestoreBucketID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The bucket ID. + in: path + name: bucketID + required: true + schema: + type: string + - in: header + name: Content-Type + schema: + default: application/octet-stream + enum: + - application/octet-stream + type: string + requestBody: + content: + text/plain: + schema: + format: byte + type: string + description: Database info serialized as protobuf. + required: true responses: - '200': - description: A list of all labels for a bucket + "200": + content: + application/json: + schema: + format: byte + type: string + description: ID mappings for shards in bucket. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Overwrite storage metadata for a bucket with shard info from a backup. + tags: + - Restore + /api/v2/restore/bucketMetadata: + post: + operationId: PostRestoreBucketMetadata + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BucketMetadataManifest' + description: Metadata manifest for a bucket. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RestoredBucketMappings' + description: ID mappings for shards in new bucket. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Create a new bucket pre-seeded with shard info from a backup. + tags: + - Restore + /api/v2/restore/kv: + post: + operationId: PostRestoreKV + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: When present, its value indicates to the database that compression + is applied to the line-protocol body. + in: header + name: Content-Encoding + schema: + default: identity + description: Specifies that the line protocol in the body is encoded with + gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - in: header + name: Content-Type + schema: + default: application/octet-stream + enum: + - application/octet-stream + type: string + requestBody: + content: + text/plain: + schema: + format: binary + type: string + description: Full KV snapshot. + required: true + responses: + "200": + content: + application/json: + schema: + properties: + token: + description: token is the root token for the instance after restore + (this is overwritten during the restore) + type: string + type: object + description: KV store successfully overwritten. + "204": + description: KV store successfully overwritten. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Overwrite the embedded KV store on the server with a backed-up snapshot. + tags: + - Restore + /api/v2/restore/shards/{shardID}: + post: + operationId: PostRestoreShardId + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: When present, its value indicates to the database that compression + is applied to the line-protocol body. + in: header + name: Content-Encoding + schema: + default: identity + description: Specifies that the line protocol in the body is encoded with + gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - in: header + name: Content-Type + schema: + default: application/octet-stream + enum: + - application/octet-stream + type: string + - description: The shard ID. + in: path + name: shardID + required: true + schema: + type: string + requestBody: + content: + text/plain: + schema: + format: binary + type: string + description: TSM snapshot. + required: true + responses: + "204": + description: TSM snapshot successfully restored. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Restore a TSM snapshot into a shard. + tags: + - Restore + /api/v2/restore/sql: + post: + operationId: PostRestoreSQL + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: When present, its value indicates to the database that compression + is applied to the line-protocol body. + in: header + name: Content-Encoding + schema: + default: identity + description: Specifies that the line protocol in the body is encoded with + gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - in: header + name: Content-Type + schema: + default: application/octet-stream + enum: + - application/octet-stream + type: string + requestBody: + content: + text/plain: + schema: + format: binary + type: string + description: Full SQL snapshot. + required: true + responses: + "204": + description: SQL store successfully overwritten. + default: + $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: Overwrite the embedded SQL store on the server with a backed-up snapshot. + tags: + - Restore + /api/v2/scrapers: + get: + operationId: GetScrapers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Specifies the name of the scraper target. + in: query + name: name + schema: + type: string + - description: List of scraper target IDs to return. If both `id` and `owner` + are specified, only `id` is used. + in: query + name: id + schema: + items: + type: string + type: array + - description: Specifies the organization ID of the scraper target. + in: query + name: orgID + schema: + type: string + - description: Specifies the organization name of the scraper target. + in: query + name: org + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScraperTargetResponses' + description: All scraper targets + summary: List all scraper targets + tags: + - Scraper Targets + post: + operationId: PostScrapers + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScraperTargetRequest' + description: Scraper target to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ScraperTargetResponse' + description: Scraper target created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error + summary: Create a scraper target + tags: + - Scraper Targets + /api/v2/scrapers/{scraperTargetID}: + delete: + operationId: DeleteScrapersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The identifier of the scraper target. + in: path + name: scraperTargetID + required: true + schema: + type: string + responses: + "204": + description: Scraper target deleted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error + summary: Delete a scraper target + tags: + - Scraper Targets + get: + operationId: GetScrapersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The identifier of the scraper target. + in: path + name: scraperTargetID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScraperTargetResponse' + description: The scraper target + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error + summary: Retrieve a scraper target + tags: + - Scraper Targets + patch: + operationId: PatchScrapersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The identifier of the scraper target. + in: path + name: scraperTargetID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScraperTargetRequest' + description: Scraper target update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScraperTargetResponse' + description: Scraper target updated + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error + summary: Update a scraper target + tags: + - Scraper Targets + /api/v2/scrapers/{scraperTargetID}/labels: + get: + operationId: GetScrapersIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The scraper target ID. + in: path + name: scraperTargetID + required: true + schema: + type: string + responses: + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of labels for a scraper target. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostBucketsIDLabels + description: Unexpected error + summary: List all labels for a scraper target tags: - - Buckets - summary: Add a label to a bucket + - Scraper Targets + post: + operationId: PostScrapersIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The scraper target ID. + in: path + name: scraperTargetID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The newly added label + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The newly added label default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/labels/{labelID}': + description: Unexpected error + summary: Add a label to a scraper target + tags: + - Scraper Targets + /api/v2/scrapers/{scraperTargetID}/labels/{labelID}: delete: - operationId: DeleteBucketsIDLabelsID - tags: - - Buckets - summary: Delete a label from a bucket + operationId: DeleteScrapersIDLabelsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The scraper target ID. + in: path + name: scraperTargetID + required: true + schema: + type: string + - description: The label ID. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': - description: Bucket not found + "404": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Scraper target not found default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/members': - get: - operationId: GetBucketsIDMembers + description: Unexpected error + summary: Delete a label from a scraper target tags: - - Buckets - summary: List all users with member privileges for a bucket + - Scraper Targets + /api/v2/scrapers/{scraperTargetID}/members: + get: + operationId: GetScrapersIDMembers parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The scraper target ID. + in: path + name: scraperTargetID + required: true + schema: + type: string responses: - '200': - description: A list of bucket members + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceMembers' + description: A list of scraper target members default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostBucketsIDMembers + description: Unexpected error + summary: List all users with member privileges for a scraper target tags: - - Buckets - summary: Add a member to a bucket + - Scraper Targets + post: + operationId: PostScrapersIDMembers parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - requestBody: - description: User to add as member + - $ref: '#/components/parameters/TraceSpan' + - description: The scraper target ID. + in: path + name: scraperTargetID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true responses: - '201': - description: Member added to bucket + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceMember' + description: Member added to scraper targets default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/members/{userID}': - delete: - operationId: DeleteBucketsIDMembersID + description: Unexpected error + summary: Add a member to a scraper target tags: - - Buckets - summary: Remove a member from a bucket + - Scraper Targets + /api/v2/scrapers/{scraperTargetID}/members/{userID}: + delete: + operationId: DeleteScrapersIDMembersID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The scraper target ID. + in: path + name: scraperTargetID + required: true + schema: + type: string responses: - '204': + "204": description: Member removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/owners': - get: - operationId: GetBucketsIDOwners + description: Unexpected error + summary: Remove a member from a scraper target tags: - - Buckets - summary: List all owners of a bucket + - Scraper Targets + /api/v2/scrapers/{scraperTargetID}/owners: + get: + operationId: GetScrapersIDOwners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The scraper target ID. + in: path + name: scraperTargetID + required: true + schema: + type: string responses: - '200': - description: A list of bucket owners + "200": content: application/json: schema: $ref: '#/components/schemas/ResourceOwners' + description: A list of scraper target owners default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostBucketsIDOwners + description: Unexpected error + summary: List all owners of a scraper target tags: - - Buckets - summary: Add an owner to a bucket + - Scraper Targets + post: + operationId: PostScrapersIDOwners parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. - requestBody: - description: User to add as owner + - $ref: '#/components/parameters/TraceSpan' + - description: The scraper target ID. + in: path + name: scraperTargetID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true responses: - '201': - description: Bucket owner added + "201": content: application/json: schema: $ref: '#/components/schemas/ResourceOwner' + description: Scraper target owner added default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/buckets/{bucketID}/owners/{userID}': - delete: - operationId: DeleteBucketsIDOwnersID + description: Unexpected error + summary: Add an owner to a scraper target tags: - - Buckets - summary: Remove an owner from a bucket + - Scraper Targets + /api/v2/scrapers/{scraperTargetID}/owners/{userID}: + delete: + operationId: DeleteScrapersIDOwnersID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: bucketID - schema: - type: string - required: true - description: The bucket ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The scraper target ID. + in: path + name: scraperTargetID + required: true + schema: + type: string responses: - '204': + "204": description: Owner removed default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /orgs: - get: - operationId: GetOrgs + description: Unexpected error + summary: Remove an owner from a scraper target tags: - - Organizations - summary: List all organizations + - Scraper Targets + /api/v2/setup: + get: + description: Returns `true` if no default user, organization, or bucket has + been created. + operationId: GetSetup parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Descending' - - in: query - name: org - schema: - type: string - description: Filter organizations to a specific organization name. - - in: query - name: orgID - schema: - type: string - description: Filter organizations to a specific organization ID. - - in: query - name: userID - schema: - type: string - description: Filter organizations to a specific user ID. + - $ref: '#/components/parameters/TraceSpan' responses: - '200': - description: A list of organizations + "200": content: application/json: schema: - $ref: '#/components/schemas/Organizations' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/IsOnboarding' + description: allowed true or false + summary: Check if database has default user, org, bucket + tags: + - Setup post: - operationId: PostOrgs - tags: - - Organizations - summary: Create an organization + description: Post an onboarding request to set up initial user, org and bucket. + operationId: PostSetup parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: - description: Organization to create - required: true content: application/json: schema: - $ref: '#/components/schemas/PostOrganizationRequest' - responses: - '201': - description: Organization created - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}': - get: - operationId: GetOrgsID - tags: - - Organizations - summary: Retrieve an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The ID of the organization to get. - responses: - '200': - description: Organization details - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchOrgsID - tags: - - Organizations - summary: Update an organization - requestBody: - description: Organization update to apply + $ref: '#/components/schemas/OnboardingRequest' + description: Source to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PatchOrganizationRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The ID of the organization to get. responses: - '200': - description: Organization updated + "201": content: application/json: schema: - $ref: '#/components/schemas/Organization' + $ref: '#/components/schemas/OnboardingResponse' + description: Created default user, bucket, org default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteOrgsID - tags: - - Organizations - summary: Delete an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The ID of the organization to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Organization not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/secrets': - get: - operationId: GetOrgsIDSecrets - tags: - - Secrets - summary: List all secret keys for an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '200': - description: A list of all secret keys - content: - application/json: - schema: - $ref: '#/components/schemas/SecretKeysResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchOrgsIDSecrets - tags: - - Secrets - summary: Update secrets in an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - requestBody: - description: Secret key value pairs to update/add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Secrets' - responses: - '204': - description: Keys successfully patched - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/members': - get: - operationId: GetOrgsIDMembers - tags: - - Organizations - summary: List all members of an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '200': - description: A list of organization members - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMembers' - '404': - description: Organization not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostOrgsIDMembers - tags: - - Organizations - summary: Add a member to an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - requestBody: - description: User to add as member - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Added to organization created - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMember' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/members/{userID}': - delete: - operationId: DeleteOrgsIDMembersID - tags: - - Organizations - summary: Remove a member from an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '204': - description: Member removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/owners': - get: - operationId: GetOrgsIDOwners - tags: - - Organizations - summary: List all owners of an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '200': - description: A list of organization owners - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwners' - '404': - description: Organization not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostOrgsIDOwners - tags: - - Organizations - summary: Add an owner to an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - requestBody: - description: User to add as owner - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Organization owner added - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwner' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/orgs/{orgID}/owners/{userID}': - delete: - operationId: DeleteOrgsIDOwnersID - tags: - - Organizations - summary: Remove an owner from an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: orgID - schema: - type: string - required: true - description: The organization ID. - responses: - '204': - description: Owner removed - default: - description: Unexpected error - content: - 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 + description: Unexpected error + summary: Set up initial user, org and bucket tags: - - resource list - summary: List all known resources + - Setup + /api/v2/signin: + post: + description: Authenticates ***Basic Auth*** credentials for a user. If successful, + creates a new UI session for the user. + operationId: PostSignin parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' responses: - '200': - description: All resources targets - content: - application/json: - schema: - type: array - items: - type: string - default: - description: Internal server error + "204": + description: Success. User authenticated. + "401": content: application/json: schema: $ref: '#/components/schemas/Error' - /stacks: + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: User account is disabled. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful authentication. + security: + - BasicAuthentication: [] + summary: Create a user session. + tags: + - Signin + /api/v2/signout: + post: + description: Expires the current UI session for the user. + operationId: PostSignout + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + "204": + description: Session successfully expired + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized access + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful session expiry + summary: Expire the current UI session + tags: + - Signout + /api/v2/sources: + get: + operationId: GetSources + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The name of the organization. + in: query + name: org + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Sources' + description: A list of sources + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all sources + tags: + - Sources + post: + operationId: PostSources + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Source' + description: Source to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Source' + description: Created Source + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a source + tags: + - Sources + /api/v2/sources/{sourceID}: + delete: + operationId: DeleteSourcesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The source ID. + in: path + name: sourceID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: View not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a source + tags: + - Sources + get: + operationId: GetSourcesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The source ID. + in: path + name: sourceID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Source' + description: A source + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Source not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a source + tags: + - Sources + patch: + operationId: PatchSourcesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The source ID. + in: path + name: sourceID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Source' + description: Source update + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Source' + description: Created Source + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Source not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a Source + tags: + - Sources + /api/v2/sources/{sourceID}/buckets: + get: + operationId: GetSourcesIDBuckets + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The source ID. + in: path + name: sourceID + required: true + schema: + type: string + - description: The name of the organization. + in: query + name: org + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Buckets' + description: A source + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Source not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Get buckets in a source + tags: + - Sources + - Buckets + /api/v2/sources/{sourceID}/health: + get: + operationId: GetSourcesIDHealth + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The source ID. + in: path + name: sourceID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheck' + description: The source is healthy + "503": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheck' + description: The source is not healthy + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Get the health of a source + tags: + - Sources + /api/v2/stacks: get: operationId: ListStacks - tags: - - Templates - summary: List installed templates parameters: - - in: query - name: orgID - required: true - schema: - type: string - description: The organization ID of the stacks - - in: query - name: name - schema: - type: string - description: A collection of names to filter the list by. - - in: query - name: stackID - schema: - type: string - description: A collection of stackIDs to filter the list by. + - description: The organization ID of the stacks + in: query + name: orgID + required: true + schema: + type: string + - description: A collection of names to filter the list by. + in: query + name: name + schema: + type: string + - description: A collection of stackIDs to filter the list by. + in: query + name: stackID + schema: + type: string responses: - '200': - description: Success. Returns the list of stacks. + "200": content: application/json: schema: - type: object properties: stacks: - type: array items: $ref: '#/components/schemas/Stack' + type: array + type: object + description: Success. Returns the list of stacks. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List installed templates + tags: + - Templates post: operationId: CreateStack - tags: - - Templates - summary: Create a new stack requestBody: - description: The stack to create. - required: true content: application/json: schema: - type: object - title: PostStackRequest properties: + description: + type: string + name: + type: string orgID: type: string - name: - type: string - description: - type: string urls: - type: array items: type: string + type: array + title: PostStackRequest + type: object + description: The stack to create. + required: true responses: - '201': - description: Success. Returns the newly created stack. + "201": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Success. Returns the newly created stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/stacks/{stack_id}': + description: Unexpected error + summary: Create a new stack + tags: + - Templates + /api/v2/stacks/{stack_id}: + delete: + operationId: DeleteStack + parameters: + - description: The identifier of the stack. + in: path + name: stack_id + required: true + schema: + type: string + - description: The identifier of the organization. + in: query + name: orgID + required: true + schema: + type: string + responses: + "204": + description: The stack and its associated resources were deleted. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a stack and associated resources + tags: + - Templates get: operationId: ReadStack - tags: - - Templates - summary: Retrieve a stack parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. + - description: The identifier of the stack. + in: path + name: stack_id + required: true + schema: + type: string responses: - '200': - description: Returns the stack. + "200": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Returns the stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a stack + tags: + - Templates patch: operationId: UpdateStack - tags: - - Templates - summary: Update a stack parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. - requestBody: - description: The stack to update. + - description: The identifier of the stack. + in: path + name: stack_id required: true + schema: + type: string + requestBody: content: application/json: schema: - type: object - title: PatchStackRequest properties: - name: - type: string - nullable: true - description: - type: string - nullable: true - templateURLs: - type: array - items: - type: string - nullable: true additionalResources: - type: array items: - type: object properties: - resourceID: - type: string kind: type: string + resourceID: + type: string templateMetaName: type: string required: - - kind - - resourceID + - kind + - resourceID + type: object + type: array + description: + nullable: true + type: string + name: + nullable: true + type: string + templateURLs: + items: + type: string + nullable: true + type: array + title: PatchStackRequest + type: object + description: The stack to update. + required: true responses: - '200': - description: Returns the updated stack. + "200": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Returns the updated stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - operationId: DeleteStack + description: Unexpected error + summary: Update a stack tags: - - Templates - summary: Delete a stack and associated resources - parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. - - in: query - name: orgID - required: true - schema: - type: string - description: The identifier of the organization. - responses: - '204': - description: The stack and its associated resources were deleted. - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/stacks/{stack_id}/uninstall': + - Templates + /api/v2/stacks/{stack_id}/uninstall: post: operationId: UninstallStack - tags: - - Templates - summary: Uninstall a stack parameters: - - in: path - name: stack_id - required: true - schema: - type: string - description: The identifier of the stack. + - description: The identifier of the stack. + in: path + name: stack_id + required: true + schema: + type: string responses: - '200': - description: Returns the uninstalled stack. + "200": content: application/json: schema: $ref: '#/components/schemas/Stack' + description: Returns the uninstalled stack. default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /templates/apply: - post: - operationId: ApplyTemplate + description: Unexpected error + summary: Uninstall a stack tags: - - Templates - summary: Apply or dry-run a template - description: Applies or performs a dry-run of template in an organization. + - Templates + /api/v2/tasks: + get: + operationId: GetTasks + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: Returns task with a specific name. + in: query + name: name + schema: + type: string + - description: Return tasks after a specified ID. + in: query + name: after + schema: + type: string + - description: Filter tasks to a specific user ID. + in: query + name: user + schema: + type: string + - description: Filter tasks to a specific organization name. + in: query + name: org + schema: + type: string + - description: Filter tasks to a specific organization ID. + in: query + name: orgID + schema: + type: string + - description: Filter tasks by a status--"inactive" or "active". + in: query + name: status + schema: + enum: + - active + - inactive + type: string + - description: The number of tasks to return + in: query + name: limit + schema: + default: 100 + maximum: 500 + minimum: 1 + type: integer + - description: Type of task, unset by default. + in: query + name: type + required: false + schema: + default: "" + enum: + - basic + - system + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks' + description: A list of tasks + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all tasks + tags: + - Tasks + post: + operationId: PostTasks + parameters: + - $ref: '#/components/parameters/TraceSpan' requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskCreateRequest' + description: Task to create required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + description: Task created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a new task + tags: + - Tasks + /api/v2/tasks/{taskID}: + delete: + description: Deletes a task and all associated records + operationId: DeleteTasksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the task to delete. + in: path + name: taskID + required: true + schema: + type: string + responses: + "204": + description: Task deleted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a task + tags: + - Tasks + get: + operationId: GetTasksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + description: Task details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a task + tags: + - Tasks + patch: + description: Update a task. This will cancel all queued runs. + operationId: PatchTasksID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskUpdateRequest' + description: Task update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + description: Task updated + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a task + tags: + - Tasks + /api/v2/tasks/{taskID}/labels: + get: + operationId: GetTasksIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a task + tags: + - Tasks + post: + operationId: PostTasksIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: A list of all labels for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a task + tags: + - Tasks + /api/v2/tasks/{taskID}/labels/{labelID}: + delete: + operationId: DeleteTasksIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The label ID. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Task not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label from a task + tags: + - Tasks + /api/v2/tasks/{taskID}/logs: + get: + operationId: GetTasksIDLogs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Logs' + description: All logs for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve all logs for a task + tags: + - Tasks + /api/v2/tasks/{taskID}/members: + get: + operationId: GetTasksIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMembers' + description: A list of users who have member privileges for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all task members + tags: + - Tasks + post: + operationId: PostTasksIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMember' + description: Added to task members + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a member to a task + tags: + - Tasks + /api/v2/tasks/{taskID}/members/{userID}: + delete: + operationId: DeleteTasksIDMembersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "204": + description: Member removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove a member from a task + tags: + - Tasks + /api/v2/tasks/{taskID}/owners: + get: + operationId: GetTasksIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwners' + description: A list of users who have owner privileges for a task + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all owners of a task + tags: + - Tasks + post: + operationId: PostTasksIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwner' + description: Added to task owners + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add an owner to a task + tags: + - Tasks + /api/v2/tasks/{taskID}/owners/{userID}: + delete: + operationId: DeleteTasksIDOwnersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + responses: + "204": + description: Owner removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove an owner from a task + tags: + - Tasks + /api/v2/tasks/{taskID}/runs: + get: + operationId: GetTasksIDRuns + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the task to get runs for. + in: path + name: taskID + required: true + schema: + type: string + - description: Returns runs after a specific ID. + in: query + name: after + schema: + type: string + - description: The number of runs to return + in: query + name: limit + schema: + default: 100 + maximum: 500 + minimum: 1 + type: integer + - description: Filter runs to those scheduled after this time, RFC3339 + in: query + name: afterTime + schema: + format: date-time + type: string + - description: Filter runs to those scheduled before this time, RFC3339 + in: query + name: beforeTime + schema: + format: date-time + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Runs' + description: A list of task runs + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List runs for a task + tags: + - Tasks + post: + operationId: PostTasksIDRuns + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: path + name: taskID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunManually' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Run' + description: Run scheduled to start + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Manually start a task run, overriding the current schedule + tags: + - Tasks + /api/v2/tasks/{taskID}/runs/{runID}: + delete: + operationId: DeleteTasksIDRunsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The run ID. + in: path + name: runID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Cancel a running task + tags: + - Tasks + get: + operationId: GetTasksIDRunsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The run ID. + in: path + name: runID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Run' + description: The run record + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a single run for a task + tags: + - Tasks + /api/v2/tasks/{taskID}/runs/{runID}/logs: + get: + operationId: GetTasksIDRunsIDLogs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: ID of task to get logs for. + in: path + name: taskID + required: true + schema: + type: string + - description: ID of run to get logs for. + in: path + name: runID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Logs' + description: All logs for a run + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve all logs for a run + tags: + - Tasks + /api/v2/tasks/{taskID}/runs/{runID}/retry: + post: + operationId: PostTasksIDRunsIDRetry + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The task ID. + in: path + name: taskID + required: true + schema: + type: string + - description: The run ID. + in: path + name: runID + required: true + schema: + type: string + requestBody: + content: + application/json; charset=utf-8: + schema: + type: object + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Run' + description: Run that has been queued + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retry a task run + tags: + - Tasks + /api/v2/telegraf/plugins: + get: + operationId: GetTelegrafPlugins + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The type of plugin desired. + in: query + name: type + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TelegrafPlugins' + description: A list of Telegraf plugins. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all Telegraf plugins + tags: + - Telegraf Plugins + /api/v2/telegrafs: + get: + operationId: GetTelegrafs + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The organization ID the Telegraf config belongs to. + in: query + name: orgID + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegrafs' + description: A list of Telegraf configurations + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all Telegraf configurations + tags: + - Telegrafs + post: + operationId: PostTelegrafs + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TelegrafRequest' + description: Telegraf configuration to create + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegraf' + description: Telegraf configuration created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a Telegraf configuration + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}: + delete: + operationId: DeleteTelegrafsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a Telegraf configuration + tags: + - Telegrafs + get: + operationId: GetTelegrafsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + - in: header + name: Accept + required: false + schema: + default: application/toml + enum: + - application/toml + - application/json + - application/octet-stream + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegraf' + application/octet-stream: + example: |- + [agent] + interval = "10s" + schema: + type: string + application/toml: + example: |- + [agent] + interval = "10s" + schema: + type: string + description: Telegraf configuration details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a Telegraf configuration + tags: + - Telegrafs + put: + operationId: PutTelegrafsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TelegrafRequest' + description: Telegraf configuration update to apply + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Telegraf' + description: An updated Telegraf configurations + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update a Telegraf configuration + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/labels: + get: + operationId: GetTelegrafsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a Telegraf config + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all labels for a Telegraf config + tags: + - Telegrafs + post: + operationId: PostTelegrafsIDLabels + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LabelResponse' + description: The label added to the Telegraf config + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a label to a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/labels/{labelID}: + delete: + operationId: DeleteTelegrafsIDLabelsID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + - description: The label ID. + in: path + name: labelID + required: true + schema: + type: string + responses: + "204": + description: Delete has been accepted + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Telegraf config not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a label from a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/members: + get: + operationId: GetTelegrafsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMembers' + description: A list of Telegraf config members + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all users with member privileges for a Telegraf config + tags: + - Telegrafs + post: + operationId: PostTelegrafsIDMembers + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as member + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceMember' + description: Member added to Telegraf config + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add a member to a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/members/{userID}: + delete: + operationId: DeleteTelegrafsIDMembersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the member to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "204": + description: Member removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove a member from a Telegraf config + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/owners: + get: + operationId: GetTelegrafsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwners' + description: Returns Telegraf configuration owners as a ResourceOwners list + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: List all owners of a Telegraf configuration + tags: + - Telegrafs + post: + operationId: PostTelegrafsIDOwners + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The Telegraf configuration ID. + in: path + name: telegrafID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddResourceMemberRequestBody' + description: User to add as owner + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOwner' + description: Telegraf configuration owner was added. Returns a ResourceOwner + that references the User. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Add an owner to a Telegraf configuration + tags: + - Telegrafs + /api/v2/telegrafs/{telegrafID}/owners/{userID}: + delete: + operationId: DeleteTelegrafsIDOwnersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the owner to remove. + in: path + name: userID + required: true + schema: + type: string + - description: The Telegraf config ID. + in: path + name: telegrafID + required: true + schema: + type: string + responses: + "204": + description: Owner removed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Remove an owner from a Telegraf config + tags: + - Telegrafs + /api/v2/templates/apply: + post: + description: Applies or performs a dry-run of template in an organization. + operationId: ApplyTemplate + requestBody: content: application/json: schema: @@ -3468,45 +6694,45 @@ paths: text/yml: schema: $ref: '#/components/schemas/TemplateApply' + required: true responses: - '200': + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateSummary' 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. + "201": content: application/json: schema: $ref: '#/components/schemas/TemplateSummary' - '201': 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: - $ref: '#/components/schemas/TemplateSummary' default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - /templates/export: + description: Unexpected error + summary: Apply or dry-run a template + tags: + - Templates + /api/v2/templates/export: post: operationId: ExportTemplate - tags: - - Templates - summary: Export a new template requestBody: - description: Export resources as an InfluxDB template. - required: false content: application/json: schema: oneOf: - - $ref: '#/components/schemas/TemplateExportByID' - - $ref: '#/components/schemas/TemplateExportByName' + - $ref: '#/components/schemas/TemplateExportByID' + - $ref: '#/components/schemas/TemplateExportByName' + description: Export resources as an InfluxDB template. + required: false responses: - '200': - description: The template was created successfully. Returns the newly created template. + "200": content: application/json: schema: @@ -3514,3818 +6740,433 @@ paths: application/x-yaml: schema: $ref: '#/components/schemas/Template' + description: The template was created successfully. Returns the newly created + template. default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}': - get: - operationId: GetTasksID + summary: Export a new template tags: - - Tasks - summary: Retrieve a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: Task details - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchTasksID - tags: - - Tasks - summary: Update a task - description: Update a task. This will cancel all queued runs. - requestBody: - description: Task update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TaskUpdateRequest' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: Task updated - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteTasksID - tags: - - Tasks - summary: Delete a task - description: Deletes a task and all associated records - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The ID of the task to delete. - responses: - '204': - description: Task deleted - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs': - get: - operationId: GetTasksIDRuns - tags: - - Tasks - summary: List runs for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The ID of the task to get runs for. - - in: query - name: after - schema: - type: string - description: Returns runs after a specific ID. - - in: query - name: limit - schema: - type: integer - minimum: 1 - maximum: 500 - default: 100 - description: The number of runs to return - - in: query - name: afterTime - schema: - type: string - format: date-time - description: 'Filter runs to those scheduled after this time, RFC3339' - - in: query - name: beforeTime - schema: - type: string - format: date-time - description: 'Filter runs to those scheduled before this time, RFC3339' - responses: - '200': - description: A list of task runs - content: - application/json: - schema: - $ref: '#/components/schemas/Runs' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDRuns - tags: - - Tasks - summary: 'Manually start a task run, overriding the current schedule' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunManually' - responses: - '201': - description: Run scheduled to start - content: - application/json: - schema: - $ref: '#/components/schemas/Run' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs/{runID}': - get: - operationId: GetTasksIDRunsID - tags: - - Tasks - summary: Retrieve a single run for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: runID - schema: - type: string - required: true - description: The run ID. - responses: - '200': - description: The run record - content: - application/json: - schema: - $ref: '#/components/schemas/Run' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteTasksIDRunsID - tags: - - Tasks - summary: Cancel a running task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: runID - schema: - type: string - required: true - description: The run ID. - responses: - '204': - description: Delete has been accepted - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs/{runID}/retry': - post: - operationId: PostTasksIDRunsIDRetry - tags: - - Tasks - summary: Retry a task run - requestBody: - content: - application/json; charset=utf-8: - schema: - type: object - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: runID - schema: - type: string - required: true - description: The run ID. - responses: - '200': - description: Run that has been queued - content: - application/json: - schema: - $ref: '#/components/schemas/Run' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/logs': - get: - operationId: GetTasksIDLogs - tags: - - Tasks - summary: Retrieve all logs for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: All logs for a task - content: - application/json: - schema: - $ref: '#/components/schemas/Logs' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/runs/{runID}/logs': - get: - operationId: GetTasksIDRunsIDLogs - tags: - - Tasks - summary: Retrieve all logs for a run - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: ID of task to get logs for. - - in: path - name: runID - schema: - type: string - required: true - description: ID of run to get logs for. - responses: - '200': - description: All logs for a run - content: - application/json: - schema: - $ref: '#/components/schemas/Logs' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/labels': - get: - operationId: GetTasksIDLabels - tags: - - Tasks - summary: List all labels for a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: A list of all labels for a task - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDLabels - tags: - - Tasks - summary: Add a label to a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: A list of all labels for a task - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/labels/{labelID}': - delete: - operationId: DeleteTasksIDLabelsID - tags: - - Tasks - summary: Delete a label from a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. - responses: - '204': - description: Delete has been accepted - '404': - description: Task not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /flags: - get: - operationId: GetFlags - tags: - - Users - summary: Return the feature flags for the currently authenticated user - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: Feature flags for the currently authenticated user - content: - application/json: - schema: - $ref: '#/components/schemas/Flags' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /me: - get: - operationId: GetMe - tags: - - Users - summary: Retrieve the currently authenticated user - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: The currently authenticated user. - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /me/password: - put: - operationId: PutMePassword - tags: - - Users - summary: Update a password - security: - - BasicAuthentication: [] - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: New password - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PasswordResetBody' - responses: - '204': - description: Password successfully updated - default: - description: Unsuccessful authentication - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/members': - get: - operationId: GetTasksIDMembers - tags: - - Tasks - summary: List all task members - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: A list of users who have member privileges for a task - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMembers' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDMembers - tags: - - Tasks - summary: Add a member to a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - requestBody: - description: User to add as member - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Added to task members - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMember' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/members/{userID}': - delete: - operationId: DeleteTasksIDMembersID - tags: - - Tasks - summary: Remove a member from a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the member to remove. - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '204': - description: Member removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/owners': - get: - operationId: GetTasksIDOwners - tags: - - Tasks - summary: List all owners of a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '200': - description: A list of users who have owner privileges for a task - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwners' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostTasksIDOwners - tags: - - Tasks - summary: Add an owner to a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - requestBody: - description: User to add as owner - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Added to task owners - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwner' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/tasks/{taskID}/owners/{userID}': - delete: - operationId: DeleteTasksIDOwnersID - tags: - - Tasks - summary: Remove an owner from a task - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the owner to remove. - - in: path - name: taskID - schema: - type: string - required: true - description: The task ID. - responses: - '204': - description: Owner removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/users/{userID}/password': - post: - operationId: PostUsersIDPassword - tags: - - Users - summary: Update a password - security: - - BasicAuthentication: [] - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The user ID. - requestBody: - description: New password - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PasswordResetBody' - responses: - '204': - description: Password successfully updated - default: - description: Unsuccessful authentication - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /checks: - get: - operationId: GetChecks - tags: - - Checks - summary: List all checks - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: query - name: orgID - required: true - description: Only show checks that belong to a specific organization ID. - schema: - type: string - responses: - '200': - description: A list of checks - content: - application/json: - schema: - $ref: '#/components/schemas/Checks' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: CreateCheck - tags: - - Checks - summary: Add new check - requestBody: - description: Check to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostCheck' - responses: - '201': - description: Check created - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}': - get: - operationId: GetChecksID - tags: - - Checks - summary: Retrieve a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: The check requested - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutChecksID - tags: - - Checks - summary: Update a check - requestBody: - description: Check update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: An updated check - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchChecksID - tags: - - Checks - summary: Update a check - requestBody: - description: Check update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CheckPatch' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: An updated check - content: - application/json: - schema: - $ref: '#/components/schemas/Check' - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteChecksID - tags: - - Checks - summary: Delete a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '204': - description: Delete has been accepted - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}/labels': - get: - operationId: GetChecksIDLabels - tags: - - Checks - summary: List all labels for a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: A list of all labels for a check - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostChecksIDLabels - tags: - - Checks - summary: Add a label to a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: The label was added to the check - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}/labels/{labelID}': - delete: - operationId: DeleteChecksIDLabelsID - tags: - - Checks - summary: Delete label from a check - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Check or label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /notificationRules: - get: - operationId: GetNotificationRules - tags: - - NotificationRules - summary: List all notification rules - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: query - name: orgID - required: true - description: Only show notification rules that belong to a specific organization ID. - schema: - type: string - - in: query - name: checkID - description: Only show notifications that belong to the specific check ID. - schema: - type: string - - in: query - name: tag - 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_]+$' - example: 'env:prod' - responses: - '200': - description: A list of notification rules - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRules' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: CreateNotificationRule - tags: - - NotificationRules - summary: Add a notification rule - requestBody: - description: Notification rule to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostNotificationRule' - responses: - '201': - description: Notification rule created - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/checks/{checkID}/query': - get: - operationId: GetChecksIDQuery - tags: - - Checks - summary: Retrieve a check query - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: checkID - schema: - type: string - required: true - description: The check ID. - responses: - '200': - description: The check query requested - content: - application/json: - schema: - $ref: '#/components/schemas/FluxResponse' - '400': - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: Check not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}': - get: - operationId: GetNotificationRulesID - tags: - - NotificationRules - summary: Retrieve a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: The notification rule requested - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutNotificationRulesID - tags: - - NotificationRules - summary: Update a notification rule - requestBody: - description: Notification rule update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: An updated notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - '404': - description: The notification rule was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchNotificationRulesID - tags: - - NotificationRules - summary: Update a notification rule - requestBody: - description: Notification rule update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRuleUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: An updated notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationRule' - '404': - description: The notification rule was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteNotificationRulesID - tags: - - NotificationRules - summary: Delete a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '204': - description: Delete has been accepted - '404': - description: The check was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}/labels': - get: - operationId: GetNotificationRulesIDLabels - tags: - - NotificationRules - summary: List all labels for a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: A list of all labels for a notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostNotificationRuleIDLabels - tags: - - NotificationRules - summary: Add a label to a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: The label was added to the notification rule - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}/labels/{labelID}': - delete: - operationId: DeleteNotificationRulesIDLabelsID - tags: - - NotificationRules - summary: Delete label from a notification rule - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Rule or label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationRules/{ruleID}/query': - get: - operationId: GetNotificationRulesIDQuery - tags: - - Rules - summary: Retrieve a notification rule query - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: ruleID - schema: - type: string - required: true - description: The notification rule ID. - responses: - '200': - description: The notification rule query requested - content: - application/json: - schema: - $ref: '#/components/schemas/FluxResponse' - '400': - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: Notification rule not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /notificationEndpoints: - get: - operationId: GetNotificationEndpoints - tags: - - NotificationEndpoints - summary: List all notification endpoints - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: query - name: orgID - required: true - description: Only show notification endpoints that belong to specific organization ID. - schema: - type: string - responses: - '200': - description: A list of notification endpoints - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoints' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: CreateNotificationEndpoint - tags: - - NotificationEndpoints - summary: Add a notification endpoint - requestBody: - description: Notification endpoint to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PostNotificationEndpoint' - responses: - '201': - description: Notification endpoint created - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationEndpoints/{endpointID}': - get: - operationId: GetNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Retrieve a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: The notification endpoint requested - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - operationId: PutNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Update a notification endpoint - requestBody: - description: A new notification endpoint to replace the existing endpoint with - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: An updated notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - '404': - description: The notification endpoint was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Update a notification endpoint - requestBody: - description: Check update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpointUpdate' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: An updated notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/NotificationEndpoint' - '404': - description: The notification endpoint was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteNotificationEndpointsID - tags: - - NotificationEndpoints - summary: Delete a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '204': - description: Delete has been accepted - '404': - description: The endpoint was not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationEndpoints/{endpointID}/labels': - get: - operationId: GetNotificationEndpointsIDLabels - tags: - - NotificationEndpoints - summary: List all labels for a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - responses: - '200': - description: A list of all labels for a notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/LabelsResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostNotificationEndpointIDLabels - tags: - - NotificationEndpoints - summary: Add a label to a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - requestBody: - description: Label to add - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LabelMapping' - responses: - '201': - description: The label was added to the notification endpoint - content: - application/json: - schema: - $ref: '#/components/schemas/LabelResponse' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/notificationEndpoints/{endpointID}/labels/{labelID}': - delete: - operationId: DeleteNotificationEndpointsIDLabelsID - tags: - - NotificationEndpoints - summary: Delete a label from a notification endpoint - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: endpointID - schema: - type: string - required: true - description: The notification endpoint ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The ID of the label to delete. - responses: - '204': - description: Delete has been accepted - '404': - description: Endpoint or label not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /health: - get: - operationId: GetHealth - tags: - - Health - summary: Get the health of an instance - servers: - - url: '' - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: The instance is healthy - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheck' - '503': - description: The instance is unhealthy - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheck' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - /ready: - get: - operationId: GetReady - tags: - - Ready - summary: Get the readiness of an instance at startup - servers: - - url: '' - parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: The instance is ready - content: - application/json: - schema: - $ref: '#/components/schemas/Ready' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - /users: + - Templates + /api/v2/users: get: operationId: GetUsers - tags: - - Users - summary: List all users parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/After' - - in: query - name: name - schema: - type: string - - in: query - name: id - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/After' + - in: query + name: name + schema: + type: string + - in: query + name: id + schema: + type: string responses: - '200': - description: A list of users + "200": content: application/json: schema: $ref: '#/components/schemas/Users' + description: A list of users default: - description: Unexpected error $ref: '#/components/responses/ServerError' + description: Unexpected error + summary: List all users + tags: + - Users post: operationId: PostUsers - tags: - - Users - summary: Create a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' description: User to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/User' responses: - '201': + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserResponse' description: User created - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' default: - description: Unexpected error $ref: '#/components/responses/ServerError' - '/users/{userID}': - get: - operationId: GetUsersID + description: Unexpected error + summary: Create a user tags: - - Users - summary: Retrieve a user - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The user ID. - responses: - '200': - description: User details - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - patch: - operationId: PatchUsersID - tags: - - Users - summary: Update a user - requestBody: - description: User update to apply - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/User' - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the user to update. - responses: - '200': - description: User updated - content: - application/json: - schema: - $ref: '#/components/schemas/UserResponse' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' + - Users + /api/v2/users/{userID}: delete: operationId: DeleteUsersID - tags: - - Users - summary: Delete a user parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of the user to delete. + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the user to delete. + in: path + name: userID + required: true + schema: + type: string responses: - '204': + "204": description: User deleted default: - description: Unexpected error $ref: '#/components/responses/ServerError' - /setup: + description: Unexpected error + summary: Delete a user + tags: + - Users get: - operationId: GetSetup - tags: - - Setup - summary: 'Check if database has default user, org, bucket' - description: 'Returns `true` if no default user, organization, or bucket has been created.' + operationId: GetUsersID parameters: - - $ref: '#/components/parameters/TraceSpan' - responses: - '200': - description: allowed true or false - content: - application/json: - schema: - $ref: '#/components/schemas/IsOnboarding' - post: - operationId: PostSetup - tags: - - Setup - summary: 'Set up initial user, org and bucket' - description: 'Post an onboarding request to set up initial user, org and bucket.' - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Source to create + - $ref: '#/components/parameters/TraceSpan' + - description: The user ID. + in: path + name: userID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/OnboardingRequest' + schema: + type: string responses: - '201': - description: 'Created default user, bucket, org' + "200": content: application/json: schema: - $ref: '#/components/schemas/OnboardingResponse' + $ref: '#/components/schemas/UserResponse' + description: User details default: - description: Unexpected error $ref: '#/components/responses/ServerError' - /authorizations: - get: - operationId: GetAuthorizations + description: Unexpected error + summary: Retrieve a user tags: - - Authorizations - summary: List all authorizations - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: userID - schema: - type: string - description: Only show authorizations that belong to a user ID. - - in: query - name: user - schema: - type: string - description: Only show authorizations that belong to a user name. - - in: query - name: orgID - schema: - type: string - description: Only show authorizations that belong to an organization ID. - - in: query - name: org - schema: - type: string - description: Only show authorizations that belong to a organization name. - responses: - '200': - description: A list of authorizations - content: - application/json: - schema: - $ref: '#/components/schemas/Authorizations' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - post: - operationId: PostAuthorizations - tags: - - Authorizations - summary: Create an authorization - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Authorization to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AuthorizationPostRequest' - responses: - '201': - description: 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' - '/authorizations/{authID}': - get: - operationId: GetAuthorizationsID - tags: - - Authorizations - summary: Retrieve an authorization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: authID - schema: - type: string - required: true - description: The ID of the authorization to get. - responses: - '200': - description: Authorization details - content: - application/json: - schema: - $ref: '#/components/schemas/Authorization' - default: - description: Unexpected error - $ref: '#/components/responses/ServerError' + - Users patch: - operationId: PatchAuthorizationsID - tags: - - Authorizations - summary: Update an authorization to be active or inactive - requestBody: - description: Authorization to update + operationId: PatchUsersID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The ID of the user to update. + in: path + name: userID required: true + schema: + type: string + requestBody: 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 authorization to update. + $ref: '#/components/schemas/User' + description: User update to apply + required: true responses: - '200': - description: The active or inactive authorization + "200": content: application/json: schema: - $ref: '#/components/schemas/Authorization' + $ref: '#/components/schemas/UserResponse' + description: User updated default: - description: Unexpected error $ref: '#/components/responses/ServerError' - delete: - operationId: DeleteAuthorizationsID + description: Unexpected error + summary: Update a user tags: - - Authorizations - summary: Delete an authorization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: authID - schema: - type: string - required: true - description: The ID of the authorization to delete. - responses: - '204': - description: Authorization deleted - 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' + - Users + /api/v2/users/{userID}/password: post: - operationId: PostLegacyAuthorizations - tags: - - Legacy Authorizations - summary: Create a legacy authorization + operationId: PostUsersIDPassword parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Legacy authorization to create + - $ref: '#/components/parameters/TraceSpan' + - description: The user ID. + in: path + name: userID 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 + schema: + type: string 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' + description: New password + required: true responses: - '204': - description: Legacy authorization password set + "204": + description: Password successfully updated default: - description: Unexpected error - $ref: '#/components/responses/ServerError' - /variables: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unsuccessful authentication + security: + - BasicAuthentication: [] + summary: Update a password + tags: + - Users + /api/v2/variables: get: operationId: GetVariables - tags: - - Variables - summary: List all variables parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: The name of the organization. - schema: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string + - $ref: '#/components/parameters/TraceSpan' + - description: The name of the organization. + in: query + name: org + schema: + type: string + - description: The organization ID. + in: query + name: orgID + schema: + type: string responses: - '200': - description: A list of variables for an organization + "200": content: application/json: schema: $ref: '#/components/schemas/Variables' - '400': + description: A list of variables for an organization + "400": + $ref: '#/components/responses/ServerError' description: Invalid request - $ref: '#/components/responses/ServerError' default: - description: Internal server error $ref: '#/components/responses/ServerError' + description: Internal server error + summary: List all variables + tags: + - Variables post: operationId: PostVariables - summary: Create a variable - tags: - - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/TraceSpan' requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' description: Variable to create required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' responses: - '201': + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' description: Variable created - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' default: - description: Internal server error $ref: '#/components/responses/ServerError' - '/variables/{variableID}': - get: - operationId: GetVariablesID + description: Internal server error + summary: Create a variable tags: - - Variables - summary: Retrieve a variable - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. - responses: - '200': - description: Variable found - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' - '404': - description: Variable not found - $ref: '#/components/responses/ServerError' - default: - description: Internal server error - $ref: '#/components/responses/ServerError' + - Variables + /api/v2/variables/{variableID}: delete: operationId: DeleteVariablesID - tags: - - Variables - summary: Delete a variable parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string responses: - '204': + "204": description: Variable deleted default: - description: Internal server error $ref: '#/components/responses/ServerError' + description: Internal server error + summary: Delete a variable + tags: + - Variables + get: + operationId: GetVariablesID + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + description: Variable found + "404": + $ref: '#/components/responses/ServerError' + description: Variable not found + default: + $ref: '#/components/responses/ServerError' + description: Internal server error + summary: Retrieve a variable + tags: + - Variables patch: operationId: PatchVariablesID - summary: Update a variable - tags: - - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' description: Variable update to apply required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Variable' responses: - '200': - description: Variable updated + "200": content: application/json: schema: $ref: '#/components/schemas/Variable' + description: Variable updated default: - description: Internal server error $ref: '#/components/responses/ServerError' + description: Internal server error + summary: Update a variable + tags: + - Variables put: operationId: PutVariablesID - summary: Replace a variable - tags: - - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: variableID - required: true - schema: - type: string - description: The variable ID. - requestBody: - description: Variable to replace + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/Variable' + description: Variable to replace + required: true responses: - '200': - description: Variable updated + "200": content: application/json: schema: $ref: '#/components/schemas/Variable' + description: Variable updated default: - description: Internal server error $ref: '#/components/responses/ServerError' - /sources: - post: - operationId: PostSources - tags: - - Sources - summary: Create a source - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Source to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Source' - responses: - '201': - description: Created Source - content: - application/json: - schema: - $ref: '#/components/schemas/Source' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - operationId: GetSources - tags: - - Sources - summary: List all sources - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: The name of the organization. - schema: - type: string - responses: - '200': - description: A list of sources - content: - application/json: - schema: - $ref: '#/components/schemas/Sources' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/sources/{sourceID}': - delete: - operationId: DeleteSourcesID - tags: - - Sources - summary: Delete a source - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - responses: - '204': - description: Delete has been accepted - '404': - description: View not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchSourcesID - tags: - - Sources - summary: Update a Source - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - requestBody: - description: Source update - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Source' - responses: - '200': - description: Created Source - content: - application/json: - schema: - $ref: '#/components/schemas/Source' - '404': - description: Source not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - operationId: GetSourcesID - tags: - - Sources - summary: Retrieve a source - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - responses: - '200': - description: A source - content: - application/json: - schema: - $ref: '#/components/schemas/Source' - '404': - description: Source not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/sources/{sourceID}/health': - get: - operationId: GetSourcesIDHealth - tags: - - Sources - summary: Get the health of a source - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - responses: - '200': - description: The source is healthy - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheck' - '503': - description: The source is not healthy - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheck' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/sources/{sourceID}/buckets': - get: - operationId: GetSourcesIDBuckets - tags: - - Sources - - Buckets - summary: Get buckets in a source - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - - in: query - name: org - description: The name of the organization. - schema: - type: string - responses: - '200': - description: A source - content: - application/json: - schema: - $ref: '#/components/schemas/Buckets' - '404': - description: Source not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /scrapers: - get: - operationId: GetScrapers - tags: - - Scraper Targets - summary: List all scraper targets - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: name - description: Specifies the name of the scraper target. - schema: - 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.' - schema: - type: array - items: - type: string - - in: query - name: orgID - description: Specifies the organization ID of the scraper target. - schema: - type: string - - in: query - name: org - description: Specifies the organization name of the scraper target. - schema: - type: string - responses: - '200': - description: All scraper targets - content: - application/json: - schema: - $ref: '#/components/schemas/ScraperTargetResponses' - post: - operationId: PostScrapers - summary: Create a scraper target - tags: - - Scraper Targets - parameters: - - $ref: '#/components/parameters/TraceSpan' - requestBody: - description: Scraper target to create - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ScraperTargetRequest' - responses: - '201': - description: Scraper target created - content: - application/json: - schema: - $ref: '#/components/schemas/ScraperTargetResponse' - default: description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/scrapers/{scraperTargetID}': + summary: Replace a variable + tags: + - Variables + /api/v2/variables/{variableID}/labels: get: - operationId: GetScrapersID - tags: - - Scraper Targets - summary: Retrieve a scraper target + operationId: GetVariablesIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - required: true - schema: - type: string - description: The identifier of the scraper target. - responses: - '200': - description: The scraper target - content: - application/json: - schema: - $ref: '#/components/schemas/ScraperTargetResponse' - default: - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - operationId: DeleteScrapersID - tags: - - Scraper Targets - summary: Delete a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - required: true - schema: - type: string - description: The identifier of the scraper target. - responses: - '204': - description: Scraper target deleted - default: - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - patch: - operationId: PatchScrapersID - summary: Update a scraper target - tags: - - Scraper Targets - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - required: true - schema: - type: string - description: The identifier of the scraper target. - requestBody: - description: Scraper target update to apply + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ScraperTargetRequest' + schema: + type: string responses: - '200': - description: Scraper target updated - content: - application/json: - schema: - $ref: '#/components/schemas/ScraperTargetResponse' - default: - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/scrapers/{scraperTargetID}/labels': - get: - operationId: GetScrapersIDLabels - tags: - - Scraper Targets - summary: List all labels for a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - responses: - '200': - description: A list of labels for a scraper target. + "200": content: application/json: schema: $ref: '#/components/schemas/LabelsResponse' + description: A list of all labels for a variable default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - post: - operationId: PostScrapersIDLabels + description: Unexpected error + summary: List all labels for a variable tags: - - Scraper Targets - summary: Add a label to a scraper target + - Variables + post: + operationId: PostVariablesIDLabels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - requestBody: - description: Label to add + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID required: true + schema: + type: string + requestBody: content: application/json: schema: $ref: '#/components/schemas/LabelMapping' + description: Label to add + required: true responses: - '201': - description: The newly added label + "201": content: application/json: schema: $ref: '#/components/schemas/LabelResponse' + description: The newly added label default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/scrapers/{scraperTargetID}/labels/{labelID}': - delete: - operationId: DeleteScrapersIDLabelsID + description: Unexpected error + summary: Add a label to a variable tags: - - Scraper Targets - summary: Delete a label from a scraper target + - Variables + /api/v2/variables/{variableID}/labels/{labelID}: + delete: + operationId: DeleteVariablesIDLabelsID parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. + - $ref: '#/components/parameters/TraceSpan' + - description: The variable ID. + in: path + name: variableID + required: true + schema: + type: string + - description: The label ID to delete. + in: path + name: labelID + required: true + schema: + type: string responses: - '204': + "204": description: Delete has been accepted - '404': - description: Scraper target not found + "404": content: application/json: schema: $ref: '#/components/schemas/Error' + description: Variable not found default: - description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' - '/scrapers/{scraperTargetID}/members': - get: - operationId: GetScrapersIDMembers - tags: - - Scraper Targets - summary: List all users with member privileges for a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - responses: - '200': - description: A list of scraper target members - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMembers' - default: description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + summary: Delete a label from a variable + tags: + - Variables + /api/v2/write: post: - operationId: PostScrapersIDMembers - tags: - - Scraper Targets - summary: Add a member to a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - requestBody: - description: User to add as member - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Member added to scraper targets - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceMember' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/scrapers/{scraperTargetID}/members/{userID}': - delete: - operationId: DeleteScrapersIDMembersID - tags: - - Scraper Targets - summary: Remove a member from a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of member to remove. - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - responses: - '204': - description: Member removed - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/scrapers/{scraperTargetID}/owners': - get: - operationId: GetScrapersIDOwners - tags: - - Scraper Targets - summary: List all owners of a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - responses: - '200': - description: A list of scraper target owners - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwners' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - operationId: PostScrapersIDOwners - tags: - - Scraper Targets - summary: Add an owner to a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - requestBody: - description: User to add as owner - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AddResourceMemberRequestBody' - responses: - '201': - description: Scraper target owner added - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOwner' - default: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '/scrapers/{scraperTargetID}/owners/{userID}': - delete: - operationId: DeleteScrapersIDOwnersID - tags: - - Scraper Targets - summary: Remove an owner from a scraper target - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: userID - schema: - type: string - required: true - description: The ID of owner to remove. - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - responses: - '204': - description: Owner removed - default: - description: Unexpected error - content: - 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' - /write: - post: - operationId: PostWrite - tags: - - Write - summary: Write data description: | Writes data to a bucket. @@ -7339,784 +7180,563 @@ paths: - 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: Data in line protocol format. + operationId: PostWrite + parameters: + - $ref: '#/components/parameters/TraceSpan' + - description: When present, the header value tells the database that compression + is applied to the line protocol in the request body. + in: header + name: Content-Encoding + schema: + default: identity + description: The header value specifies that the line protocol in the request + body is encoded with gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + - description: The header value indicates the format of the data in the request + body. + in: header + name: Content-Type + schema: + default: text/plain; charset=utf-8 + description: | + `text/plain` specifies line protocol. `UTF-8` is the default character set. + enum: + - text/plain + - text/plain; charset=utf-8 + - application/vnd.influx.arrow + type: string + - 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`. + in: header + name: Content-Length + schema: + description: The length in decimal number of octets. + type: integer + - description: The header value specifies the response format. + in: header + name: Accept + schema: + default: application/json + description: The response format for errors. + enum: + - application/json + type: string + - 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. + in: query + name: org required: true + schema: + description: Organization name or ID. + type: string + - description: The parameter value specifies the ID of the destination organization + for writes. If both `orgID` and `org` are specified, `org` takes precedence. + in: query + name: orgID + schema: + type: string + - description: The destination bucket for writes. + in: query + name: bucket + required: true + schema: + description: All points within batch are written to this bucket. + type: string + - description: The precision for the unix timestamps within the body line-protocol. + in: query + name: precision + schema: + $ref: '#/components/schemas/WritePrecision' + requestBody: content: text/plain: schema: - type: string format: byte - parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Encoding - 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: 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: The header value indicates the format of the data in the request body. - schema: - type: string - description: | - `text/plain` specifies line protocol. `UTF-8` is the default character set. - default: text/plain; charset=utf-8 - enum: - - text/plain - - text/plain; charset=utf-8 - - application/vnd.influx.arrow - - in: header - name: Content-Length - 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: The header value specifies the response format. - schema: - type: string - description: The response format for errors. - default: application/json - enum: - - application/json - - in: query - name: org - 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: Organization name or ID. - - in: query - name: orgID - 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 - name: bucket - description: The destination bucket for writes. - required: true - schema: - type: string - description: All points within batch are written to this bucket. - - in: query - name: precision - description: The precision for the unix timestamps within the body line-protocol. - schema: - $ref: '#/components/schemas/WritePrecision' + type: string + description: Data in line protocol format. + required: true responses: - '204': - 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: 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. + "204": + 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": content: application/json: - schema: - $ref: '#/components/schemas/LineProtocolError' examples: measurementSchemaFieldTypeConflict: - summary: Example of a field type conflict thrown by an explicit bucket schema + summary: Example of a field type conflict thrown by an explicit + bucket schema value: code: invalid - message: 'partial write error (2 written): unable to parse ''air_sensor,service=S1,sensor=L1 temperature="90.5",humidity=70.0 1632850122'': schema: field type for field "temperature" not permitted by schema; got String but expected Float' - '401': - 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. + message: 'partial write error (2 written): unable to parse ''air_sensor,service=S1,sensor=L1 + temperature="90.5",humidity=70.0 1632850122'': schema: field + type for field "temperature" not permitted by schema; got String + but expected Float' + schema: + $ref: '#/components/schemas/LineProtocolError' + 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. + "401": content: application/json: - schema: - $ref: '#/components/schemas/Error' examples: tokenNotAuthorized: summary: Token is not authorized to access the organization or resource value: code: unauthorized message: unauthorized access - '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' + 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. + "404": + content: + application/json: examples: resource-not-found: summary: Not found error value: code: not found message: bucket "air_sensor" not found - '413': - description: | - All request data was rejected and not written. InfluxDB OSS only returns this error if the [Go (golang) `ioutil.ReadAll()`](https://pkg.go.dev/io/ioutil#ReadAll) function raises an error. + schema: + $ref: '#/components/schemas/Error' + 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. + "413": content: application/json: schema: $ref: '#/components/schemas/LineProtocolLengthError' - '500': - description: Internal server error. + description: | + All request data was rejected and not written. InfluxDB OSS only returns this error if the [Go (golang) `ioutil.ReadAll()`](https://pkg.go.dev/io/ioutil#ReadAll) function raises an error. + "500": content: application/json: - schema: - $ref: '#/components/schemas/Error' examples: internalError: summary: Internal error example value: code: internal error - '503': - description: The server is temporarily unavailable to accept writes. The `Retry-After` header describes when to try the write again. + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + "503": + 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 + type: integer default: $ref: '#/components/responses/ServerError' + summary: Write data + tags: + - Write components: parameters: - TraceSpan: - in: header - name: Zap-Trace-Span - description: OpenTracing span context - example: - trace_id: '1' - span_id: '1' - baggage: - key: value + After: + description: | + The last resource ID from which to seek from (but not including). This is to be used instead of `offset`. + in: query + name: after required: false schema: type: string - Offset: - in: query - name: offset - required: false - schema: - type: integer - minimum: 0 - Limit: - in: query - name: limit - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - default: 20 Descending: in: query name: descending required: false schema: - type: boolean default: false + type: boolean + Limit: + in: query + name: limit + required: false + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + Offset: + in: query + name: offset + required: false + schema: + minimum: 0 + type: integer SortBy: in: query name: sortBy required: false schema: type: string - After: - in: query - name: after + TraceSpan: + description: OpenTracing span context + example: + baggage: + key: value + span_id: "1" + trace_id: "1" + in: header + name: Zap-Trace-Span 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`. schemas: - LanguageRequest: - description: Flux query to be analyzed. - type: object - required: - - query + ASTResponse: + description: Contains the AST for the supplied Flux query properties: - query: - description: Flux query script to be analyzed - type: string - Query: - description: Query influx using the Flux language + ast: + $ref: '#/components/schemas/Package' type: object - required: - - query + AddResourceMemberRequestBody: properties: - extern: - $ref: '#/components/schemas/File' - query: - description: Query script to execute. + id: type: string - type: - description: The type of query. Must be "flux". - type: string - enum: - - flux - 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) - 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. - type: string - format: date-time - InfluxQLQuery: - description: Query influx using the InfluxQL language - type: object - required: - - query - properties: - query: - description: InfluxQL query execute. - type: string - type: - description: The type of query. Must be "influxql". - type: string - enum: - - influxql - bucket: - 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. - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - path: - description: Package import path - type: string - package: - description: Package name - type: string - files: - description: Package files - type: array - items: - $ref: '#/components/schemas/File' - File: - description: Represents a source from a single file - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' name: - description: The name of the file. type: string - package: - $ref: '#/components/schemas/PackageClause' - imports: - description: A list of package imports - type: array - items: - $ref: '#/components/schemas/ImportDeclaration' - body: - description: List of Flux statements - type: array - items: - $ref: '#/components/schemas/Statement' - PackageClause: - description: Defines a package identifier - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - name: - $ref: '#/components/schemas/Identifier' - ImportDeclaration: - description: Declares a package import - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - as: - $ref: '#/components/schemas/Identifier' - path: - $ref: '#/components/schemas/StringLiteral' - DeletePredicateRequest: - description: The delete predicate request. - type: object required: - - start - - stop + - id + type: object + AnalyzeQueryResponse: properties: - start: - description: RFC3339Nano + errors: + items: + properties: + character: + type: integer + column: + type: integer + line: + type: integer + message: + type: string + type: object + type: array + type: object + ArrayExpression: + description: Used to create and directly specify the elements of an array object + properties: + elements: + description: Elements of the array + items: + $ref: '#/components/schemas/Expression' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + Authorization: + allOf: + - $ref: '#/components/schemas/AuthorizationUpdateRequest' + - properties: + createdAt: + format: date-time + readOnly: true + type: string + id: + readOnly: true + type: string + links: + example: + self: /api/v2/authorizations/1 + user: /api/v2/users/12 + properties: + self: + $ref: '#/components/schemas/Link' + readOnly: true + user: + $ref: '#/components/schemas/Link' + readOnly: true + readOnly: true + type: object + org: + description: Name of the org token is scoped to. + readOnly: true + type: string + orgID: + description: ID of org that authorization is scoped to. + type: string + permissions: + description: List of permissions for an auth. An auth must have at least + one Permission. + items: + $ref: '#/components/schemas/Permission' + minItems: 1 + type: array + token: + description: Passed via the Authorization Header and Token Authentication + type. + readOnly: true + type: string + updatedAt: + format: date-time + readOnly: true + type: string + user: + description: Name of user that created and owns the token. + readOnly: true + type: string + userID: + description: ID of user that created and owns the token. + readOnly: true + type: string + type: object + required: + - orgID + - permissions + AuthorizationPostRequest: + allOf: + - $ref: '#/components/schemas/AuthorizationUpdateRequest' + - properties: + orgID: + description: ID of org that authorization is scoped to. + type: string + permissions: + description: List of permissions for an auth. An auth must have at least + one Permission. + items: + $ref: '#/components/schemas/Permission' + minItems: 1 + type: array + userID: + description: ID of user that authorization is scoped to. + type: string + type: object + required: + - orgID + - permissions + AuthorizationUpdateRequest: + properties: + description: + description: A description of the token. type: string - format: date-time - stop: - description: RFC3339Nano + status: + default: active + description: If inactive the token is inactive and requests using the token + will be rejected. + enum: + - active + - inactive type: string - format: date-time - predicate: - description: InfluxQL-like delete statement - example: tag1="value1" and (tag2="value2" and tag3!="value3") + Authorizations: + properties: + authorizations: + items: + $ref: '#/components/schemas/Authorization' + type: array + links: + $ref: '#/components/schemas/Links' + readOnly: true + type: object + Axes: + description: The viewport for a View's visualizations + properties: + x: + $ref: '#/components/schemas/Axis' + "y": + $ref: '#/components/schemas/Axis' + required: + - x + - "y" + type: object + Axis: + description: The description of a particular axis for a visualization. + properties: + base: + description: Base represents the radix for formatting axis values. + enum: + - "" + - "2" + - "10" type: string - Node: - oneOf: - - $ref: '#/components/schemas/Expression' - - $ref: '#/components/schemas/Block' - NodeType: - description: Type of AST node + bounds: + 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 + maxItems: 2 + minItems: 0 + type: array + label: + description: Label is a description of this Axis + type: string + prefix: + description: Prefix represents a label prefix for formatting axis values. + type: string + scale: + $ref: '#/components/schemas/AxisScale' + suffix: + description: Suffix represents a label suffix for formatting axis values. + type: string + type: object + AxisScale: + description: 'Scale is the axis formatting scale. Supported: "log", "linear"' + enum: + - log + - linear type: string - Block: - description: A set of statements - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - body: - description: Block body - type: array - items: - $ref: '#/components/schemas/Statement' - Statement: - oneOf: - - $ref: '#/components/schemas/BadStatement' - - $ref: '#/components/schemas/VariableAssignment' - - $ref: '#/components/schemas/MemberAssignment' - - $ref: '#/components/schemas/ExpressionStatement' - - $ref: '#/components/schemas/ReturnStatement' - - $ref: '#/components/schemas/OptionStatement' - - $ref: '#/components/schemas/BuiltinStatement' - - $ref: '#/components/schemas/TestStatement' BadStatement: - description: A placeholder for statements for which no correct statement nodes can be created - type: object + description: A placeholder for statements for which no correct statement nodes + can be created properties: - type: - $ref: '#/components/schemas/NodeType' text: description: Raw source text type: string - VariableAssignment: - description: Represents the declaration of a variable - type: object - properties: type: $ref: '#/components/schemas/NodeType' - id: - $ref: '#/components/schemas/Identifier' - init: - $ref: '#/components/schemas/Expression' - MemberAssignment: - description: Object property assignment type: object + BandViewProperties: properties: - type: - $ref: '#/components/schemas/NodeType' - member: - $ref: '#/components/schemas/MemberExpression' - 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 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - expression: - $ref: '#/components/schemas/Expression' - ReturnStatement: - description: Defines an expression to return - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - argument: - $ref: '#/components/schemas/Expression' - OptionStatement: - description: A single variable declaration - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - assignment: - oneOf: - - $ref: '#/components/schemas/VariableAssignment' - - $ref: '#/components/schemas/MemberAssignment' - BuiltinStatement: - description: Declares a builtin identifier and its type - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - id: - $ref: '#/components/schemas/Identifier' - TestStatement: - description: Declares a Flux test case - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - assignment: - $ref: '#/components/schemas/VariableAssignment' - Expression: - oneOf: - - $ref: '#/components/schemas/ArrayExpression' - - $ref: '#/components/schemas/DictExpression' - - $ref: '#/components/schemas/FunctionExpression' - - $ref: '#/components/schemas/BinaryExpression' - - $ref: '#/components/schemas/CallExpression' - - $ref: '#/components/schemas/ConditionalExpression' - - $ref: '#/components/schemas/LogicalExpression' - - $ref: '#/components/schemas/MemberExpression' - - $ref: '#/components/schemas/IndexExpression' - - $ref: '#/components/schemas/ObjectExpression' - - $ref: '#/components/schemas/ParenExpression' - - $ref: '#/components/schemas/PipeExpression' - - $ref: '#/components/schemas/UnaryExpression' - - $ref: '#/components/schemas/BooleanLiteral' - - $ref: '#/components/schemas/DateTimeLiteral' - - $ref: '#/components/schemas/DurationLiteral' - - $ref: '#/components/schemas/FloatLiteral' - - $ref: '#/components/schemas/IntegerLiteral' - - $ref: '#/components/schemas/PipeLiteral' - - $ref: '#/components/schemas/RegexpLiteral' - - $ref: '#/components/schemas/StringLiteral' - - $ref: '#/components/schemas/UnsignedIntegerLiteral' - - $ref: '#/components/schemas/Identifier' - ArrayExpression: - description: Used to create and directly specify the elements of an array object - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - elements: - description: Elements of the array - type: array + axes: + $ref: '#/components/schemas/Axes' + colors: + description: Colors define color encoding of data into a visualization items: - $ref: '#/components/schemas/Expression' - DictExpression: - description: Used to create and directly specify the elements of a dictionary - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - elements: - description: Elements of the dictionary + $ref: '#/components/schemas/DashboardColor' type: array - items: - $ref: '#/components/schemas/DictItem' - DictItem: - description: A key-value pair in a dictionary - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - key: - $ref: '#/components/schemas/Expression' - val: - $ref: '#/components/schemas/Expression' - FunctionExpression: - description: Function expression - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - params: - description: Function parameters - type: array - items: - $ref: '#/components/schemas/Property' - body: - $ref: '#/components/schemas/Node' - BinaryExpression: - description: uses binary operators to act on two operands in an expression - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - operator: - type: string - left: - $ref: '#/components/schemas/Expression' - right: - $ref: '#/components/schemas/Expression' - CallExpression: - description: Represents a function call - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - callee: - $ref: '#/components/schemas/Expression' - arguments: - description: Function arguments - type: array - items: - $ref: '#/components/schemas/Expression' - ConditionalExpression: - description: 'Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`' - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - test: - $ref: '#/components/schemas/Expression' - alternate: - $ref: '#/components/schemas/Expression' - consequent: - $ref: '#/components/schemas/Expression' - LogicalExpression: - description: Represents the rule conditions that collectively evaluate to either true or false - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - operator: - type: string - left: - $ref: '#/components/schemas/Expression' - right: - $ref: '#/components/schemas/Expression' - MemberExpression: - description: Represents accessing a property of an object - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - object: - $ref: '#/components/schemas/Expression' - property: - $ref: '#/components/schemas/PropertyKey' - IndexExpression: - description: Represents indexing into an array - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - array: - $ref: '#/components/schemas/Expression' - index: - $ref: '#/components/schemas/Expression' - ObjectExpression: - description: Allows the declaration of an anonymous object within a declaration - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - properties: - description: Object properties - type: array - items: - $ref: '#/components/schemas/Property' - ParenExpression: - description: Represents an expression wrapped in parenthesis - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - expression: - $ref: '#/components/schemas/Expression' - PipeExpression: - description: Call expression with pipe argument - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - argument: - $ref: '#/components/schemas/Expression' - call: - $ref: '#/components/schemas/CallExpression' - UnaryExpression: - description: Uses operators to act on a single operand in an expression - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - operator: - type: string - argument: - $ref: '#/components/schemas/Expression' - BooleanLiteral: - description: Represents boolean values - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: boolean - DateTimeLiteral: - description: Represents an instant in time with nanosecond precision using the syntax of golang's RFC3339 Nanosecond variant - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - 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 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - values: - description: Duration values - type: array - items: - $ref: '#/components/schemas/Duration' - FloatLiteral: - description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: number - IntegerLiteral: - description: Represents integer numbers - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: string - PipeLiteral: - 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 - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: string - StringLiteral: - description: Expressions begin and end with double quote marks - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - value: - type: string - UnsignedIntegerLiteral: - description: Represents integer numbers - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - 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. - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - magnitude: - type: integer - unit: - type: string - Property: - description: The value associated with a key - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - key: - $ref: '#/components/schemas/PropertyKey' - value: - $ref: '#/components/schemas/Expression' - PropertyKey: - oneOf: - - $ref: '#/components/schemas/Identifier' - - $ref: '#/components/schemas/StringLiteral' - Identifier: - description: A valid Flux identifier - type: object - properties: - type: - $ref: '#/components/schemas/NodeType' - 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' - type: object - properties: - header: - description: 'If true, the results will contain a header row' - type: boolean - default: true - delimiter: - description: 'Separator between cells; the default is ,' - type: string - default: ',' - maxLength: 1 - minLength: 1 - annotations: - description: 'https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns' - type: array - uniqueItems: true + generateXAxisTicks: items: type: string - enum: - - group - - datatype - - default - commentPrefix: - description: Character prefixed to comment strings - type: string - default: '#' - maxLength: 1 - minLength: 0 - dateTimeFormat: - description: Format of timestamps - type: string - default: RFC3339 + type: array + generateYAxisTicks: + items: + type: string + type: array + geom: + $ref: '#/components/schemas/XYGeom' + hoverDimension: enum: - - RFC3339 - - RFC3339Nano - AuthorizationUpdateRequest: - properties: - status: - description: If inactive the token is inactive and requests using the token will be rejected. - default: active + - auto + - x + - "y" + - xy type: string + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + lowerColumn: + type: string + mainColumn: + type: string + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: enum: - - active - - inactive - description: + - chronograf-v2 type: string - description: A description of the token. - PostBucketRequest: - properties: - orgID: + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + timeFormat: type: string - name: + type: + enum: + - band type: string - description: + upperColumn: type: string - rp: + xColumn: type: string - retentionRules: - $ref: '#/components/schemas/RetentionRules' - schemaType: - $ref: '#/components/schemas/SchemaType' - default: implicit + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yColumn: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer required: - - orgID - - name - - retentionRules + - type + - geom + - queries + - shape + - axes + - colors + - note + - showNoteWhenEmpty + type: object + BinaryExpression: + description: uses binary operators to act on two operands in an expression + properties: + left: + $ref: '#/components/schemas/Expression' + operator: + type: string + right: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Block: + description: A set of statements + properties: + body: + description: Block body + items: + $ref: '#/components/schemas/Statement' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + BooleanLiteral: + description: Represents boolean values + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: boolean + type: object Bucket: properties: - links: - type: object + createdAt: + format: date-time readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: example: labels: /api/v2/buckets/1/labels members: /api/v2/buckets/1/members @@ -8126,5128 +7746,3052 @@ components: write: /api/v2/write?org=2&bucket=1 properties: labels: + $ref: '#/components/schemas/Link' description: URL to retrieve labels for this bucket - $ref: '#/components/schemas/Link' members: + $ref: '#/components/schemas/Link' description: URL to retrieve members that can read this bucket - $ref: '#/components/schemas/Link' org: + $ref: '#/components/schemas/Link' description: URL to retrieve parent organization for this bucket - $ref: '#/components/schemas/Link' owners: - description: URL to retrieve owners that can read and write to this bucket. $ref: '#/components/schemas/Link' + description: URL to retrieve owners that can read and write to this + bucket. self: + $ref: '#/components/schemas/Link' description: URL for this bucket - $ref: '#/components/schemas/Link' write: - description: URL to write line protocol for this bucket $ref: '#/components/schemas/Link' - id: + description: URL to write line protocol for this bucket readOnly: true - type: string - type: - readOnly: true - type: string - default: user - enum: - - user - - system + type: object name: type: string - description: - type: string orgID: type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' rp: type: string schemaType: $ref: '#/components/schemas/SchemaType' default: implicit - createdAt: - type: string - format: date-time + type: + default: user + enum: + - user + - system readOnly: true + type: string updatedAt: - type: string format: date-time readOnly: true - retentionRules: - $ref: '#/components/schemas/RetentionRules' - labels: - $ref: '#/components/schemas/Labels' + type: string required: - - name - - retentionRules - Buckets: - type: object + - name + - retentionRules + BucketMetadataManifest: + properties: + bucketID: + type: string + bucketName: + type: string + defaultRetentionPolicy: + type: string + description: + type: string + organizationID: + type: string + organizationName: + type: string + retentionPolicies: + $ref: '#/components/schemas/RetentionPolicyManifests' + required: + - organizationID + - organizationName + - bucketID + - bucketName + - defaultRetentionPolicy + - retentionPolicies + type: object + BucketMetadataManifests: + items: + $ref: '#/components/schemas/BucketMetadataManifest' + type: array + BucketShardMapping: + properties: + newId: + format: int64 + type: integer + oldId: + format: int64 + type: integer + required: + - oldId + - newId + type: object + BucketShardMappings: + items: + $ref: '#/components/schemas/BucketShardMapping' + type: array + Buckets: properties: - links: - readOnly: true - $ref: '#/components/schemas/Links' buckets: - type: array items: $ref: '#/components/schemas/Bucket' - RetentionRules: - type: array - description: Rules to expire or retain data. No rules means data never expires. - items: - $ref: '#/components/schemas/RetentionRule' - PatchBucketRequest: - type: object - description: Updates to an existing bucket resource. - properties: - name: - type: string - description: - type: string - retentionRules: - $ref: '#/components/schemas/PatchRetentionRules' - PatchRetentionRules: - type: array - description: Updates to rules to expire or retain data. No rules means no updates. - items: - $ref: '#/components/schemas/PatchRetentionRule' - PatchRetentionRule: - type: object - description: Updates to a rule to expire or retain data. - properties: - type: - type: string - default: expire - enum: - - expire - everySeconds: - type: integer - format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. - example: 86400 - minimum: 0 - shardGroupDurationSeconds: - type: integer - format: int64 - description: Shard duration measured in seconds. - required: - - type - RetentionRule: - type: object - properties: - type: - type: string - default: expire - enum: - - expire - everySeconds: - type: integer - format: int64 - description: Duration in seconds for how long data will be kept in the database. 0 means infinite. - example: 86400 - minimum: 0 - shardGroupDurationSeconds: - type: integer - format: int64 - description: Shard duration measured in seconds. - required: - - type - - everySeconds - Link: - type: string - format: uri - readOnly: true - description: URI of resource. - Links: - type: object - properties: - next: - $ref: '#/components/schemas/Link' - self: - $ref: '#/components/schemas/Link' - prev: - $ref: '#/components/schemas/Link' - required: - - self - Logs: - type: object - properties: - events: - readOnly: true type: array - items: - $ref: '#/components/schemas/LogEvent' - LogEvent: - type: object - properties: - time: - readOnly: true - description: 'Time event occurred, RFC3339Nano.' - type: string - format: date-time - message: - readOnly: true - description: A description of the event that occurred. - type: string - example: Halt and catch fire - runID: - readOnly: true - description: the ID of the task that logged - type: string - Organization: - properties: - links: - type: object - readOnly: true - example: - self: /api/v2/orgs/1 - members: /api/v2/orgs/1/members - owners: /api/v2/orgs/1/owners - labels: /api/v2/orgs/1/labels - secrets: /api/v2/orgs/1/secrets - buckets: /api/v2/buckets?org=myorg - tasks: /api/v2/tasks?org=myorg - dashboards: /api/v2/dashboards?org=myorg - properties: - self: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - secrets: - $ref: '#/components/schemas/Link' - buckets: - $ref: '#/components/schemas/Link' - tasks: - $ref: '#/components/schemas/Link' - dashboards: - $ref: '#/components/schemas/Link' - id: - readOnly: true - type: string - name: - type: string - description: - type: string - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - status: - description: If inactive the organization is inactive. - default: active - type: string - enum: - - active - - inactive - required: - - name - Organizations: - type: object - properties: links: $ref: '#/components/schemas/Links' - orgs: - type: array - items: - $ref: '#/components/schemas/Organization' - PostOrganizationRequest: + readOnly: true type: object - properties: - name: - type: string - description: - type: string - required: - - name - PatchOrganizationRequest: - type: object - properties: - name: - type: string - description: New name to set on the organization - description: - type: string - description: New description to set on the organization - TemplateApply: - type: object - properties: - dryRun: - type: boolean - orgID: - type: string - stackID: - type: string - template: - type: object - properties: - contentType: - type: string - sources: - type: array - items: - type: string - contents: - $ref: '#/components/schemas/Template' - templates: - type: array - items: - type: object - properties: - contentType: - type: string - sources: - type: array - items: - type: string - contents: - $ref: '#/components/schemas/Template' - envRefs: - type: object - additionalProperties: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - secrets: - type: object - additionalProperties: - type: string - remotes: - type: array - items: - type: object - properties: - url: - type: string - contentType: - type: string - required: - - url - actions: - type: array - items: - oneOf: - - type: object - properties: - action: - type: string - enum: - - skipKind - properties: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - required: - - kind - - type: object - properties: - action: - type: string - enum: - - skipResource - properties: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - resourceTemplateName: - type: string - required: - - kind - - resourceTemplateName - TemplateKind: - type: string + BuilderAggregateFunctionType: enum: - - Bucket - - Check - - CheckDeadman - - CheckThreshold - - Dashboard - - Label - - NotificationEndpoint - - NotificationEndpointHTTP - - NotificationEndpointPagerDuty - - NotificationEndpointSlack - - NotificationRule - - Task - - Telegraf - - Variable - TemplateExportByID: - type: object - properties: - stackID: - type: string - orgIDs: - type: array - items: - type: object - properties: - orgID: - type: string - resourceFilters: - type: object - properties: - byLabel: - type: array - items: - type: string - byResourceKind: - type: array - items: - $ref: '#/components/schemas/TemplateKind' - resources: - 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: - stackID: - type: string - orgIDs: - type: array - items: - type: object - properties: - orgID: - type: string - resourceFilters: - type: object - properties: - byLabel: - type: array - items: - type: string - byResourceKind: - type: array - items: - $ref: '#/components/schemas/TemplateKind' - resources: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - name: - type: string - required: - - name - - kind - Template: - type: array - items: - type: object - properties: - apiVersion: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - meta: - type: object - properties: - name: - type: string - spec: - type: object - TemplateEnvReferences: - type: array - items: - type: object - properties: - resourceField: - type: string - description: Field the environment reference corresponds too - envRefKey: - type: string - description: Key identified as environment reference and is the key identified in the template - value: - description: Value provided to fulfill reference - nullable: true - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - defaultValue: - description: Default value that will be provided for the reference when no value is provided - nullable: true - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - required: - - resourceField - - envRefKey - TemplateSummary: - type: object - properties: - sources: - type: array - items: - type: string - stackID: - type: string - summary: - type: object - properties: - buckets: - type: array - items: - type: object - properties: - id: - type: string - orgID: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - name: - type: string - description: - type: string - retentionPeriod: - type: integer - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - checks: - type: array - items: - allOf: - - $ref: '#/components/schemas/CheckDiscriminator' - - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - dashboards: - type: array - items: - type: object - properties: - id: - type: string - orgID: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - name: - type: string - description: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - charts: - type: array - items: - $ref: '#/components/schemas/TemplateChart' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - labels: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - labelMappings: - type: array - items: - type: object - properties: - status: - type: string - resourceTemplateMetaName: - type: string - resourceName: - type: string - resourceID: - type: string - resourceType: - type: string - labelTemplateMetaName: - type: string - labelName: - type: string - labelID: - type: string - missingEnvRefs: - type: array - items: - type: string - missingSecrets: - type: array - items: - type: string - notificationEndpoints: - type: array - items: - allOf: - - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - notificationRules: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - name: - type: string - description: - type: string - endpointTemplateMetaName: - type: string - endpointID: - type: string - endpointType: - type: string - every: - type: string - offset: - type: string - messageTemplate: - type: string - status: - type: string - statusRules: - type: array - items: - type: object - properties: - currentLevel: - type: string - previousLevel: - type: string - tagRules: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - tasks: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - id: - type: string - name: - type: string - cron: - type: string - description: - type: string - every: - type: string - offset: - type: string - query: - type: string - status: - type: string - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - telegrafConfigs: - type: array - items: - allOf: - - $ref: '#/components/schemas/TelegrafRequest' - - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - variables: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - id: - type: string - orgID: - type: string - name: - type: string - description: - type: string - arguments: - $ref: '#/components/schemas/VariableProperties' - labelAssociations: - type: array - items: - $ref: '#/components/schemas/TemplateSummaryLabel' - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - diff: - type: object - properties: - buckets: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - retentionRules: - $ref: '#/components/schemas/RetentionRules' - old: - type: object - properties: - name: - type: string - description: - type: string - retentionRules: - $ref: '#/components/schemas/RetentionRules' - checks: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - $ref: '#/components/schemas/CheckDiscriminator' - old: - $ref: '#/components/schemas/CheckDiscriminator' - dashboards: - type: array - items: - type: object - properties: - stateStatus: - type: string - id: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - charts: - type: array - items: - $ref: '#/components/schemas/TemplateChart' - old: - type: object - properties: - name: - type: string - description: - type: string - charts: - type: array - items: - $ref: '#/components/schemas/TemplateChart' - labels: - type: array - items: - type: object - properties: - stateStatus: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - color: - type: string - description: - type: string - old: - type: object - properties: - name: - type: string - color: - type: string - description: - type: string - labelMappings: - type: array - items: - type: object - properties: - status: - type: string - resourceType: - type: string - resourceID: - type: string - resourceTemplateMetaName: - type: string - resourceName: - type: string - labelID: - type: string - labelTemplateMetaName: - type: string - labelName: - type: string - notificationEndpoints: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - old: - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - notificationRules: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - endpointName: - type: string - endpointID: - type: string - endpointType: - type: string - every: - type: string - offset: - type: string - messageTemplate: - type: string - status: - type: string - statusRules: - type: array - items: - type: object - properties: - currentLevel: - type: string - previousLevel: - type: string - tagRules: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string - old: - type: object - properties: - name: - type: string - description: - type: string - endpointName: - type: string - endpointID: - type: string - endpointType: - type: string - every: - type: string - offset: - type: string - messageTemplate: - type: string - status: - type: string - statusRules: - type: array - items: - type: object - properties: - currentLevel: - type: string - previousLevel: - type: string - tagRules: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string - tasks: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - cron: - type: string - description: - type: string - every: - type: string - offset: - type: string - query: - type: string - status: - type: string - old: - type: object - properties: - name: - type: string - cron: - type: string - description: - type: string - every: - type: string - offset: - type: string - query: - type: string - status: - type: string - telegrafConfigs: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - $ref: '#/components/schemas/TelegrafRequest' - old: - $ref: '#/components/schemas/TelegrafRequest' - variables: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - stateStatus: - type: string - id: - type: string - templateMetaName: - type: string - new: - type: object - properties: - name: - type: string - description: - type: string - args: - $ref: '#/components/schemas/VariableProperties' - old: - type: object - properties: - name: - type: string - description: - type: string - args: - $ref: '#/components/schemas/VariableProperties' - errors: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - reason: - type: string - fields: - type: array - items: - type: string - indexes: - type: array - items: - type: integer - TemplateSummaryLabel: - type: object - properties: - id: - type: string - orgID: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - name: - type: string - properties: - type: object - properties: - color: - type: string - description: - type: string - envReferences: - $ref: '#/components/schemas/TemplateEnvReferences' - TemplateChart: - type: object - properties: - xPos: - type: integer - yPos: - type: integer - height: - type: integer - width: - type: integer - properties: - $ref: '#/components/schemas/ViewProperties' - Stack: - type: object - properties: - id: - type: string - orgID: - type: string - createdAt: - type: string - format: date-time - readOnly: true - events: - type: array - items: - type: object - properties: - eventType: - type: string - name: - type: string - description: - type: string - sources: - type: array - items: - type: string - resources: - type: array - items: - type: object - properties: - apiVersion: - type: string - resourceID: - type: string - kind: - $ref: '#/components/schemas/TemplateKind' - templateMetaName: - type: string - associations: - type: array - items: - type: object - properties: - kind: - $ref: '#/components/schemas/TemplateKind' - metaName: - type: string - links: - type: object - properties: - self: - type: string - urls: - type: array - items: - type: string - updatedAt: - type: string - format: date-time - readOnly: true - Runs: - type: object - properties: - links: - $ref: '#/components/schemas/Links' - runs: - type: array - items: - $ref: '#/components/schemas/Run' - Run: - properties: - id: - readOnly: true - type: string - taskID: - readOnly: true - type: string - status: - readOnly: true - type: string - enum: - - scheduled - - started - - failed - - success - - canceled - scheduledFor: - description: 'Time used for run''s "now" option, RFC3339.' - type: string - format: date-time - log: - description: An array of logs associated with the run. - type: array - readOnly: true - items: - $ref: '#/components/schemas/LogEvent' - startedAt: - readOnly: true - description: 'Time run started executing, RFC3339Nano.' - type: string - format: date-time - finishedAt: - readOnly: true - description: 'Time run finished executing, RFC3339Nano.' - type: string - format: date-time - requestedAt: - readOnly: true - description: 'Time run was manually requested, RFC3339Nano.' - type: string - format: date-time - links: - type: object - readOnly: true - example: - self: /api/v2/tasks/1/runs/1 - task: /api/v2/tasks/1 - retry: /api/v2/tasks/1/runs/1/retry - properties: - self: - type: string - format: uri - task: - type: string - format: uri - retry: - type: string - format: uri - RunManually: - properties: - scheduledFor: - nullable: true - description: 'Time used for run''s "now" option, RFC3339. Default is the server''s now time.' - type: string - format: date-time - Tasks: - type: object - properties: - links: - readOnly: true - $ref: '#/components/schemas/Links' - tasks: - type: array - items: - $ref: '#/components/schemas/Task' - Task: - type: object - properties: - id: - readOnly: true - type: string - type: - 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. - type: string - org: - description: The name of the organization that owns this Task. - type: string - 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 - status: - $ref: '#/components/schemas/TaskStatusType' - labels: - $ref: '#/components/schemas/Labels' - authorizationID: - 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. - type: string - every: - description: A simple task repetition schedule; parsed from Flux. - type: string - cron: - 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.' - type: string - latestCompleted: - description: 'Timestamp of latest scheduled, completed run, RFC3339.' - type: string - format: date-time - readOnly: true - lastRunStatus: - readOnly: true - type: string - enum: - - failed - - success - - canceled - lastRunError: - readOnly: true - type: string - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - links: - type: object - readOnly: true - example: - self: /api/v2/tasks/1 - owners: /api/v2/tasks/1/owners - members: /api/v2/tasks/1/members - labels: /api/v2/tasks/1/labels - runs: /api/v2/tasks/1/runs - logs: /api/v2/tasks/1/logs - properties: - self: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - runs: - $ref: '#/components/schemas/Link' - logs: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - required: - - id - - name - - orgID - - flux - TaskStatusType: + - filter + - group type: string - enum: - - active - - inactive - UserResponse: - properties: - id: - readOnly: true - type: string - oauthID: - type: string - name: - type: string - status: - description: If inactive the user is inactive. - default: active - type: string - enum: - - active - - inactive - links: - type: object - readOnly: true - example: - self: /api/v2/users/1 - properties: - self: - type: string - format: uri - required: - - name - Flags: - type: object - additionalProperties: true - ResourceMember: - allOf: - - $ref: '#/components/schemas/UserResponse' - - type: object - properties: - role: - type: string - default: member - enum: - - member - ResourceMembers: - type: object - properties: - links: - type: object - properties: - self: - type: string - format: uri - users: - type: array - items: - $ref: '#/components/schemas/ResourceMember' - ResourceOwner: - allOf: - - $ref: '#/components/schemas/UserResponse' - - type: object - properties: - role: - type: string - default: owner - enum: - - owner - ResourceOwners: - type: object - properties: - links: - type: object - properties: - self: - type: string - format: uri - users: - type: array - items: - $ref: '#/components/schemas/ResourceOwner' - FluxSuggestions: - type: object - properties: - funcs: - type: array - items: - $ref: '#/components/schemas/FluxSuggestion' - FluxSuggestion: - type: object - properties: - name: - type: string - params: - type: object - additionalProperties: - type: string - Routes: - properties: - authorizations: - type: string - format: uri - buckets: - type: string - format: uri - dashboards: - type: string - format: uri - external: - type: object - properties: - statusFeed: - type: string - format: uri - variables: - type: string - format: uri - me: - type: string - format: uri - flags: - type: string - format: uri - orgs: - type: string - format: uri - query: - type: object - properties: - self: - type: string - format: uri - ast: - type: string - format: uri - analyze: - type: string - format: uri - suggestions: - type: string - format: uri - setup: - type: string - format: uri - signin: - type: string - format: uri - signout: - type: string - format: uri - sources: - type: string - format: uri - system: - type: object - properties: - metrics: - type: string - format: uri - debug: - type: string - format: uri - health: - type: string - format: uri - tasks: - type: string - format: uri - telegrafs: - type: string - format: uri - users: - type: string - format: uri - write: - type: string - format: uri - Error: - properties: - code: - description: code is the machine-readable error code. - readOnly: true - type: string - enum: - - internal error - - not found - - conflict - - invalid - - unprocessable entity - - empty value - - unavailable - - forbidden - - too many requests - - unauthorized - - method not allowed - - request too large - - unsupported media type - message: - readOnly: true - description: message is a human-readable message. - type: string - op: - readOnly: true - 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. - type: string - required: - - code - - message - LineProtocolError: - properties: - code: - description: Code is the machine-readable error code. - readOnly: true - type: string - enum: - - internal error - - not found - - conflict - - invalid - - empty value - - unavailable - message: - readOnly: true - description: Message is a human-readable message. - type: string - op: - readOnly: true - 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. - type: string - line: - readOnly: true - description: First line within sent body containing malformed data - type: integer - format: int32 - required: - - code - - message - - op - - err - LineProtocolLengthError: - properties: - code: - description: Code is the machine-readable error code. - readOnly: true - type: string - enum: - - invalid - message: - readOnly: true - description: Message is a human-readable message. - type: string - maxLength: - readOnly: true - description: Max length in bytes for a body of line-protocol. - type: integer - format: int32 - required: - - code - - message - - maxLength - Field: - type: object - properties: - value: - 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.' - type: string - enum: - - func - - field - - integer - - number - - regex - - wildcard - alias: - 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 - type: array - items: - $ref: '#/components/schemas/Field' BuilderConfig: - type: object properties: - buckets: - type: array - items: - type: string - tags: - type: array - items: - $ref: '#/components/schemas/BuilderTagsType' - functions: - type: array - items: - $ref: '#/components/schemas/BuilderFunctionsType' aggregateWindow: - type: object properties: - period: - type: string fillValues: type: boolean - BuilderTagsType: - type: object - properties: - key: - type: string - values: - type: array + period: + type: string + type: object + buckets: items: type: string + type: array + functions: + items: + $ref: '#/components/schemas/BuilderFunctionsType' + type: array + tags: + items: + $ref: '#/components/schemas/BuilderTagsType' + type: array + type: object + BuilderFunctionsType: + properties: + name: + type: string + type: object + BuilderTagsType: + properties: aggregateFunctionType: $ref: '#/components/schemas/BuilderAggregateFunctionType' - BuilderAggregateFunctionType: - type: string - enum: - - filter - - group - BuilderFunctionsType: - type: object - properties: - name: - type: string - DashboardQuery: - type: object - properties: - text: - type: string - description: The text of the Flux query. - editMode: - $ref: '#/components/schemas/QueryEditMode' - name: - type: string - builderConfig: - $ref: '#/components/schemas/BuilderConfig' - QueryEditMode: - type: string - enum: - - builder - - advanced - Axis: - type: object - description: The description of a particular axis for a visualization. - properties: - bounds: - 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' - items: - type: string - label: - description: Label is a description of this Axis - type: string - prefix: - description: Prefix represents a label prefix for formatting axis values. - type: string - suffix: - description: Suffix represents a label suffix for formatting axis values. - type: string - base: - description: Base represents the radix for formatting axis values. - type: string - enum: - - '' - - '2' - - '10' - scale: - $ref: '#/components/schemas/AxisScale' - AxisScale: - description: 'Scale is the axis formatting scale. Supported: "log", "linear"' - type: string - enum: - - log - - linear - DashboardColor: - type: object - description: Defines an encoding of data value into color space. - required: - - id - - type - - hex - - name - - value - properties: - id: - description: The unique ID of the view color. - type: string - type: - description: Type is how the color is used. - type: string - enum: - - min - - max - - threshold - - scale - - text - - background - hex: - description: The hex number of the color - type: string - maxLength: 7 - minLength: 7 - name: - description: The user-facing name of the hex color. - type: string - value: - description: The data value mapped to this color. - type: number - format: float - RenamableField: - description: Describes a field that can be renamed and made visible or invisible. - type: object - properties: - internalName: - description: The calculated name of a field. - readOnly: true - type: string - displayName: - description: The name that a field is renamed to by the user. - type: string - visible: - description: Indicates whether this field should be visible on the table. - type: boolean - XYViewProperties: - type: object - required: - - type - - geom - - queries - - shape - - axes - - colors - - note - - showNoteWhenEmpty - - position - properties: - timeFormat: - type: string - type: - type: string - enum: - - xy - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - axes: - $ref: '#/components/schemas/Axes' - staticLegend: - $ref: '#/components/schemas/StaticLegend' - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - shadeBelow: - type: boolean - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - position: - type: string - enum: - - overlaid - - stacked - geom: - $ref: '#/components/schemas/XYGeom' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - XYGeom: - type: string - enum: - - line - - step - - stacked - - bar - - monotoneX - BandViewProperties: - type: object - required: - - type - - geom - - queries - - shape - - axes - - colors - - note - - showNoteWhenEmpty - properties: - timeFormat: - type: string - type: - type: string - enum: - - band - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - axes: - $ref: '#/components/schemas/Axes' - staticLegend: - $ref: '#/components/schemas/StaticLegend' - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - upperColumn: - type: string - mainColumn: - type: string - lowerColumn: - type: string - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - geom: - $ref: '#/components/schemas/XYGeom' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - LinePlusSingleStatProperties: - type: object - required: - - type - - queries - - shape - - axes - - colors - - note - - showNoteWhenEmpty - - prefix - - suffix - - decimalPlaces - - position - properties: - timeFormat: - type: string - type: - type: string - enum: - - line-plus-single-stat - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - axes: - $ref: '#/components/schemas/Axes' - staticLegend: - $ref: '#/components/schemas/StaticLegend' - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - shadeBelow: - type: boolean - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - position: - type: string - enum: - - overlaid - - stacked - prefix: - type: string - suffix: - type: string - decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - MosaicViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - ySeriesColumns - - fillColumns - - xDomain - - yDomain - - xAxisLabel - - yAxisLabel - - xPrefix - - yPrefix - - xSuffix - - ySuffix - properties: - timeFormat: - type: string - type: - type: string - enum: - - mosaic - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - type: string - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yLabelColumnSeparator: - type: string - yLabelColumns: - type: array - items: - type: string - ySeriesColumns: - type: array - items: - type: string - fillColumns: - type: array - items: - type: string - xDomain: - type: array - items: - type: number - maxItems: 2 - yDomain: - type: array - items: - type: number - maxItems: 2 - xAxisLabel: - type: string - yAxisLabel: - type: string - xPrefix: - type: string - xSuffix: - type: string - yPrefix: - type: string - ySuffix: - type: string - hoverDimension: - type: string - enum: - - auto - - x - - 'y' - - xy - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - ScatterViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - yColumn - - fillColumns - - symbolColumns - - xDomain - - yDomain - - xAxisLabel - - yAxisLabel - - xPrefix - - yPrefix - - xSuffix - - ySuffix - properties: - timeFormat: - type: string - type: - type: string - enum: - - scatter - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - type: string - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - fillColumns: - type: array - items: - type: string - symbolColumns: - type: array - items: - type: string - xDomain: - type: array - items: - type: number - maxItems: 2 - yDomain: - type: array - items: - type: number - maxItems: 2 - xAxisLabel: - type: string - yAxisLabel: - type: string - xPrefix: - type: string - xSuffix: - type: string - yPrefix: - type: string - ySuffix: - type: string - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - HeatmapViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - yColumn - - xDomain - - yDomain - - xAxisLabel - - yAxisLabel - - xPrefix - - yPrefix - - xSuffix - - ySuffix - - binSize - properties: - timeFormat: - type: string - type: - type: string - enum: - - heatmap - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - type: string - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - generateXAxisTicks: - type: array - items: - type: string - xTotalTicks: - type: integer - xTickStart: - type: number - format: float - xTickStep: - type: number - format: float - yColumn: - type: string - generateYAxisTicks: - type: array - items: - type: string - yTotalTicks: - type: integer - yTickStart: - type: number - format: float - yTickStep: - type: number - format: float - xDomain: - type: array - items: - type: number - maxItems: 2 - yDomain: - type: array - items: - type: number - maxItems: 2 - xAxisLabel: - type: string - yAxisLabel: - type: string - xPrefix: - type: string - xSuffix: - type: string - yPrefix: - type: string - ySuffix: - type: string - binSize: - type: number - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - SingleStatViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - prefix - - tickPrefix - - suffix - - tickSuffix - - decimalPlaces - properties: - type: - type: string - enum: - - single-stat - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - prefix: - type: string - tickPrefix: - type: string - suffix: - type: string - tickSuffix: - type: string - staticLegend: - $ref: '#/components/schemas/StaticLegend' - decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' - HistogramViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - xColumn - - fillColumns - - xDomain - - xAxisLabel - - position - - binCount - properties: - type: - type: string - enum: - - histogram - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - xColumn: - type: string - fillColumns: - type: array - items: - type: string - xDomain: - type: array - items: - type: number - format: float - xAxisLabel: - type: string - position: - type: string - enum: - - overlaid - - stacked - binCount: - type: integer - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - GaugeViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - prefix - - tickPrefix - - suffix - - tickSuffix - - decimalPlaces - properties: - type: - type: string - enum: - - gauge - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - prefix: - type: string - tickPrefix: - type: string - suffix: - type: string - tickSuffix: - type: string - decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' - TableViewProperties: - type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - tableOptions - - fieldOptions - - timeFormat - - decimalPlaces - properties: - type: - type: string - enum: - - table - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - tableOptions: - type: object - properties: - verticalTimeAxis: - 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 - type: string - enum: - - truncate - - wrap - - single-line - fixFirstColumn: - 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 - type: array - items: - $ref: '#/components/schemas/RenamableField' - timeFormat: - 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: - - type - - shape - - note - properties: - type: - type: string - enum: - - markdown - shape: - type: string - enum: - - chronograf-v2 - note: - type: string - CheckViewProperties: - type: object - required: - - type - - shape - - checkID - - queries - - colors - properties: - type: - type: string - enum: - - check - shape: - type: string - enum: - - chronograf-v2 - checkID: - type: string - check: - $ref: '#/components/schemas/Check' - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - legendColorizeRows: - type: boolean - legendHide: - type: boolean - legendOpacity: - type: number - format: float - legendOrientationThreshold: - type: integer - GeoViewLayer: - type: object - oneOf: - - $ref: '#/components/schemas/GeoCircleViewLayer' - - $ref: '#/components/schemas/GeoHeatMapViewLayer' - - $ref: '#/components/schemas/GeoPointMapViewLayer' - - $ref: '#/components/schemas/GeoTrackMapViewLayer' - GeoViewLayerProperties: - type: object - required: - - type - properties: - type: - type: string - enum: - - heatmap - - circleMap - - pointMap - - trackMap - GeoCircleViewLayer: - allOf: - - $ref: '#/components/schemas/GeoViewLayerProperties' - - type: object - required: - - radiusField - - radiusDimension - - colorField - - colorDimension - - colors - properties: - radiusField: - type: string - description: Radius field - radiusDimension: - $ref: '#/components/schemas/Axis' - colorField: - type: string - description: Circle color field - colorDimension: - $ref: '#/components/schemas/Axis' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - radius: - description: Maximum radius size in pixels - type: integer - interpolateColors: - description: Interpolate circle color based on displayed value - type: boolean - GeoPointMapViewLayer: - allOf: - - $ref: '#/components/schemas/GeoViewLayerProperties' - - type: object - required: - - colorField - - colorDimension - - colors - properties: - colorField: - type: string - description: Marker color field - colorDimension: - $ref: '#/components/schemas/Axis' - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - 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' - - type: object - required: - - trackWidth - - speed - - randomColors - - trackPointVisualization - properties: - trackWidth: - description: Width of the track - type: integer - speed: - description: Speed of the track animation - type: integer - randomColors: - description: Assign different colors to different tracks - type: boolean - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - GeoHeatMapViewLayer: - allOf: - - $ref: '#/components/schemas/GeoViewLayerProperties' - - type: object - required: - - intensityField - - intensityDimension - - radius - - blur - - colors - properties: - intensityField: - type: string - description: Intensity field - intensityDimension: - $ref: '#/components/schemas/Axis' - radius: - description: Radius size in pixels - type: integer - blur: - description: Blur for heatmap points - type: integer - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - GeoViewProperties: - type: object - required: - - type - - shape - - queries - - note - - showNoteWhenEmpty - - center - - zoom - - allowPanAndZoom - - detectCoordinateFields - - layers - properties: - type: - type: string - enum: - - geo - queries: - type: array - items: - $ref: '#/components/schemas/DashboardQuery' - shape: - type: string - enum: - - chronograf-v2 - center: - description: Coordinates of the center of the map - type: object - required: - - lat - - lon - properties: - lat: - description: Latitude of the center of the map - type: number - format: double - lon: - description: Longitude of the center of the map - type: number - format: double - zoom: - description: Zoom level used for initial display of the map - type: number - format: double - minimum: 1 - maximum: 28 - allowPanAndZoom: - description: 'If true, map zoom and pan controls are enabled on the dashboard view' - type: boolean - default: true - detectCoordinateFields: - 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 - note: - type: string - showNoteWhenEmpty: - description: 'If true, will display note when empty' - type: boolean - colors: - description: Colors define color encoding of data into a visualization - type: array - items: - $ref: '#/components/schemas/DashboardColor' - layers: - description: List of individual layers shown in the map - 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 - required: - - x - - 'y' - properties: - x: - $ref: '#/components/schemas/Axis' - 'y': - $ref: '#/components/schemas/Axis' - StaticLegend: - description: StaticLegend represents the options specific to the static legend - type: object - properties: - colorizeRows: - type: boolean - heightRatio: - type: number - format: float - show: - type: boolean - opacity: - type: number - format: float - orientationThreshold: - type: integer - valueAxis: - type: string - widthRatio: - type: number - format: float - DecimalPlaces: - description: 'Indicates whether decimal places should be enforced, and how many digits it should show.' - type: object - properties: - isEnforced: - description: Indicates whether decimal point setting should be enforced - type: boolean - digits: - description: The number of digits after decimal to display - type: integer - format: int32 - ConstantVariableProperties: - properties: - type: - type: string - enum: - - constant values: - type: array items: type: string - MapVariableProperties: - properties: - type: - type: string - enum: - - map - values: - type: object - additionalProperties: - type: string - QueryVariableProperties: - properties: - type: - type: string - enum: - - query - values: - type: object - properties: - query: - type: string - language: - type: string - VariableProperties: + type: array type: object - oneOf: - - $ref: '#/components/schemas/QueryVariableProperties' - - $ref: '#/components/schemas/ConstantVariableProperties' - - $ref: '#/components/schemas/MapVariableProperties' - ViewProperties: - oneOf: - - $ref: '#/components/schemas/LinePlusSingleStatProperties' - - $ref: '#/components/schemas/XYViewProperties' - - $ref: '#/components/schemas/SingleStatViewProperties' - - $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' - - $ref: '#/components/schemas/HeatmapViewProperties' - - $ref: '#/components/schemas/MosaicViewProperties' - - $ref: '#/components/schemas/BandViewProperties' - - $ref: '#/components/schemas/GeoViewProperties' - View: - required: - - name - - properties + BuiltinStatement: + description: Declares a builtin identifier and its type properties: - links: - type: object - readOnly: true - properties: - self: - type: string id: - readOnly: true - type: string - name: - type: string - properties: - $ref: '#/components/schemas/ViewProperties' - Views: + $ref: '#/components/schemas/Identifier' + type: + $ref: '#/components/schemas/NodeType' type: object + CallExpression: + description: Represents a function call properties: - links: - type: object - properties: - self: - type: string - views: - type: array + arguments: + description: Function arguments items: - $ref: '#/components/schemas/View' - CellUpdate: - type: object - properties: - x: - type: integer - format: int32 - 'y': - type: integer - format: int32 - w: - type: integer - format: int32 - h: - type: integer - format: int32 - CreateCell: - type: object - properties: - name: - type: string - x: - type: integer - format: int32 - 'y': - type: integer - format: int32 - w: - type: integer - format: int32 - h: - type: integer - format: int32 - usingView: - type: string - description: Makes a copy of the provided view. - AnalyzeQueryResponse: - type: object - properties: - errors: + $ref: '#/components/schemas/Expression' type: array - items: - type: object - properties: - line: - type: integer - column: - type: integer - character: - type: integer - message: - type: string - CellWithViewProperties: + callee: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' type: object - allOf: - - $ref: '#/components/schemas/Cell' - - type: object - properties: - name: - type: string - properties: - $ref: '#/components/schemas/ViewProperties' Cell: - type: object properties: + h: + format: int32 + type: integer id: type: string links: - type: object properties: self: type: string view: type: string - x: - type: integer - format: int32 - 'y': - type: integer - format: int32 - w: - type: integer - format: int32 - h: - type: integer - format: int32 + type: object viewID: - type: string description: The reference to a view from the views API. - CellsWithViewProperties: - type: array - items: - $ref: '#/components/schemas/CellWithViewProperties' + type: string + w: + format: int32 + type: integer + x: + format: int32 + type: integer + "y": + format: int32 + type: integer + type: object + CellUpdate: + properties: + h: + format: int32 + type: integer + w: + format: int32 + type: integer + x: + format: int32 + type: integer + "y": + format: int32 + type: integer + type: object + CellWithViewProperties: + allOf: + - $ref: '#/components/schemas/Cell' + - properties: + name: + type: string + properties: + $ref: '#/components/schemas/ViewProperties' + type: object + type: object Cells: - type: array items: $ref: '#/components/schemas/Cell' - Secrets: - additionalProperties: - type: string - example: - apikey: abc123xyz - SecretKeys: - type: object - properties: - secrets: - type: array - items: - type: string - SecretKeysResponse: - allOf: - - $ref: '#/components/schemas/SecretKeys' - - type: object - properties: - links: - readOnly: true - type: object - properties: - self: - type: string - org: - type: string - CreateDashboardRequest: - properties: - orgID: - type: string - description: The ID of the organization that owns the dashboard. - name: - type: string - description: The user-facing name of the dashboard. - description: - type: string - description: The user-facing description of the dashboard. - required: - - orgID - - name - DashboardWithViewProperties: - type: object - allOf: - - $ref: '#/components/schemas/CreateDashboardRequest' - - type: object - properties: - links: - type: object - example: - self: /api/v2/dashboards/1 - cells: /api/v2/dashboards/1/cells - owners: /api/v2/dashboards/1/owners - members: /api/v2/dashboards/1/members - labels: /api/v2/dashboards/1/labels - org: /api/v2/labels/1 - properties: - self: - $ref: '#/components/schemas/Link' - cells: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - org: - $ref: '#/components/schemas/Link' - id: - readOnly: true - type: string - meta: - type: object - properties: - createdAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - cells: - $ref: '#/components/schemas/CellsWithViewProperties' - labels: - $ref: '#/components/schemas/Labels' - Dashboard: - type: object - allOf: - - $ref: '#/components/schemas/CreateDashboardRequest' - - type: object - properties: - links: - type: object - example: - self: /api/v2/dashboards/1 - cells: /api/v2/dashboards/1/cells - owners: /api/v2/dashboards/1/owners - members: /api/v2/dashboards/1/members - labels: /api/v2/dashboards/1/labels - org: /api/v2/labels/1 - properties: - self: - $ref: '#/components/schemas/Link' - cells: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - org: - $ref: '#/components/schemas/Link' - id: - readOnly: true - type: string - meta: - type: object - properties: - createdAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - cells: - $ref: '#/components/schemas/Cells' - labels: - $ref: '#/components/schemas/Labels' - Dashboards: - type: object - properties: - links: - $ref: '#/components/schemas/Links' - dashboards: - type: array - items: - $ref: '#/components/schemas/Dashboard' - DocumentMeta: - type: object - properties: - name: - type: string - type: - type: string - templateID: - type: string - description: - type: string - version: - type: string - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - required: - - name - - version - Document: - type: object - properties: - id: - type: string - readOnly: true - meta: - $ref: '#/components/schemas/DocumentMeta' - content: - type: object - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/documents/templates/1 - properties: - self: - description: The document URL. - $ref: '#/components/schemas/Link' - required: - - id - - meta - - content - DocumentCreate: - type: object - properties: - meta: - $ref: '#/components/schemas/DocumentMeta' - content: - type: object - org: - type: string - description: The organization Name. Specify either `orgID` or `org`. - orgID: - type: string - description: The organization Name. Specify either `orgID` or `org`. - labels: - type: array - description: An array of label IDs to be added as labels to the document. - items: - type: string - required: - - meta - - content - DocumentUpdate: - type: object - properties: - meta: - $ref: '#/components/schemas/DocumentMeta' - content: - type: object - DocumentListEntry: - type: object - properties: - id: - type: string - readOnly: true - meta: - $ref: '#/components/schemas/DocumentMeta' - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/documents/templates/1 - properties: - self: - description: The document URL. - $ref: '#/components/schemas/Link' - required: - - id - - meta - Documents: - type: object - properties: - documents: - type: array - items: - $ref: '#/components/schemas/DocumentListEntry' - TelegrafRequest: - type: object - properties: - name: - type: string - description: - type: string - metadata: - type: object - properties: - buckets: - type: array - items: - type: string - config: - type: string - orgID: - type: string - Telegraf: - type: object - allOf: - - $ref: '#/components/schemas/TelegrafRequest' - - type: object - properties: - id: - type: string - readOnly: true - links: - type: object - readOnly: true - example: - self: /api/v2/telegrafs/1 - lables: /api/v2/telegrafs/1/labels - owners: /api/v2/telegrafs/1/owners - members: /api/v2/telegrafs/1/members - properties: - self: - $ref: '#/components/schemas/Link' - labels: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - labels: - readOnly: true - $ref: '#/components/schemas/Labels' - Telegrafs: - type: object - properties: - configurations: - type: array - items: - $ref: '#/components/schemas/Telegraf' - TelegrafPlugin: - type: object - properties: - type: - type: string - name: - type: string - description: - type: string - config: - type: string - TelegrafPlugins: - type: object - properties: - version: - type: string - os: - type: string - plugins: - type: array - items: - $ref: '#/components/schemas/TelegrafPlugin' - IsOnboarding: - type: object - properties: - allowed: - description: True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. - type: boolean - PasswordResetBody: - properties: - password: - type: string - required: - - password - AddResourceMemberRequestBody: - type: object - properties: - id: - type: string - name: - type: string - required: - - id - Ready: - type: object - properties: - status: - type: string - enum: - - ready - started: - type: string - format: date-time - example: '2019-03-13T10:09:33.891196-04:00' - up: - type: string - example: 14m45.911966424s - HealthCheck: - type: object - required: - - name - - status - properties: - name: - type: string - message: - type: string - checks: - type: array - items: - $ref: '#/components/schemas/HealthCheck' - status: - type: string - enum: - - pass - - fail - version: - type: string - commit: - type: string - Labels: type: array + CellsWithViewProperties: items: - $ref: '#/components/schemas/Label' - Label: - type: object - properties: - id: - readOnly: true - type: string - orgID: - readOnly: true - type: string - name: - type: string - properties: - 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. - example: - color: ffb3b3 - description: this is a description - LabelCreateRequest: - type: object - required: - - orgID - - name - properties: - orgID: - type: string - name: - type: string - properties: - 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. - example: - color: ffb3b3 - description: this is a description - LabelUpdate: - type: object - properties: - name: - type: string - properties: - 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. - example: - color: ffb3b3 - description: this is a description - LabelMapping: - type: object - properties: - labelID: - type: string - LabelsResponse: - type: object - properties: - labels: - $ref: '#/components/schemas/Labels' - links: - $ref: '#/components/schemas/Links' - LabelResponse: - type: object - properties: - label: - $ref: '#/components/schemas/Label' - links: - $ref: '#/components/schemas/Links' - ASTResponse: - description: Contains the AST for the supplied Flux query - type: object - properties: - ast: - $ref: '#/components/schemas/Package' - WritePrecision: - type: string - enum: - - ms - - s - - us - - ns - TaskCreateRequest: - type: object - properties: - orgID: - description: The ID of the organization that owns this Task. - type: string - org: - description: The name of the organization that owns this Task. - type: string - status: - $ref: '#/components/schemas/TaskStatusType' - flux: - description: The Flux script to run for this task. - type: string - description: - description: An optional description of the task. - type: string - required: - - flux - TaskUpdateRequest: - type: object - properties: - status: - $ref: '#/components/schemas/TaskStatusType' - flux: - description: The Flux script to run for this task. - type: string - name: - description: Override the 'name' option in the flux script. - type: string - every: - description: Override the 'every' option in the flux script. - type: string - cron: - description: Override the 'cron' option in the flux script. - type: string - offset: - description: Override the 'offset' option in the flux script. - type: string - description: - description: An optional description of the task. - type: string - FluxResponse: - description: Rendered flux that backs the check or notification. - properties: - flux: - type: string - CheckPatch: - type: object - properties: - name: - type: string - description: - type: string - status: - type: string - enum: - - active - - inactive - CheckDiscriminator: - oneOf: - - $ref: '#/components/schemas/DeadmanCheck' - - $ref: '#/components/schemas/ThresholdCheck' - - $ref: '#/components/schemas/CustomCheck' - discriminator: - propertyName: type - mapping: - deadman: '#/components/schemas/DeadmanCheck' - threshold: '#/components/schemas/ThresholdCheck' - custom: '#/components/schemas/CustomCheck' + $ref: '#/components/schemas/CellWithViewProperties' + type: array Check: allOf: - - $ref: '#/components/schemas/CheckDiscriminator' - PostCheck: - allOf: - - $ref: '#/components/schemas/CheckDiscriminator' - Checks: - properties: - checks: - type: array - items: - $ref: '#/components/schemas/Check' - links: - $ref: '#/components/schemas/Links' + - $ref: '#/components/schemas/CheckDiscriminator' CheckBase: properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + description: An optional description of the check. + type: string id: readOnly: true type: string + labels: + $ref: '#/components/schemas/Labels' + lastRunError: + readOnly: true + type: string + lastRunStatus: + enum: + - failed + - success + - canceled + readOnly: true + type: string + latestCompleted: + description: Timestamp of latest scheduled, completed run, RFC3339. + format: date-time + readOnly: true + type: string + links: + example: + labels: /api/v2/checks/1/labels + members: /api/v2/checks/1/members + owners: /api/v2/checks/1/owners + query: /api/v2/checks/1/query + self: /api/v2/checks/1 + properties: + labels: + $ref: '#/components/schemas/Link' + description: URL to retrieve labels for this check + members: + $ref: '#/components/schemas/Link' + description: URL to retrieve members for this check + owners: + $ref: '#/components/schemas/Link' + description: URL to retrieve owners for this check + query: + $ref: '#/components/schemas/Link' + description: URL to retrieve flux script for this check + self: + $ref: '#/components/schemas/Link' + description: URL for this check + readOnly: true + type: object name: type: string orgID: description: The ID of the organization that owns this check. type: string - taskID: - description: The ID of the task associated with this check. - type: string ownerID: description: The ID of creator used to create this check. - type: string readOnly: true - createdAt: type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true query: $ref: '#/components/schemas/DashboardQuery' status: $ref: '#/components/schemas/TaskStatusType' - description: - description: An optional description of the check. - type: string - latestCompleted: - description: 'Timestamp of latest scheduled, completed run, RFC3339.' + taskID: + description: The ID of the task associated with this check. type: string + updatedAt: format: date-time readOnly: true - lastRunStatus: - readOnly: true type: string - enum: - - failed - - success - - canceled - lastRunError: - readOnly: true - type: string - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/checks/1 - labels: /api/v2/checks/1/labels - members: /api/v2/checks/1/members - owners: /api/v2/checks/1/owners - query: /api/v2/checks/1/query - properties: - self: - description: URL for this check - $ref: '#/components/schemas/Link' - labels: - description: URL to retrieve labels for this check - $ref: '#/components/schemas/Link' - members: - description: URL to retrieve members for this check - $ref: '#/components/schemas/Link' - owners: - description: URL to retrieve owners for this check - $ref: '#/components/schemas/Link' - query: - description: URL to retrieve flux script for this check - $ref: '#/components/schemas/Link' required: - - name - - orgID - - query - ThresholdCheck: - allOf: - - $ref: '#/components/schemas/CheckBase' - - type: object - required: - - type - properties: - type: - type: string - enum: - - threshold - thresholds: - type: array - items: - $ref: '#/components/schemas/Threshold' - every: - description: Check repetition interval. - type: string - offset: - description: 'Duration to delay after the schedule, before executing check.' - type: string - tags: - description: List of tags to write to each status. - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - statusMessageTemplate: - description: The template used to generate and write a status message. - type: string - Threshold: - oneOf: - - $ref: '#/components/schemas/GreaterThreshold' - - $ref: '#/components/schemas/LesserThreshold' - - $ref: '#/components/schemas/RangeThreshold' + - name + - orgID + - query + CheckDiscriminator: discriminator: - propertyName: type mapping: - greater: '#/components/schemas/GreaterThreshold' - lesser: '#/components/schemas/LesserThreshold' - range: '#/components/schemas/RangeThreshold' - DeadmanCheck: - allOf: - - $ref: '#/components/schemas/CheckBase' - - type: object - required: - - type - properties: - type: - type: string - enum: - - deadman - timeSince: - 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. - type: string - reportZero: - description: 'If only zero values reported since time, trigger an alert' - type: boolean - level: - $ref: '#/components/schemas/CheckStatusLevel' - every: - description: Check repetition interval. - type: string - offset: - description: 'Duration to delay after the schedule, before executing check.' - type: string - tags: - description: List of tags to write to each status. - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - statusMessageTemplate: - description: The template used to generate and write a status message. - type: string - CustomCheck: - allOf: - - $ref: '#/components/schemas/CheckBase' - - type: object - properties: - type: - type: string - enum: - - custom - required: - - type - ThresholdBase: + custom: '#/components/schemas/CustomCheck' + deadman: '#/components/schemas/DeadmanCheck' + threshold: '#/components/schemas/ThresholdCheck' + propertyName: type + oneOf: + - $ref: '#/components/schemas/DeadmanCheck' + - $ref: '#/components/schemas/ThresholdCheck' + - $ref: '#/components/schemas/CustomCheck' + CheckPatch: properties: - level: - $ref: '#/components/schemas/CheckStatusLevel' - allValues: - description: 'If true, only alert if all values meet threshold.' - type: boolean - GreaterThreshold: - allOf: - - $ref: '#/components/schemas/ThresholdBase' - - type: object - required: - - type - - value - properties: - type: - type: string - enum: - - greater - value: - type: number - format: float - LesserThreshold: - allOf: - - $ref: '#/components/schemas/ThresholdBase' - - type: object - required: - - type - - value - properties: - type: - type: string - enum: - - lesser - value: - type: number - format: float - RangeThreshold: - allOf: - - $ref: '#/components/schemas/ThresholdBase' - - type: object - required: - - type - - min - - max - - within - properties: - type: - type: string - enum: - - range - min: - type: number - format: float - max: - type: number - format: float - within: - type: boolean + description: + type: string + name: + type: string + status: + enum: + - active + - inactive + type: string + type: object CheckStatusLevel: description: The state to record if check matches a criteria. - type: string enum: - - UNKNOWN - - OK - - INFO - - CRIT - - WARN - RuleStatusLevel: - description: The state to record if check matches a criteria. + - UNKNOWN + - OK + - INFO + - CRIT + - WARN type: string - enum: - - UNKNOWN - - OK - - INFO - - CRIT - - WARN - - ANY - NotificationRuleUpdate: - type: object + CheckViewProperties: properties: - name: + check: + $ref: '#/components/schemas/Check' + checkID: type: string - description: - type: string - status: - type: string - enum: - - active - - inactive - NotificationRuleDiscriminator: - oneOf: - - $ref: '#/components/schemas/SlackNotificationRule' - - $ref: '#/components/schemas/SMTPNotificationRule' - - $ref: '#/components/schemas/PagerDutyNotificationRule' - - $ref: '#/components/schemas/HTTPNotificationRule' - - $ref: '#/components/schemas/TelegramNotificationRule' - discriminator: - propertyName: type - mapping: - slack: '#/components/schemas/SlackNotificationRule' - smtp: '#/components/schemas/SMTPNotificationRule' - pagerduty: '#/components/schemas/PagerDutyNotificationRule' - http: '#/components/schemas/HTTPNotificationRule' - telegram: '#/components/schemas/TelegramNotificationRule' - NotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleDiscriminator' - PostNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleDiscriminator' - NotificationRules: - properties: - notificationRules: - type: array + colors: + description: Colors define color encoding of data into a visualization items: - $ref: '#/components/schemas/NotificationRule' - links: - $ref: '#/components/schemas/Links' - NotificationRuleBase: - type: object - required: - - orgID - - status - - name - - statusRules - - endpointID - properties: - latestCompleted: - description: 'Timestamp of latest scheduled, completed run, RFC3339.' - type: string - format: date-time - readOnly: true - lastRunStatus: - readOnly: true - type: string - enum: - - failed - - success - - canceled - lastRunError: - readOnly: true - type: string - id: - readOnly: true - type: string - endpointID: - type: string - orgID: - description: The ID of the organization that owns this notification rule. - type: string - taskID: - description: The ID of the task associated with this notification rule. - type: string - ownerID: - description: The ID of creator used to create this notification rule. - type: string - readOnly: true - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - status: - $ref: '#/components/schemas/TaskStatusType' - name: - description: Human-readable name describing the notification rule. - type: string - sleepUntil: - type: string - every: - description: The notification repetition interval. - type: string - offset: - description: 'Duration to delay after the schedule, before executing check.' - type: string - runbookLink: - type: string - limitEvery: - 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.' - type: integer - tagRules: - description: List of tag rules the notification rule attempts to match. + $ref: '#/components/schemas/DashboardColor' type: array - items: - $ref: '#/components/schemas/TagRule' - description: - description: An optional description of the notification rule. - type: string - statusRules: - description: List of status rules the notification rule attempts to match. - type: array - minItems: 1 - items: - $ref: '#/components/schemas/StatusRule' - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/notificationRules/1 - labels: /api/v2/notificationRules/1/labels - members: /api/v2/notificationRules/1/members - owners: /api/v2/notificationRules/1/owners - query: /api/v2/notificationRules/1/query - properties: - self: - description: URL for this endpoint. - $ref: '#/components/schemas/Link' - labels: - description: URL to retrieve labels for this notification rule. - $ref: '#/components/schemas/Link' - members: - description: URL to retrieve members for this notification rule. - $ref: '#/components/schemas/Link' - owners: - description: URL to retrieve owners for this notification rule. - $ref: '#/components/schemas/Link' - query: - description: URL to retrieve flux script for this notification rule. - $ref: '#/components/schemas/Link' - TagRule: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string - enum: - - equal - - notequal - - equalregex - - notequalregex - StatusRule: - type: object - properties: - currentLevel: - $ref: '#/components/schemas/RuleStatusLevel' - previousLevel: - $ref: '#/components/schemas/RuleStatusLevel' - count: - type: integer - period: - type: string - HTTPNotificationRuleBase: - type: object - required: - - type - properties: - type: - type: string - enum: - - http - url: - type: string - HTTPNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/HTTPNotificationRuleBase' - SlackNotificationRuleBase: - type: object - required: - - type - - messageTemplate - properties: - type: - type: string - enum: - - slack - channel: - type: string - messageTemplate: - type: string - SlackNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/SlackNotificationRuleBase' - SMTPNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/SMTPNotificationRuleBase' - SMTPNotificationRuleBase: - type: object - required: - - type - - subjectTemplate - - to - properties: - type: - type: string - enum: - - smtp - subjectTemplate: - type: string - bodyTemplate: - type: string - to: - type: string - PagerDutyNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/PagerDutyNotificationRuleBase' - PagerDutyNotificationRuleBase: - type: object - required: - - type - - messageTemplate - properties: - type: - type: string - enum: - - pagerduty - messageTemplate: - type: string - TelegramNotificationRule: - allOf: - - $ref: '#/components/schemas/NotificationRuleBase' - - $ref: '#/components/schemas/TelegramNotificationRuleBase' - TelegramNotificationRuleBase: - type: object - required: - - type - - messageTemplate - - channel - properties: - type: - description: The discriminator between other types of notification rules is "telegram". - type: string - enum: - - telegram - messageTemplate: - 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" .' - type: string - enum: - - MarkdownV2 - - HTML - - Markdown - disableWebPagePreview: - description: Disables preview of web links in the sent messages when "true". Defaults to "false" . + legendColorizeRows: type: boolean - NotificationEndpointUpdate: - type: object - properties: - name: - type: string - description: - type: string - status: - type: string - enum: - - active - - inactive - NotificationEndpointDiscriminator: - oneOf: - - $ref: '#/components/schemas/SlackNotificationEndpoint' - - $ref: '#/components/schemas/PagerDutyNotificationEndpoint' - - $ref: '#/components/schemas/HTTPNotificationEndpoint' - - $ref: '#/components/schemas/TelegramNotificationEndpoint' - discriminator: - propertyName: type - mapping: - slack: '#/components/schemas/SlackNotificationEndpoint' - pagerduty: '#/components/schemas/PagerDutyNotificationEndpoint' - http: '#/components/schemas/HTTPNotificationEndpoint' - telegram: '#/components/schemas/TelegramNotificationEndpoint' - NotificationEndpoint: - allOf: - - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - PostNotificationEndpoint: - allOf: - - $ref: '#/components/schemas/NotificationEndpointDiscriminator' - NotificationEndpoints: - properties: - notificationEndpoints: - type: array + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + queries: items: - $ref: '#/components/schemas/NotificationEndpoint' + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + type: + enum: + - check + type: string + required: + - type + - shape + - checkID + - queries + - colors + type: object + Checks: + properties: + checks: + items: + $ref: '#/components/schemas/Check' + type: array links: $ref: '#/components/schemas/Links' - NotificationEndpointBase: - type: object - required: - - type - - name + ConditionalExpression: + description: Selects one of two expressions, `Alternate` or `Consequent`, depending + on a third boolean expression, `Test` properties: - id: - type: string - orgID: - type: string - userID: - type: string - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - description: - description: An optional description of the notification endpoint. + alternate: + $ref: '#/components/schemas/Expression' + consequent: + $ref: '#/components/schemas/Expression' + test: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + ConstantVariableProperties: + properties: + type: + enum: + - constant type: string + values: + items: + type: string + type: array + CreateCell: + properties: + h: + format: int32 + type: integer name: type: string - status: - description: The status of the endpoint. - default: active + usingView: + description: Makes a copy of the provided view. type: string - enum: - - active - - inactive - labels: - $ref: '#/components/schemas/Labels' - links: - type: object - readOnly: true - example: - self: /api/v2/notificationEndpoints/1 - labels: /api/v2/notificationEndpoints/1/labels - members: /api/v2/notificationEndpoints/1/members - owners: /api/v2/notificationEndpoints/1/owners - properties: - self: - description: URL for this endpoint. - $ref: '#/components/schemas/Link' - labels: - description: URL to retrieve labels for this endpoint. - $ref: '#/components/schemas/Link' - members: - description: URL to retrieve members for this endpoint. - $ref: '#/components/schemas/Link' - owners: - description: URL to retrieve owners for this endpoint. - $ref: '#/components/schemas/Link' - type: - $ref: '#/components/schemas/NotificationEndpointType' - SlackNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - properties: - url: - 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`. - type: string - PagerDutyNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - required: - - routingKey - properties: - clientURL: - type: string - routingKey: - type: string - HTTPNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - required: - - url - - authMethod - - method - properties: - url: - type: string - username: - type: string - password: - type: string - token: - type: string - method: - type: string - enum: - - POST - - GET - - PUT - authMethod: - type: string - enum: - - none - - basic - - bearer - contentTemplate: - type: string - headers: - type: object - description: Customized headers. - additionalProperties: - type: string - TelegramNotificationEndpoint: - type: object - allOf: - - $ref: '#/components/schemas/NotificationEndpointBase' - - type: object - required: - - token - - channel - properties: - token: - 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 .' - type: string - NotificationEndpointType: - type: string - enum: - - slack - - pagerduty - - http - - telegram - DBRP: + w: + format: int32 + type: integer + x: + format: int32 + type: integer + "y": + format: int32 + type: integer type: object + CreateDashboardRequest: properties: - id: + description: + description: The user-facing description of the dashboard. type: string + name: + description: The user-facing name of the dashboard. + type: string + orgID: + description: The ID of the organization that owns the dashboard. + type: string + required: + - orgID + - name + CustomCheck: + allOf: + - $ref: '#/components/schemas/CheckBase' + - properties: + type: + enum: + - custom + type: string + required: + - type + type: object + DBRP: + properties: + bucketID: + description: the bucket ID used as target for the translation. + type: string + database: + description: InfluxDB v1 database + type: string + default: + description: Specify if this mapping represents the default retention policy + for the database specificed. + type: boolean + id: 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. - org: type: string - description: the organization 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. + type: string required: - - bucketID - - database - - retention_policy - DBRPGet: + - id + - orgID + - bucketID + - database + - retention_policy + - default type: object + DBRPCreate: + properties: + bucketID: + description: the bucket ID used as target for the translation. + type: string + database: + description: InfluxDB v1 database + type: string + default: + description: Specify if this mapping represents the default retention policy + for the database specificed. + type: boolean + org: + description: the organization that owns this mapping. + type: string + orgID: + description: the organization ID that owns this mapping. + type: string + retention_policy: + description: InfluxDB v1 retention policy + type: string + required: + - bucketID + - database + - retention_policy + type: object + DBRPGet: properties: content: $ref: '#/components/schemas/DBRP' required: true - SchemaType: - type: string - enum: - - implicit - - explicit - Authorization: - required: - - orgID - - permissions - allOf: - - $ref: '#/components/schemas/AuthorizationUpdateRequest' - - type: object - properties: - createdAt: - type: string - format: date-time - readOnly: true - updatedAt: - type: string - format: date-time - readOnly: true - orgID: - type: string - description: ID of org that authorization is scoped to. - 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' - id: - readOnly: true - type: string - token: - readOnly: true - type: string - description: Passed via the Authorization Header and Token Authentication type. - userID: - readOnly: true - type: string - description: ID of user that created and owns the token. - user: - readOnly: true - type: string - description: Name of user that created and owns the token. - org: - readOnly: true - type: string - description: Name of the org token is scoped to. - links: - type: object - readOnly: true - example: - self: /api/v2/authorizations/1 - user: /api/v2/users/12 - properties: - self: - readOnly: true - $ref: '#/components/schemas/Link' - user: - readOnly: true - $ref: '#/components/schemas/Link' - AuthorizationPostRequest: - 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. - 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' - 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: type: object + DBRPUpdate: properties: - links: - readOnly: true - $ref: '#/components/schemas/Links' - authorizations: - type: array + default: + type: boolean + retention_policy: + description: InfluxDB v1 retention policy + type: string + DBRPs: + properties: + content: items: - $ref: '#/components/schemas/Authorization' - Permission: - required: - - action - - resource - properties: - action: - type: string - enum: - - read - - write - resource: - $ref: '#/components/schemas/Resource' - Resource: + $ref: '#/components/schemas/DBRP' + type: array + Dashboard: + allOf: + - $ref: '#/components/schemas/CreateDashboardRequest' + - properties: + cells: + $ref: '#/components/schemas/Cells' + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + example: + cells: /api/v2/dashboards/1/cells + labels: /api/v2/dashboards/1/labels + members: /api/v2/dashboards/1/members + org: /api/v2/labels/1 + owners: /api/v2/dashboards/1/owners + self: /api/v2/dashboards/1 + properties: + cells: + $ref: '#/components/schemas/Link' + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + org: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + type: object + meta: + properties: + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + type: object + type: object type: object - required: - - type + DashboardColor: + description: Defines an encoding of data value into color space. properties: - type: + hex: + description: The hex number of the color + maxLength: 7 + minLength: 7 type: string - enum: - - authorizations - - buckets - - dashboards - - orgs - - sources - - tasks - - telegrafs - - users - - variables - - scrapers - - secrets - - labels - - views - - documents - - notificationRules - - notificationEndpoints - - checks - - dbrp - - notebooks id: + description: The unique ID of the view color. type: string - 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: + description: The user-facing name of the hex color. + type: string + type: + description: Type is how the color is used. + enum: + - min + - max + - threshold + - scale + - text + - background + type: string + value: + description: The data value mapped to this color. + format: float + type: number + required: + - id + - type + - hex + - name + - value + type: object + DashboardQuery: + properties: + builderConfig: + $ref: '#/components/schemas/BuilderConfig' + editMode: + $ref: '#/components/schemas/QueryEditMode' name: type: string - description: Optional name of the resource if the resource has a name field. - orgID: + text: + description: The text of the Flux query. type: string - 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 - description: Optional name of the organization of the organization with orgID. - User: + type: object + DashboardWithViewProperties: + allOf: + - $ref: '#/components/schemas/CreateDashboardRequest' + - properties: + cells: + $ref: '#/components/schemas/CellsWithViewProperties' + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + example: + cells: /api/v2/dashboards/1/cells + labels: /api/v2/dashboards/1/labels + members: /api/v2/dashboards/1/members + org: /api/v2/labels/1 + owners: /api/v2/dashboards/1/owners + self: /api/v2/dashboards/1 + properties: + cells: + $ref: '#/components/schemas/Link' + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + org: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + type: object + meta: + properties: + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + type: object + type: object + type: object + Dashboards: properties: - id: + dashboards: + items: + $ref: '#/components/schemas/Dashboard' + type: array + links: + $ref: '#/components/schemas/Links' + type: object + DateTimeLiteral: + description: Represents an instant in time with nanosecond precision using the + syntax of golang's RFC3339 Nanosecond variant + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + format: date-time + type: string + type: object + DeadmanCheck: + allOf: + - $ref: '#/components/schemas/CheckBase' + - properties: + every: + description: Check repetition interval. + type: string + level: + $ref: '#/components/schemas/CheckStatusLevel' + offset: + description: Duration to delay after the schedule, before executing check. + type: string + reportZero: + description: If only zero values reported since time, trigger an alert + type: boolean + staleTime: + description: String duration for time that a series is considered stale + and should not trigger deadman. + type: string + statusMessageTemplate: + description: The template used to generate and write a status message. + type: string + tags: + description: List of tags to write to each status. + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + timeSince: + description: String duration before deadman triggers. + type: string + type: + enum: + - deadman + type: string + required: + - type + type: object + DecimalPlaces: + description: Indicates whether decimal places should be enforced, and how many + digits it should show. + properties: + digits: + description: The number of digits after decimal to display + format: int32 + type: integer + isEnforced: + description: Indicates whether decimal point setting should be enforced + type: boolean + type: object + DeletePredicateRequest: + description: The delete predicate request. + properties: + predicate: + description: InfluxQL-like delete statement + example: tag1="value1" and (tag2="value2" and tag3!="value3") + type: string + start: + description: RFC3339Nano + format: date-time + type: string + stop: + description: RFC3339Nano + format: date-time + type: string + required: + - start + - stop + type: object + Dialect: + description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions + properties: + annotations: + description: https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + items: + enum: + - group + - datatype + - default + type: string + type: array + uniqueItems: true + commentPrefix: + default: '#' + description: Character prefixed to comment strings + maxLength: 1 + minLength: 0 + type: string + dateTimeFormat: + default: RFC3339 + description: Format of timestamps + enum: + - RFC3339 + - RFC3339Nano + type: string + delimiter: + default: ',' + description: Separator between cells; the default is , + maxLength: 1 + minLength: 1 + type: string + header: + default: true + description: If true, the results will contain a header row + type: boolean + type: object + DictExpression: + description: Used to create and directly specify the elements of a dictionary + properties: + elements: + description: Elements of the dictionary + items: + $ref: '#/components/schemas/DictItem' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + DictItem: + description: A key/value pair in a dictionary + properties: + key: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + val: + $ref: '#/components/schemas/Expression' + type: object + 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. + properties: + magnitude: + type: integer + type: + $ref: '#/components/schemas/NodeType' + unit: + type: string + type: object + DurationLiteral: + description: Represents the elapsed time between two instants as an int64 nanosecond + count with syntax of golang's time.Duration + properties: + type: + $ref: '#/components/schemas/NodeType' + values: + description: Duration values + items: + $ref: '#/components/schemas/Duration' + type: array + type: object + Error: + properties: + code: + description: code is the machine-readable error code. + enum: + - internal error + - not found + - conflict + - invalid + - unprocessable entity + - empty value + - unavailable + - forbidden + - too many requests + - unauthorized + - method not allowed + - request too large + - unsupported media type readOnly: true type: string - oauthID: + err: + description: err is a stack of errors that occurred during processing of + the request. Useful for debugging. + readOnly: true + type: string + message: + description: message is a human-readable message. + readOnly: true + type: string + op: + description: op describes the logical code operation during error. Useful + for debugging. + readOnly: true + type: string + required: + - code + - message + Expression: + oneOf: + - $ref: '#/components/schemas/ArrayExpression' + - $ref: '#/components/schemas/DictExpression' + - $ref: '#/components/schemas/FunctionExpression' + - $ref: '#/components/schemas/BinaryExpression' + - $ref: '#/components/schemas/CallExpression' + - $ref: '#/components/schemas/ConditionalExpression' + - $ref: '#/components/schemas/LogicalExpression' + - $ref: '#/components/schemas/MemberExpression' + - $ref: '#/components/schemas/IndexExpression' + - $ref: '#/components/schemas/ObjectExpression' + - $ref: '#/components/schemas/ParenExpression' + - $ref: '#/components/schemas/PipeExpression' + - $ref: '#/components/schemas/UnaryExpression' + - $ref: '#/components/schemas/BooleanLiteral' + - $ref: '#/components/schemas/DateTimeLiteral' + - $ref: '#/components/schemas/DurationLiteral' + - $ref: '#/components/schemas/FloatLiteral' + - $ref: '#/components/schemas/IntegerLiteral' + - $ref: '#/components/schemas/PipeLiteral' + - $ref: '#/components/schemas/RegexpLiteral' + - $ref: '#/components/schemas/StringLiteral' + - $ref: '#/components/schemas/UnsignedIntegerLiteral' + - $ref: '#/components/schemas/Identifier' + ExpressionStatement: + description: May consist of an expression that does not return a value and is + executed solely for its side-effects + properties: + expression: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Field: + properties: + alias: + 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 + items: + $ref: '#/components/schemas/Field' + type: array + type: + description: '`type` describes the field type. `func` is a function. `field` + is a field reference.' + enum: + - func + - field + - integer + - number + - regex + - wildcard + type: string + value: + description: value is the value of the field. Meaning of the value is implied + by the `type` key + type: string + type: object + File: + description: Represents a source from a single file + properties: + body: + description: List of Flux statements + items: + $ref: '#/components/schemas/Statement' + type: array + imports: + description: A list of package imports + items: + $ref: '#/components/schemas/ImportDeclaration' + type: array + name: + description: The name of the file. + type: string + package: + $ref: '#/components/schemas/PackageClause' + type: + $ref: '#/components/schemas/NodeType' + type: object + Flags: + additionalProperties: true + type: object + FloatLiteral: + description: Represents floating point numbers according to the double representations + defined by the IEEE-754-1985 + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: number + type: object + FluxResponse: + description: Rendered flux that backs the check or notification. + properties: + flux: + type: string + FluxSuggestion: + properties: + name: + type: string + params: + additionalProperties: + type: string + type: object + type: object + FluxSuggestions: + properties: + funcs: + items: + $ref: '#/components/schemas/FluxSuggestion' + type: array + type: object + FunctionExpression: + description: Function expression + properties: + body: + $ref: '#/components/schemas/Node' + params: + description: Function parameters + items: + $ref: '#/components/schemas/Property' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + GaugeViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + note: + type: string + prefix: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + suffix: + type: string + tickPrefix: + type: string + tickSuffix: + type: string + type: + enum: + - gauge + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - prefix + - tickPrefix + - suffix + - tickSuffix + - decimalPlaces + type: object + GeoCircleViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - properties: + colorDimension: + $ref: '#/components/schemas/Axis' + colorField: + description: Circle color field + type: string + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + interpolateColors: + description: Interpolate circle color based on displayed value + type: boolean + radius: + description: Maximum radius size in pixels + type: integer + radiusDimension: + $ref: '#/components/schemas/Axis' + radiusField: + description: Radius field + type: string + required: + - radiusField + - radiusDimension + - colorField + - colorDimension + - colors + type: object + GeoHeatMapViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - properties: + blur: + description: Blur for heatmap points + type: integer + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + intensityDimension: + $ref: '#/components/schemas/Axis' + intensityField: + description: Intensity field + type: string + radius: + description: Radius size in pixels + type: integer + required: + - intensityField + - intensityDimension + - radius + - blur + - colors + type: object + GeoPointMapViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - properties: + colorDimension: + $ref: '#/components/schemas/Axis' + colorField: + description: Marker color field + type: string + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + isClustered: + description: Cluster close markers together + type: boolean + tooltipColumns: + description: An array for which columns to display in tooltip + items: + type: string + type: array + required: + - colorField + - colorDimension + - colors + type: object + GeoTrackMapViewLayer: + allOf: + - $ref: '#/components/schemas/GeoViewLayerProperties' + - required: + - trackWidth + - speed + - randomColors + - trackPointVisualization + type: object + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + randomColors: + description: Assign different colors to different tracks + type: boolean + speed: + description: Speed of the track animation + type: integer + trackWidth: + description: Width of the track + type: integer + GeoViewLayer: + oneOf: + - $ref: '#/components/schemas/GeoCircleViewLayer' + - $ref: '#/components/schemas/GeoHeatMapViewLayer' + - $ref: '#/components/schemas/GeoPointMapViewLayer' + - $ref: '#/components/schemas/GeoTrackMapViewLayer' + type: object + GeoViewLayerProperties: + properties: + type: + enum: + - heatmap + - circleMap + - pointMap + - trackMap + type: string + required: + - type + type: object + GeoViewProperties: + properties: + allowPanAndZoom: + default: true + description: If true, map zoom and pan controls are enabled on the dashboard + view + type: boolean + center: + description: Coordinates of the center of the map + properties: + lat: + description: Latitude of the center of the map + format: double + type: number + lon: + description: Longitude of the center of the map + format: double + type: number + required: + - lat + - lon + type: object + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + detectCoordinateFields: + default: true + description: If true, search results get automatically regroupped so that + lon,lat and value are treated as columns + type: boolean + latLonColumns: + $ref: '#/components/schemas/LatLonColumns' + layers: + description: List of individual layers shown in the map + items: + $ref: '#/components/schemas/GeoViewLayer' + type: array + mapStyle: + description: Define map type - regular, satellite etc. + type: string + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + s2Column: + description: String to define the column + type: string + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + type: + enum: + - geo + type: string + useS2CellID: + description: If true, S2 column is used to calculate lat/lon + type: boolean + zoom: + description: Zoom level used for initial display of the map + format: double + maximum: 28 + minimum: 1 + type: number + required: + - type + - shape + - queries + - note + - showNoteWhenEmpty + - center + - zoom + - allowPanAndZoom + - detectCoordinateFields + - layers + type: object + GreaterThreshold: + allOf: + - $ref: '#/components/schemas/ThresholdBase' + - properties: + type: + enum: + - greater + type: string + value: + format: float + type: number + required: + - type + - value + type: object + HTTPNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + authMethod: + enum: + - none + - basic + - bearer + type: string + contentTemplate: + type: string + headers: + additionalProperties: + type: string + description: Customized headers. + type: object + method: + enum: + - POST + - GET + - PUT + type: string + password: + type: string + token: + type: string + url: + type: string + username: + type: string + required: + - url + - authMethod + - method + type: object + type: object + HTTPNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/HTTPNotificationRuleBase' + HTTPNotificationRuleBase: + properties: + type: + enum: + - http + type: string + url: + type: string + required: + - type + type: object + HealthCheck: + properties: + checks: + items: + $ref: '#/components/schemas/HealthCheck' + type: array + commit: + type: string + message: type: string name: type: string status: - description: If inactive the user is inactive. - default: active - type: string enum: - - active - - inactive + - pass + - fail + type: string + version: + type: string required: - - name - Users: + - name + - status type: object + HeatmapViewProperties: + properties: + binSize: + type: number + colors: + description: Colors define color encoding of data into a visualization + items: + type: string + type: array + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + timeFormat: + type: string + type: + enum: + - heatmap + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + type: number + maxItems: 2 + type: array + xPrefix: + type: string + xSuffix: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yAxisLabel: + type: string + yColumn: + type: string + yDomain: + items: + type: number + maxItems: 2 + type: array + yPrefix: + type: string + ySuffix: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - yColumn + - xDomain + - yDomain + - xAxisLabel + - yAxisLabel + - xPrefix + - yPrefix + - xSuffix + - ySuffix + - binSize + type: object + HistogramViewProperties: + properties: + binCount: + type: integer + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + fillColumns: + items: + type: string + type: array + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + position: + enum: + - overlaid + - stacked + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + type: + enum: + - histogram + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + format: float + type: number + type: array + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - fillColumns + - xDomain + - xAxisLabel + - position + - binCount + type: object + Identifier: + description: A valid Flux identifier + properties: + name: + type: string + type: + $ref: '#/components/schemas/NodeType' + type: object + ImportDeclaration: + description: Declares a package import + properties: + as: + $ref: '#/components/schemas/Identifier' + path: + $ref: '#/components/schemas/StringLiteral' + type: + $ref: '#/components/schemas/NodeType' + type: object + IndexExpression: + description: Represents indexing into an array + properties: + array: + $ref: '#/components/schemas/Expression' + index: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + InfluxQLQuery: + description: Query influx using the InfluxQL language + properties: + bucket: + description: Bucket is to be used instead of the database and retention + policy specified in the InfluxQL query. + type: string + query: + description: InfluxQL query execute. + type: string + type: + description: The type of query. Must be "influxql". + enum: + - influxql + type: string + required: + - query + type: object + IntegerLiteral: + description: Represents integer numbers + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: string + type: object + IsOnboarding: + properties: + allowed: + description: True means that the influxdb instance has NOT had initial setup; + false means that the database has been setup. + type: boolean + type: object + Label: + properties: + id: + readOnly: true + type: string + name: + type: string + orgID: + readOnly: true + type: string + properties: + additionalProperties: + type: string + 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 + type: object + type: object + LabelCreateRequest: + properties: + name: + type: string + orgID: + type: string + properties: + additionalProperties: + type: string + 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 + type: object + required: + - orgID + - name + type: object + LabelMapping: + properties: + labelID: + type: string + type: object + LabelResponse: + properties: + label: + $ref: '#/components/schemas/Label' + links: + $ref: '#/components/schemas/Links' + type: object + LabelUpdate: + properties: + name: + type: string + properties: + additionalProperties: + type: string + 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 + type: object + type: object + Labels: + items: + $ref: '#/components/schemas/Label' + type: array + LabelsResponse: + properties: + labels: + $ref: '#/components/schemas/Labels' + links: + $ref: '#/components/schemas/Links' + type: object + LanguageRequest: + description: Flux query to be analyzed. + properties: + query: + description: Flux query script to be analyzed + type: string + required: + - query + type: object + LatLonColumn: + description: Object type for key and column definitions + properties: + column: + description: Column to look up Lat/Lon + type: string + key: + description: Key to determine whether the column is tag/field + type: string + required: + - key + - column + type: object + LatLonColumns: + description: Object type to define lat/lon columns + properties: + lat: + $ref: '#/components/schemas/LatLonColumn' + lon: + $ref: '#/components/schemas/LatLonColumn' + required: + - lat + - lon + type: object + LegacyAuthorizationPostRequest: + allOf: + - $ref: '#/components/schemas/AuthorizationUpdateRequest' + - properties: + orgID: + description: ID of org that authorization is scoped to. + type: string + permissions: + description: List of permissions for an auth. An auth must have at least + one Permission. + items: + $ref: '#/components/schemas/Permission' + minItems: 1 + type: array + token: + description: Token (name) of the authorization + type: string + userID: + description: ID of user that authorization is scoped to. + type: string + type: object + required: + - orgID + - permissions + LesserThreshold: + allOf: + - $ref: '#/components/schemas/ThresholdBase' + - properties: + type: + enum: + - lesser + type: string + value: + format: float + type: number + required: + - type + - value + type: object + LinePlusSingleStatProperties: + properties: + axes: + $ref: '#/components/schemas/Axes' + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + hoverDimension: + enum: + - auto + - x + - "y" + - xy + type: string + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + position: + enum: + - overlaid + - stacked + type: string + prefix: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shadeBelow: + type: boolean + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + suffix: + type: string + timeFormat: + type: string + type: + enum: + - line-plus-single-stat + type: string + xColumn: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yColumn: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer + required: + - type + - queries + - shape + - axes + - colors + - note + - showNoteWhenEmpty + - prefix + - suffix + - decimalPlaces + - position + type: object + LineProtocolError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - internal error + - not found + - conflict + - invalid + - empty value + - unavailable + readOnly: true + type: string + err: + description: Err is a stack of errors that occurred during processing of + the request. Useful for debugging. + readOnly: true + type: string + line: + description: First line within sent body containing malformed data + format: int32 + readOnly: true + type: integer + message: + description: Message is a human-readable message. + readOnly: true + type: string + op: + description: Op describes the logical code operation during error. Useful + for debugging. + readOnly: true + type: string + required: + - code + - message + - op + - err + LineProtocolLengthError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - invalid + readOnly: true + type: string + maxLength: + description: Max length in bytes for a body of line-protocol. + format: int32 + readOnly: true + type: integer + message: + description: Message is a human-readable message. + readOnly: true + type: string + required: + - code + - message + - maxLength + Link: + description: URI of resource. + format: uri + readOnly: true + type: string + Links: + properties: + next: + $ref: '#/components/schemas/Link' + prev: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + required: + - self + type: object + LogEvent: + properties: + message: + description: A description of the event that occurred. + example: Halt and catch fire + readOnly: true + type: string + runID: + description: the ID of the task that logged + readOnly: true + type: string + time: + description: Time event occurred, RFC3339Nano. + format: date-time + readOnly: true + type: string + type: object + LogicalExpression: + description: Represents the rule conditions that collectively evaluate to either + true or false + properties: + left: + $ref: '#/components/schemas/Expression' + operator: + type: string + right: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Logs: + properties: + events: + items: + $ref: '#/components/schemas/LogEvent' + readOnly: true + type: array + type: object + MapVariableProperties: + properties: + type: + enum: + - map + type: string + values: + additionalProperties: + type: string + type: object + MarkdownViewProperties: + properties: + note: + type: string + shape: + enum: + - chronograf-v2 + type: string + type: + enum: + - markdown + type: string + required: + - type + - shape + - note + type: object + MemberAssignment: + description: Object property assignment + properties: + init: + $ref: '#/components/schemas/Expression' + member: + $ref: '#/components/schemas/MemberExpression' + type: + $ref: '#/components/schemas/NodeType' + type: object + MemberExpression: + description: Represents accessing a property of an object + properties: + object: + $ref: '#/components/schemas/Expression' + property: + $ref: '#/components/schemas/PropertyKey' + type: + $ref: '#/components/schemas/NodeType' + type: object + MetadataBackup: + properties: + buckets: + $ref: '#/components/schemas/BucketMetadataManifests' + kv: + format: binary + type: string + sql: + format: binary + type: string + required: + - kv + - sql + - buckets + type: object + MosaicViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + type: string + type: array + fillColumns: + items: + type: string + type: array + generateXAxisTicks: + items: + type: string + type: array + hoverDimension: + enum: + - auto + - x + - "y" + - xy + type: string + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + timeFormat: + type: string + type: + enum: + - mosaic + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + type: number + maxItems: 2 + type: array + xPrefix: + type: string + xSuffix: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yAxisLabel: + type: string + yDomain: + items: + type: number + maxItems: 2 + type: array + yLabelColumnSeparator: + type: string + yLabelColumns: + items: + type: string + type: array + yPrefix: + type: string + ySeriesColumns: + items: + type: string + type: array + ySuffix: + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - ySeriesColumns + - fillColumns + - xDomain + - yDomain + - xAxisLabel + - yAxisLabel + - xPrefix + - yPrefix + - xSuffix + - ySuffix + type: object + Node: + oneOf: + - $ref: '#/components/schemas/Expression' + - $ref: '#/components/schemas/Block' + NodeType: + description: Type of AST node + type: string + NotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointDiscriminator' + NotificationEndpointBase: + properties: + createdAt: + format: date-time + readOnly: true + type: string + description: + description: An optional description of the notification endpoint. + type: string + id: + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + example: + labels: /api/v2/notificationEndpoints/1/labels + members: /api/v2/notificationEndpoints/1/members + owners: /api/v2/notificationEndpoints/1/owners + self: /api/v2/notificationEndpoints/1 + properties: + labels: + $ref: '#/components/schemas/Link' + description: URL to retrieve labels for this endpoint. + members: + $ref: '#/components/schemas/Link' + description: URL to retrieve members for this endpoint. + owners: + $ref: '#/components/schemas/Link' + description: URL to retrieve owners for this endpoint. + self: + $ref: '#/components/schemas/Link' + description: URL for this endpoint. + readOnly: true + type: object + name: + type: string + orgID: + type: string + status: + default: active + description: The status of the endpoint. + enum: + - active + - inactive + type: string + type: + $ref: '#/components/schemas/NotificationEndpointType' + updatedAt: + format: date-time + readOnly: true + type: string + userID: + type: string + required: + - type + - name + type: object + NotificationEndpointDiscriminator: + discriminator: + mapping: + http: '#/components/schemas/HTTPNotificationEndpoint' + pagerduty: '#/components/schemas/PagerDutyNotificationEndpoint' + slack: '#/components/schemas/SlackNotificationEndpoint' + telegram: '#/components/schemas/TelegramNotificationEndpoint' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SlackNotificationEndpoint' + - $ref: '#/components/schemas/PagerDutyNotificationEndpoint' + - $ref: '#/components/schemas/HTTPNotificationEndpoint' + - $ref: '#/components/schemas/TelegramNotificationEndpoint' + NotificationEndpointType: + enum: + - slack + - pagerduty + - http + - telegram + type: string + NotificationEndpointUpdate: + properties: + description: + type: string + name: + type: string + status: + enum: + - active + - inactive + type: string + type: object + NotificationEndpoints: properties: links: - type: object - properties: - self: - type: string - format: uri - users: - type: array + $ref: '#/components/schemas/Links' + notificationEndpoints: items: - $ref: '#/components/schemas/UserResponse' - OnboardingRequest: - type: object + $ref: '#/components/schemas/NotificationEndpoint' + type: array + NotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleDiscriminator' + NotificationRuleBase: properties: - username: + createdAt: + format: date-time + readOnly: true type: string - password: + description: + description: An optional description of the notification rule. + type: string + endpointID: + type: string + every: + description: The notification repetition interval. + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + lastRunError: + readOnly: true + type: string + lastRunStatus: + enum: + - failed + - success + - canceled + readOnly: true + type: string + latestCompleted: + description: Timestamp of latest scheduled, completed run, RFC3339. + format: date-time + readOnly: true + type: string + limit: + description: Don't notify me more than times every + seconds. If set, limitEvery cannot be empty. + type: integer + limitEvery: + description: Don't notify me more than times every + seconds. If set, limit cannot be empty. + type: integer + links: + example: + labels: /api/v2/notificationRules/1/labels + members: /api/v2/notificationRules/1/members + owners: /api/v2/notificationRules/1/owners + query: /api/v2/notificationRules/1/query + self: /api/v2/notificationRules/1 + properties: + labels: + $ref: '#/components/schemas/Link' + description: URL to retrieve labels for this notification rule. + members: + $ref: '#/components/schemas/Link' + description: URL to retrieve members for this notification rule. + owners: + $ref: '#/components/schemas/Link' + description: URL to retrieve owners for this notification rule. + query: + $ref: '#/components/schemas/Link' + description: URL to retrieve flux script for this notification rule. + self: + $ref: '#/components/schemas/Link' + description: URL for this endpoint. + readOnly: true + type: object + name: + description: Human-readable name describing the notification rule. + type: string + offset: + description: Duration to delay after the schedule, before executing check. + type: string + orgID: + description: The ID of the organization that owns this notification rule. + type: string + ownerID: + description: The ID of creator used to create this notification rule. + readOnly: true + type: string + runbookLink: + type: string + sleepUntil: + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + statusRules: + description: List of status rules the notification rule attempts to match. + items: + $ref: '#/components/schemas/StatusRule' + minItems: 1 + type: array + tagRules: + description: List of tag rules the notification rule attempts to match. + items: + $ref: '#/components/schemas/TagRule' + type: array + taskID: + description: The ID of the task associated with this notification rule. + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - orgID + - status + - name + - statusRules + - endpointID + type: object + NotificationRuleDiscriminator: + discriminator: + mapping: + http: '#/components/schemas/HTTPNotificationRule' + pagerduty: '#/components/schemas/PagerDutyNotificationRule' + slack: '#/components/schemas/SlackNotificationRule' + smtp: '#/components/schemas/SMTPNotificationRule' + telegram: '#/components/schemas/TelegramNotificationRule' + propertyName: type + oneOf: + - $ref: '#/components/schemas/SlackNotificationRule' + - $ref: '#/components/schemas/SMTPNotificationRule' + - $ref: '#/components/schemas/PagerDutyNotificationRule' + - $ref: '#/components/schemas/HTTPNotificationRule' + - $ref: '#/components/schemas/TelegramNotificationRule' + NotificationRuleUpdate: + properties: + description: + type: string + name: + type: string + status: + enum: + - active + - inactive + type: string + type: object + NotificationRules: + properties: + links: + $ref: '#/components/schemas/Links' + notificationRules: + items: + $ref: '#/components/schemas/NotificationRule' + type: array + ObjectExpression: + description: Allows the declaration of an anonymous object within a declaration + properties: + properties: + description: Object properties + items: + $ref: '#/components/schemas/Property' + type: array + type: + $ref: '#/components/schemas/NodeType' + type: object + OnboardingRequest: + properties: + bucket: type: string org: type: string - bucket: + password: type: string - retentionPeriodSeconds: - type: integer - format: int64 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` + type: integer + retentionPeriodSeconds: + format: int64 + type: integer token: - type: string description: | Authentication token to set on the initial user. If not specified, the server will generate a token. - required: - - username - - org - - bucket - OnboardingResponse: - type: object - properties: - user: - $ref: '#/components/schemas/UserResponse' - org: - $ref: '#/components/schemas/Organization' - bucket: - $ref: '#/components/schemas/Bucket' - auth: - $ref: '#/components/schemas/Authorization' - Variable: - type: object - required: - - name - - orgID - - arguments - properties: - links: - type: object - readOnly: true - properties: - self: - type: string - format: uri - org: - type: string - format: uri - labels: - type: string - format: uri - id: - readOnly: true - type: string - orgID: - type: string - name: - type: string - description: - type: string - selected: - type: array - items: - type: string - labels: - $ref: '#/components/schemas/Labels' - arguments: - $ref: '#/components/schemas/VariableProperties' - createdAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - Variables: - type: object - example: - variables: - - id: '1221432' - name: ':ok:' - selected: - - hello - arguments: - type: constant - values: - - howdy - - hello - - hi - - yo - - oy - - id: '1221432' - name: ':ok:' - selected: - - c - arguments: - type: map - values: - a: fdjaklfdjkldsfjlkjdsa - b: dfaksjfkljekfajekdljfas - c: fdjksajfdkfeawfeea - - id: '1221432' - name: ':ok:' - selected: - - host - arguments: - type: query - query: 'from(bucket: "foo") |> showMeasurements()' - language: flux - properties: - variables: - type: array - items: - $ref: '#/components/schemas/Variable' - Source: - type: object - properties: - links: - type: object - properties: - self: - type: string - query: - type: string - health: - type: string - buckets: - type: string - id: - type: string - orgID: - type: string - default: - type: boolean - name: - type: string - type: - type: string - enum: - - v1 - - v2 - - self - url: - type: string - format: uri - insecureSkipVerify: - type: boolean - telegraf: - type: string - token: type: string username: type: string - password: - type: string - sharedSecret: - type: string - metaUrl: - type: string - format: uri - defaultRP: - type: string - languages: - type: array - readOnly: true - items: - type: string - enum: - - flux - - influxql - Sources: - type: object - properties: - links: - type: object - properties: - self: - type: string - format: uri - sources: - type: array - items: - $ref: '#/components/schemas/Source' - ScraperTargetRequest: - type: object - properties: - name: - type: string - description: The name of the scraper target. - type: - type: string - description: The type of the metrics to be parsed. - enum: - - prometheus - url: - type: string - description: The URL of the metrics endpoint. - example: 'http://localhost:9090/metrics' - orgID: - type: string - description: The organization ID. - bucketID: - type: string - description: The ID of the bucket to write to. - allowInsecure: - type: boolean - description: Skip TLS verification on endpoint. - default: false - ScraperTargetResponse: - type: object - allOf: - - $ref: '#/components/schemas/ScraperTargetRequest' - - type: object - properties: - id: - type: string - readOnly: true - org: - type: string - description: The name of the organization. - bucket: - type: string - description: The bucket name. - links: - type: object - readOnly: true - example: - self: /api/v2/scrapers/1 - owners: /api/v2/scrapers/1/owners - members: /api/v2/scrapers/1/members - bucket: /api/v2/buckets/1 - organization: /api/v2/orgs/1 - properties: - self: - $ref: '#/components/schemas/Link' - members: - $ref: '#/components/schemas/Link' - owners: - $ref: '#/components/schemas/Link' - bucket: - $ref: '#/components/schemas/Link' - organization: - $ref: '#/components/schemas/Link' - ScraperTargetResponses: - type: object - properties: - configurations: - 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: + - username + - org + - bucket type: object + OnboardingResponse: properties: - organizationID: - type: string - organizationName: - type: string - bucketID: - type: string - bucketName: + auth: + $ref: '#/components/schemas/Authorization' + bucket: + $ref: '#/components/schemas/Bucket' + org: + $ref: '#/components/schemas/Organization' + user: + $ref: '#/components/schemas/UserResponse' + type: object + OptionStatement: + description: A single variable declaration + properties: + assignment: + oneOf: + - $ref: '#/components/schemas/VariableAssignment' + - $ref: '#/components/schemas/MemberAssignment' + type: + $ref: '#/components/schemas/NodeType' + type: object + Organization: + properties: + createdAt: + format: date-time + readOnly: true type: string description: type: string - defaultRetentionPolicy: + id: + readOnly: true 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: + links: + example: + buckets: /api/v2/buckets?org=myorg + dashboards: /api/v2/dashboards?org=myorg + labels: /api/v2/orgs/1/labels + members: /api/v2/orgs/1/members + owners: /api/v2/orgs/1/owners + secrets: /api/v2/orgs/1/secrets + self: /api/v2/orgs/1 + tasks: /api/v2/tasks?org=myorg + properties: + buckets: + $ref: '#/components/schemas/Link' + dashboards: + $ref: '#/components/schemas/Link' + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + secrets: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + tasks: + $ref: '#/components/schemas/Link' + readOnly: true + type: object 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: + status: + default: active + description: If inactive the organization is inactive. + enum: + - active + - inactive type: string + updatedAt: format: date-time - endTime: + readOnly: true 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 + - name + Organizations: 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 + links: + $ref: '#/components/schemas/Links' + orgs: items: - type: string - required: - - name - - mode - - destinations - RestoredBucketMappings: + $ref: '#/components/schemas/Organization' + type: array type: object + Package: + description: Represents a complete package source tree. + properties: + files: + description: Package files + items: + $ref: '#/components/schemas/File' + type: array + package: + description: Package name + type: string + path: + description: Package import path + type: string + type: + $ref: '#/components/schemas/NodeType' + type: object + PackageClause: + description: Defines a package identifier + properties: + name: + $ref: '#/components/schemas/Identifier' + type: + $ref: '#/components/schemas/NodeType' + type: object + PagerDutyNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + clientURL: + type: string + routingKey: + type: string + required: + - routingKey + type: object + type: object + PagerDutyNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/PagerDutyNotificationRuleBase' + PagerDutyNotificationRuleBase: + properties: + messageTemplate: + type: string + type: + enum: + - pagerduty + type: string + required: + - type + - messageTemplate + type: object + ParenExpression: + description: Represents an expression wrapped in parenthesis + properties: + expression: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + PasswordResetBody: + properties: + password: + type: string + required: + - password + PatchBucketRequest: + description: Updates to an existing bucket resource. + properties: + description: + type: string + name: + type: string + retentionRules: + $ref: '#/components/schemas/PatchRetentionRules' + type: object + PatchOrganizationRequest: + properties: + description: + description: New description to set on the organization + type: string + name: + description: New name to set on the organization + type: string + type: object + PatchRetentionRule: + description: Updates to a rule to expire or retain data. + properties: + everySeconds: + description: Duration in seconds for how long data will be kept in the database. + 0 means infinite. + example: 86400 + format: int64 + minimum: 0 + type: integer + shardGroupDurationSeconds: + description: Shard duration measured in seconds. + format: int64 + type: integer + type: + default: expire + enum: + - expire + type: string + required: + - type + type: object + PatchRetentionRules: + description: Updates to rules to expire or retain data. No rules means no updates. + items: + $ref: '#/components/schemas/PatchRetentionRule' + type: array + Permission: + properties: + action: + enum: + - read + - write + type: string + resource: + $ref: '#/components/schemas/Resource' + required: + - action + - resource + PipeExpression: + description: Call expression with pipe argument + properties: + argument: + $ref: '#/components/schemas/Expression' + call: + $ref: '#/components/schemas/CallExpression' + type: + $ref: '#/components/schemas/NodeType' + type: object + PipeLiteral: + description: Represents a specialized literal value, indicating the left hand + value of a pipe expression + properties: + type: + $ref: '#/components/schemas/NodeType' + type: object + PostBucketRequest: + properties: + description: + type: string + name: + type: string + orgID: + type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' + rp: + type: string + schemaType: + $ref: '#/components/schemas/SchemaType' + default: implicit + required: + - orgID + - name + - retentionRules + PostCheck: + allOf: + - $ref: '#/components/schemas/CheckDiscriminator' + PostNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointDiscriminator' + PostNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleDiscriminator' + PostOrganizationRequest: + properties: + description: + type: string + name: + type: string + required: + - name + type: object + Property: + description: The value associated with a key + properties: + key: + $ref: '#/components/schemas/PropertyKey' + type: + $ref: '#/components/schemas/NodeType' + value: + $ref: '#/components/schemas/Expression' + type: object + PropertyKey: + oneOf: + - $ref: '#/components/schemas/Identifier' + - $ref: '#/components/schemas/StringLiteral' + Query: + description: Query influx using the Flux language + properties: + dialect: + $ref: '#/components/schemas/Dialect' + extern: + $ref: '#/components/schemas/File' + now: + description: Specifies the time that should be reported as "now" in the + query. Default is the server's now time. + format: date-time + type: string + params: + 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) + type: object + query: + description: Query script to execute. + type: string + type: + description: The type of query. Must be "flux". + enum: + - flux + type: string + required: + - query + type: object + QueryEditMode: + enum: + - builder + - advanced + type: string + QueryVariableProperties: + properties: + type: + enum: + - query + type: string + values: + properties: + language: + type: string + query: + type: string + type: object + RangeThreshold: + allOf: + - $ref: '#/components/schemas/ThresholdBase' + - properties: + max: + format: float + type: number + min: + format: float + type: number + type: + enum: + - range + type: string + within: + type: boolean + required: + - type + - min + - max + - within + type: object + Ready: + properties: + started: + example: "2019-03-13T10:09:33.891196-04:00" + format: date-time + type: string + status: + enum: + - ready + type: string + up: + example: 14m45.911966424s + type: string + type: object + RegexpLiteral: + description: Expressions begin and end with `/` and are regular expressions + with syntax accepted by RE2 + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: string + type: object + RemoteConnection: + properties: + allowInsecureTLS: + default: false + type: boolean + description: + type: string + id: + type: string + name: + type: string + orgID: + type: string + remoteOrgID: + type: string + remoteURL: + format: uri + type: string + required: + - id + - name + - orgID + - remoteURL + - remoteOrgID + - allowInsecureTLS + type: object + RemoteConnectionCreationRequest: + properties: + allowInsecureTLS: + default: false + type: boolean + description: + type: string + name: + type: string + orgID: + type: string + remoteAPIToken: + type: string + remoteOrgID: + type: string + remoteURL: + format: uri + type: string + required: + - name + - orgID + - remoteURL + - remoteAPIToken + - remoteOrgID + - allowInsecureTLS + type: object + RemoteConnectionUpdateRequest: + properties: + allowInsecureTLS: + default: false + type: boolean + description: + type: string + name: + type: string + remoteAPIToken: + type: string + remoteOrgID: + type: string + remoteURL: + format: uri + type: string + type: object + RemoteConnections: + properties: + remotes: + items: + $ref: '#/components/schemas/RemoteConnection' + type: array + type: object + RenamableField: + description: Describes a field that can be renamed and made visible or invisible. + properties: + displayName: + description: The name that a field is renamed to by the user. + type: string + internalName: + description: The calculated name of a field. + readOnly: true + type: string + visible: + description: Indicates whether this field should be visible on the table. + type: boolean + type: object + Replication: + properties: + currentQueueSizeBytes: + format: int64 + type: integer + description: + type: string + id: + type: string + latestErrorMessage: + type: string + latestResponseCode: + type: integer + localBucketID: + type: string + maxQueueSizeBytes: + format: int64 + type: integer + name: + type: string + orgID: + type: string + remoteBucketID: + type: string + remoteID: + type: string + required: + - id + - name + - remoteID + - orgID + - localBucketID + - remoteBucketID + - maxQueueSizeBytes + - currentQueueSizeBytes + type: object + ReplicationCreationRequest: + properties: + description: + type: string + localBucketID: + type: string + maxQueueSizeBytes: + default: 67108860 + format: int64 + minimum: 33554430 + type: integer + name: + type: string + orgID: + type: string + remoteBucketID: + type: string + remoteID: + type: string + required: + - name + - orgID + - remoteID + - localBucketID + - remoteBucketID + - maxQueueSizeBytes + type: object + ReplicationUpdateRequest: + properties: + description: + type: string + maxQueueSizeBytes: + format: int64 + minimum: 33554430 + type: integer + name: + type: string + remoteBucketID: + type: string + remoteID: + type: string + type: object + Replications: + properties: + replications: + items: + $ref: '#/components/schemas/Replication' + type: array + type: object + Resource: + properties: + id: + 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. + type: string + name: + description: Optional name of the resource if the resource has a name field. + type: string + org: + description: Optional name of the organization of the organization with + orgID. + type: string + orgID: + 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. + type: string + type: + enum: + - authorizations + - buckets + - dashboards + - orgs + - sources + - tasks + - telegrafs + - users + - variables + - scrapers + - secrets + - labels + - views + - documents + - notificationRules + - notificationEndpoints + - checks + - dbrp + - notebooks + type: string + required: + - type + type: object + ResourceMember: + allOf: + - $ref: '#/components/schemas/UserResponse' + - properties: + role: + default: member + enum: + - member + type: string + type: object + ResourceMembers: + properties: + links: + properties: + self: + format: uri + type: string + type: object + users: + items: + $ref: '#/components/schemas/ResourceMember' + type: array + type: object + ResourceOwner: + allOf: + - $ref: '#/components/schemas/UserResponse' + - properties: + role: + default: owner + enum: + - owner + type: string + type: object + ResourceOwners: + properties: + links: + properties: + self: + format: uri + type: string + type: object + users: + items: + $ref: '#/components/schemas/ResourceOwner' + type: array + type: object + RestoredBucketMappings: properties: id: description: New ID of the restored bucket @@ -13257,193 +10801,2479 @@ components: shardMappings: $ref: '#/components/schemas/BucketShardMappings' required: - - id - - name - - shardMappings - BucketShardMappings: - type: array + - id + - name + - shardMappings + type: object + RetentionPolicyManifest: + properties: + duration: + format: int64 + type: integer + name: + type: string + replicaN: + type: integer + shardGroupDuration: + format: int64 + type: integer + shardGroups: + $ref: '#/components/schemas/ShardGroupManifests' + subscriptions: + $ref: '#/components/schemas/SubscriptionManifests' + required: + - name + - replicaN + - duration + - shardGroupDuration + - shardGroups + - subscriptions + type: object + RetentionPolicyManifests: items: - $ref: '#/components/schemas/BucketShardMapping' - BucketShardMapping: - type: object + $ref: '#/components/schemas/RetentionPolicyManifest' + type: array + RetentionRule: properties: - oldId: - type: integer + everySeconds: + description: Duration in seconds for how long data will be kept in the database. + 0 means infinite. + example: 86400 format: int64 - newId: + minimum: 0 type: integer + shardGroupDurationSeconds: + description: Shard duration measured in seconds. format: int64 + type: integer + type: + default: expire + enum: + - expire + type: string required: - - oldId - - newId - RemoteConnection: + - type + - everySeconds type: object + RetentionRules: + description: Rules to expire or retain data. No rules means data never expires. + items: + $ref: '#/components/schemas/RetentionRule' + type: array + ReturnStatement: + description: Defines an expression to return + properties: + argument: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + Routes: + properties: + authorizations: + format: uri + type: string + buckets: + format: uri + type: string + dashboards: + format: uri + type: string + external: + properties: + statusFeed: + format: uri + type: string + type: object + flags: + format: uri + type: string + me: + format: uri + type: string + orgs: + format: uri + type: string + query: + properties: + analyze: + format: uri + type: string + ast: + format: uri + type: string + self: + format: uri + type: string + suggestions: + format: uri + type: string + type: object + setup: + format: uri + type: string + signin: + format: uri + type: string + signout: + format: uri + type: string + sources: + format: uri + type: string + system: + properties: + debug: + format: uri + type: string + health: + format: uri + type: string + metrics: + format: uri + type: string + type: object + tasks: + format: uri + type: string + telegrafs: + format: uri + type: string + users: + format: uri + type: string + variables: + format: uri + type: string + write: + format: uri + type: string + RuleStatusLevel: + description: The state to record if check matches a criteria. + enum: + - UNKNOWN + - OK + - INFO + - CRIT + - WARN + - ANY + type: string + Run: + properties: + finishedAt: + description: Time run finished executing, RFC3339Nano. + format: date-time + readOnly: true + type: string + id: + readOnly: true + type: string + links: + example: + retry: /api/v2/tasks/1/runs/1/retry + self: /api/v2/tasks/1/runs/1 + task: /api/v2/tasks/1 + properties: + retry: + format: uri + type: string + self: + format: uri + type: string + task: + format: uri + type: string + readOnly: true + type: object + log: + description: An array of logs associated with the run. + items: + $ref: '#/components/schemas/LogEvent' + readOnly: true + type: array + requestedAt: + description: Time run was manually requested, RFC3339Nano. + format: date-time + readOnly: true + type: string + scheduledFor: + description: Time used for run's "now" option, RFC3339. + format: date-time + type: string + startedAt: + description: Time run started executing, RFC3339Nano. + format: date-time + readOnly: true + type: string + status: + enum: + - scheduled + - started + - failed + - success + - canceled + readOnly: true + type: string + taskID: + readOnly: true + type: string + RunManually: + properties: + scheduledFor: + description: Time used for run's "now" option, RFC3339. Default is the + server's now time. + format: date-time + nullable: true + type: string + Runs: + properties: + links: + $ref: '#/components/schemas/Links' + runs: + items: + $ref: '#/components/schemas/Run' + type: array + type: object + SMTPNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/SMTPNotificationRuleBase' + SMTPNotificationRuleBase: + properties: + bodyTemplate: + type: string + subjectTemplate: + type: string + to: + type: string + type: + enum: + - smtp + type: string + required: + - type + - subjectTemplate + - to + type: object + ScatterViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + type: string + type: array + fillColumns: + items: + type: string + type: array + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: + type: integer + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + symbolColumns: + items: + type: string + type: array + timeFormat: + type: string + type: + enum: + - scatter + type: string + xAxisLabel: + type: string + xColumn: + type: string + xDomain: + items: + type: number + maxItems: 2 + type: array + xPrefix: + type: string + xSuffix: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yAxisLabel: + type: string + yColumn: + type: string + yDomain: + items: + type: number + maxItems: 2 + type: array + yPrefix: + type: string + ySuffix: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - xColumn + - yColumn + - fillColumns + - symbolColumns + - xDomain + - yDomain + - xAxisLabel + - yAxisLabel + - xPrefix + - yPrefix + - xSuffix + - ySuffix + type: object + SchemaType: + enum: + - implicit + - explicit + type: string + ScraperTargetRequest: + properties: + allowInsecure: + default: false + description: Skip TLS verification on endpoint. + type: boolean + bucketID: + description: The ID of the bucket to write to. + type: string + name: + description: The name of the scraper target. + type: string + orgID: + description: The organization ID. + type: string + type: + description: The type of the metrics to be parsed. + enum: + - prometheus + type: string + url: + description: The URL of the metrics endpoint. + example: http://localhost:9090/metrics + type: string + type: object + ScraperTargetResponse: + allOf: + - $ref: '#/components/schemas/ScraperTargetRequest' + - properties: + bucket: + description: The bucket name. + type: string + id: + readOnly: true + type: string + links: + example: + bucket: /api/v2/buckets/1 + members: /api/v2/scrapers/1/members + organization: /api/v2/orgs/1 + owners: /api/v2/scrapers/1/owners + self: /api/v2/scrapers/1 + properties: + bucket: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + organization: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + readOnly: true + type: object + org: + description: The name of the organization. + type: string + type: object + type: object + ScraperTargetResponses: + properties: + configurations: + items: + $ref: '#/components/schemas/ScraperTargetResponse' + type: array + type: object + SecretKeys: + properties: + secrets: + items: + type: string + type: array + type: object + SecretKeysResponse: + allOf: + - $ref: '#/components/schemas/SecretKeys' + - properties: + links: + properties: + org: + type: string + self: + type: string + readOnly: true + type: object + type: object + Secrets: + additionalProperties: + type: string + example: + apikey: abc123xyz + ShardGroupManifest: + properties: + deletedAt: + format: date-time + type: string + endTime: + format: date-time + type: string + id: + format: int64 + type: integer + shards: + $ref: '#/components/schemas/ShardManifests' + startTime: + format: date-time + type: string + truncatedAt: + format: date-time + type: string + required: + - id + - startTime + - endTime + - shards + type: object + ShardGroupManifests: + items: + $ref: '#/components/schemas/ShardGroupManifest' + type: array + ShardManifest: properties: id: + format: int64 + type: integer + shardOwners: + $ref: '#/components/schemas/ShardOwners' + required: + - id + - shardOwners + type: object + ShardManifests: + items: + $ref: '#/components/schemas/ShardManifest' + type: array + ShardOwner: + properties: + nodeID: + description: ID of the node that owns a shard. + format: int64 + type: integer + required: + - nodeID + type: object + ShardOwners: + items: + $ref: '#/components/schemas/ShardOwner' + type: array + SimpleTableViewProperties: + properties: + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showAll: + type: boolean + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + type: + enum: + - simple-table + type: string + required: + - type + - showAll + - queries + - shape + - note + - showNoteWhenEmpty + type: object + SingleStatViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + note: + type: string + prefix: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + suffix: + type: string + tickPrefix: + type: string + tickSuffix: + type: string + type: + enum: + - single-stat + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - prefix + - tickPrefix + - suffix + - tickSuffix + - decimalPlaces + type: object + SlackNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + token: + description: Specifies the API token string. Specify either `URL` or `Token`. + type: string + url: + description: Specifies the URL of the Slack endpoint. Specify either `URL` + or `Token`. + type: string + type: object + type: object + SlackNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/SlackNotificationRuleBase' + SlackNotificationRuleBase: + properties: + channel: + type: string + messageTemplate: + type: string + type: + enum: + - slack + type: string + required: + - type + - messageTemplate + type: object + Source: + properties: + default: + type: boolean + defaultRP: + type: string + id: + type: string + insecureSkipVerify: + type: boolean + languages: + items: + enum: + - flux + - influxql + type: string + readOnly: true + type: array + links: + properties: + buckets: + type: string + health: + type: string + query: + type: string + self: + type: string + type: object + metaUrl: + format: uri type: string name: type: string orgID: type: string + password: + type: string + sharedSecret: + type: string + telegraf: + type: string + token: + type: string + type: + enum: + - v1 + - v2 + - self + type: string + url: + format: uri + type: string + username: + type: string + type: object + Sources: + properties: + links: + properties: + self: + format: uri + type: string + type: object + sources: + items: + $ref: '#/components/schemas/Source' + type: array + type: object + Stack: + properties: + createdAt: + format: date-time + readOnly: true + type: string + events: + items: + properties: + description: + type: string + eventType: + type: string + name: + type: string + resources: + items: + properties: + apiVersion: + type: string + associations: + items: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + metaName: + type: string + type: object + type: array + kind: + $ref: '#/components/schemas/TemplateKind' + links: + properties: + self: + type: string + type: object + resourceID: + type: string + templateMetaName: + type: string + type: object + type: array + sources: + items: + type: string + type: array + updatedAt: + format: date-time + readOnly: true + type: string + urls: + items: + type: string + type: array + type: object + type: array + id: + type: string + orgID: + type: string + type: object + Statement: + oneOf: + - $ref: '#/components/schemas/BadStatement' + - $ref: '#/components/schemas/VariableAssignment' + - $ref: '#/components/schemas/MemberAssignment' + - $ref: '#/components/schemas/ExpressionStatement' + - $ref: '#/components/schemas/ReturnStatement' + - $ref: '#/components/schemas/OptionStatement' + - $ref: '#/components/schemas/BuiltinStatement' + - $ref: '#/components/schemas/TestStatement' + StaticLegend: + description: StaticLegend represents the options specific to the static legend + properties: + colorizeRows: + type: boolean + heightRatio: + format: float + type: number + opacity: + format: float + type: number + orientationThreshold: + type: integer + show: + type: boolean + valueAxis: + type: string + widthRatio: + format: float + type: number + type: object + StatusRule: + properties: + count: + type: integer + currentLevel: + $ref: '#/components/schemas/RuleStatusLevel' + period: + type: string + previousLevel: + $ref: '#/components/schemas/RuleStatusLevel' + type: object + StringLiteral: + description: Expressions begin and end with double quote marks + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: string + type: object + SubscriptionManifest: + properties: + destinations: + items: + type: string + type: array + mode: + type: string + name: + type: string + required: + - name + - mode + - destinations + type: object + SubscriptionManifests: + items: + $ref: '#/components/schemas/SubscriptionManifest' + type: array + TableViewProperties: + properties: + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + decimalPlaces: + $ref: '#/components/schemas/DecimalPlaces' + fieldOptions: + description: fieldOptions represent the fields retrieved by the query with + customization options + items: + $ref: '#/components/schemas/RenamableField' + type: array + note: + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + tableOptions: + properties: + fixFirstColumn: + description: fixFirstColumn indicates whether the first column of the + table should be locked + type: boolean + sortBy: + $ref: '#/components/schemas/RenamableField' + verticalTimeAxis: + description: verticalTimeAxis describes the orientation of the table + by indicating whether the time axis will be displayed vertically + type: boolean + wrapping: + description: Wrapping describes the text wrapping style to be used in + table views + enum: + - truncate + - wrap + - single-line + type: string + type: object + timeFormat: + description: timeFormat describes the display format for time values according + to moment.js date formatting + type: string + type: + enum: + - table + type: string + required: + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - tableOptions + - fieldOptions + - timeFormat + - decimalPlaces + type: object + TagRule: + properties: + key: + type: string + operator: + enum: + - equal + - notequal + - equalregex + - notequalregex + type: string + value: + type: string + type: object + Task: + properties: + authorizationID: + description: The ID of the authorization used when this task communicates + with the query engine. + type: string + createdAt: + format: date-time + readOnly: true + type: string + cron: + description: A task repetition schedule in the form '* * * * * *'; parsed + from Flux. + type: string + description: + description: An optional description of the task. + type: string + every: + description: A simple task repetition schedule; parsed from Flux. + type: string + flux: + description: The Flux script to run for this task. + type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + lastRunError: + readOnly: true + type: string + lastRunStatus: + enum: + - failed + - success + - canceled + readOnly: true + type: string + latestCompleted: + description: Timestamp of latest scheduled, completed run, RFC3339. + format: date-time + readOnly: true + type: string + links: + example: + labels: /api/v2/tasks/1/labels + logs: /api/v2/tasks/1/logs + members: /api/v2/tasks/1/members + owners: /api/v2/tasks/1/owners + runs: /api/v2/tasks/1/runs + self: /api/v2/tasks/1 + properties: + labels: + $ref: '#/components/schemas/Link' + logs: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + runs: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + readOnly: true + type: object + name: + description: The name of the task. + 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. + type: string + org: + description: The name of the organization that owns this Task. + type: string + orgID: + description: The ID of the organization that owns this Task. + type: string + ownerID: + description: The ID of the user who owns this Task. + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + type: + description: The type of task, this can be used for filtering tasks on list + actions. + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - id + - name + - orgID + - flux + type: object + TaskCreateRequest: + properties: + description: + description: An optional description of the task. + type: string + flux: + description: The Flux script to run for this task. + type: string + org: + description: The name of the organization that owns this Task. + type: string + orgID: + description: The ID of the organization that owns this Task. + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + required: + - flux + type: object + TaskStatusType: + enum: + - active + - inactive + type: string + TaskUpdateRequest: + properties: + cron: + description: Override the 'cron' option in the flux script. + type: string + description: + description: An optional description of the task. + type: string + every: + description: Override the 'every' option in the flux script. + type: string + flux: + description: The Flux script to run for this task. + type: string + name: + description: Override the 'name' option in the flux script. + type: string + offset: + description: Override the 'offset' option in the flux script. + type: string + status: + $ref: '#/components/schemas/TaskStatusType' + type: object + Tasks: + properties: + links: + $ref: '#/components/schemas/Links' + readOnly: true + tasks: + items: + $ref: '#/components/schemas/Task' + type: array + type: object + Telegraf: + allOf: + - $ref: '#/components/schemas/TelegrafRequest' + - properties: + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + readOnly: true + links: + example: + lables: /api/v2/telegrafs/1/labels + members: /api/v2/telegrafs/1/members + owners: /api/v2/telegrafs/1/owners + self: /api/v2/telegrafs/1 + properties: + labels: + $ref: '#/components/schemas/Link' + members: + $ref: '#/components/schemas/Link' + owners: + $ref: '#/components/schemas/Link' + self: + $ref: '#/components/schemas/Link' + readOnly: true + type: object + type: object + type: object + TelegrafPlugin: + properties: + config: + type: string description: type: string - remoteURL: + name: type: string - format: uri - remoteOrgID: + type: type: string - allowInsecureTLS: - type: boolean - default: false - required: - - id - - name - - orgID - - remoteURL - - remoteOrgID - - allowInsecureTLS - RemoteConnections: type: object + TelegrafPlugins: properties: + os: + type: string + plugins: + items: + $ref: '#/components/schemas/TelegrafPlugin' + type: array + version: + type: string + type: object + TelegrafRequest: + properties: + config: + type: string + description: + type: string + metadata: + properties: + buckets: + items: + type: string + type: array + type: object + name: + type: string + orgID: + type: string + type: object + Telegrafs: + properties: + configurations: + items: + $ref: '#/components/schemas/Telegraf' + type: array + type: object + TelegramNotificationEndpoint: + allOf: + - $ref: '#/components/schemas/NotificationEndpointBase' + - properties: + channel: + description: ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage + . + type: string + token: + description: Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot + . + type: string + required: + - token + - channel + type: object + type: object + TelegramNotificationRule: + allOf: + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/TelegramNotificationRuleBase' + TelegramNotificationRuleBase: + properties: + disableWebPagePreview: + description: Disables preview of web links in the sent messages when "true". + Defaults to "false" . + type: boolean + messageTemplate: + 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" . + enum: + - MarkdownV2 + - HTML + - Markdown + type: string + type: + description: The discriminator between other types of notification rules + is "telegram". + enum: + - telegram + type: string + required: + - type + - messageTemplate + - channel + type: object + Template: + items: + properties: + apiVersion: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + meta: + properties: + name: + type: string + type: object + spec: + type: object + type: object + type: array + TemplateApply: + properties: + actions: + items: + oneOf: + - properties: + action: + enum: + - skipKind + type: string + properties: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + required: + - kind + type: object + type: object + - properties: + action: + enum: + - skipResource + type: string + properties: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + resourceTemplateName: + type: string + required: + - kind + - resourceTemplateName + type: object + type: object + type: array + dryRun: + type: boolean + envRefs: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + type: object + orgID: + type: string remotes: - type: array items: - $ref: '#/components/schemas/RemoteConnection' - RemoteConnectionCreationRequest: + properties: + contentType: + type: string + url: + type: string + required: + - url + type: object + type: array + secrets: + additionalProperties: + type: string + type: object + stackID: + type: string + template: + properties: + contentType: + type: string + contents: + $ref: '#/components/schemas/Template' + sources: + items: + type: string + type: array + type: object + templates: + items: + properties: + contentType: + type: string + contents: + $ref: '#/components/schemas/Template' + sources: + items: + type: string + type: array + type: object + type: array type: object + TemplateChart: 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: + height: + type: integer + properties: + $ref: '#/components/schemas/ViewProperties' + width: + type: integer + xPos: + type: integer + yPos: + type: integer type: object + TemplateEnvReferences: + items: + properties: + defaultValue: + description: Default value that will be provided for the reference when + no value is provided + nullable: true + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + envRefKey: + description: Key identified as environment reference and is the key identified + in the template + type: string + resourceField: + description: Field the environment reference corresponds too + type: string + value: + description: Value provided to fulfill reference + nullable: true + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + required: + - resourceField + - envRefKey + type: object + type: array + TemplateExportByID: properties: - name: + orgIDs: + items: + properties: + orgID: + type: string + resourceFilters: + properties: + byLabel: + items: + type: string + type: array + byResourceKind: + items: + $ref: '#/components/schemas/TemplateKind' + type: array + type: object + type: object + type: array + resources: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + name: + description: if defined with id, name is used for resource exported + by id. if defined independently, resources strictly matching name + are exported + type: string + required: + - id + - kind + type: object + type: array + stackID: type: string - description: - type: string - remoteURL: - type: string - format: uri - remoteAPIToken: - type: string - remoteOrgID: - type: string - allowInsecureTLS: - type: boolean - default: false - Replication: type: object + TemplateExportByName: properties: + orgIDs: + items: + properties: + orgID: + type: string + resourceFilters: + properties: + byLabel: + items: + type: string + type: array + byResourceKind: + items: + $ref: '#/components/schemas/TemplateKind' + type: array + type: object + type: object + type: array + resources: + items: + properties: + kind: + $ref: '#/components/schemas/TemplateKind' + name: + type: string + required: + - name + - kind + type: object + type: array + stackID: + type: string + type: object + TemplateKind: + enum: + - Bucket + - Check + - CheckDeadman + - CheckThreshold + - Dashboard + - Label + - NotificationEndpoint + - NotificationEndpointHTTP + - NotificationEndpointPagerDuty + - NotificationEndpointSlack + - NotificationRule + - Task + - Telegraf + - Variable + type: string + TemplateSummary: + properties: + diff: + properties: + buckets: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + description: + type: string + name: + type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' + type: object + old: + properties: + description: + type: string + name: + type: string + retentionRules: + $ref: '#/components/schemas/RetentionRules' + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + checks: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + $ref: '#/components/schemas/CheckDiscriminator' + old: + $ref: '#/components/schemas/CheckDiscriminator' + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + dashboards: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + charts: + items: + $ref: '#/components/schemas/TemplateChart' + type: array + description: + type: string + name: + type: string + type: object + old: + properties: + charts: + items: + $ref: '#/components/schemas/TemplateChart' + type: array + description: + type: string + name: + type: string + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + labelMappings: + items: + properties: + labelID: + type: string + labelName: + type: string + labelTemplateMetaName: + type: string + resourceID: + type: string + resourceName: + type: string + resourceTemplateMetaName: + type: string + resourceType: + type: string + status: + type: string + type: object + type: array + labels: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + color: + type: string + description: + type: string + name: + type: string + type: object + old: + properties: + color: + type: string + description: + type: string + name: + type: string + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + notificationEndpoints: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + $ref: '#/components/schemas/NotificationEndpointDiscriminator' + old: + $ref: '#/components/schemas/NotificationEndpointDiscriminator' + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + notificationRules: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + description: + type: string + endpointID: + type: string + endpointName: + type: string + endpointType: + type: string + every: + type: string + messageTemplate: + type: string + name: + type: string + offset: + type: string + status: + type: string + statusRules: + items: + properties: + currentLevel: + type: string + previousLevel: + type: string + type: object + type: array + tagRules: + items: + properties: + key: + type: string + operator: + type: string + value: + type: string + type: object + type: array + type: object + old: + properties: + description: + type: string + endpointID: + type: string + endpointName: + type: string + endpointType: + type: string + every: + type: string + messageTemplate: + type: string + name: + type: string + offset: + type: string + status: + type: string + statusRules: + items: + properties: + currentLevel: + type: string + previousLevel: + type: string + type: object + type: array + tagRules: + items: + properties: + key: + type: string + operator: + type: string + value: + type: string + type: object + type: array + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + tasks: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + cron: + type: string + description: + type: string + every: + type: string + name: + type: string + offset: + type: string + query: + type: string + status: + type: string + type: object + old: + properties: + cron: + type: string + description: + type: string + every: + type: string + name: + type: string + offset: + type: string + query: + type: string + status: + type: string + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + telegrafConfigs: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + $ref: '#/components/schemas/TelegrafRequest' + old: + $ref: '#/components/schemas/TelegrafRequest' + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + variables: + items: + properties: + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + new: + properties: + args: + $ref: '#/components/schemas/VariableProperties' + description: + type: string + name: + type: string + type: object + old: + properties: + args: + $ref: '#/components/schemas/VariableProperties' + description: + type: string + name: + type: string + type: object + stateStatus: + type: string + templateMetaName: + type: string + type: object + type: array + type: object + errors: + items: + properties: + fields: + items: + type: string + type: array + indexes: + items: + type: integer + type: array + kind: + $ref: '#/components/schemas/TemplateKind' + reason: + type: string + type: object + type: array + sources: + items: + type: string + type: array + stackID: + type: string + summary: + properties: + buckets: + items: + properties: + description: + type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + name: + type: string + orgID: + type: string + retentionPeriod: + type: integer + templateMetaName: + type: string + type: object + type: array + checks: + items: + allOf: + - $ref: '#/components/schemas/CheckDiscriminator' + - properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + templateMetaName: + type: string + type: object + type: array + dashboards: + items: + properties: + charts: + items: + $ref: '#/components/schemas/TemplateChart' + type: array + description: + type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + name: + type: string + orgID: + type: string + templateMetaName: + type: string + type: object + type: array + labelMappings: + items: + properties: + labelID: + type: string + labelName: + type: string + labelTemplateMetaName: + type: string + resourceID: + type: string + resourceName: + type: string + resourceTemplateMetaName: + type: string + resourceType: + type: string + status: + type: string + type: object + type: array + labels: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + missingEnvRefs: + items: + type: string + type: array + missingSecrets: + items: + type: string + type: array + notificationEndpoints: + items: + allOf: + - $ref: '#/components/schemas/NotificationEndpointDiscriminator' + - properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + templateMetaName: + type: string + type: object + type: array + notificationRules: + items: + properties: + description: + type: string + endpointID: + type: string + endpointTemplateMetaName: + type: string + endpointType: + type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + every: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + messageTemplate: + type: string + name: + type: string + offset: + type: string + status: + type: string + statusRules: + items: + properties: + currentLevel: + type: string + previousLevel: + type: string + type: object + type: array + tagRules: + items: + properties: + key: + type: string + operator: + type: string + value: + type: string + type: object + type: array + templateMetaName: + type: string + type: object + type: array + tasks: + items: + properties: + cron: + type: string + description: + type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + every: + type: string + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + name: + type: string + offset: + type: string + query: + type: string + status: + type: string + templateMetaName: + type: string + type: object + type: array + telegrafConfigs: + items: + allOf: + - $ref: '#/components/schemas/TelegrafRequest' + - properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + templateMetaName: + type: string + type: object + type: array + variables: + items: + properties: + arguments: + $ref: '#/components/schemas/VariableProperties' + description: + type: string + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' + id: + type: string + kind: + $ref: '#/components/schemas/TemplateKind' + labelAssociations: + items: + $ref: '#/components/schemas/TemplateSummaryLabel' + type: array + name: + type: string + orgID: + type: string + templateMetaName: + type: string + type: object + type: array + type: object + type: object + TemplateSummaryLabel: + properties: + envReferences: + $ref: '#/components/schemas/TemplateEnvReferences' id: type: string + kind: + $ref: '#/components/schemas/TemplateKind' name: type: string - description: - type: string orgID: type: string - remoteID: + properties: + properties: + color: + type: string + description: + type: string + type: object + templateMetaName: type: string - localBucketID: + type: object + TestStatement: + description: Declares a Flux test case + properties: + assignment: + $ref: '#/components/schemas/VariableAssignment' + type: + $ref: '#/components/schemas/NodeType' + type: object + Threshold: + discriminator: + mapping: + greater: '#/components/schemas/GreaterThreshold' + lesser: '#/components/schemas/LesserThreshold' + range: '#/components/schemas/RangeThreshold' + propertyName: type + oneOf: + - $ref: '#/components/schemas/GreaterThreshold' + - $ref: '#/components/schemas/LesserThreshold' + - $ref: '#/components/schemas/RangeThreshold' + ThresholdBase: + properties: + allValues: + description: If true, only alert if all values meet threshold. + type: boolean + level: + $ref: '#/components/schemas/CheckStatusLevel' + ThresholdCheck: + allOf: + - $ref: '#/components/schemas/CheckBase' + - properties: + every: + description: Check repetition interval. + type: string + offset: + description: Duration to delay after the schedule, before executing check. + type: string + statusMessageTemplate: + description: The template used to generate and write a status message. + type: string + tags: + description: List of tags to write to each status. + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + thresholds: + items: + $ref: '#/components/schemas/Threshold' + type: array + type: + enum: + - threshold + type: string + required: + - type + type: object + Token: + properties: + token: type: string - remoteBucketID: + type: object + UnaryExpression: + description: Uses operators to act on a single operand in an expression + properties: + argument: + $ref: '#/components/schemas/Expression' + operator: type: string - maxQueueSizeBytes: - type: integer - format: int64 - currentQueueSizeBytes: - type: integer - format: int64 - latestResponseCode: - type: integer - latestErrorMessage: + type: + $ref: '#/components/schemas/NodeType' + type: object + UnsignedIntegerLiteral: + description: Represents integer numbers + properties: + type: + $ref: '#/components/schemas/NodeType' + value: + type: string + type: object + User: + properties: + id: + readOnly: true + type: string + name: + type: string + oauthID: + type: string + status: + default: active + description: If inactive the user is inactive. + enum: + - active + - inactive type: string required: - - id - - name - - remoteID - - orgID - - localBucketID - - remoteBucketID - - maxQueueSizeBytes - - currentQueueSizeBytes - Replications: - type: object + - name + UserResponse: properties: - replications: - type: array + id: + readOnly: true + type: string + links: + example: + self: /api/v2/users/1 + properties: + self: + format: uri + type: string + readOnly: true + type: object + name: + type: string + oauthID: + type: string + status: + default: active + description: If inactive the user is inactive. + enum: + - active + - inactive + type: string + required: + - name + Users: + properties: + links: + properties: + self: + format: uri + type: string + type: object + users: items: - $ref: '#/components/schemas/Replication' - ReplicationCreationRequest: + $ref: '#/components/schemas/UserResponse' + type: array type: object + Variable: properties: - name: + arguments: + $ref: '#/components/schemas/VariableProperties' + createdAt: + format: date-time type: string description: type: string + id: + readOnly: true + type: string + labels: + $ref: '#/components/schemas/Labels' + links: + properties: + labels: + format: uri + type: string + org: + format: uri + type: string + self: + format: uri + type: string + readOnly: true + type: object + name: + type: string orgID: type: string - remoteID: + selected: + items: + type: string + type: array + updatedAt: + format: date-time 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: + - name + - orgID + - arguments type: object + VariableAssignment: + description: Represents the declaration of a variable properties: + id: + $ref: '#/components/schemas/Identifier' + init: + $ref: '#/components/schemas/Expression' + type: + $ref: '#/components/schemas/NodeType' + type: object + VariableProperties: + oneOf: + - $ref: '#/components/schemas/QueryVariableProperties' + - $ref: '#/components/schemas/ConstantVariableProperties' + - $ref: '#/components/schemas/MapVariableProperties' + type: object + Variables: + example: + variables: + - arguments: + type: constant + values: + - howdy + - hello + - hi + - yo + - oy + id: "1221432" + name: ':ok:' + selected: + - hello + - arguments: + type: map + values: + a: fdjaklfdjkldsfjlkjdsa + b: dfaksjfkljekfajekdljfas + c: fdjksajfdkfeawfeea + id: "1221432" + name: ':ok:' + selected: + - c + - arguments: + language: flux + query: 'from(bucket: "foo") |> showMeasurements()' + type: query + id: "1221432" + name: ':ok:' + selected: + - host + properties: + variables: + items: + $ref: '#/components/schemas/Variable' + type: array + type: object + View: + properties: + id: + readOnly: true + type: string + links: + properties: + self: + type: string + readOnly: true + type: object name: type: string - description: + properties: + $ref: '#/components/schemas/ViewProperties' + required: + - name + - properties + ViewProperties: + oneOf: + - $ref: '#/components/schemas/LinePlusSingleStatProperties' + - $ref: '#/components/schemas/XYViewProperties' + - $ref: '#/components/schemas/SingleStatViewProperties' + - $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' + - $ref: '#/components/schemas/HeatmapViewProperties' + - $ref: '#/components/schemas/MosaicViewProperties' + - $ref: '#/components/schemas/BandViewProperties' + - $ref: '#/components/schemas/GeoViewProperties' + Views: + properties: + links: + properties: + self: + type: string + type: object + views: + items: + $ref: '#/components/schemas/View' + type: array + type: object + WritePrecision: + enum: + - ms + - s + - us + - ns + type: string + XYGeom: + enum: + - line + - step + - stacked + - bar + - monotoneX + type: string + XYViewProperties: + properties: + axes: + $ref: '#/components/schemas/Axes' + colors: + description: Colors define color encoding of data into a visualization + items: + $ref: '#/components/schemas/DashboardColor' + type: array + generateXAxisTicks: + items: + type: string + type: array + generateYAxisTicks: + items: + type: string + type: array + geom: + $ref: '#/components/schemas/XYGeom' + hoverDimension: + enum: + - auto + - x + - "y" + - xy type: string - remoteID: - type: string - remoteBucketID: - type: string - maxQueueSizeBytes: + legendColorizeRows: + type: boolean + legendHide: + type: boolean + legendOpacity: + format: float + type: number + legendOrientationThreshold: type: integer - format: int64 - minimum: 33554430 + note: + type: string + position: + enum: + - overlaid + - stacked + type: string + queries: + items: + $ref: '#/components/schemas/DashboardQuery' + type: array + shadeBelow: + type: boolean + shape: + enum: + - chronograf-v2 + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + staticLegend: + $ref: '#/components/schemas/StaticLegend' + timeFormat: + type: string + type: + enum: + - xy + type: string + xColumn: + type: string + xTickStart: + format: float + type: number + xTickStep: + format: float + type: number + xTotalTicks: + type: integer + yColumn: + type: string + yTickStart: + format: float + type: number + yTickStep: + format: float + type: number + yTotalTicks: + type: integer + required: + - type + - geom + - queries + - shape + - axes + - colors + - note + - showNoteWhenEmpty + - position + type: object responses: ServerError: - description: Non 2XX error response from server. content: application/json: schema: $ref: '#/components/schemas/Error' + description: Non 2XX error response from server. securitySchemes: TokenAuthentication: type: http diff --git a/api-docs/v2.0/swaggerV1Compat.yml b/api-docs/v2.0/swaggerV1Compat.yml index 0da0e97fb..d0ab5fd9d 100644 --- a/api-docs/v2.0/swaggerV1Compat.yml +++ b/api-docs/v2.0/swaggerV1Compat.yml @@ -1,4 +1,5 @@ -openapi: 3.0.0 +# this is a manually maintained file for these old routes until oats#15 is resolved +openapi: "3.0.0" info: title: Influx API Service (V1 compatible endpoints) version: 0.1.0 @@ -7,7 +8,7 @@ servers: description: V1 compatible api endpoints. paths: /write: - post: + post: # technically this functions with other methods as well operationId: PostWriteV1 tags: - Write @@ -20,17 +21,15 @@ 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: @@ -43,76 +42,54 @@ 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 @@ -121,9 +98,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" /query: - post: + post: # technically this functions with other methods as well operationId: PostQueryV1 tags: - Query @@ -131,21 +108,18 @@ paths: requestBody: description: InfluxQL query to execute. content: - text/plain: + text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter 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 @@ -154,15 +128,10 @@ 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 @@ -179,53 +148,42 @@ 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 @@ -234,7 +192,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: "#/components/schemas/Error" components: parameters: TraceSpan: @@ -242,8 +200,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 @@ -302,6 +260,7 @@ 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 @@ -318,9 +277,7 @@ components: readOnly: true description: Message is a human-readable message. type: string - required: - - code - - message + required: [code, message] LineProtocolError: properties: code: @@ -340,26 +297,18 @@ 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: @@ -377,7 +326,4 @@ 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/content/influxdb/cloud/api-guide/api-invocable-scripts/_index.md b/content/influxdb/cloud/api-guide/api-invocable-scripts/_index.md new file mode 100644 index 000000000..223f9c2ee --- /dev/null +++ b/content/influxdb/cloud/api-guide/api-invocable-scripts/_index.md @@ -0,0 +1,189 @@ +--- +title: Invoke custom scripts as API endpoints +seotitle: Use InfluxDB API-invocable scripts +description: > + Use API-invocable scripts to create your own InfluxDB API endpoints that execute custom scripts. +weight: 101 +menu: + influxdb_cloud: + name: Invoke custom scripts + parent: Develop with the API +influxdb/cloud/tags: [api guides] +--- + +Use API invocable scripts to create custom InfluxDB API endpoints that query, process, and shape data. API invocable scripts let you assign scripts to API endpoints and then execute them as standard REST operations in InfluxDB Cloud. Learn how to manage API invocable scripts and invoke them with runtime parameters. + +Use the `/api/v2/functions` InfluxDB API endpoint to: +- [Create a script](#create-an-invocable-script) +- [Invoke a script](#invoke-a-script) +- [List scripts](#list-invocable-scripts) +- [Update a script](#update-an-invocable-script) +- [Delete a script](#delete-an-invocable-script) + +## Create an invocable script +To create an API-invocable script +for your [organization](/influxdb/v2.0/reference/glossary/#organization), +send a request using the `POST` method to the `/api/v2/scripts` InfluxDB API endpoint. + + +[{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/scripts" >}}](/influxdb/cloud/api/#operation/PostScripts) + +Provide the following in your API request: + +#### Request headers +- **Content-Type**: application/json +- **Authorization**: Token *`INFLUX_API_TOKEN`* + +#### Request body +JSON object with the following fields: + +- **script** : [Flux](/{{% latest "flux" %}}) script as a string. +- **language** : language of your script ("flux") +- **name** : script name, unique within your organization +- **description** : script description +- **orgID**: your [InfluxDB organization ID](/influxdb/v2.0/organizations/view-orgs/#view-your-organization-id) + +### Use parameters in a script +To create an invocable script that accepts parameters (variables), +reference the parameters as properties of the `params` object, e.g. `params.firstparam`. +`params` is an InfluxDB object that defines runtime variables. +You provide values for `params` when you [invoke a script](#invoke-a-script). + +## Examples + +### Create an invocable Flux script +The following example creates a new Flux script that references the `params.mybucket` parameter and returns the last point from the [bucket](/influxdb/v2.0/reference/glossary/#bucket). + +```sh +{{% get-shared-text "api/v2.0/api-invocable-scripts/create-flux-script.sh" %}} +``` +Replace the following: +- *`INFLUX_API_TOKEN`*: your [InfluxDB API token](/influxdb/cloud/reference/glossary/#token) +- *`INFLUX_ORG_ID`*: your [InfluxDB organization ID](/influxdb/v2.0/organizations/view-orgs/#view-your-organization-id) + +InfluxDB returns the newly created script. Next, see how to [invoke a script](#invoke-a-script). + +```json +{ + "id": "084d693d93048000", + "orgID": "INFLUX_ORG_ID", + "name": "getLastPoint", + "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)", + "description": "getLastPoint finds the last point in a bucket", + "language": "flux", + "createdAt": "2021-10-15T20:32:04.172938Z", + "updatedAt": "2021-10-15T20:32:04.172938Z" +} +``` + +## Invoke a script +To invoke a script, send a request using the `POST` method to the `/api/v2/scripts/SCRIPT_ID/invoke` InfluxDB API endpoint. + +[{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/PostScriptsIDInvoke) + +Replace *`SCRIPT_ID`* with the ID of the script you want to execute. To find the script ID, see how to [list scripts](#list-scripts). + +Provide the following in your request: + +### Request headers +- **Content-Type**: application/json +- **Accept**: application/csv +- **Authorization**: Token *`INFLUX_API_TOKEN`* + +### Request body +JSON object that contains a `params` object. In `params`, provide key-value pairs for parameters referenced in your script. +The [create](#create-an-invocable-script) example, references the parameter `params.mybucket`. +```json + "from(bucket: params.mybucket) \ + |> range(start: -7d) \ + |> limit(n:1)" +``` + +The following example invokes the created script and passes "air_sensor" as the value for `params.mybucket`. + +```sh +{{% get-shared-text "api/v2.0/api-invocable-scripts/invoke-post.sh" %}} +``` + +InfluxDB returns query results in [annotated CSV](/influxdb/cloud/reference/syntax/annotated-csv/) from the `air_sensor` bucket. + +## List invocable scripts +To list scripts for an organization, send a request using the `GET` method to the `/api/v2/scripts` InfluxDB API endpoint. + +Provide the following in your request: + +#### Request headers +- **Content-Type**: application/json +- **Authorization**: Token *`INFLUX_API_TOKEN`* + +#### Request query parameters +- **org**: your organization name (mutually exclusive with **orgID**) +- **orgID**: your organization ID (mutually exclusive with **org**) +- **limit**: (Optional) number of scripts to return +- **offset**: (Optional) number to offset the pagination + +```sh +{{% get-shared-text "api/v2.0/api-invocable-scripts/list.sh" %}} +``` + +To find a specific script for an organization, send a request using the `GET` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint. + +[{{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/GetScriptsID) + +Replace *`SCRIPT_ID`* with the ID of the script you want to find. + +Provide the following in your request: + +#### Request headers +- **Authorization**: Token *`INFLUX_API_TOKEN`* +- **Accept**: application/json + +```sh +{{% get-shared-text "api/v2.0/api-invocable-scripts/find.sh" %}} +``` +## Update an invocable script +Use the API to replace the following properties of an invocable script: +- name +- description +- script + +To update an existing script for an organization, send a request using the `PATCH` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint. +Replace *`SCRIPT_ID`* with the ID of the script you want to update. + +[{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/PatchScriptsID) + +Provide the following in your request: + +#### Request headers +- **Authorization**: Token *`INFLUX_API_TOKEN`* +- **Content-Type**: application/json +- **Accept**: application/json' + +#### Request body +- A modified **invocable script** as a JSON object. + +The following example finds an invocable script containing a numeric date range, +replaces the date with a new parameter, and updates the invocable script. + +```sh +{{% get-shared-text "api/v2.0/api-invocable-scripts/update-flux-script.sh" %}} +``` +1. Use `GET /api/v2/scripts` to retrieve an object that contains a list of scripts. +2. With the scripts array, use [`jq`](https://stedolan.github.io/jq/) to find the first **invocable script** object that has a `script` property that contains a hard-coded numeric date range. +3. Replace the hard-coded date range in the `script` property with a new `params.myrangestart` dynamic parameter and assign the object to a `new_script` variable. +4. Assign the script ID to a `script_id` variable. +5. Update the script by sending a request to `PATCH /api/v2/scripts/` with `$script_id` in the URL path and `$new_script` as data (in the request body). + +InfluxDB returns the updated invocable script. + +## Delete an invocable script +To delete a script, send a request using the `DELETE` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint. +Replace *`SCRIPT_ID`* with the ID of the script you want to update. + +[{{< api-endpoint method="delete" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/DeleteScriptsID) + +Provide the following in your request: + +#### Request headers +- **Authorization**: Token *`INFLUX_API_TOKEN`* +- **Accept**: application/json' diff --git a/content/influxdb/v2.0/process-data/manage-tasks/create-task.md b/content/influxdb/v2.0/process-data/manage-tasks/create-task.md index fc775f8e5..8b77cf597 100644 --- a/content/influxdb/v2.0/process-data/manage-tasks/create-task.md +++ b/content/influxdb/v2.0/process-data/manage-tasks/create-task.md @@ -129,7 +129,7 @@ Provide the following in your API request: ##### Request headers - **Content-Type**: application/json -- **Authorization**: Token _YOURINFLUXDBTOKEN_** +- **Authorization**: Token *`YOUR_INFLUXDB_TOKEN`* ##### Request body JSON object with the following fields: @@ -142,11 +142,16 @@ JSON object with the following fields: ```sh curl --request POST 'https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/tasks' \ --header 'Content-Type: application/json' \ - --header 'Authorization: Token ' \ + --header 'Authorization: Token INFLUX_TOKEN' \ --data-raw '{ - "flux": "option task = {name: \"CPU Total 1 Hour New\", every: 1h}\n\nfrom(bucket: \"telegraf\")\n\t|> range(start: -1h)\n\t|> filter(fn: (r) =>\n\t\t(r._measurement == \"cpu\"))\n\t|> filter(fn: (r) =>\n\t\t(r._field == \"usage_system\"))\n\t|> filter(fn: (r) =>\n\t\t(r.cpu == \"cpu-total\"))\n\t|> aggregateWindow(every: 1h, fn: max)\n\t|> to(bucket: \"cpu_usage_user_total_1h\", org: \"\")", - "orgID": "", + "flux": "option task = {name: \"CPU Total 1 Hour New\", every: 1h}\n\nfrom(bucket: \"telegraf\")\n\t|> range(start: -1h)\n\t|> filter(fn: (r) =>\n\t\t(r._measurement == \"cpu\"))\n\t|> filter(fn: (r) =>\n\t\t(r._field == \"usage_system\"))\n\t|> filter(fn: (r) =>\n\t\t(r.cpu == \"cpu-total\"))\n\t|> aggregateWindow(every: 1h, fn: max)\n\t|> to(bucket: \"cpu_usage_user_total_1h\", org: \"INFLUX_ORG\")", + "orgID": "INFLUX_ORG_ID", "status": "active", "description": "This task downsamples CPU data every hour" }' ``` +Replace the following: +- *`INFLUX_API_TOKEN`*: your [InfluxDB API token](/influxdb/v2.0/security/tokens/) +- *`INFLUX_ORG`*: your [InfluxDB organization name](influxdb/2.0/organizations/view-orgs/) +- *`INFLUX_ORG_ID`*: your [InfluxDB organization ID](/influxdb/v2.0/organizations/view-orgs/#view-your-organization-id) + diff --git a/shared/text/api/v2.0/api-invocable-scripts/create-flux-script.sh b/shared/text/api/v2.0/api-invocable-scripts/create-flux-script.sh new file mode 100644 index 000000000..1f145436d --- /dev/null +++ b/shared/text/api/v2.0/api-invocable-scripts/create-flux-script.sh @@ -0,0 +1,16 @@ +curl -X 'POST' \ + "http://cloud2.influxdata.com/api/v2/scripts" \ + --header "Authorization: Token ${INFLUX_API_TOKEN}" \ + --header 'accept: application/json' \ + --header 'Content-Type: application/json' \ + --data-binary @- << EOF | jq . + { + "name": "getLastPoint", + "description": "getLastPoint finds the last point in a bucket", + "orgID": "${INFLUX_ORG_ID}", + "script": "from(bucket: params.mybucket) \ + |> range(start: -7d) \ + |> limit(n:1)", + "language": "flux" + } +EOF diff --git a/shared/text/api/v2.0/api-invocable-scripts/find.sh b/shared/text/api/v2.0/api-invocable-scripts/find.sh new file mode 100644 index 000000000..3349590aa --- /dev/null +++ b/shared/text/api/v2.0/api-invocable-scripts/find.sh @@ -0,0 +1,5 @@ +curl -X 'GET' \ + "${INFLUX_URL}/api/v2/scripts/${SCRIPT_ID}" \ + --header "Authorization: Token ${INFLUX_API_TOKEN}" \ + --header 'accept: application/json' \ + --header 'Content-Type: application/json' diff --git a/shared/text/api/v2.0/api-invocable-scripts/invoke-post.sh b/shared/text/api/v2.0/api-invocable-scripts/invoke-post.sh new file mode 100644 index 000000000..ca810a795 --- /dev/null +++ b/shared/text/api/v2.0/api-invocable-scripts/invoke-post.sh @@ -0,0 +1,8 @@ +SCRIPT_ID=085138a111448000 + +curl -X 'POST' \ + "${INFLUX_URL}/api/v2/scripts/${SCRIPT_ID}/invoke" \ + --header "Authorization: Token ${INFLUX_TOKEN}" \ + --header 'Accept: application/csv' \ + --header 'Content-Type: application/json' \ + --data-binary '{ "params": { "mybucket": "air_sensor" } }' diff --git a/shared/text/api/v2.0/api-invocable-scripts/list.sh b/shared/text/api/v2.0/api-invocable-scripts/list.sh new file mode 100644 index 000000000..09ffb5923 --- /dev/null +++ b/shared/text/api/v2.0/api-invocable-scripts/list.sh @@ -0,0 +1,6 @@ +curl -X 'GET' \ + "${INFLUX_URL}/api/v2/scripts" \ + --header "Authorization: Token ${INFLUX_API_TOKEN}" \ + --header 'accept: application/json' \ + --header 'Content-Type: application/json' \ + --data-urlencode 'org=jstirnamaninflux&limit=10' diff --git a/shared/text/api/v2.0/api-invocable-scripts/update-flux-script.sh b/shared/text/api/v2.0/api-invocable-scripts/update-flux-script.sh new file mode 100644 index 000000000..d4a38ed62 --- /dev/null +++ b/shared/text/api/v2.0/api-invocable-scripts/update-flux-script.sh @@ -0,0 +1,21 @@ +find_and_update() { + script=$(curl -X 'GET' \ + "http://cloud2.influxdata.com/api/v2/scripts" \ + --header "Authorization: Token ${INFLUX_API_TOKEN}" \ + --header 'Accept: application/json' \ + --header 'Content-Type: application/json' \ + --data-urlencode 'org=jstirnamaninflux&limit=10' \ + | jq '[.scripts[] | select(.script | test("start: -?\\d\\w"))]' \ + | jq '.[0]') + new_script=$(jq '.script |= sub("start: .*d"; "start: params.myrangestart")' <<< "${script}") + script_id=$(jq -r '.id' <<< "${new_script}") + + curl -X 'PATCH' \ + "${INFLUX_URL}/api/v2/scripts/${script_id}" \ + --header "Authorization: Token ${INFLUX_API_TOKEN}" \ + --header 'Accept: application/json' \ + --header 'Content-Type: application/json' \ + --data "${new_script}" | jq . +} + +find_and_update