From 9b60f4aa24f6db64f806b1d08ac17b853c6008fa Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Sat, 24 Apr 2021 06:22:53 +0200 Subject: [PATCH 1/5] chore: document new location of the swagger file --- packages/apis/DEVELOPMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apis/DEVELOPMENT.md b/packages/apis/DEVELOPMENT.md index 93ba45df8..46470aeff 100644 --- a/packages/apis/DEVELOPMENT.md +++ b/packages/apis/DEVELOPMENT.md @@ -11,7 +11,7 @@ $ yarn build ## Re-generate APIs code - update local resources/swagger.yml to the latest version - - `wget -O resources/swagger.yml https://raw.githubusercontent.com/influxdata/influxdb/master/http/swagger.yml` + - `wget -O resources/swagger.yml https://raw.githubusercontent.com/influxdata/openapi/master/contracts/oss.yml` - re-generate src/generated/types.ts and resources/operations.json using [oats](https://github.com/bonitoo/oats) - `rm -rf src/generated/*.ts` - `oats -i 'types' --storeOperations resources/operations.json resources/swagger.yml > src/generated/types.ts` From e460e0d26716161cedd672ffeaace297bc02c52b Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Sat, 24 Apr 2021 06:23:33 +0200 Subject: [PATCH 2/5] chore: update swagger file --- packages/apis/resources/swagger.yml | 5663 ++++++++++++++------------- 1 file changed, 2991 insertions(+), 2672 deletions(-) diff --git a/packages/apis/resources/swagger.yml b/packages/apis/resources/swagger.yml index 37b90eee1..2642ae353 100644 --- a/packages/apis/resources/swagger.yml +++ b/packages/apis/resources/swagger.yml @@ -1,7 +1,7 @@ -openapi: "3.0.0" +openapi: 3.0.0 info: - title: Influx API Service - version: 0.1.0 + title: Influx OSS API Service + version: 2.0.0 servers: - url: /api/v2 paths: @@ -12,142 +12,69 @@ paths: security: - BasicAuth: [] parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' responses: - "204": + '204': description: Successfully authenticated - "401": + '401': description: Unauthorized access content: application/json: schema: - $ref: "#/components/schemas/Error" - "403": + $ref: '#/components/schemas/Error' + '403': description: user account is disabled content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unsuccessful authentication content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /signout: post: operationId: PostSignout summary: Expire the current session parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' responses: - "204": + '204': description: Session successfully expired - "401": + '401': description: Unauthorized access content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unsuccessful session expiry content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /: get: operationId: GetRoutes summary: Map of all top level routes available parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' responses: default: description: All routes content: application/json: schema: - $ref: "#/components/schemas/Routes" - /setup: - 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. - 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 - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/OnboardingRequest" - responses: - "201": - description: Created default user, bucket, org - content: - application/json: - schema: - $ref: "#/components/schemas/OnboardingResponse" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /setup/user: - post: - operationId: PostSetupUser - tags: - - Setup - summary: Set up a new user, org and bucket - description: Post an onboarding request to set up a new user, org and bucket. - parameters: - - $ref: "#/components/parameters/TraceSpan" - requestBody: - description: Source to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/OnboardingRequest" - responses: - "201": - description: Created default user, bucket, org - content: - application/json: - schema: - $ref: "#/components/schemas/OnboardingResponse" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Routes' /documents/templates: get: operationId: GetDocumentsTemplates tags: - Templates parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: org description: Specifies the name of the organization of the template. @@ -159,52 +86,52 @@ paths: schema: type: string responses: - "200": + '200': description: A list of template documents content: application/json: schema: - $ref: "#/components/schemas/Documents" + $ref: '#/components/schemas/Documents' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostDocumentsTemplates tags: - Templates summary: Create a template 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" + $ref: '#/components/schemas/DocumentCreate' responses: - "201": + '201': description: Template created content: application/json: schema: - $ref: "#/components/schemas/Document" + $ref: '#/components/schemas/Document' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/documents/templates/{templateID}": + $ref: '#/components/schemas/Error' + '/documents/templates/{templateID}': get: operationId: GetDocumentsTemplatesID tags: - Templates parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: templateID schema: @@ -212,24 +139,24 @@ paths: required: true description: The template ID. responses: - "200": + '200': description: The template requested content: application/json: schema: - $ref: "#/components/schemas/Document" + $ref: '#/components/schemas/Document' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' put: operationId: PutDocumentsTemplatesID tags: - Templates parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: templateID schema: @@ -242,27 +169,27 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DocumentUpdate" + $ref: '#/components/schemas/DocumentUpdate' responses: - "200": + '200': description: The newly updated template content: application/json: schema: - $ref: "#/components/schemas/Document" + $ref: '#/components/schemas/Document' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteDocumentsTemplatesID tags: - Templates summary: Delete a template parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: templateID schema: @@ -270,22 +197,22 @@ paths: required: true description: The template ID. responses: - "204": + '204': description: Delete has been accepted default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/documents/templates/{templateID}/labels": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: templateID schema: @@ -293,25 +220,25 @@ paths: required: true description: The template ID. responses: - "200": + '200': description: A list of all labels for a template content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostDocumentsTemplatesIDLabels tags: - Templates summary: Add a label to a template parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: templateID schema: @@ -324,28 +251,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The label added to the template content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/documents/templates/{templateID}/labels/{labelID}": + $ref: '#/components/schemas/Error' + '/documents/templates/{templateID}/labels/{labelID}': delete: operationId: DeleteDocumentsTemplatesIDLabelsID tags: - Templates summary: Delete a label from a template parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: templateID schema: @@ -359,20 +286,20 @@ paths: required: true description: The label ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Template not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /dbrps: get: operationId: GetDBRPs @@ -380,7 +307,7 @@ paths: - DBRPs summary: List all database retention policy mappings parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID required: true @@ -413,65 +340,65 @@ paths: schema: type: string responses: - "200": + '200': description: A list of all database retention policy mappings content: application/json: schema: - $ref: "#/components/schemas/DBRPs" - "400": + $ref: '#/components/schemas/DBRPs' + '400': description: if any of the parameter passed is invalid content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostDBRP tags: - DBRPs summary: Add a database retention policy mapping parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: The database retention policy mapping to add required: true content: application/json: schema: - $ref: "#/components/schemas/DBRP" + $ref: '#/components/schemas/DBRP' responses: - "201": + '201': description: Database retention policy mapping created content: application/json: schema: - $ref: "#/components/schemas/DBRP" - "400": + $ref: '#/components/schemas/DBRP' + '400': description: if any of the IDs in the mapping is invalid content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dbrps/{dbrpID}": + $ref: '#/components/schemas/Error' + '/dbrps/{dbrpID}': get: operationId: GetDBRPsID tags: - DBRPs summary: Retrieve a database retention policy mapping parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID required: true @@ -485,24 +412,24 @@ paths: required: true description: The database retention policy mapping ID responses: - "200": + '200': description: The database retention policy requested content: application/json: schema: - $ref: "#/components/schemas/DBRP" - "400": + $ref: '#/components/schemas/DBRP' + '400': description: if any of the IDs passed is invalid content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchDBRPID tags: @@ -514,9 +441,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DBRPUpdate" + $ref: '#/components/schemas/DBRPUpdate' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID required: true @@ -530,37 +457,37 @@ paths: required: true description: The database retention policy mapping. responses: - "200": + '200': description: An updated mapping content: application/json: schema: - $ref: "#/components/schemas/DBRP" - "404": - description: The mapping was not found + $ref: '#/components/schemas/DBRP' + '400': + description: if any of the IDs passed is invalid content: application/json: schema: - $ref: "#/components/schemas/Error" - "400": - description: if any of the IDs passed is invalid + $ref: '#/components/schemas/Error' + '404': + description: The mapping was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteDBRPID tags: - DBRPs summary: Delete a database retention policy parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID required: true @@ -574,103 +501,103 @@ paths: required: true description: The database retention policy mapping responses: - "204": + '204': description: Delete has been accepted - "400": + '400': description: if any of the IDs passed is invalid content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /telegraf/plugins: get: operationId: GetTelegrafPlugins parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: type description: The type of plugin desired. schema: type: string responses: - "200": + '200': description: A list of Telegraf plugins. content: application/json: schema: - $ref: "#/components/schemas/TelegrafPlugins" + $ref: '#/components/schemas/TelegrafPlugins' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /telegrafs: get: operationId: GetTelegrafs tags: - Telegrafs parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID description: The organization ID the Telegraf config belongs to. schema: type: string responses: - "200": + '200': description: A list of Telegraf configs content: application/json: schema: - $ref: "#/components/schemas/Telegrafs" + $ref: '#/components/schemas/Telegrafs' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTelegrafs tags: - Telegrafs summary: Create a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: Telegraf config to create required: true content: application/json: schema: - $ref: "#/components/schemas/TelegrafRequest" + $ref: '#/components/schemas/TelegrafRequest' responses: - "201": + '201': description: Telegraf config created content: application/json: schema: - $ref: "#/components/schemas/Telegraf" + $ref: '#/components/schemas/Telegraf' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/telegrafs/{telegrafID}": + $ref: '#/components/schemas/Error' + '/telegrafs/{telegrafID}': get: operationId: GetTelegrafsID tags: - Telegrafs summary: Retrieve a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -688,18 +615,22 @@ paths: - application/json - application/octet-stream responses: - "200": + '200': description: Telegraf config details content: application/toml: - example: "[agent]\ninterval = \"10s\"" + example: |- + [agent] + interval = "10s" schema: type: string application/json: schema: - $ref: "#/components/schemas/Telegraf" + $ref: '#/components/schemas/Telegraf' application/octet-stream: - example: "[agent]\ninterval = \"10s\"" + example: |- + [agent] + interval = "10s" schema: type: string default: @@ -707,14 +638,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' put: operationId: PutTelegrafsID tags: - Telegrafs summary: Update a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -727,27 +658,27 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/TelegrafRequest" + $ref: '#/components/schemas/TelegrafRequest' responses: - "200": + '200': description: An updated Telegraf config content: application/json: schema: - $ref: "#/components/schemas/Telegraf" + $ref: '#/components/schemas/Telegraf' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteTelegrafsID tags: - Telegrafs summary: Delete a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -755,22 +686,22 @@ paths: required: true description: The Telegraf config ID. responses: - "204": + '204': description: Delete has been accepted default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/telegrafs/{telegrafID}/labels": + $ref: '#/components/schemas/Error' + '/telegrafs/{telegrafID}/labels': get: operationId: GetTelegrafsIDLabels tags: - Telegrafs summary: List all labels for a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -778,25 +709,25 @@ paths: required: true description: The Telegraf config ID. responses: - "200": + '200': description: A list of all labels for a Telegraf config content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTelegrafsIDLabels tags: - Telegrafs summary: Add a label to a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -809,28 +740,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The label added to the Telegraf config content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/telegrafs/{telegrafID}/labels/{labelID}": + $ref: '#/components/schemas/Error' + '/telegrafs/{telegrafID}/labels/{labelID}': delete: operationId: DeleteTelegrafsIDLabelsID tags: - Telegrafs summary: Delete a label from a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -844,21 +775,21 @@ paths: required: true description: The label ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Telegraf config not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/telegrafs/{telegrafID}/members": + $ref: '#/components/schemas/Error' + '/telegrafs/{telegrafID}/members': get: operationId: GetTelegrafsIDMembers tags: @@ -866,7 +797,7 @@ paths: - Telegrafs summary: List all users with member privileges for a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -874,18 +805,18 @@ paths: required: true description: The Telegraf config ID. responses: - "200": + '200': description: A list of Telegraf config members content: application/json: schema: - $ref: "#/components/schemas/ResourceMembers" + $ref: '#/components/schemas/ResourceMembers' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTelegrafsIDMembers tags: @@ -893,7 +824,7 @@ paths: - Telegrafs summary: Add a member to a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -906,21 +837,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Member added to Telegraf config content: application/json: schema: - $ref: "#/components/schemas/ResourceMember" + $ref: '#/components/schemas/ResourceMember' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/telegrafs/{telegrafID}/members/{userID}": + $ref: '#/components/schemas/Error' + '/telegrafs/{telegrafID}/members/{userID}': delete: operationId: DeleteTelegrafsIDMembersID tags: @@ -928,7 +859,7 @@ paths: - Telegrafs summary: Remove a member from a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -942,15 +873,15 @@ paths: required: true description: The Telegraf config ID. responses: - "204": + '204': description: Member removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/telegrafs/{telegrafID}/owners": + $ref: '#/components/schemas/Error' + '/telegrafs/{telegrafID}/owners': get: operationId: GetTelegrafsIDOwners tags: @@ -958,7 +889,7 @@ paths: - Telegrafs summary: List all owners of a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -966,18 +897,18 @@ paths: required: true description: The Telegraf config ID. responses: - "200": + '200': description: A list of Telegraf config owners content: application/json: schema: - $ref: "#/components/schemas/ResourceOwners" + $ref: '#/components/schemas/ResourceOwners' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTelegrafsIDOwners tags: @@ -985,7 +916,7 @@ paths: - Telegrafs summary: Add an owner to a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: telegrafID schema: @@ -998,21 +929,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Telegraf config owner added content: application/json: schema: - $ref: "#/components/schemas/ResourceOwner" + $ref: '#/components/schemas/ResourceOwner' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/telegrafs/{telegrafID}/owners/{userID}": + $ref: '#/components/schemas/Error' + '/telegrafs/{telegrafID}/owners/{userID}': delete: operationId: DeleteTelegrafsIDOwnersID tags: @@ -1020,7 +951,7 @@ paths: - Telegrafs summary: Remove an owner from a Telegraf config parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -1034,14 +965,14 @@ paths: required: true description: The Telegraf config ID. responses: - "204": + '204': description: Owner removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /scrapers: get: operationId: GetScrapers @@ -1049,7 +980,7 @@ paths: - ScraperTargets summary: Get all scraper targets parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: name description: Specifies the name of the scraper target. @@ -1057,7 +988,7 @@ paths: type: string - in: query name: id - description: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. + description: 'List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used.' schema: type: array items: @@ -1073,47 +1004,47 @@ paths: schema: type: string responses: - "200": + '200': description: All scraper targets content: application/json: schema: - $ref: "#/components/schemas/ScraperTargetResponses" + $ref: '#/components/schemas/ScraperTargetResponses' post: operationId: PostScrapers summary: Create a scraper target tags: - ScraperTargets parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: Scraper target to create required: true content: application/json: schema: - $ref: "#/components/schemas/ScraperTargetRequest" + $ref: '#/components/schemas/ScraperTargetRequest' responses: - "201": + '201': description: Scraper target created content: application/json: schema: - $ref: "#/components/schemas/ScraperTargetResponse" + $ref: '#/components/schemas/ScraperTargetResponse' default: description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/scrapers/{scraperTargetID}": + $ref: '#/components/schemas/Error' + '/scrapers/{scraperTargetID}': get: operationId: GetScrapersID tags: - ScraperTargets summary: Get a scraper target by ID parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID required: true @@ -1121,25 +1052,25 @@ paths: type: string description: The scraper target ID. responses: - "200": + '200': description: Scraper target updated content: application/json: schema: - $ref: "#/components/schemas/ScraperTargetResponse" + $ref: '#/components/schemas/ScraperTargetResponse' default: description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteScrapersID tags: - ScraperTargets summary: Delete a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID required: true @@ -1147,21 +1078,21 @@ paths: type: string description: The scraper target ID. responses: - "204": + '204': description: Scraper target deleted default: description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchScrapersID summary: Update a scraper target tags: - ScraperTargets parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID required: true @@ -1174,28 +1105,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ScraperTargetRequest" + $ref: '#/components/schemas/ScraperTargetRequest' responses: - "200": + '200': description: Scraper target updated content: application/json: schema: - $ref: "#/components/schemas/ScraperTargetResponse" + $ref: '#/components/schemas/ScraperTargetResponse' default: description: Internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/scrapers/{scraperTargetID}/labels": + $ref: '#/components/schemas/Error' + '/scrapers/{scraperTargetID}/labels': get: operationId: GetScrapersIDLabels tags: - ScraperTargets summary: List all labels for a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID schema: @@ -1203,25 +1134,25 @@ paths: required: true description: The scraper target ID. responses: - "200": + '200': description: A list of all labels for a scraper target content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostScrapersIDLabels tags: - ScraperTargets summary: Add a label to a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID schema: @@ -1234,28 +1165,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The newly added label content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/scrapers/{scraperTargetID}/labels/{labelID}": + $ref: '#/components/schemas/Error' + '/scrapers/{scraperTargetID}/labels/{labelID}': delete: operationId: DeleteScrapersIDLabelsID tags: - ScraperTargets summary: Delete a label from a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID schema: @@ -1269,21 +1200,21 @@ paths: required: true description: The label ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Scraper target not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/scrapers/{scraperTargetID}/members": + $ref: '#/components/schemas/Error' + '/scrapers/{scraperTargetID}/members': get: operationId: GetScrapersIDMembers tags: @@ -1291,7 +1222,7 @@ paths: - ScraperTargets summary: List all users with member privileges for a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID schema: @@ -1299,18 +1230,18 @@ paths: required: true description: The scraper target ID. responses: - "200": + '200': description: A list of scraper target members content: application/json: schema: - $ref: "#/components/schemas/ResourceMembers" + $ref: '#/components/schemas/ResourceMembers' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostScrapersIDMembers tags: @@ -1318,7 +1249,7 @@ paths: - ScraperTargets summary: Add a member to a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID schema: @@ -1331,21 +1262,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Member added to scraper targets content: application/json: schema: - $ref: "#/components/schemas/ResourceMember" + $ref: '#/components/schemas/ResourceMember' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/scrapers/{scraperTargetID}/members/{userID}": + $ref: '#/components/schemas/Error' + '/scrapers/{scraperTargetID}/members/{userID}': delete: operationId: DeleteScrapersIDMembersID tags: @@ -1353,7 +1284,7 @@ paths: - ScraperTargets summary: Remove a member from a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -1367,15 +1298,15 @@ paths: required: true description: The scraper target ID. responses: - "204": + '204': description: Member removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/scrapers/{scraperTargetID}/owners": + $ref: '#/components/schemas/Error' + '/scrapers/{scraperTargetID}/owners': get: operationId: GetScrapersIDOwners tags: @@ -1383,7 +1314,7 @@ paths: - ScraperTargets summary: List all owners of a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID schema: @@ -1391,18 +1322,18 @@ paths: required: true description: The scraper target ID. responses: - "200": + '200': description: A list of scraper target owners content: application/json: schema: - $ref: "#/components/schemas/ResourceOwners" + $ref: '#/components/schemas/ResourceOwners' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostScrapersIDOwners tags: @@ -1410,7 +1341,7 @@ paths: - ScraperTargets summary: Add an owner to a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: scraperTargetID schema: @@ -1423,21 +1354,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Scraper target owner added content: application/json: schema: - $ref: "#/components/schemas/ResourceOwner" + $ref: '#/components/schemas/ResourceOwner' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/scrapers/{scraperTargetID}/owners/{userID}": + $ref: '#/components/schemas/Error' + '/scrapers/{scraperTargetID}/owners/{userID}': delete: operationId: DeleteScrapersIDOwnersID tags: @@ -1445,7 +1376,7 @@ paths: - ScraperTargets summary: Remove an owner from a scraper target parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -1459,207 +1390,22 @@ paths: required: true description: The scraper target ID. responses: - "204": + '204': description: Owner removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /variables: - get: - operationId: GetVariables - tags: - - Variables - summary: Get all variables - parameters: - - $ref: "#/components/parameters/TraceSpan" - - in: query - name: org - description: The organization name. - schema: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string - responses: - "200": - description: All variables for an organization - content: - application/json: - schema: - $ref: "#/components/schemas/Variables" - "400": - description: Invalid request - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - default: - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - post: - operationId: PostVariables - summary: Create a variable - tags: - - Variables - parameters: - - $ref: "#/components/parameters/TraceSpan" - requestBody: - description: Variable to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Variable" - responses: - "201": - description: Variable created - content: - application/json: - schema: - $ref: "#/components/schemas/Variable" - default: - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - "/variables/{variableID}": - get: - operationId: GetVariablesID - tags: - - Variables - summary: Get 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 - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - default: - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 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. - responses: - "204": - description: Variable deleted - default: - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 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. - requestBody: - description: Variable update to apply - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Variable" - responses: - "200": - description: Variable updated - content: - application/json: - schema: - $ref: "#/components/schemas/Variable" - default: - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 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 - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Variable" - responses: - "200": - description: Variable updated - content: - application/json: - schema: - $ref: "#/components/schemas/Variable" - default: - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - "/variables/{variableID}/labels": + $ref: '#/components/schemas/Error' + '/variables/{variableID}/labels': get: operationId: GetVariablesIDLabels tags: - Variables summary: List all labels for a variable parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: variableID schema: @@ -1667,25 +1413,25 @@ paths: required: true description: The variable ID. responses: - "200": + '200': description: A list of all labels for a variable content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostVariablesIDLabels tags: - Variables summary: Add a label to a variable parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: variableID schema: @@ -1698,28 +1444,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The newly added label content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/variables/{variableID}/labels/{labelID}": + $ref: '#/components/schemas/Error' + '/variables/{variableID}/labels/{labelID}': delete: operationId: DeleteVariablesIDLabelsID tags: - Variables summary: Delete a label from a variable parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: variableID schema: @@ -1733,20 +1479,20 @@ paths: required: true description: The label ID to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Variable not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /write: post: operationId: PostWrite @@ -1761,10 +1507,10 @@ paths: schema: type: string parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: header name: Content-Encoding - description: When present, its value indicates to the database that compression is applied to the line-protocol body. + description: 'When present, 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. @@ -1785,7 +1531,7 @@ paths: - application/vnd.influx.arrow - in: header name: Content-Length - description: Content-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent. + description: 'Content-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent.' schema: type: integer description: The length in decimal number of octets. @@ -1800,14 +1546,14 @@ paths: - application/json - in: query name: org - description: Specifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence. + description: 'Specifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.' required: true schema: type: string description: All points within batch are written to this organization. - in: query name: orgID - description: Specifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. + description: 'Specifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence.' schema: type: string - in: query @@ -1821,35 +1567,35 @@ paths: name: precision description: The precision for the unix timestamps within the body line-protocol. schema: - $ref: "#/components/schemas/WritePrecision" + $ref: '#/components/schemas/WritePrecision' responses: - "204": + '204': description: Write data is correctly formatted and accepted for writing to the bucket. - "400": + '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": + $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": + $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": + $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: @@ -1857,7 +1603,7 @@ paths: schema: type: integer format: int32 - "503": + '503': description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. headers: Retry-After: @@ -1870,7 +1616,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /delete: post: operationId: PostDelete @@ -1881,9 +1627,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DeletePredicateRequest" + $ref: '#/components/schemas/DeletePredicateRequest' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: org description: Specifies the organization to delete data from. @@ -1908,84 +1654,32 @@ paths: type: string description: Only points from this bucket ID are deleted. responses: - "204": + '204': description: delete has been accepted - "400": - description: invalid request. - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - "404": - description: the bucket or organization is not found. + '400': + description: Invalid request. content: application/json: schema: - $ref: "#/components/schemas/Error" - "403": + $ref: '#/components/schemas/Error' + '403': description: no token was sent or does not have sufficient permissions. content: application/json: schema: - $ref: "#/components/schemas/Error" - default: - description: internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /ready: - servers: - - url: / - get: - operationId: GetReady - tags: - - Ready - summary: Get the readiness of an instance at startup - parameters: - - $ref: "#/components/parameters/TraceSpan" - responses: - "200": - description: The instance is ready - content: - application/json: - schema: - $ref: "#/components/schemas/Ready" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - /health: - servers: - - url: / - get: - operationId: GetHealth - tags: - - Health - summary: Get the health of an instance - 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 + $ref: '#/components/schemas/Error' + '404': + description: the bucket or organization is not found. content: application/json: schema: - $ref: "#/components/schemas/HealthCheck" + $ref: '#/components/schemas/Error' default: - description: Unexpected error + description: internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /sources: post: operationId: PostSources @@ -1993,60 +1687,60 @@ paths: - Sources summary: Create a source parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: Source to create required: true content: application/json: schema: - $ref: "#/components/schemas/Source" + $ref: '#/components/schemas/Source' responses: - "201": + '201': description: Created Source content: application/json: schema: - $ref: "#/components/schemas/Source" + $ref: '#/components/schemas/Source' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' get: operationId: GetSources tags: - Sources summary: Get all sources parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: org description: The organization name. schema: type: string responses: - "200": + '200': description: All sources content: application/json: schema: - $ref: "#/components/schemas/Sources" + $ref: '#/components/schemas/Sources' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /sources/{sourceID}: + $ref: '#/components/schemas/Error' + '/sources/{sourceID}': delete: operationId: DeleteSourcesID tags: - Sources summary: Delete a source parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: sourceID schema: @@ -2054,27 +1748,27 @@ paths: required: true description: The source ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: View not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchSourcesID tags: - Sources summary: Update a Source parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: sourceID schema: @@ -2087,33 +1781,33 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Source" + $ref: '#/components/schemas/Source' responses: - "200": + '200': description: Created Source content: application/json: schema: - $ref: "#/components/schemas/Source" - "404": + $ref: '#/components/schemas/Source' + '404': description: Source not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' get: operationId: GetSourcesID tags: - Sources summary: Get a source parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: sourceID schema: @@ -2121,32 +1815,32 @@ paths: required: true description: The source ID. responses: - "200": + '200': description: A source content: application/json: schema: - $ref: "#/components/schemas/Source" - "404": + $ref: '#/components/schemas/Source' + '404': description: Source not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /sources/{sourceID}/health: + $ref: '#/components/schemas/Error' + '/sources/{sourceID}/health': get: operationId: GetSourcesIDHealth tags: - Sources summary: Get the health of a source parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: sourceID schema: @@ -2154,25 +1848,25 @@ paths: required: true description: The source ID. responses: - "200": + '200': description: The source is healthy content: application/json: schema: - $ref: "#/components/schemas/HealthCheck" - "503": + $ref: '#/components/schemas/HealthCheck' + '503': description: The source is not healthy content: application/json: schema: - $ref: "#/components/schemas/HealthCheck" + $ref: '#/components/schemas/HealthCheck' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /sources/{sourceID}/buckets: + $ref: '#/components/schemas/Error' + '/sources/{sourceID}/buckets': get: operationId: GetSourcesIDBuckets tags: @@ -2180,7 +1874,7 @@ paths: - Buckets summary: Get buckets in a source parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: sourceID schema: @@ -2193,24 +1887,24 @@ paths: schema: type: string responses: - "200": + '200': description: A source content: application/json: schema: - $ref: "#/components/schemas/Buckets" - "404": + $ref: '#/components/schemas/Buckets' + '404': description: Source not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /labels: post: operationId: PostLabels @@ -2223,53 +1917,53 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelCreateRequest" + $ref: '#/components/schemas/LabelCreateRequest' responses: - "201": + '201': description: Added label content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' get: operationId: GetLabels tags: - Labels summary: Get all labels parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: orgID description: The organization ID. schema: type: string responses: - "200": + '200': description: All labels content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /labels/{labelID}: + $ref: '#/components/schemas/Error' + '/labels/{labelID}': get: operationId: GetLabelsID tags: - Labels summary: Get a label parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: labelID schema: @@ -2277,18 +1971,18 @@ paths: required: true description: The ID of the label to update. responses: - "200": + '200': description: A label content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchLabelsID tags: @@ -2300,9 +1994,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelUpdate" + $ref: '#/components/schemas/LabelUpdate' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: labelID schema: @@ -2310,31 +2004,31 @@ paths: required: true description: The ID of the label to update. responses: - "200": + '200': description: Updated label content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" - "404": + $ref: '#/components/schemas/LabelResponse' + '404': description: Label not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteLabelsID tags: - Labels summary: Delete a label parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: labelID schema: @@ -2342,20 +2036,20 @@ paths: required: true description: The ID of the label to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Label not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /dashboards: post: operationId: PostDashboards @@ -2363,39 +2057,39 @@ paths: - Dashboards summary: Create a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: Dashboard to create required: true content: application/json: schema: - $ref: "#/components/schemas/CreateDashboardRequest" + $ref: '#/components/schemas/CreateDashboardRequest' responses: - "201": + '201': description: Added dashboard content: application/json: schema: oneOf: - - $ref: "#/components/schemas/Dashboard" - - $ref: "#/components/schemas/DashboardWithViewProperties" + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' get: operationId: GetDashboards tags: - Dashboards summary: Get all dashboards parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" - - $ref: "#/components/parameters/Descending" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Descending' - in: query name: owner description: The owner ID. @@ -2407,12 +2101,12 @@ paths: schema: type: string enum: - - "ID" - - "CreatedAt" - - "UpdatedAt" + - ID + - CreatedAt + - UpdatedAt - in: query name: id - description: List of dashboard IDs to return. If both `id` and `owner` are specified, only `id` is used. + description: 'List of dashboard IDs to return. If both `id` and `owner` are specified, only `id` is used.' schema: type: array items: @@ -2428,26 +2122,26 @@ paths: schema: type: string responses: - "200": + '200': description: All dashboards content: application/json: schema: - $ref: "#/components/schemas/Dashboards" + $ref: '#/components/schemas/Dashboards' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}': get: operationId: GetDashboardsID tags: - Dashboards summary: Get a Dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2463,26 +2157,26 @@ paths: - properties description: Includes the cell view properties in the response if set to `properties` responses: - "200": + '200': description: Get a single dashboard content: application/json: schema: oneOf: - - $ref: "#/components/schemas/Dashboard" - - $ref: "#/components/schemas/DashboardWithViewProperties" - "404": + - $ref: '#/components/schemas/Dashboard' + - $ref: '#/components/schemas/DashboardWithViewProperties' + '404': description: Dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchDashboardsID tags: @@ -2497,16 +2191,16 @@ paths: type: object properties: name: - description: optional, when provided will replace the name + description: 'optional, when provided will replace the name' type: string description: - description: optional, when provided will replace the 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" + description: 'optional, when provided will replace all existing cells with the cells provided' + $ref: '#/components/schemas/CellWithViewProperties' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2514,31 +2208,31 @@ paths: required: true description: The ID of the dashboard to update. responses: - "200": + '200': description: Updated dashboard content: application/json: schema: - $ref: "#/components/schemas/Dashboard" - "404": + $ref: '#/components/schemas/Dashboard' + '404': description: Dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteDashboardsID tags: - Dashboards summary: Delete a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2546,21 +2240,21 @@ paths: required: true description: The ID of the dashboard to update. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/cells": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/cells': put: operationId: PutDashboardsIDCells tags: @@ -2573,9 +2267,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Cells" + $ref: '#/components/schemas/Cells' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2583,24 +2277,24 @@ paths: required: true description: The ID of the dashboard to update. responses: - "201": + '201': description: Replaced dashboard cells content: application/json: schema: - $ref: "#/components/schemas/Dashboard" - "404": + $ref: '#/components/schemas/Dashboard' + '404': description: Dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostDashboardsIDCells tags: @@ -2613,9 +2307,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CreateCell" + $ref: '#/components/schemas/CreateCell' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2623,25 +2317,25 @@ paths: required: true description: The ID of the dashboard to update. responses: - "201": + '201': description: Cell successfully added content: application/json: schema: - $ref: "#/components/schemas/Cell" - "404": + $ref: '#/components/schemas/Cell' + '404': description: Dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/cells/{cellID}": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/cells/{cellID}': patch: operationId: PatchDashboardsIDCellsID tags: @@ -2654,9 +2348,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CellUpdate" + $ref: '#/components/schemas/CellUpdate' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2670,24 +2364,24 @@ paths: required: true description: The ID of the cell to update. responses: - "200": + '200': description: Updated dashboard cell content: application/json: schema: - $ref: "#/components/schemas/Cell" - "404": + $ref: '#/components/schemas/Cell' + '404': description: Cell or dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteDashboardsIDCellsID tags: @@ -2695,7 +2389,7 @@ paths: - Dashboards summary: Delete a dashboard cell parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2709,21 +2403,21 @@ paths: required: true description: The ID of the cell to delete. responses: - "204": + '204': description: Cell successfully deleted - "404": + '404': description: Cell or dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/cells/{cellID}/view": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/cells/{cellID}/view': get: operationId: GetDashboardsIDCellsIDView tags: @@ -2732,7 +2426,7 @@ paths: - Views summary: Retrieve the view for a cell parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2746,24 +2440,24 @@ paths: required: true description: The cell ID. responses: - "200": + '200': description: A dashboard cells view content: application/json: schema: - $ref: "#/components/schemas/View" - "404": + $ref: '#/components/schemas/View' + '404': description: Cell or dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchDashboardsIDCellsIDView tags: @@ -2776,9 +2470,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/View" + $ref: '#/components/schemas/View' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2792,32 +2486,32 @@ paths: required: true description: The ID of the cell to update. responses: - "200": + '200': description: Updated cell view content: application/json: schema: - $ref: "#/components/schemas/View" - "404": + $ref: '#/components/schemas/View' + '404': description: Cell or dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/labels": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/labels': get: operationId: GetDashboardsIDLabels tags: - Dashboards summary: List all labels for a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2825,25 +2519,25 @@ paths: required: true description: The dashboard ID. responses: - "200": + '200': description: A list of all labels for a dashboard content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostDashboardsIDLabels tags: - Dashboards summary: Add a label to a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2856,28 +2550,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The label added to the dashboard content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/labels/{labelID}": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/labels/{labelID}': delete: operationId: DeleteDashboardsIDLabelsID tags: - Dashboards summary: Delete a label from a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2891,21 +2585,21 @@ paths: required: true description: The ID of the label to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Dashboard not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/members": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/members': get: operationId: GetDashboardsIDMembers tags: @@ -2913,7 +2607,7 @@ paths: - Dashboards summary: List all dashboard members parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2921,18 +2615,18 @@ paths: required: true description: The dashboard ID. responses: - "200": + '200': description: A list of users who have member privileges for a dashboard content: application/json: schema: - $ref: "#/components/schemas/ResourceMembers" + $ref: '#/components/schemas/ResourceMembers' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostDashboardsIDMembers tags: @@ -2940,7 +2634,7 @@ paths: - Dashboards summary: Add a member to a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -2953,21 +2647,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Added to dashboard members content: application/json: schema: - $ref: "#/components/schemas/ResourceMember" + $ref: '#/components/schemas/ResourceMember' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/members/{userID}": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/members/{userID}': delete: operationId: DeleteDashboardsIDMembersID tags: @@ -2975,7 +2669,7 @@ paths: - Dashboards summary: Remove a member from a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -2989,15 +2683,15 @@ paths: required: true description: The dashboard ID. responses: - "204": + '204': description: Member removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/owners": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/owners': get: operationId: GetDashboardsIDOwners tags: @@ -3005,7 +2699,7 @@ paths: - Dashboards summary: List all dashboard owners parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -3013,18 +2707,18 @@ paths: required: true description: The dashboard ID. responses: - "200": + '200': description: A list of users who have owner privileges for a dashboard content: application/json: schema: - $ref: "#/components/schemas/ResourceOwners" + $ref: '#/components/schemas/ResourceOwners' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostDashboardsIDOwners tags: @@ -3032,7 +2726,7 @@ paths: - Dashboards summary: Add an owner to a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: dashboardID schema: @@ -3045,21 +2739,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Added to dashboard owners content: application/json: schema: - $ref: "#/components/schemas/ResourceOwner" + $ref: '#/components/schemas/ResourceOwner' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/dashboards/{dashboardID}/owners/{userID}": + $ref: '#/components/schemas/Error' + '/dashboards/{dashboardID}/owners/{userID}': delete: operationId: DeleteDashboardsIDOwnersID tags: @@ -3067,7 +2761,7 @@ paths: - Dashboards summary: Remove an owner from a dashboard parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -3081,14 +2775,14 @@ paths: required: true description: The dashboard ID. responses: - "204": + '204': description: Owner removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /query/ast: post: operationId: PostQueryAst @@ -3096,7 +2790,7 @@ paths: tags: - Query parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: header name: Content-Type schema: @@ -3108,47 +2802,47 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LanguageRequest" + $ref: '#/components/schemas/LanguageRequest' responses: - "200": + '200': description: Abstract syntax tree of flux query. content: application/json: schema: - $ref: "#/components/schemas/ASTResponse" + $ref: '#/components/schemas/ASTResponse' default: description: Any response other than 200 is an internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /query/suggestions: get: operationId: GetQuerySuggestions tags: - Query parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' responses: - "200": + '200': description: Suggestions for next functions in call chain content: application/json: schema: - $ref: "#/components/schemas/FluxSuggestions" + $ref: '#/components/schemas/FluxSuggestions' default: description: Any response other than 200 is an internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/query/suggestions/{name}": + $ref: '#/components/schemas/Error' + '/query/suggestions/{name}': get: operationId: GetQuerySuggestionsName tags: - Query parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: name schema: @@ -3156,179 +2850,18 @@ paths: required: true description: The name of the branching suggestion. responses: - "200": + '200': description: Suggestions for next functions in call chain content: application/json: schema: - $ref: "#/components/schemas/FluxSuggestion" + $ref: '#/components/schemas/FluxSuggestion' default: description: Any response other than 200 is an internal server error content: application/json: schema: - $ref: "#/components/schemas/Error" - /authorizations: - get: - operationId: GetAuthorizations - 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 - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 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 - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 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 ID of the authorization to get. - responses: - "200": - description: Authorization details - content: - application/json: - schema: - $ref: "#/components/schemas/Authorization" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - patch: - operationId: PatchAuthorizationsID - tags: - - Authorizations - summary: Update an authorization to be active or inactive - requestBody: - description: 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 authorization to update. - responses: - "200": - description: The active or inactie authorization - content: - application/json: - schema: - $ref: "#/components/schemas/Authorization" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - delete: - operationId: DeleteAuthorizationsID - 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 - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /query/analyze: post: operationId: PostQueryAnalyze @@ -3336,7 +2869,7 @@ paths: - Query summary: Analyze an InfluxQL or Flux query parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: header name: Content-Type schema: @@ -3348,14 +2881,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Query" + $ref: '#/components/schemas/Query' responses: - "200": + '200': description: Query analyze results. Errors will be empty if the query is valid. content: application/json: schema: - $ref: "#/components/schemas/AnalyzeQueryResponse" + $ref: '#/components/schemas/AnalyzeQueryResponse' default: description: Internal server error headers: @@ -3370,7 +2903,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /query: post: operationId: PostQuery @@ -3378,10 +2911,10 @@ paths: - Query summary: Query InfluxDB parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: header name: Accept-Encoding - description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. + description: 'The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.' schema: type: string description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity. @@ -3398,12 +2931,12 @@ paths: - application/vnd.flux - in: query name: org - description: Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence. + description: 'Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.' schema: type: string - in: query name: orgID - description: Specifies the ID of the organization executing the query. If both `orgID` and `org` are specified, `org` takes precedence. + description: 'Specifies the ID of the organization executing the query. If both `orgID` and `org` are specified, `org` takes precedence.' schema: type: string requestBody: @@ -3412,17 +2945,17 @@ paths: 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 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. @@ -3431,7 +2964,7 @@ paths: - 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. @@ -3439,16 +2972,13 @@ paths: text/csv: schema: type: string - example: > - result,table,_start,_stop,_time,region,host,_value - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 + example: | + result,table,_start,_stop,_time,region,host,_value mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 application/vnd.influx.arrow: schema: type: string format: binary - "429": + '429': description: Token is temporarily over quota. The Retry-After header describes when to try the read again. headers: Retry-After: @@ -3461,7 +2991,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /buckets: get: operationId: GetBuckets @@ -3469,10 +2999,10 @@ paths: - Buckets summary: List all buckets parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" - - $ref: "#/components/parameters/After" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/After' - in: query name: org description: The organization name. @@ -3489,59 +3019,59 @@ paths: schema: type: string responses: - "200": + '200': description: A list of buckets content: application/json: schema: - $ref: "#/components/schemas/Buckets" + $ref: '#/components/schemas/Buckets' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostBuckets tags: - Buckets summary: Create a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: Bucket to create required: true content: application/json: schema: - $ref: "#/components/schemas/PostBucketRequest" + $ref: '#/components/schemas/PostBucketRequest' responses: - "201": + '201': description: Bucket created content: application/json: schema: - $ref: "#/components/schemas/Bucket" - 422: + $ref: '#/components/schemas/Bucket' + '422': description: Request body failed validation content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/buckets/{bucketID}": + $ref: '#/components/schemas/Error' + '/buckets/{bucketID}': get: operationId: GetBucketsID tags: - Buckets summary: Retrieve a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3549,18 +3079,18 @@ paths: required: true description: The bucket ID. responses: - "200": + '200': description: Bucket details content: application/json: schema: - $ref: "#/components/schemas/Bucket" + $ref: '#/components/schemas/Bucket' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchBucketsID tags: @@ -3572,9 +3102,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Bucket" + $ref: '#/components/schemas/Bucket' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3582,25 +3112,25 @@ paths: required: true description: The bucket ID. responses: - "200": + '200': description: An updated bucket content: application/json: schema: - $ref: "#/components/schemas/Bucket" + $ref: '#/components/schemas/Bucket' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteBucketsID tags: - Buckets summary: Delete a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3608,28 +3138,28 @@ paths: required: true description: The ID of the bucket to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Bucket not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/buckets/{bucketID}/labels": + $ref: '#/components/schemas/Error' + '/buckets/{bucketID}/labels': get: operationId: GetBucketsIDLabels tags: - Buckets summary: List all labels for a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3637,25 +3167,25 @@ paths: required: true description: The bucket ID. responses: - "200": + '200': description: A list of all labels for a bucket content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostBucketsIDLabels tags: - Buckets summary: Add a label to a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3668,28 +3198,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The newly added label content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/buckets/{bucketID}/labels/{labelID}": + $ref: '#/components/schemas/Error' + '/buckets/{bucketID}/labels/{labelID}': delete: operationId: DeleteBucketsIDLabelsID tags: - Buckets summary: Delete a label from a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3703,21 +3233,21 @@ paths: required: true description: The ID of the label to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Bucket not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/buckets/{bucketID}/members": + $ref: '#/components/schemas/Error' + '/buckets/{bucketID}/members': get: operationId: GetBucketsIDMembers tags: @@ -3725,7 +3255,7 @@ paths: - Buckets summary: List all users with member privileges for a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3733,18 +3263,18 @@ paths: required: true description: The bucket ID. responses: - "200": + '200': description: A list of bucket members content: application/json: schema: - $ref: "#/components/schemas/ResourceMembers" + $ref: '#/components/schemas/ResourceMembers' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostBucketsIDMembers tags: @@ -3752,7 +3282,7 @@ paths: - Buckets summary: Add a member to a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3765,21 +3295,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Member added to bucket content: application/json: schema: - $ref: "#/components/schemas/ResourceMember" + $ref: '#/components/schemas/ResourceMember' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/buckets/{bucketID}/members/{userID}": + $ref: '#/components/schemas/Error' + '/buckets/{bucketID}/members/{userID}': delete: operationId: DeleteBucketsIDMembersID tags: @@ -3787,7 +3317,7 @@ paths: - Buckets summary: Remove a member from a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -3801,15 +3331,15 @@ paths: required: true description: The bucket ID. responses: - "204": + '204': description: Member removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/buckets/{bucketID}/owners": + $ref: '#/components/schemas/Error' + '/buckets/{bucketID}/owners': get: operationId: GetBucketsIDOwners tags: @@ -3817,7 +3347,7 @@ paths: - Buckets summary: List all owners of a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3825,18 +3355,18 @@ paths: required: true description: The bucket ID. responses: - "200": + '200': description: A list of bucket owners content: application/json: schema: - $ref: "#/components/schemas/ResourceOwners" + $ref: '#/components/schemas/ResourceOwners' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostBucketsIDOwners tags: @@ -3844,7 +3374,7 @@ paths: - Buckets summary: Add an owner to a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: bucketID schema: @@ -3857,21 +3387,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Bucket owner added content: application/json: schema: - $ref: "#/components/schemas/ResourceOwner" + $ref: '#/components/schemas/ResourceOwner' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/buckets/{bucketID}/owners/{userID}": + $ref: '#/components/schemas/Error' + '/buckets/{bucketID}/owners/{userID}': delete: operationId: DeleteBucketsIDOwnersID tags: @@ -3879,7 +3409,7 @@ paths: - Buckets summary: Remove an owner from a bucket parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -3893,14 +3423,14 @@ paths: required: true description: The bucket ID. responses: - "204": + '204': description: Owner removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /orgs: get: operationId: GetOrgs @@ -3908,10 +3438,10 @@ paths: - Organizations summary: List all organizations parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" - - $ref: "#/components/parameters/Descending" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Descending' - in: query name: org schema: @@ -3928,53 +3458,53 @@ paths: type: string description: Filter organizations to a specific user ID. responses: - "200": + '200': description: A list of organizations content: application/json: schema: - $ref: "#/components/schemas/Organizations" + $ref: '#/components/schemas/Organizations' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostOrgs tags: - Organizations summary: Create an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: Organization to create required: true content: application/json: schema: - $ref: "#/components/schemas/Organization" + $ref: '#/components/schemas/Organization' responses: - "201": + '201': description: Organization created content: application/json: schema: - $ref: "#/components/schemas/Organization" + $ref: '#/components/schemas/Organization' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/orgs/{orgID}": + $ref: '#/components/schemas/Error' + '/orgs/{orgID}': get: operationId: GetOrgsID tags: - Organizations summary: Retrieve an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -3982,18 +3512,18 @@ paths: required: true description: The ID of the organization to get. responses: - "200": + '200': description: Organization details content: application/json: schema: - $ref: "#/components/schemas/Organization" + $ref: '#/components/schemas/Organization' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchOrgsID tags: @@ -4005,9 +3535,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Organization" + $ref: '#/components/schemas/Organization' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4015,25 +3545,25 @@ paths: required: true description: The ID of the organization to get. responses: - "200": + '200': description: Organization updated content: application/json: schema: - $ref: "#/components/schemas/Organization" + $ref: '#/components/schemas/Organization' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteOrgsID tags: - Organizations summary: Delete an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4041,21 +3571,21 @@ paths: required: true description: The ID of the organization to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Organization not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/orgs/{orgID}/secrets": + $ref: '#/components/schemas/Error' + '/orgs/{orgID}/secrets': get: operationId: GetOrgsIDSecrets tags: @@ -4063,7 +3593,7 @@ paths: - Organizations summary: List all secret keys for an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4071,18 +3601,18 @@ paths: required: true description: The organization ID. responses: - "200": + '200': description: A list of all secret keys content: application/json: schema: - $ref: "#/components/schemas/SecretKeysResponse" + $ref: '#/components/schemas/SecretKeysResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchOrgsIDSecrets tags: @@ -4090,7 +3620,7 @@ paths: - Organizations summary: Update secrets in an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4103,17 +3633,17 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Secrets" + $ref: '#/components/schemas/Secrets' responses: - "204": + '204': description: Keys successfully patched default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/orgs/{orgID}/secrets/delete": # had to make this because swagger wouldn't let me have a request body with a DELETE + $ref: '#/components/schemas/Error' + '/orgs/{orgID}/secrets/delete': post: operationId: PostOrgsIDSecrets tags: @@ -4121,7 +3651,7 @@ paths: - Organizations summary: Delete secrets from an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4134,17 +3664,17 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/SecretKeys" + $ref: '#/components/schemas/SecretKeys' responses: - "204": + '204': description: Keys successfully patched default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/orgs/{orgID}/members": + $ref: '#/components/schemas/Error' + '/orgs/{orgID}/members': get: operationId: GetOrgsIDMembers tags: @@ -4152,7 +3682,7 @@ paths: - Organizations summary: List all members of an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4160,24 +3690,24 @@ paths: required: true description: The organization ID. responses: - "200": + '200': description: A list of organization members content: application/json: schema: - $ref: "#/components/schemas/ResourceMembers" - "404": + $ref: '#/components/schemas/ResourceMembers' + '404': description: Organization not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostOrgsIDMembers tags: @@ -4185,7 +3715,7 @@ paths: - Organizations summary: Add a member to an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4198,21 +3728,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Added to organization created content: application/json: schema: - $ref: "#/components/schemas/ResourceMember" + $ref: '#/components/schemas/ResourceMember' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/orgs/{orgID}/members/{userID}": + $ref: '#/components/schemas/Error' + '/orgs/{orgID}/members/{userID}': delete: operationId: DeleteOrgsIDMembersID tags: @@ -4220,7 +3750,7 @@ paths: - Organizations summary: Remove a member from an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -4234,15 +3764,15 @@ paths: required: true description: The organization ID. responses: - "204": + '204': description: Member removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/orgs/{orgID}/owners": + $ref: '#/components/schemas/Error' + '/orgs/{orgID}/owners': get: operationId: GetOrgsIDOwners tags: @@ -4250,7 +3780,7 @@ paths: - Organizations summary: List all owners of an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4258,24 +3788,24 @@ paths: required: true description: The organization ID. responses: - "200": + '200': description: A list of organization owners content: application/json: schema: - $ref: "#/components/schemas/ResourceOwners" - "404": + $ref: '#/components/schemas/ResourceOwners' + '404': description: Organization not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostOrgsIDOwners tags: @@ -4283,7 +3813,7 @@ paths: - Organizations summary: Add an owner to an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: orgID schema: @@ -4296,21 +3826,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Organization owner added content: application/json: schema: - $ref: "#/components/schemas/ResourceOwner" + $ref: '#/components/schemas/ResourceOwner' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/orgs/{orgID}/owners/{userID}": + $ref: '#/components/schemas/Error' + '/orgs/{orgID}/owners/{userID}': delete: operationId: DeleteOrgsIDOwnersID tags: @@ -4318,7 +3848,7 @@ paths: - Organizations summary: Remove an owner from an organization parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -4332,14 +3862,14 @@ paths: required: true description: The organization ID. responses: - "204": + '204': description: Owner removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /stacks: get: operationId: ListStacks @@ -4364,7 +3894,7 @@ paths: type: string description: A collection of stackIDs to filter the list by. responses: - "200": + '200': description: Influx stacks found content: application/json: @@ -4374,13 +3904,13 @@ paths: stacks: type: array items: - $ref: "#/components/schemas/Stack" + $ref: '#/components/schemas/Stack' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: CreateStack tags: @@ -4405,19 +3935,19 @@ paths: items: type: string responses: - "201": + '201': description: InfluxDB Stack created content: application/json: schema: - $ref: "#/components/schemas/Stack" + $ref: '#/components/schemas/Stack' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /stacks/{stack_id}: + $ref: '#/components/schemas/Error' + '/stacks/{stack_id}': get: operationId: ReadStack tags: @@ -4431,18 +3961,18 @@ paths: type: string description: The stack id responses: - "200": + '200': description: Read an influx stack by ID content: application/json: schema: - $ref: "#/components/schemas/Stack" + $ref: '#/components/schemas/Stack' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: UpdateStack tags: @@ -4485,20 +4015,22 @@ paths: type: string templateMetaName: type: string - required: ["kind", "resourceID"] + required: + - kind + - resourceID responses: - "200": + '200': description: Influx stack updated content: application/json: schema: - $ref: "#/components/schemas/Stack" + $ref: '#/components/schemas/Stack' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteStack tags: @@ -4518,15 +4050,15 @@ paths: type: string description: The organization id of the user responses: - "204": + '204': description: Stack and all its associated resources are deleted default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /stacks/{stack_id}/uninstall: + $ref: '#/components/schemas/Error' + '/stacks/{stack_id}/uninstall': post: operationId: UninstallStack tags: @@ -4540,18 +4072,18 @@ paths: type: string description: The stack id responses: - "200": + '200': description: Influx stack uninstalled content: application/json: schema: - $ref: "#/components/schemas/Stack" + $ref: '#/components/schemas/Stack' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /templates/apply: post: operationId: ApplyTemplate @@ -4563,39 +4095,34 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/TemplateApply" + $ref: '#/components/schemas/TemplateApply' application/x-jsonnet: schema: - $ref: "#/components/schemas/TemplateApply" + $ref: '#/components/schemas/TemplateApply' text/yml: schema: - $ref: "#/components/schemas/TemplateApply" + $ref: '#/components/schemas/TemplateApply' responses: - "200": - description: > - Influx package dry-run successful, no new resources created. - The provided diff and summary will not have IDs for resources - that do not exist at the time of the dry run. + '200': + description: | + Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources that do not exist at the time of the dry run. content: application/json: schema: - $ref: "#/components/schemas/TemplateSummary" - "201": - description: > - Influx package applied successfully. Newly created resources created - available in summary. The diff compares the state of the world before - the package is applied with the changes the application will impose. - This corresponds to `"dryRun": true` + $ref: '#/components/schemas/TemplateSummary' + '201': + description: | + Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before the package is applied with the changes the application will impose. This corresponds to `"dryRun": true` content: application/json: schema: - $ref: "#/components/schemas/TemplateSummary" + $ref: '#/components/schemas/TemplateSummary' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /templates/export: post: operationId: ExportTemplate @@ -4609,24 +4136,24 @@ paths: application/json: schema: oneOf: - - $ref: "#/components/schemas/TemplateExportByID" - - $ref: "#/components/schemas/TemplateExportByName" + - $ref: '#/components/schemas/TemplateExportByID' + - $ref: '#/components/schemas/TemplateExportByName' responses: - "200": + '200': description: InfluxDB template created content: application/json: schema: - $ref: "#/components/schemas/Template" + $ref: '#/components/schemas/Template' application/x-yaml: schema: - $ref: "#/components/schemas/Template" + $ref: '#/components/schemas/Template' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /tasks: get: operationId: GetTasks @@ -4634,7 +4161,7 @@ paths: - Tasks summary: List all tasks parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: query name: name description: Returns task with a specific name. @@ -4677,53 +4204,53 @@ paths: default: 100 description: The number of tasks to return responses: - "200": + '200': description: A list of tasks content: application/json: schema: - $ref: "#/components/schemas/Tasks" + $ref: '#/components/schemas/Tasks' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTasks tags: - Tasks summary: Create a new task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: Task to create required: true content: application/json: schema: - $ref: "#/components/schemas/TaskCreateRequest" + $ref: '#/components/schemas/TaskCreateRequest' responses: - "201": + '201': description: Task created content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: '#/components/schemas/Task' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}': get: operationId: GetTasksID tags: - Tasks summary: Retrieve a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4731,18 +4258,18 @@ paths: required: true description: The task ID. responses: - "200": + '200': description: Task details content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: '#/components/schemas/Task' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchTasksID tags: @@ -4755,9 +4282,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/TaskUpdateRequest" + $ref: '#/components/schemas/TaskUpdateRequest' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4765,18 +4292,18 @@ paths: required: true description: The task ID. responses: - "200": + '200': description: Task updated content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: '#/components/schemas/Task' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteTasksID tags: @@ -4784,7 +4311,7 @@ paths: summary: Delete a task description: Deletes a task and all associated records parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4792,22 +4319,22 @@ paths: required: true description: The ID of the task to delete. responses: - "204": + '204': description: Task deleted default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/runs": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/runs': get: operationId: GetTasksIDRuns tags: - Tasks summary: List runs for a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4832,33 +4359,33 @@ paths: schema: type: string format: date-time - description: Filter runs to those scheduled after this time, RFC3339 + 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 + description: 'Filter runs to those scheduled before this time, RFC3339' responses: - "200": + '200': description: A list of task runs content: application/json: schema: - $ref: "#/components/schemas/Runs" + $ref: '#/components/schemas/Runs' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTasksIDRuns tags: - Tasks - summary: Manually start a task run, overriding the current schedule + summary: 'Manually start a task run, overriding the current schedule' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4868,28 +4395,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RunManually" + $ref: '#/components/schemas/RunManually' responses: - "201": + '201': description: Run scheduled to start content: application/json: schema: - $ref: "#/components/schemas/Run" + $ref: '#/components/schemas/Run' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/runs/{runID}": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4903,25 +4430,25 @@ paths: required: true description: The run ID. responses: - "200": + '200': description: The run record content: application/json: schema: - $ref: "#/components/schemas/Run" + $ref: '#/components/schemas/Run' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteTasksIDRunsID tags: - Tasks summary: Cancel a running task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4935,22 +4462,22 @@ paths: required: true description: The run ID. responses: - "204": + '204': description: Delete has been accepted default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/runs/{runID}/retry": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/runs/{runID}/retry': post: operationId: PostTasksIDRunsIDRetry tags: - Tasks summary: Retry a task run parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4964,26 +4491,26 @@ paths: required: true description: The run ID. responses: - "200": + '200': description: Run that has been queued content: application/json: schema: - $ref: "#/components/schemas/Run" + $ref: '#/components/schemas/Run' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/logs": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/logs': get: operationId: GetTasksIDLogs tags: - Tasks summary: Retrieve all logs for a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -4991,26 +4518,26 @@ paths: required: true description: The task ID. responses: - "200": + '200': description: All logs for a task content: application/json: schema: - $ref: "#/components/schemas/Logs" + $ref: '#/components/schemas/Logs' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/runs/{runID}/logs": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5024,26 +4551,26 @@ paths: required: true description: ID of run to get logs for. responses: - "200": + '200': description: All logs for a run content: application/json: schema: - $ref: "#/components/schemas/Logs" + $ref: '#/components/schemas/Logs' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/labels": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/labels': get: operationId: GetTasksIDLabels tags: - Tasks summary: List all labels for a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5051,25 +4578,25 @@ paths: required: true description: The task ID. responses: - "200": + '200': description: A list of all labels for a task content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTasksIDLabels tags: - Tasks summary: Add a label to a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5082,28 +4609,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: A list of all labels for a task content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/labels/{labelID}": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5117,20 +4644,20 @@ paths: required: true description: The label ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Task not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /flags: get: operationId: GetFlags @@ -5138,20 +4665,20 @@ paths: - Users summary: Return the feature flags for the currently authenticated user parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' responses: - "200": + '200': description: Feature flags for the currently authenticated user content: application/json: schema: - $ref: "#/components/schemas/Flags" + $ref: '#/components/schemas/Flags' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /me: get: operationId: GetMe @@ -5159,20 +4686,20 @@ paths: - Users summary: Return the current authenticated user parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' responses: - "200": + '200': description: Currently authenticated user content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: '#/components/schemas/UserResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /me/password: put: operationId: PutMePassword @@ -5182,24 +4709,24 @@ paths: security: - BasicAuth: [] parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' requestBody: description: New password required: true content: application/json: schema: - $ref: "#/components/schemas/PasswordResetBody" + $ref: '#/components/schemas/PasswordResetBody' responses: - "204": + '204': description: Password successfully updated default: description: Unsuccessful authentication content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/members": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/members': get: operationId: GetTasksIDMembers tags: @@ -5207,7 +4734,7 @@ paths: - Tasks summary: List all task members parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5215,18 +4742,18 @@ paths: required: true description: The task ID. responses: - "200": + '200': description: A list of users who have member privileges for a task content: application/json: schema: - $ref: "#/components/schemas/ResourceMembers" + $ref: '#/components/schemas/ResourceMembers' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTasksIDMembers tags: @@ -5234,7 +4761,7 @@ paths: - Tasks summary: Add a member to a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5247,21 +4774,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Added to task members content: application/json: schema: - $ref: "#/components/schemas/ResourceMember" + $ref: '#/components/schemas/ResourceMember' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/members/{userID}": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/members/{userID}': delete: operationId: DeleteTasksIDMembersID tags: @@ -5269,7 +4796,7 @@ paths: - Tasks summary: Remove a member from a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -5283,15 +4810,15 @@ paths: required: true description: The task ID. responses: - "204": + '204': description: Member removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/owners": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/owners': get: operationId: GetTasksIDOwners tags: @@ -5299,7 +4826,7 @@ paths: - Tasks summary: List all owners of a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5307,18 +4834,18 @@ paths: required: true description: The task ID. responses: - "200": + '200': description: A list of users who have owner privileges for a task content: application/json: schema: - $ref: "#/components/schemas/ResourceOwners" + $ref: '#/components/schemas/ResourceOwners' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostTasksIDOwners tags: @@ -5326,7 +4853,7 @@ paths: - Tasks summary: Add an owner to a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: taskID schema: @@ -5339,21 +4866,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/AddResourceMemberRequestBody" + $ref: '#/components/schemas/AddResourceMemberRequestBody' responses: - "201": + '201': description: Added to task owners content: application/json: schema: - $ref: "#/components/schemas/ResourceOwner" + $ref: '#/components/schemas/ResourceOwner' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/tasks/{taskID}/owners/{userID}": + $ref: '#/components/schemas/Error' + '/tasks/{taskID}/owners/{userID}': delete: operationId: DeleteTasksIDOwnersID tags: @@ -5361,7 +4888,7 @@ paths: - Tasks summary: Remove an owner from a task parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -5375,145 +4902,15 @@ paths: required: true description: The task ID. responses: - "204": + '204': description: Owner removed default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - /users: - get: - operationId: GetUsers - tags: - - Users - summary: List all users - parameters: - - $ref: "#/components/parameters/TraceSpan" - responses: - "200": - description: A list of users - content: - application/json: - schema: - $ref: "#/components/schemas/Users" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - post: - operationId: PostUsers - tags: - - Users - summary: Create a user - parameters: - - $ref: "#/components/parameters/TraceSpan" - requestBody: - description: User to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/User" - responses: - "201": - description: User created - content: - application/json: - schema: - $ref: "#/components/schemas/User" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - "/users/{userID}": - get: - operationId: GetUsersID - 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/User" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 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/User" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - 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. - responses: - "204": - description: User deleted - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - "/users/{userID}/password": + $ref: '#/components/schemas/Error' + '/users/{userID}/password': post: operationId: PostUsersIDPassword tags: @@ -5522,7 +4919,7 @@ paths: security: - BasicAuth: [] parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: userID schema: @@ -5535,16 +4932,16 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PasswordResetBody" + $ref: '#/components/schemas/PasswordResetBody' responses: - "204": + '204': description: Password successfully updated default: description: Unsuccessful authentication content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /checks: get: operationId: GetChecks @@ -5552,9 +4949,9 @@ paths: - Checks summary: Get all checks parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' - in: query name: orgID required: true @@ -5562,18 +4959,18 @@ paths: schema: type: string responses: - "200": + '200': description: A list of checks content: application/json: schema: - $ref: "#/components/schemas/Checks" + $ref: '#/components/schemas/Checks' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: CreateCheck tags: @@ -5585,28 +4982,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PostCheck" + $ref: '#/components/schemas/PostCheck' responses: - "201": + '201': description: Check created content: application/json: schema: - $ref: "#/components/schemas/Check" + $ref: '#/components/schemas/Check' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/checks/{checkID}": + $ref: '#/components/schemas/Error' + '/checks/{checkID}': get: operationId: GetChecksID tags: - Checks summary: Get a check parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5614,18 +5011,18 @@ paths: required: true description: The check ID. responses: - "200": + '200': description: The check requested content: application/json: schema: - $ref: "#/components/schemas/Check" + $ref: '#/components/schemas/Check' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' put: operationId: PutChecksID tags: @@ -5637,9 +5034,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Check" + $ref: '#/components/schemas/Check' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5647,24 +5044,24 @@ paths: required: true description: The check ID. responses: - "200": + '200': description: An updated check content: application/json: schema: - $ref: "#/components/schemas/Check" - "404": + $ref: '#/components/schemas/Check' + '404': description: The check was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchChecksID tags: @@ -5676,9 +5073,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CheckPatch" + $ref: '#/components/schemas/CheckPatch' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5686,31 +5083,31 @@ paths: required: true description: The check ID. responses: - "200": + '200': description: An updated check content: application/json: schema: - $ref: "#/components/schemas/Check" - "404": + $ref: '#/components/schemas/Check' + '404': description: The check was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteChecksID tags: - Checks summary: Delete a check parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5718,28 +5115,28 @@ paths: required: true description: The check ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: The check was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/checks/{checkID}/labels": + $ref: '#/components/schemas/Error' + '/checks/{checkID}/labels': get: operationId: GetChecksIDLabels tags: - Checks summary: List all labels for a check parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5747,25 +5144,25 @@ paths: required: true description: The check ID. responses: - "200": + '200': description: A list of all labels for a check content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostChecksIDLabels tags: - Checks summary: Add a label to a check parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5778,28 +5175,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The label was added to the check content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/checks/{checkID}/labels/{labelID}": + $ref: '#/components/schemas/Error' + '/checks/{checkID}/labels/{labelID}': delete: operationId: DeleteChecksIDLabelsID tags: - Checks summary: Delete label from a check parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5813,20 +5210,20 @@ paths: required: true description: The ID of the label to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Check or label not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /notificationRules: get: operationId: GetNotificationRules @@ -5834,9 +5231,9 @@ paths: - NotificationRules summary: Get all notification rules parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' - in: query name: orgID required: true @@ -5853,21 +5250,21 @@ paths: 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 + pattern: '^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$' + example: 'env:prod' responses: - "200": + '200': description: A list of notification rules content: application/json: schema: - $ref: "#/components/schemas/NotificationRules" + $ref: '#/components/schemas/NotificationRules' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: CreateNotificationRule tags: @@ -5879,28 +5276,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PostNotificationRule" + $ref: '#/components/schemas/PostNotificationRule' responses: - "201": + '201': description: Notification rule created content: application/json: schema: - $ref: "#/components/schemas/NotificationRule" + $ref: '#/components/schemas/NotificationRule' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/checks/{checkID}/query": + $ref: '#/components/schemas/Error' + '/checks/{checkID}/query': get: operationId: GetChecksIDQuery tags: - Checks summary: Get a check query parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: checkID schema: @@ -5908,38 +5305,38 @@ paths: required: true description: The check ID. responses: - "200": + '200': description: The check query requested content: application/json: schema: - $ref: "#/components/schemas/FluxResponse" - "400": + $ref: '#/components/schemas/FluxResponse' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/Error" - "404": + $ref: '#/components/schemas/Error' + '404': description: Check not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/notificationRules/{ruleID}": + $ref: '#/components/schemas/Error' + '/notificationRules/{ruleID}': get: operationId: GetNotificationRulesID tags: - NotificationRules summary: Get a notification rule parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -5947,18 +5344,18 @@ paths: required: true description: The notification rule ID. responses: - "200": + '200': description: The notification rule requested content: application/json: schema: - $ref: "#/components/schemas/NotificationRule" + $ref: '#/components/schemas/NotificationRule' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' put: operationId: PutNotificationRulesID tags: @@ -5970,9 +5367,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NotificationRule" + $ref: '#/components/schemas/NotificationRule' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -5980,24 +5377,24 @@ paths: required: true description: The notification rule ID. responses: - "200": + '200': description: An updated notification rule content: application/json: schema: - $ref: "#/components/schemas/NotificationRule" - "404": + $ref: '#/components/schemas/NotificationRule' + '404': description: The notification rule was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchNotificationRulesID tags: @@ -6009,9 +5406,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NotificationRuleUpdate" + $ref: '#/components/schemas/NotificationRuleUpdate' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -6019,31 +5416,31 @@ paths: required: true description: The notification rule ID. responses: - "200": + '200': description: An updated notification rule content: application/json: schema: - $ref: "#/components/schemas/NotificationRule" - "404": + $ref: '#/components/schemas/NotificationRule' + '404': description: The notification rule was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteNotificationRulesID tags: - NotificationRules summary: Delete a notification rule parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -6051,28 +5448,28 @@ paths: required: true description: The notification rule ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: The check was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/notificationRules/{ruleID}/labels": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -6080,25 +5477,25 @@ paths: required: true description: The notification rule ID. responses: - "200": + '200': description: A list of all labels for a notification rule content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostNotificationRuleIDLabels tags: - NotificationRules summary: Add a label to a notification rule parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -6111,28 +5508,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The label was added to the notification rule content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/notificationRules/{ruleID}/labels/{labelID}": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -6146,28 +5543,28 @@ paths: required: true description: The ID of the label to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Rule or label not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/notificationRules/{ruleID}/query": + $ref: '#/components/schemas/Error' + '/notificationRules/{ruleID}/query': get: operationId: GetNotificationRulesIDQuery tags: - Rules summary: Get a notification rule query parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: ruleID schema: @@ -6175,30 +5572,30 @@ paths: required: true description: The notification rule ID. responses: - "200": + '200': description: The notification rule query requested content: application/json: schema: - $ref: "#/components/schemas/FluxResponse" - "400": + $ref: '#/components/schemas/FluxResponse' + '400': description: Invalid request content: application/json: schema: - $ref: "#/components/schemas/Error" - "404": + $ref: '#/components/schemas/Error' + '404': description: Notification rule not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' /notificationEndpoints: get: operationId: GetNotificationEndpoints @@ -6206,9 +5603,9 @@ paths: - NotificationEndpoints summary: Get all notification endpoints parameters: - - $ref: "#/components/parameters/TraceSpan" - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" + - $ref: '#/components/parameters/TraceSpan' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Limit' - in: query name: orgID required: true @@ -6216,18 +5613,18 @@ paths: schema: type: string responses: - "200": + '200': description: A list of notification endpoints content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpoints" + $ref: '#/components/schemas/NotificationEndpoints' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: CreateNotificationEndpoint tags: @@ -6239,28 +5636,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PostNotificationEndpoint" + $ref: '#/components/schemas/PostNotificationEndpoint' responses: - "201": + '201': description: Notification endpoint created content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpoint" + $ref: '#/components/schemas/NotificationEndpoint' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/notificationEndpoints/{endpointID}": + $ref: '#/components/schemas/Error' + '/notificationEndpoints/{endpointID}': get: operationId: GetNotificationEndpointsID tags: - NotificationEndpoints summary: Get a notification endpoint parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: endpointID schema: @@ -6268,18 +5665,18 @@ paths: required: true description: The notification endpoint ID. responses: - "200": + '200': description: The notification endpoint requested content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpoint" + $ref: '#/components/schemas/NotificationEndpoint' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' put: operationId: PutNotificationEndpointsID tags: @@ -6291,9 +5688,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpoint" + $ref: '#/components/schemas/NotificationEndpoint' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: endpointID schema: @@ -6301,24 +5698,24 @@ paths: required: true description: The notification endpoint ID. responses: - "200": + '200': description: An updated notification endpoint content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpoint" - "404": + $ref: '#/components/schemas/NotificationEndpoint' + '404': description: The notification endpoint was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' patch: operationId: PatchNotificationEndpointsID tags: @@ -6330,9 +5727,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpointUpdate" + $ref: '#/components/schemas/NotificationEndpointUpdate' parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: endpointID schema: @@ -6340,31 +5737,31 @@ paths: required: true description: The notification endpoint ID. responses: - "200": + '200': description: An updated notification endpoint content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpoint" - "404": + $ref: '#/components/schemas/NotificationEndpoint' + '404': description: The notification endpoint was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' delete: operationId: DeleteNotificationEndpointsID tags: - NotificationEndpoints summary: Delete a notification endpoint parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: endpointID schema: @@ -6372,28 +5769,28 @@ paths: required: true description: The notification endpoint ID. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: The endpoint was not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/notificationEndpoints/{endpointID}/labels": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: endpointID schema: @@ -6401,25 +5798,25 @@ paths: required: true description: The notification endpoint ID. responses: - "200": + '200': description: A list of all labels for a notification endpoint content: application/json: schema: - $ref: "#/components/schemas/LabelsResponse" + $ref: '#/components/schemas/LabelsResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' post: operationId: PostNotificationEndpointIDLabels tags: - NotificationEndpoints summary: Add a label to a notification endpoint parameters: - - $ref: "#/components/parameters/TraceSpan" + - $ref: '#/components/parameters/TraceSpan' - in: path name: endpointID schema: @@ -6432,28 +5829,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/LabelMapping" + $ref: '#/components/schemas/LabelMapping' responses: - "201": + '201': description: The label was added to the notification endpoint content: application/json: schema: - $ref: "#/components/schemas/LabelResponse" + $ref: '#/components/schemas/LabelResponse' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" - "/notificationEndpoints/{endpointID}/labels/{labelID}": + $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" + - $ref: '#/components/parameters/TraceSpan' - in: path name: endpointID schema: @@ -6467,37 +5864,641 @@ paths: required: true description: The ID of the label to delete. responses: - "204": + '204': description: Delete has been accepted - "404": + '404': description: Endpoint or label not found content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: - $ref: "#/components/schemas/Error" -components: - parameters: - 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 + $ref: '#/components/schemas/Error' + /health: + get: + operationId: GetHealth + tags: + - Health + summary: Get the health of an instance + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /ready: + get: + operationId: GetReady + tags: + - Ready + summary: Get the readiness of an instance at startup + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + '200': + description: The instance is ready + content: + application/json: + schema: + $ref: '#/components/schemas/Ready' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /users: + get: + operationId: GetUsers + tags: + - Users + summary: List all users + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + '200': + description: A list of users + content: + application/json: + schema: + $ref: '#/components/schemas/Users' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + operationId: PostUsers + tags: + - Users + summary: Create a user + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: User to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/User' + responses: + '201': + description: User created + content: + application/json: + schema: + $ref: '#/components/schemas/UserResponse' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '/users/{userID}': + get: + operationId: GetUsersID + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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. + responses: + '204': + description: User deleted + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setup: + 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.' + 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 + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingRequest' + responses: + '201': + description: 'Created default user, bucket, org' + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingResponse' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /setup/user: + post: + operationId: PostSetupUser + tags: + - Setup + summary: 'Set up a new user, org and bucket' + description: 'Post an onboarding request to set up a new user, org and bucket.' + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Source to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingRequest' + responses: + '201': + description: 'Created default user, bucket, org' + content: + application/json: + schema: + $ref: '#/components/schemas/OnboardingResponse' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /authorizations: + get: + operationId: GetAuthorizations + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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 ID of the authorization to get. + responses: + '200': + description: Authorization details + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + patch: + operationId: PatchAuthorizationsID + tags: + - Authorizations + summary: Update an authorization to be active or inactive + requestBody: + description: 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 authorization to update. + responses: + '200': + description: The active or inactie authorization + content: + application/json: + schema: + $ref: '#/components/schemas/Authorization' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + operationId: DeleteAuthorizationsID + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /variables: + get: + operationId: GetVariables + tags: + - Variables + summary: Get all variables + parameters: + - $ref: '#/components/parameters/TraceSpan' + - in: query + name: org + description: The organization name. + schema: + type: string + - in: query + name: orgID + description: The organization ID. + schema: + type: string + responses: + '200': + description: All variables for an organization + content: + application/json: + schema: + $ref: '#/components/schemas/Variables' + '400': + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + operationId: PostVariables + summary: Create a variable + tags: + - Variables + parameters: + - $ref: '#/components/parameters/TraceSpan' + requestBody: + description: Variable to create + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + responses: + '201': + description: Variable created + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '/variables/{variableID}': + get: + operationId: GetVariablesID + tags: + - Variables + summary: Get 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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. + responses: + '204': + description: Variable deleted + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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. + requestBody: + description: Variable update to apply + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + responses: + '200': + description: Variable updated + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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 + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + responses: + '200': + description: Variable updated + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + default: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +components: + parameters: + TraceSpan: + in: header + name: Zap-Trace-Span + description: OpenTracing span context + example: + trace_id: '1' + span_id: '1' + baggage: + key: value + 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 @@ -6512,27 +6513,14 @@ components: required: false schema: type: string - TraceSpan: - in: header - name: Zap-Trace-Span - description: OpenTracing span context - example: - trace_id: "1" - span_id: "1" - baggage: - key: value - required: false - schema: - type: string After: in: query name: after required: false schema: type: string - description: > - The last resource ID from which to seek from (but not including). - This is to be used instead of `offset`. + description: | + The last resource ID from which to seek from (but not including). This is to be used instead of `offset`. schemas: LanguageRequest: description: Flux query to be analyzed. @@ -6550,7 +6538,7 @@ components: - query properties: extern: - $ref: "#/components/schemas/File" + $ref: '#/components/schemas/File' query: description: Query script to execute. type: string @@ -6560,7 +6548,7 @@ components: enum: - flux dialect: - $ref: "#/components/schemas/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 @@ -6587,7 +6575,7 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' path: description: Package import path type: string @@ -6598,50 +6586,52 @@ components: description: Package files type: array items: - $ref: "#/components/schemas/File" + $ref: '#/components/schemas/File' File: description: Represents a source from a single file type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' name: description: The name of the file. type: string package: - $ref: "#/components/schemas/PackageClause" + $ref: '#/components/schemas/PackageClause' imports: description: A list of package imports type: array items: - $ref: "#/components/schemas/ImportDeclaration" + $ref: '#/components/schemas/ImportDeclaration' body: description: List of Flux statements type: array items: - $ref: "#/components/schemas/Statement" + $ref: '#/components/schemas/Statement' PackageClause: description: Defines a package identifier type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' name: - $ref: "#/components/schemas/Identifier" + $ref: '#/components/schemas/Identifier' ImportDeclaration: description: Declares a package import type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' as: - $ref: "#/components/schemas/Identifier" + $ref: '#/components/schemas/Identifier' path: - $ref: "#/components/schemas/StringLiteral" + $ref: '#/components/schemas/StringLiteral' DeletePredicateRequest: description: The delete predicate request. type: object - required: [start, stop] + required: + - start + - stop properties: start: description: RFC3339Nano @@ -6657,35 +6647,38 @@ components: type: string Node: oneOf: - - $ref: "#/components/schemas/Expression" - - $ref: "#/components/schemas/Block" + - $ref: '#/components/schemas/Expression' + - $ref: '#/components/schemas/Block' + NodeType: + description: Type of AST node + type: string Block: description: A set of statements type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' body: description: Block body type: array items: - $ref: "#/components/schemas/Statement" + $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" + - $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 properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' text: description: Raw source text type: string @@ -6694,247 +6687,247 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' id: - $ref: "#/components/schemas/Identifier" + $ref: '#/components/schemas/Identifier' init: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' MemberAssignment: description: Object property assignment type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' member: - $ref: "#/components/schemas/MemberExpression" + $ref: '#/components/schemas/MemberExpression' init: - $ref: "#/components/schemas/Expression" + $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" + $ref: '#/components/schemas/NodeType' expression: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' ReturnStatement: description: Defines an expression to return type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' argument: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' OptionStatement: description: A single variable declaration type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' assignment: oneOf: - - $ref: "#/components/schemas/VariableAssignment" - - $ref: "#/components/schemas/MemberAssignment" + - $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" + $ref: '#/components/schemas/NodeType' id: - $ref: "#/components/schemas/Identifier" + $ref: '#/components/schemas/Identifier' TestStatement: description: Declares a Flux test case type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' assignment: - $ref: "#/components/schemas/VariableAssignment" + $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" + - $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" + $ref: '#/components/schemas/NodeType' elements: description: Elements of the array type: array items: - $ref: "#/components/schemas/Expression" + $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" + $ref: '#/components/schemas/NodeType' elements: description: Elements of the dictionary type: array items: - $ref: "#/components/schemas/DictItem" + $ref: '#/components/schemas/DictItem' DictItem: description: A key/value pair in a dictionary type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' key: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' val: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' FunctionExpression: description: Function expression type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' params: description: Function parameters type: array items: - $ref: "#/components/schemas/Property" + $ref: '#/components/schemas/Property' body: - $ref: "#/components/schemas/Node" + $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" + $ref: '#/components/schemas/NodeType' operator: type: string left: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' right: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' CallExpression: description: Represents a function call type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' callee: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' arguments: description: Function arguments type: array items: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' ConditionalExpression: - description: Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test` + description: 'Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`' type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' test: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' alternate: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' consequent: - $ref: "#/components/schemas/Expression" + $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" + $ref: '#/components/schemas/NodeType' operator: type: string left: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' right: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' MemberExpression: description: Represents accessing a property of an object type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' object: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' property: - $ref: "#/components/schemas/PropertyKey" + $ref: '#/components/schemas/PropertyKey' IndexExpression: description: Represents indexing into an array type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' array: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' index: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' ObjectExpression: description: Allows the declaration of an anonymous object within a declaration type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' properties: description: Object properties type: array items: - $ref: "#/components/schemas/Property" + $ref: '#/components/schemas/Property' ParenExpression: description: Represents an expression wrapped in parenthesis type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' expression: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' PipeExpression: description: Call expression with pipe argument type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' argument: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' call: - $ref: "#/components/schemas/CallExpression" + $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" + $ref: '#/components/schemas/NodeType' operator: type: string argument: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' BooleanLiteral: description: Represents boolean values type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' value: type: boolean DateTimeLiteral: @@ -6942,7 +6935,7 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' value: type: string DurationLiteral: @@ -6950,18 +6943,18 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' values: description: Duration values type: array items: - $ref: "#/components/schemas/Duration" + $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" + $ref: '#/components/schemas/NodeType' value: type: number IntegerLiteral: @@ -6969,21 +6962,21 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' value: type: string PipeLiteral: - description: Represents a specialized literal value, indicating the left hand value of a pipe expression + description: 'Represents a specialized literal value, indicating the left hand value of a pipe expression' type: object properties: type: - $ref: "#/components/schemas/NodeType" + $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" + $ref: '#/components/schemas/NodeType' value: type: string StringLiteral: @@ -6991,7 +6984,7 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' value: type: string UnsignedIntegerLiteral: @@ -6999,7 +6992,7 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' value: type: string Duration: @@ -7007,7 +7000,7 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' magnitude: type: integer unit: @@ -7017,114 +7010,60 @@ components: type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' key: - $ref: "#/components/schemas/PropertyKey" + $ref: '#/components/schemas/PropertyKey' value: - $ref: "#/components/schemas/Expression" + $ref: '#/components/schemas/Expression' PropertyKey: oneOf: - - $ref: "#/components/schemas/Identifier" - - $ref: "#/components/schemas/StringLiteral" + - $ref: '#/components/schemas/Identifier' + - $ref: '#/components/schemas/StringLiteral' Identifier: description: A valid Flux identifier type: object properties: type: - $ref: "#/components/schemas/NodeType" + $ref: '#/components/schemas/NodeType' name: type: string - NodeType: - description: Type of AST node - type: string Dialect: - description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions + description: 'Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions' type: object properties: header: - description: If true, the results will contain a header row + description: 'If true, the results will contain a header row' type: boolean default: true delimiter: - description: Separator between cells; the default is , + description: 'Separator between cells; the default is ,' type: string - default: "," + default: ',' maxLength: 1 minLength: 1 annotations: - description: https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + description: 'https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns' type: array uniqueItems: true items: type: string enum: - - "group" - - "datatype" - - "default" + - group + - datatype + - default commentPrefix: description: Character prefixed to comment strings type: string - default: "#" + default: '#' maxLength: 1 minLength: 0 dateTimeFormat: description: Format of timestamps type: string - default: "RFC3339" + default: RFC3339 enum: - RFC3339 - RFC3339Nano - Permission: - required: [action, resource] - properties: - action: - type: string - enum: - - read - - write - resource: - $ref: "#/components/schemas/Resource" - Resource: - type: object - required: [type] - properties: - type: - type: string - enum: - - authorizations - - buckets - - dashboards - - orgs - - sources - - tasks - - telegrafs - - users - - variables - - scrapers - - secrets - - labels - - views - - documents - - notificationRules - - notificationEndpoints - - checks - - dbrp - 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. AuthorizationUpdateRequest: properties: status: @@ -7137,71 +7076,6 @@ components: description: type: string description: A description of the token. - 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" PostBucketRequest: properties: orgID: @@ -7213,39 +7087,42 @@ components: rp: type: string retentionRules: - $ref: "#/components/schemas/RetentionRules" - required: [orgID, name, retentionRules] + $ref: '#/components/schemas/RetentionRules' + required: + - orgID + - name + - retentionRules Bucket: 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" + 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" + $ref: '#/components/schemas/Link' members: description: URL to retrieve members that can read this bucket - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' org: description: URL to retrieve parent organization for this bucket - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: description: URL to retrieve owners that can read and write to this bucket. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' self: description: URL for this bucket - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' write: description: URL to write line protocol for this bucket - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' id: readOnly: true type: string @@ -7273,25 +7150,27 @@ components: format: date-time readOnly: true retentionRules: - $ref: "#/components/schemas/RetentionRules" + $ref: '#/components/schemas/RetentionRules' labels: - $ref: "#/components/schemas/Labels" - required: [name, retentionRules] + $ref: '#/components/schemas/Labels' + required: + - name + - retentionRules Buckets: type: object properties: links: readOnly: true - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' buckets: type: array items: - $ref: "#/components/schemas/Bucket" + $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" + $ref: '#/components/schemas/RetentionRule' RetentionRule: type: object properties: @@ -7302,6 +7181,7 @@ components: - 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 @@ -7309,7 +7189,9 @@ components: type: integer format: int64 description: Shard duration measured in seconds. - required: [type, everySeconds] + required: + - type + - everySeconds Link: type: string format: uri @@ -7319,12 +7201,13 @@ components: type: object properties: next: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' self: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' prev: - $ref: "#/components/schemas/Link" - required: [self] + $ref: '#/components/schemas/Link' + required: + - self Logs: type: object properties: @@ -7332,13 +7215,13 @@ components: readOnly: true type: array items: - $ref: "#/components/schemas/LogEvent" + $ref: '#/components/schemas/LogEvent' LogEvent: type: object properties: time: readOnly: true - description: Time event occurred, RFC3339Nano. + description: 'Time event occurred, RFC3339Nano.' type: string format: date-time message: @@ -7352,31 +7235,31 @@ components: 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" + 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" + $ref: '#/components/schemas/Link' members: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' labels: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' secrets: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' buckets: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' tasks: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' dashboards: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' id: readOnly: true type: string @@ -7399,16 +7282,17 @@ components: enum: - active - inactive - required: [name] + required: + - name Organizations: type: object properties: links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' orgs: type: array items: - $ref: "#/components/schemas/Organization" + $ref: '#/components/schemas/Organization' TemplateApply: type: object properties: @@ -7428,7 +7312,7 @@ components: items: type: string contents: - $ref: "#/components/schemas/Template" + $ref: '#/components/schemas/Template' templates: type: array items: @@ -7441,7 +7325,7 @@ components: items: type: string contents: - $ref: "#/components/schemas/Template" + $ref: '#/components/schemas/Template' envRefs: type: object additionalProperties: @@ -7463,7 +7347,8 @@ components: type: string contentType: type: string - required: ["url"] + required: + - url actions: type: array items: @@ -7472,26 +7357,31 @@ components: properties: action: type: string - enum: ["skipKind"] + enum: + - skipKind properties: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" - required: ["kind"] + $ref: '#/components/schemas/TemplateKind' + required: + - kind - type: object properties: action: type: string - enum: ["skipResource"] + enum: + - skipResource properties: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' resourceTemplateName: type: string - required: ["kind", "resourceTemplateName"] + required: + - kind + - resourceTemplateName TemplateKind: type: string enum: @@ -7531,18 +7421,20 @@ components: byResourceKind: type: array items: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' resources: type: object properties: id: type: string kind: - $ref: "#/components/schemas/TemplateKind" + $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] + 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: @@ -7565,15 +7457,17 @@ components: byResourceKind: type: array items: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' resources: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' name: type: string - required: [name, kind] + required: + - name + - kind Template: type: array items: @@ -7582,7 +7476,7 @@ components: apiVersion: type: string kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' meta: type: object properties: @@ -7617,7 +7511,9 @@ components: - type: integer - type: number - type: boolean - required: [resourceField, envRefKey] + required: + - resourceField + - envRefKey TemplateSummary: type: object properties: @@ -7640,7 +7536,7 @@ components: orgID: type: string kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string name: @@ -7652,57 +7548,57 @@ components: labelAssociations: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' checks: type: array items: allOf: - - $ref: "#/components/schemas/CheckDiscriminator" + - $ref: '#/components/schemas/CheckDiscriminator' - type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string labelAssociations: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' dashboards: type: array items: type: object properties: id: - type: "string" + type: string orgID: - type: "string" + type: string kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string name: - type: "string" + type: string description: - type: "string" + type: string labelAssociations: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' charts: type: array items: - $ref: "#/components/schemas/TemplateChart" + $ref: '#/components/schemas/TemplateChart' envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' labels: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' labelMappings: type: array items: @@ -7736,26 +7632,26 @@ components: type: array items: allOf: - - $ref: "#/components/schemas/NotificationEndpointDiscrimator" + - $ref: '#/components/schemas/NotificationEndpointDiscrimator' - type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string labelAssociations: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' notificationRules: type: array items: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string name: @@ -7799,16 +7695,16 @@ components: labelAssociations: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' tasks: type: array items: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string id: @@ -7828,31 +7724,31 @@ components: status: type: string envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' telegrafConfigs: type: array items: allOf: - - $ref: "#/components/schemas/TelegrafRequest" + - $ref: '#/components/schemas/TelegrafRequest' - type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string labelAssociations: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' variables: type: array items: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string id: @@ -7864,13 +7760,13 @@ components: description: type: string arguments: - $ref: "#/components/schemas/VariableProperties" + $ref: '#/components/schemas/VariableProperties' labelAssociations: type: array items: - $ref: "#/components/schemas/TemplateSummaryLabel" + $ref: '#/components/schemas/TemplateSummaryLabel' envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' diff: type: object properties: @@ -7880,7 +7776,7 @@ components: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' stateStatus: type: string id: @@ -7895,7 +7791,7 @@ components: description: type: string retentionRules: - $ref: "#/components/schemas/RetentionRules" + $ref: '#/components/schemas/RetentionRules' old: type: object properties: @@ -7904,14 +7800,14 @@ components: description: type: string retentionRules: - $ref: "#/components/schemas/RetentionRules" + $ref: '#/components/schemas/RetentionRules' checks: type: array items: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' stateStatus: type: string id: @@ -7919,9 +7815,9 @@ components: templateMetaName: type: string new: - $ref: "#/components/schemas/CheckDiscriminator" + $ref: '#/components/schemas/CheckDiscriminator' old: - $ref: "#/components/schemas/CheckDiscriminator" + $ref: '#/components/schemas/CheckDiscriminator' dashboards: type: array items: @@ -7932,7 +7828,7 @@ components: id: type: string kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string new: @@ -7945,7 +7841,7 @@ components: charts: type: array items: - $ref: "#/components/schemas/TemplateChart" + $ref: '#/components/schemas/TemplateChart' old: type: object properties: @@ -7956,7 +7852,7 @@ components: charts: type: array items: - $ref: "#/components/schemas/TemplateChart" + $ref: '#/components/schemas/TemplateChart' labels: type: array items: @@ -7965,7 +7861,7 @@ components: stateStatus: type: string kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' id: type: string templateMetaName: @@ -8015,7 +7911,7 @@ components: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' stateStatus: type: string id: @@ -8023,16 +7919,16 @@ components: templateMetaName: type: string new: - $ref: "#/components/schemas/NotificationEndpointDiscrimator" + $ref: '#/components/schemas/NotificationEndpointDiscrimator' old: - $ref: "#/components/schemas/NotificationEndpointDiscrimator" + $ref: '#/components/schemas/NotificationEndpointDiscrimator' notificationRules: type: array items: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' stateStatus: type: string id: @@ -8127,7 +8023,7 @@ components: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' stateStatus: type: string id: @@ -8174,7 +8070,7 @@ components: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' stateStatus: type: string id: @@ -8182,16 +8078,16 @@ components: templateMetaName: type: string new: - $ref: "#/components/schemas/TelegrafRequest" + $ref: '#/components/schemas/TelegrafRequest' old: - $ref: "#/components/schemas/TelegrafRequest" + $ref: '#/components/schemas/TelegrafRequest' variables: type: array items: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' stateStatus: type: string id: @@ -8206,7 +8102,7 @@ components: description: type: string args: - $ref: "#/components/schemas/VariableProperties" + $ref: '#/components/schemas/VariableProperties' old: type: object properties: @@ -8215,14 +8111,14 @@ components: description: type: string args: - $ref: "#/components/schemas/VariableProperties" + $ref: '#/components/schemas/VariableProperties' errors: type: array items: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' reason: type: string fields: @@ -8241,7 +8137,7 @@ components: orgID: type: string kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string name: @@ -8254,7 +8150,7 @@ components: description: type: string envReferences: - $ref: "#/components/schemas/TemplateEnvReferences" + $ref: '#/components/schemas/TemplateEnvReferences' TemplateChart: type: object properties: @@ -8266,8 +8162,8 @@ components: type: integer width: type: integer - properties: # field name is properties - $ref: "#/components/schemas/ViewProperties" + properties: + $ref: '#/components/schemas/ViewProperties' Stack: type: object properties: @@ -8304,7 +8200,7 @@ components: resourceID: type: string kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' templateMetaName: type: string associations: @@ -8313,7 +8209,7 @@ components: type: object properties: kind: - $ref: "#/components/schemas/TemplateKind" + $ref: '#/components/schemas/TemplateKind' metaName: type: string links: @@ -8333,11 +8229,11 @@ components: type: object properties: links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' runs: type: array items: - $ref: "#/components/schemas/Run" + $ref: '#/components/schemas/Run' Run: properties: id: @@ -8356,7 +8252,7 @@ components: - success - canceled scheduledFor: - description: Time used for run's "now" option, RFC3339. + description: 'Time used for run''s "now" option, RFC3339.' type: string format: date-time log: @@ -8374,26 +8270,26 @@ components: type: string startedAt: readOnly: true - description: Time run started executing, RFC3339Nano. + description: 'Time run started executing, RFC3339Nano.' type: string format: date-time finishedAt: readOnly: true - description: Time run finished executing, RFC3339Nano. + description: 'Time run finished executing, RFC3339Nano.' type: string format: date-time requestedAt: readOnly: true - description: Time run was manually requested, RFC3339Nano. + 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" + self: /api/v2/tasks/1/runs/1 + task: /api/v2/tasks/1 + retry: /api/v2/tasks/1/runs/1/retry properties: self: type: string @@ -8408,7 +8304,7 @@ components: properties: scheduledFor: nullable: true - description: Time used for run's "now" option, RFC3339. Default is the server's now time. + description: 'Time used for run''s "now" option, RFC3339. Default is the server''s now time.' type: string format: date-time Tasks: @@ -8416,11 +8312,11 @@ components: properties: links: readOnly: true - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' tasks: type: array items: - $ref: "#/components/schemas/Task" + $ref: '#/components/schemas/Task' Task: type: object properties: @@ -8428,7 +8324,7 @@ components: readOnly: true type: string type: - description: The type of task, this can be used for filtering tasks on list actions. + description: 'The type of task, this can be used for filtering tasks on list actions.' type: string orgID: description: The ID of the organization that owns this Task. @@ -8443,9 +8339,9 @@ components: description: An optional description of the task. type: string status: - $ref: "#/components/schemas/TaskStatusType" + $ref: '#/components/schemas/TaskStatusType' labels: - $ref: "#/components/schemas/Labels" + $ref: '#/components/schemas/Labels' authorizationID: description: The ID of the authorization used when this task communicates with the query engine. type: string @@ -8459,10 +8355,10 @@ components: description: A task repetition schedule in the form '* * * * * *'; parsed from Flux. type: string offset: - description: Duration to delay after the schedule, before executing the task; parsed from flux, if set to zero it will remove this option and use 0 as the default. + description: 'Duration to delay after the schedule, before executing the task; parsed from flux, if set to zero it will remove this option and use 0 as the default.' type: string latestCompleted: - description: Timestamp of latest scheduled, completed run, RFC3339. + description: 'Timestamp of latest scheduled, completed run, RFC3339.' type: string format: date-time readOnly: true @@ -8488,30 +8384,36 @@ components: 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" + 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" + $ref: '#/components/schemas/Link' owners: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' members: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' runs: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' logs: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' labels: - $ref: "#/components/schemas/Link" - required: [id, name, orgID, flux] + $ref: '#/components/schemas/Link' + required: + - id + - name + - orgID + - flux TaskStatusType: type: string - enum: [active, inactive] - User: + enum: + - active + - inactive + UserResponse: properties: id: readOnly: true @@ -8531,31 +8433,19 @@ components: type: object readOnly: true example: - self: "/api/v2/users/1" - properties: - self: - type: string - format: uri - required: [name] - Users: - type: object - properties: - links: - type: object + self: /api/v2/users/1 properties: self: type: string format: uri - users: - type: array - items: - $ref: "#/components/schemas/User" + required: + - name Flags: type: object additionalProperties: true ResourceMember: allOf: - - $ref: "#/components/schemas/User" + - $ref: '#/components/schemas/UserResponse' - type: object properties: role: @@ -8575,10 +8465,10 @@ components: users: type: array items: - $ref: "#/components/schemas/ResourceMember" + $ref: '#/components/schemas/ResourceMember' ResourceOwner: allOf: - - $ref: "#/components/schemas/User" + - $ref: '#/components/schemas/UserResponse' - type: object properties: role: @@ -8598,14 +8488,14 @@ components: users: type: array items: - $ref: "#/components/schemas/ResourceOwner" + $ref: '#/components/schemas/ResourceOwner' FluxSuggestions: type: object properties: funcs: type: array items: - $ref: "#/components/schemas/FluxSuggestion" + $ref: '#/components/schemas/FluxSuggestion' FluxSuggestion: type: object properties: @@ -8698,10 +8588,9 @@ components: Error: properties: code: - description: Code is the machine-readable error code. + 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 @@ -8714,11 +8603,22 @@ components: - too many requests - unauthorized - method not allowed + - request too large message: readOnly: true - description: Message is a human-readable message. + 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] + required: + - code + - message LineProtocolError: properties: code: @@ -8749,7 +8649,11 @@ components: 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: @@ -8767,18 +8671,18 @@ components: description: Max length in bytes for a body of line-protocol. type: integer format: int32 - required: [code, message, maxLength] + 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 + description: value is the value of the field. Meaning of the value is implied by the `type` key type: string type: - description: >- - `type` describes the field type. `func` is a function. `field` is a field reference. + description: '`type` describes the field type. `func` is a function. `field` is a field reference.' type: string enum: - func @@ -8788,15 +8692,13 @@ components: - regex - wildcard alias: - description: >- - Alias overrides the field name in the returned response. Applies only - if type is `func` + description: Alias overrides the field name in the returned response. Applies only if type is `func` type: string args: description: Args are the arguments to the function type: array items: - $ref: "#/components/schemas/Field" + $ref: '#/components/schemas/Field' BuilderConfig: type: object properties: @@ -8807,11 +8709,11 @@ components: tags: type: array items: - $ref: "#/components/schemas/BuilderTagsType" + $ref: '#/components/schemas/BuilderTagsType' functions: type: array items: - $ref: "#/components/schemas/BuilderFunctionsType" + $ref: '#/components/schemas/BuilderFunctionsType' aggregateWindow: type: object properties: @@ -8829,10 +8731,12 @@ components: items: type: string aggregateFunctionType: - $ref: "#/components/schemas/BuilderAggregateFunctionType" + $ref: '#/components/schemas/BuilderAggregateFunctionType' BuilderAggregateFunctionType: type: string - enum: ["filter", "group"] + enum: + - filter + - group BuilderFunctionsType: type: object properties: @@ -8845,14 +8749,16 @@ components: type: string description: The text of the Flux query. editMode: - $ref: "#/components/schemas/QueryEditMode" + $ref: '#/components/schemas/QueryEditMode' name: type: string builderConfig: - $ref: "#/components/schemas/BuilderConfig" + $ref: '#/components/schemas/BuilderConfig' QueryEditMode: type: string - enum: ["builder", "advanced"] + enum: + - builder + - advanced Axis: type: object description: The description of a particular axis for a visualization. @@ -8861,9 +8767,7 @@ components: type: array minItems: 0 maxItems: 2 - description: >- - The extents of an axis in the form [lower, upper]. Clients determine - whether bounds are to be inclusive or exclusive of their limits + description: 'The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits' items: type: string label: @@ -8878,17 +8782,27 @@ components: base: description: Base represents the radix for formatting axis values. type: string - enum: ["", "2", "10"] + enum: + - '' + - '2' + - '10' scale: - $ref: "#/components/schemas/AxisScale" + $ref: '#/components/schemas/AxisScale' AxisScale: description: 'Scale is the axis formatting scale. Supported: "log", "linear"' type: string - enum: ["log", "linear"] + enum: + - log + - linear DashboardColor: type: object description: Defines an encoding of data value into color space. - required: [id, type, hex, name, value] + required: + - id + - type + - hex + - name + - value properties: id: description: The unique ID of the view color. @@ -8946,28 +8860,32 @@ components: type: string type: type: string - enum: [xy] + enum: + - xy queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean axes: - $ref: "#/components/schemas/Axes" + $ref: '#/components/schemas/Axes' staticLegend: - $ref: "#/components/schemas/StaticLegend" + $ref: '#/components/schemas/StaticLegend' + legend: + $ref: '#/components/schemas/Legend' xColumn: type: string generateXAxisTicks: @@ -9000,12 +8918,18 @@ components: type: boolean hoverDimension: type: string - enum: [auto, x, y, xy] + enum: + - auto + - x + - 'y' + - xy position: type: string - enum: [overlaid, stacked] + enum: + - overlaid + - stacked geom: - $ref: "#/components/schemas/XYGeom" + $ref: '#/components/schemas/XYGeom' legendColorizeRows: type: boolean legendOpacity: @@ -9015,7 +8939,12 @@ components: type: integer XYGeom: type: string - enum: [line, step, stacked, bar, monotoneX] + enum: + - line + - step + - stacked + - bar + - monotoneX BandViewProperties: type: object required: @@ -9032,28 +8961,32 @@ components: type: string type: type: string - enum: [band] + enum: + - band queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean axes: - $ref: "#/components/schemas/Axes" + $ref: '#/components/schemas/Axes' + legend: + $ref: '#/components/schemas/Legend' staticLegend: - $ref: "#/components/schemas/StaticLegend" + $ref: '#/components/schemas/StaticLegend' xColumn: type: string generateXAxisTicks: @@ -9090,9 +9023,13 @@ components: type: string hoverDimension: type: string - enum: [auto, x, y, xy] + enum: + - auto + - x + - 'y' + - xy geom: - $ref: "#/components/schemas/XYGeom" + $ref: '#/components/schemas/XYGeom' legendColorizeRows: type: boolean legendOpacity: @@ -9119,28 +9056,32 @@ components: type: string type: type: string - enum: [line-plus-single-stat] + enum: + - line-plus-single-stat queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean axes: - $ref: "#/components/schemas/Axes" + $ref: '#/components/schemas/Axes' staticLegend: - $ref: "#/components/schemas/StaticLegend" + $ref: '#/components/schemas/StaticLegend' + legend: + $ref: '#/components/schemas/Legend' xColumn: type: string generateXAxisTicks: @@ -9173,16 +9114,22 @@ components: type: boolean hoverDimension: type: string - enum: [auto, x, y, xy] + enum: + - auto + - x + - 'y' + - xy position: type: string - enum: [overlaid, stacked] + enum: + - overlaid + - stacked prefix: type: string suffix: type: string decimalPlaces: - $ref: "#/components/schemas/DecimalPlaces" + $ref: '#/components/schemas/DecimalPlaces' legendColorizeRows: type: boolean legendOpacity: @@ -9215,11 +9162,12 @@ components: type: string type: type: string - enum: [mosaic] + enum: + - mosaic queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array @@ -9227,11 +9175,12 @@ components: type: string shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean xColumn: type: string @@ -9285,7 +9234,11 @@ components: type: string hoverDimension: type: string - enum: [auto, x, y, xy] + enum: + - auto + - x + - 'y' + - xy legendColorizeRows: type: boolean legendOpacity: @@ -9319,11 +9272,12 @@ components: type: string type: type: string - enum: [scatter] + enum: + - scatter queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array @@ -9331,11 +9285,12 @@ components: type: string shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean xColumn: type: string @@ -9427,11 +9382,12 @@ components: type: string type: type: string - enum: [heatmap] + enum: + - heatmap queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array @@ -9439,11 +9395,12 @@ components: type: string shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean xColumn: type: string @@ -9521,23 +9478,25 @@ components: properties: type: type: string - enum: [single-stat] + enum: + - single-stat queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean prefix: type: string @@ -9547,8 +9506,12 @@ components: type: string tickSuffix: type: string + staticLegend: + $ref: '#/components/schemas/StaticLegend' + legend: + $ref: '#/components/schemas/Legend' decimalPlaces: - $ref: "#/components/schemas/DecimalPlaces" + $ref: '#/components/schemas/DecimalPlaces' HistogramViewProperties: type: object required: @@ -9567,23 +9530,25 @@ components: properties: type: type: string - enum: [histogram] + enum: + - histogram queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean xColumn: type: string @@ -9600,7 +9565,9 @@ components: type: string position: type: string - enum: [overlaid, stacked] + enum: + - overlaid + - stacked binCount: type: integer legendColorizeRows: @@ -9613,39 +9580,39 @@ components: GaugeViewProperties: type: object required: - [ - type, - queries, - colors, - shape, - note, - showNoteWhenEmpty, - prefix, - tickPrefix, - suffix, - tickSuffix, - decimalPlaces, - ] + - type + - queries + - colors + - shape + - note + - showNoteWhenEmpty + - prefix + - tickPrefix + - suffix + - tickSuffix + - decimalPlaces properties: type: type: string - enum: [gauge] + enum: + - gauge queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean prefix: type: string @@ -9655,8 +9622,12 @@ components: type: string tickSuffix: type: string + staticLegend: + $ref: '#/components/schemas/StaticLegend' + legend: + $ref: '#/components/schemas/Legend' decimalPlaces: - $ref: "#/components/schemas/DecimalPlaces" + $ref: '#/components/schemas/DecimalPlaces' TableViewProperties: type: object required: @@ -9673,33 +9644,33 @@ components: properties: type: type: string - enum: [table] + enum: + - table queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + description: 'If true, will display note when empty' type: boolean tableOptions: properties: verticalTimeAxis: - description: >- - verticalTimeAxis describes the orientation of the table by - indicating whether the time axis will be displayed vertically + description: verticalTimeAxis describes the orientation of the table by indicating whether the time axis will be displayed vertically type: boolean sortBy: - $ref: "#/components/schemas/RenamableField" + $ref: '#/components/schemas/RenamableField' wrapping: description: Wrapping describes the text wrapping style to be used in table views type: string @@ -9708,24 +9679,18 @@ components: - wrap - single-line fixFirstColumn: - description: >- - fixFirstColumn indicates whether the first column of the table - should be locked + description: fixFirstColumn indicates whether the first column of the table should be locked type: boolean fieldOptions: - description: >- - fieldOptions represent the fields retrieved by the query with - customization options + description: fieldOptions represent the fields retrieved by the query with customization options type: array items: - $ref: "#/components/schemas/RenamableField" + $ref: '#/components/schemas/RenamableField' timeFormat: - description: >- - timeFormat describes the display format for time values according to - moment.js date formatting + description: timeFormat describes the display format for time values according to moment.js date formatting type: string decimalPlaces: - $ref: "#/components/schemas/DecimalPlaces" + $ref: '#/components/schemas/DecimalPlaces' MarkdownViewProperties: type: object required: @@ -9735,10 +9700,12 @@ components: properties: type: type: string - enum: [markdown] + enum: + - markdown shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 note: type: string CheckViewProperties: @@ -9752,23 +9719,25 @@ components: properties: type: type: string - enum: [check] + enum: + - check shape: type: string - enum: ["chronograf-v2"] + enum: + - chronograf-v2 checkID: type: string check: - $ref: "#/components/schemas/Check" + $ref: '#/components/schemas/Check' queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' colors: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' legendColorizeRows: type: boolean legendOpacity: @@ -9779,22 +9748,32 @@ components: GeoViewLayer: type: object oneOf: - - $ref: "#/components/schemas/GeoCircleViewLayer" - - $ref: "#/components/schemas/GeoHeatMapViewLayer" - - $ref: "#/components/schemas/GeoPointMapViewLayer" - - $ref: "#/components/schemas/GeoTrackMapViewLayer" + - $ref: '#/components/schemas/GeoCircleViewLayer' + - $ref: '#/components/schemas/GeoHeatMapViewLayer' + - $ref: '#/components/schemas/GeoPointMapViewLayer' + - $ref: '#/components/schemas/GeoTrackMapViewLayer' GeoViewLayerProperties: type: object - required: [type] + required: + - type properties: type: type: string - enum: [heatmap, circleMap, pointMap, trackMap] + enum: + - heatmap + - circleMap + - pointMap + - trackMap GeoCircleViewLayer: allOf: - - $ref: "#/components/schemas/GeoViewLayerProperties" + - $ref: '#/components/schemas/GeoViewLayerProperties' - type: object - required: [radiusField, radiusDimension, colorField, colorDimension, colors] + required: + - radiusField + - radiusDimension + - colorField + - colorDimension + - colors properties: radiusField: type: string @@ -9810,7 +9789,7 @@ components: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' radius: description: Maximum radius size in pixels type: integer @@ -9819,9 +9798,12 @@ components: type: boolean GeoPointMapViewLayer: allOf: - - $ref: "#/components/schemas/GeoViewLayerProperties" + - $ref: '#/components/schemas/GeoViewLayerProperties' - type: object - required: [colorField, colorDimension, colors] + required: + - colorField + - colorDimension + - colors properties: colorField: type: string @@ -9832,15 +9814,19 @@ components: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' isClustered: description: Cluster close markers together type: boolean GeoTrackMapViewLayer: allOf: - - $ref: "#/components/schemas/GeoViewLayerProperties" + - $ref: '#/components/schemas/GeoViewLayerProperties' - type: object - required: [trackWidth, speed, randomColors, trackPointVisualization] + required: + - trackWidth + - speed + - randomColors + - trackPointVisualization properties: trackWidth: description: Width of the track @@ -9855,12 +9841,17 @@ components: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' GeoHeatMapViewLayer: allOf: - - $ref: "#/components/schemas/GeoViewLayerProperties" + - $ref: '#/components/schemas/GeoViewLayerProperties' - type: object - required: [intensityField, intensityDimension, radius, blur, colors] + required: + - intensityField + - intensityDimension + - radius + - blur + - colors properties: intensityField: type: string @@ -9877,25 +9868,39 @@ components: description: Colors define color encoding of data into a visualization type: array items: - $ref: "#/components/schemas/DashboardColor" + $ref: '#/components/schemas/DashboardColor' GeoViewProperties: type: object - required: [type, shape, queries, note, showNoteWhenEmpty, center, zoom, allowPanAndZoom, detectCoordinateFields, layers] + required: + - type + - shape + - queries + - note + - showNoteWhenEmpty + - center + - zoom + - allowPanAndZoom + - detectCoordinateFields + - layers properties: type: type: string - enum: [geo] + enum: + - geo queries: type: array items: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' shape: type: string - enum: ['chronograf-v2'] + enum: + - chronograf-v2 center: description: Coordinates of the center of the map type: object - required: [lat, lon] + required: + - lat + - lon properties: lat: description: Latitude of the center of the map @@ -9912,42 +9917,44 @@ components: minimum: 1 maximum: 28 allowPanAndZoom: - description: If true, map zoom and pan controls are enabled on the dashboard view + 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 + description: 'If true, search results get automatically regroupped so that lon,lat and value are treated as columns' type: boolean default: true mapStyle: - description: Define map type - regular, satellite etc. + description: 'Define map type - regular, satellite etc.' type: string note: type: string showNoteWhenEmpty: - description: If true, will display note when empty + 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" + $ref: '#/components/schemas/DashboardColor' layers: description: List of individual layers shown in the map type: array items: - $ref: "#/components/schemas/GeoViewLayer" + $ref: '#/components/schemas/GeoViewLayer' Axes: description: The viewport for a View's visualizations type: object - required: ["x", "y"] + required: + - x + - 'y' properties: x: - $ref: "#/components/schemas/Axis" - "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true. - $ref: "#/components/schemas/Axis" + $ref: '#/components/schemas/Axis' + 'y': + $ref: '#/components/schemas/Axis' StaticLegend: - description: The options specific to the static legend + description: StaticLegend represents the options specific to the static legend type: object properties: colorizeRows: @@ -9965,8 +9972,26 @@ components: widthRatio: type: number format: float + Legend: + description: Legend define encoding of data into a view's legend + type: object + deprecated: true + properties: + type: + description: The style of the legend. + type: string + enum: + - static + orientation: + description: orientation is the location of the legend with respect to the view graph + type: string + enum: + - top + - bottom + - left + - right DecimalPlaces: - description: Indicates whether decimal places should be enforced, and how many digits it should show. + description: 'Indicates whether decimal places should be enforced, and how many digits it should show.' type: object properties: isEnforced: @@ -9980,7 +10005,8 @@ components: properties: type: type: string - enum: [constant] + enum: + - constant values: type: array items: @@ -9989,7 +10015,8 @@ components: properties: type: type: string - enum: [map] + enum: + - map values: type: object additionalProperties: @@ -9998,7 +10025,8 @@ components: properties: type: type: string - enum: [query] + enum: + - query values: type: object properties: @@ -10006,109 +10034,27 @@ components: type: string language: type: string - 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" VariableProperties: type: object oneOf: - - $ref: "#/components/schemas/QueryVariableProperties" - - $ref: "#/components/schemas/ConstantVariableProperties" - - $ref: "#/components/schemas/MapVariableProperties" + - $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/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" + - $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/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 @@ -10126,7 +10072,7 @@ components: name: type: string properties: - $ref: "#/components/schemas/ViewProperties" + $ref: '#/components/schemas/ViewProperties' Views: type: object properties: @@ -10138,14 +10084,14 @@ components: views: type: array items: - $ref: "#/components/schemas/View" + $ref: '#/components/schemas/View' CellUpdate: type: object properties: x: type: integer format: int32 - "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true. + 'y': type: integer format: int32 w: @@ -10162,7 +10108,7 @@ components: x: type: integer format: int32 - "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true. + 'y': type: integer format: int32 w: @@ -10193,13 +10139,13 @@ components: CellWithViewProperties: type: object allOf: - - $ref: "#/components/schemas/Cell" + - $ref: '#/components/schemas/Cell' - type: object properties: name: type: string properties: - $ref: "#/components/schemas/ViewProperties" + $ref: '#/components/schemas/ViewProperties' Cell: type: object properties: @@ -10215,7 +10161,7 @@ components: x: type: integer format: int32 - "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true. + 'y': type: integer format: int32 w: @@ -10230,11 +10176,11 @@ components: CellsWithViewProperties: type: array items: - $ref: "#/components/schemas/CellWithViewProperties" + $ref: '#/components/schemas/CellWithViewProperties' Cells: type: array items: - $ref: "#/components/schemas/Cell" + $ref: '#/components/schemas/Cell' Secrets: additionalProperties: type: string @@ -10249,7 +10195,7 @@ components: type: string SecretKeysResponse: allOf: - - $ref: "#/components/schemas/SecretKeys" + - $ref: '#/components/schemas/SecretKeys' - type: object properties: links: @@ -10277,31 +10223,31 @@ components: DashboardWithViewProperties: type: object allOf: - - $ref: "#/components/schemas/CreateDashboardRequest" + - $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" + 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" + $ref: '#/components/schemas/Link' cells: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' members: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' labels: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' org: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' id: readOnly: true type: string @@ -10315,37 +10261,37 @@ components: type: string format: date-time cells: - $ref: "#/components/schemas/CellsWithViewProperties" + $ref: '#/components/schemas/CellsWithViewProperties' labels: - $ref: "#/components/schemas/Labels" + $ref: '#/components/schemas/Labels' Dashboard: type: object allOf: - - $ref: "#/components/schemas/CreateDashboardRequest" + - $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" + 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" + $ref: '#/components/schemas/Link' cells: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' members: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' labels: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' org: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' id: readOnly: true type: string @@ -10359,18 +10305,18 @@ components: type: string format: date-time cells: - $ref: "#/components/schemas/Cells" + $ref: '#/components/schemas/Cells' labels: - $ref: "#/components/schemas/Labels" + $ref: '#/components/schemas/Labels' Dashboards: type: object properties: links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' dashboards: type: array items: - $ref: "#/components/schemas/Dashboard" + $ref: '#/components/schemas/Dashboard' Source: type: object properties: @@ -10395,7 +10341,10 @@ components: type: string type: type: string - enum: ["v1", "v2", "self"] + enum: + - v1 + - v2 + - self url: type: string format: uri @@ -10436,7 +10385,7 @@ components: sources: type: array items: - $ref: "#/components/schemas/Source" + $ref: '#/components/schemas/Source' ScraperTargetRequest: type: object properties: @@ -10446,11 +10395,12 @@ components: type: type: string description: The type of the metrics to be parsed. - enum: [prometheus] + enum: + - prometheus url: type: string description: The URL of the metrics endpoint. - example: http://localhost:9090/metrics + example: 'http://localhost:9090/metrics' orgID: type: string description: The organization ID. @@ -10464,7 +10414,7 @@ components: ScraperTargetResponse: type: object allOf: - - $ref: "#/components/schemas/ScraperTargetRequest" + - $ref: '#/components/schemas/ScraperTargetRequest' - type: object properties: id: @@ -10480,29 +10430,29 @@ components: 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" + 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" + $ref: '#/components/schemas/Link' members: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' bucket: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' organization: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' ScraperTargetResponses: type: object properties: configurations: type: array items: - $ref: "#/components/schemas/ScraperTargetResponse" + $ref: '#/components/schemas/ScraperTargetResponse' DocumentMeta: type: object properties: @@ -10534,20 +10484,20 @@ components: type: string readOnly: true meta: - $ref: "#/components/schemas/DocumentMeta" + $ref: '#/components/schemas/DocumentMeta' content: type: object labels: - $ref: "#/components/schemas/Labels" + $ref: '#/components/schemas/Labels' links: type: object readOnly: true example: - self: "/api/v2/documents/templates/1" + self: /api/v2/documents/templates/1 properties: self: description: The document URL. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' required: - id - meta @@ -10556,7 +10506,7 @@ components: type: object properties: meta: - $ref: "#/components/schemas/DocumentMeta" + $ref: '#/components/schemas/DocumentMeta' content: type: object org: @@ -10577,7 +10527,7 @@ components: type: object properties: meta: - $ref: "#/components/schemas/DocumentMeta" + $ref: '#/components/schemas/DocumentMeta' content: type: object DocumentListEntry: @@ -10587,18 +10537,18 @@ components: type: string readOnly: true meta: - $ref: "#/components/schemas/DocumentMeta" + $ref: '#/components/schemas/DocumentMeta' labels: - $ref: "#/components/schemas/Labels" + $ref: '#/components/schemas/Labels' links: type: object readOnly: true example: - self: "/api/v2/documents/templates/1" + self: /api/v2/documents/templates/1 properties: self: description: The document URL. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' required: - id - meta @@ -10608,7 +10558,7 @@ components: documents: type: array items: - $ref: "#/components/schemas/DocumentListEntry" + $ref: '#/components/schemas/DocumentListEntry' TelegrafRequest: type: object properties: @@ -10629,19 +10579,19 @@ components: type: string TelegrafRequestPlugin: oneOf: - - $ref: "#/components/schemas/TelegrafPluginInputCpu" - - $ref: "#/components/schemas/TelegrafPluginInputDisk" - - $ref: "#/components/schemas/TelegrafPluginInputDiskio" - - $ref: "#/components/schemas/TelegrafPluginInputDocker" - - $ref: "#/components/schemas/TelegrafPluginInputFile" - - $ref: "#/components/schemas/TelegrafPluginInputKubernetes" - - $ref: "#/components/schemas/TelegrafPluginInputLogParser" - - $ref: "#/components/schemas/TelegrafPluginInputProcstat" - - $ref: "#/components/schemas/TelegrafPluginInputPrometheus" - - $ref: "#/components/schemas/TelegrafPluginInputRedis" - - $ref: "#/components/schemas/TelegrafPluginInputSyslog" - - $ref: "#/components/schemas/TelegrafPluginOutputFile" - - $ref: "#/components/schemas/TelegrafPluginOutputInfluxDBV2" + - $ref: '#/components/schemas/TelegrafPluginInputCpu' + - $ref: '#/components/schemas/TelegrafPluginInputDisk' + - $ref: '#/components/schemas/TelegrafPluginInputDiskio' + - $ref: '#/components/schemas/TelegrafPluginInputDocker' + - $ref: '#/components/schemas/TelegrafPluginInputFile' + - $ref: '#/components/schemas/TelegrafPluginInputKubernetes' + - $ref: '#/components/schemas/TelegrafPluginInputLogParser' + - $ref: '#/components/schemas/TelegrafPluginInputProcstat' + - $ref: '#/components/schemas/TelegrafPluginInputPrometheus' + - $ref: '#/components/schemas/TelegrafPluginInputRedis' + - $ref: '#/components/schemas/TelegrafPluginInputSyslog' + - $ref: '#/components/schemas/TelegrafPluginOutputFile' + - $ref: '#/components/schemas/TelegrafPluginOutputInfluxDBV2' TelegrafPluginInputCpu: type: object required: @@ -10650,10 +10600,12 @@ components: properties: name: type: string - enum: ["cpu"] + enum: + - cpu type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputDisk: @@ -10664,10 +10616,12 @@ components: properties: name: type: string - enum: ["disk"] + enum: + - disk type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputDiskio: @@ -10678,10 +10632,12 @@ components: properties: name: type: string - enum: ["diskio"] + enum: + - diskio type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputDocker: @@ -10693,14 +10649,16 @@ components: properties: name: type: string - enum: ["docker"] + enum: + - docker type: type: string - enum: ["input"] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputDockerConfig" + $ref: '#/components/schemas/TelegrafPluginInputDockerConfig' TelegrafPluginInputFile: type: object required: @@ -10710,14 +10668,16 @@ components: properties: name: type: string - enum: ["file"] + enum: + - file type: type: string - enum: [input] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputFileConfig" + $ref: '#/components/schemas/TelegrafPluginInputFileConfig' TelegrafPluginInputKernel: type: object required: @@ -10726,10 +10686,12 @@ components: properties: name: type: string - enum: ["kernel"] + enum: + - kernel type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputKubernetes: @@ -10741,14 +10703,16 @@ components: properties: name: type: string - enum: ["kubernetes"] + enum: + - kubernetes type: type: string - enum: ["input"] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputKubernetesConfig" + $ref: '#/components/schemas/TelegrafPluginInputKubernetesConfig' TelegrafPluginInputLogParser: type: object required: @@ -10758,14 +10722,16 @@ components: properties: name: type: string - enum: ["logparser"] + enum: + - logparser type: type: string - enum: ["input"] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputLogParserConfig" + $ref: '#/components/schemas/TelegrafPluginInputLogParserConfig' TelegrafPluginInputMem: type: object required: @@ -10774,10 +10740,12 @@ components: properties: name: type: string - enum: ["mem"] + enum: + - mem type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputNetResponse: @@ -10788,10 +10756,12 @@ components: properties: name: type: string - enum: ["net_response"] + enum: + - net_response type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputNet: @@ -10802,10 +10772,12 @@ components: properties: name: type: string - enum: ["net"] + enum: + - net type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputNginx: @@ -10816,10 +10788,12 @@ components: properties: name: type: string - enum: ["nginx"] + enum: + - nginx type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputProcesses: @@ -10830,10 +10804,12 @@ components: properties: name: type: string - enum: ["processes"] + enum: + - processes type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputProcstat: @@ -10845,14 +10821,16 @@ components: properties: name: type: string - enum: ["procstat"] + enum: + - procstat type: type: string - enum: ["input"] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputProcstatConfig" + $ref: '#/components/schemas/TelegrafPluginInputProcstatConfig' TelegrafPluginInputPrometheus: type: object required: @@ -10862,14 +10840,16 @@ components: properties: name: type: string - enum: ["prometheus"] + enum: + - prometheus type: type: string - enum: ["input"] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputPrometheusConfig" + $ref: '#/components/schemas/TelegrafPluginInputPrometheusConfig' TelegrafPluginInputRedis: type: object required: @@ -10879,14 +10859,16 @@ components: properties: name: type: string - enum: ["redis"] + enum: + - redis type: type: string - enum: ["input"] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputRedisConfig" + $ref: '#/components/schemas/TelegrafPluginInputRedisConfig' TelegrafPluginInputSyslog: type: object required: @@ -10896,14 +10878,16 @@ components: properties: name: type: string - enum: ["syslog"] + enum: + - syslog type: type: string - enum: ["input"] + enum: + - input comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginInputSyslogConfig" + $ref: '#/components/schemas/TelegrafPluginInputSyslogConfig' TelegrafPluginInputSwap: type: object required: @@ -10912,10 +10896,12 @@ components: properties: name: type: string - enum: ["swap"] + enum: + - swap type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputSystem: @@ -10926,10 +10912,12 @@ components: properties: name: type: string - enum: ["system"] + enum: + - system type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginInputTail: @@ -10940,10 +10928,12 @@ components: properties: name: type: string - enum: ["tail"] + enum: + - tail type: type: string - enum: ["input"] + enum: + - input comment: type: string TelegrafPluginOutputFile: @@ -10955,14 +10945,16 @@ components: properties: name: type: string - enum: ["file"] + enum: + - file type: type: string - enum: ["output"] + enum: + - output comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginOutputFileConfig" + $ref: '#/components/schemas/TelegrafPluginOutputFileConfig' TelegrafPluginOutputInfluxDBV2: type: object required: @@ -10972,18 +10964,20 @@ components: properties: name: type: string - enum: ["influxdb_v2"] + enum: + - influxdb_v2 type: type: string - enum: ["output"] + enum: + - output comment: type: string config: - $ref: "#/components/schemas/TelegrafPluginOutputInfluxDBV2Config" + $ref: '#/components/schemas/TelegrafPluginOutputInfluxDBV2Config' Telegraf: type: object allOf: - - $ref: "#/components/schemas/TelegrafRequest" + - $ref: '#/components/schemas/TelegrafRequest' - type: object properties: id: @@ -10993,29 +10987,29 @@ components: 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" + 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" + $ref: '#/components/schemas/Link' labels: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' members: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' labels: readOnly: true - $ref: "#/components/schemas/Labels" + $ref: '#/components/schemas/Labels' Telegrafs: type: object properties: configurations: type: array items: - $ref: "#/components/schemas/Telegraf" + $ref: '#/components/schemas/Telegraf' TelegrafPlugin: type: object properties: @@ -11037,7 +11031,7 @@ components: plugins: type: array items: - $ref: "#/components/schemas/TelegrafPlugin" + $ref: '#/components/schemas/TelegrafPlugin' TelegrafPluginInputDockerConfig: type: object required: @@ -11104,7 +11098,9 @@ components: properties: type: type: string - enum: [stdout, path] + enum: + - stdout + - path path: type: string TelegrafPluginOutputInfluxDBV2Config: @@ -11132,40 +11128,6 @@ components: allowed: description: True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. type: boolean - OnboardingRequest: - type: object - properties: - username: - type: string - password: - type: string - org: - type: string - bucket: - type: string - retentionPeriodSeconds: - type: integer - 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` - required: - - username - - org - - bucket - OnboardingResponse: - type: object - properties: - user: - $ref: "#/components/schemas/User" - org: - $ref: "#/components/schemas/Organization" - bucket: - $ref: "#/components/schemas/Bucket" - auth: - $ref: "#/components/schemas/Authorization" PasswordResetBody: properties: password: @@ -11191,10 +11153,10 @@ components: started: type: string format: date-time - example: "2019-03-13T10:09:33.891196-04:00" + example: '2019-03-13T10:09:33.891196-04:00' up: type: string - example: "14m45.911966424s" + example: 14m45.911966424s HealthCheck: type: object required: @@ -11208,7 +11170,7 @@ components: checks: type: array items: - $ref: "#/components/schemas/HealthCheck" + $ref: '#/components/schemas/HealthCheck' status: type: string enum: @@ -11221,7 +11183,7 @@ components: Labels: type: array items: - $ref: "#/components/schemas/Label" + $ref: '#/components/schemas/Label' Label: type: object properties: @@ -11238,10 +11200,14 @@ components: 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" } + example: + color: ffb3b3 + description: this is a description LabelCreateRequest: type: object - required: [orgID, name] + required: + - orgID + - name properties: orgID: type: string @@ -11252,7 +11218,9 @@ components: 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" } + example: + color: ffb3b3 + description: this is a description LabelUpdate: type: object properties: @@ -11263,7 +11231,9 @@ components: 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" } + example: + color: ffb3b3 + description: this is a description LabelMapping: type: object properties: @@ -11273,22 +11243,22 @@ components: type: object properties: labels: - $ref: "#/components/schemas/Labels" + $ref: '#/components/schemas/Labels' links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' LabelResponse: type: object properties: label: - $ref: "#/components/schemas/Label" + $ref: '#/components/schemas/Label' links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' ASTResponse: description: Contains the AST for the supplied Flux query type: object properties: ast: - $ref: "#/components/schemas/Package" + $ref: '#/components/schemas/Package' WritePrecision: type: string enum: @@ -11306,19 +11276,20 @@ components: description: The name of the organization that owns this Task. type: string status: - $ref: "#/components/schemas/TaskStatusType" + $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] + required: + - flux TaskUpdateRequest: type: object properties: status: - $ref: "#/components/schemas/TaskStatusType" + $ref: '#/components/schemas/TaskStatusType' flux: description: The Flux script to run for this task. type: string @@ -11356,29 +11327,29 @@ components: - inactive CheckDiscriminator: oneOf: - - $ref: "#/components/schemas/DeadmanCheck" - - $ref: "#/components/schemas/ThresholdCheck" - - $ref: "#/components/schemas/CustomCheck" + - $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" + deadman: ./DeadmanCheck.yml + threshold: ./ThresholdCheck.yml + custom: ./CustomCheck.yml Check: allOf: - - $ref: "#/components/schemas/CheckDiscriminator" + - $ref: '#/components/schemas/CheckDiscriminator' PostCheck: allOf: - - $ref: "#/components/schemas/CheckDiscriminator" + - $ref: '#/components/schemas/CheckDiscriminator' Checks: properties: checks: type: array items: - $ref: "#/components/schemas/Check" + $ref: '#/components/schemas/Check' links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' CheckBase: properties: id: @@ -11389,6 +11360,9 @@ components: 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 @@ -11402,14 +11376,14 @@ components: format: date-time readOnly: true query: - $ref: "#/components/schemas/DashboardQuery" + $ref: '#/components/schemas/DashboardQuery' status: - $ref: "#/components/schemas/TaskStatusType" + $ref: '#/components/schemas/TaskStatusType' description: description: An optional description of the check. type: string latestCompleted: - description: Timestamp of latest scheduled, completed run, RFC3339. + description: 'Timestamp of latest scheduled, completed run, RFC3339.' type: string format: date-time readOnly: true @@ -11424,51 +11398,56 @@ components: readOnly: true type: string labels: - $ref: "#/components/schemas/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" + 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" + $ref: '#/components/schemas/Link' labels: description: URL to retrieve labels for this check - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' members: description: URL to retrieve members for this check - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: description: URL to retrieve owners for this check - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' query: description: URL to retrieve flux script for this check - $ref: "#/components/schemas/Link" - required: [name, orgID, query] + $ref: '#/components/schemas/Link' + required: + - name + - orgID + - query ThresholdCheck: allOf: - - $ref: "#/components/schemas/CheckBase" + - $ref: '#/components/schemas/CheckBase' - type: object - required: [type] + required: + - type properties: type: type: string - enum: [threshold] + enum: + - threshold thresholds: type: array items: - $ref: "#/components/schemas/Threshold" + $ref: '#/components/schemas/Threshold' every: description: Check repetition interval. type: string offset: - description: Duration to delay after the schedule, before executing check. + description: 'Duration to delay after the schedule, before executing check.' type: string tags: description: List of tags to write to each status. @@ -11485,24 +11464,26 @@ components: type: string Threshold: oneOf: - - $ref: "#/components/schemas/GreaterThreshold" - - $ref: "#/components/schemas/LesserThreshold" - - $ref: "#/components/schemas/RangeThreshold" + - $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" + greater: ./GreaterThreshold.yml + lesser: ./LesserThreshold.yml + range: ./RangeThreshold.yml DeadmanCheck: allOf: - - $ref: "#/components/schemas/CheckBase" + - $ref: '#/components/schemas/CheckBase' - type: object - required: [type] + required: + - type properties: type: type: string - enum: [deadman] + enum: + - deadman timeSince: description: String duration before deadman triggers. type: string @@ -11510,15 +11491,15 @@ components: 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 + description: 'If only zero values reported since time, trigger an alert' type: boolean level: - $ref: "#/components/schemas/CheckStatusLevel" + $ref: '#/components/schemas/CheckStatusLevel' every: description: Check repetition interval. type: string offset: - description: Duration to delay after the schedule, before executing check. + description: 'Duration to delay after the schedule, before executing check.' type: string tags: description: List of tags to write to each status. @@ -11535,53 +11516,66 @@ components: type: string CustomCheck: allOf: - - $ref: "#/components/schemas/CheckBase" + - $ref: '#/components/schemas/CheckBase' - type: object properties: type: type: string - enum: [custom] - required: [type] + enum: + - custom + required: + - type ThresholdBase: properties: level: - $ref: "#/components/schemas/CheckStatusLevel" + $ref: '#/components/schemas/CheckStatusLevel' allValues: - description: If true, only alert if all values meet threshold. + description: 'If true, only alert if all values meet threshold.' type: boolean GreaterThreshold: allOf: - - $ref: "#/components/schemas/ThresholdBase" + - $ref: '#/components/schemas/ThresholdBase' - type: object - required: [type, value] + required: + - type + - value properties: type: type: string - enum: [greater] + enum: + - greater value: type: number format: float LesserThreshold: allOf: - - $ref: "#/components/schemas/ThresholdBase" + - $ref: '#/components/schemas/ThresholdBase' - type: object - required: [type, value] + required: + - type + - value properties: type: type: string - enum: [lesser] + enum: + - lesser value: type: number format: float RangeThreshold: allOf: - - $ref: "#/components/schemas/ThresholdBase" + - $ref: '#/components/schemas/ThresholdBase' - type: object - required: [type, min, max, within] + required: + - type + - min + - max + - within properties: type: type: string - enum: [range] + enum: + - range min: type: number format: float @@ -11593,11 +11587,22 @@ components: CheckStatusLevel: description: The state to record if check matches a criteria. type: string - enum: ["UNKNOWN", "OK", "INFO", "CRIT", "WARN"] + 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"] + enum: + - UNKNOWN + - OK + - INFO + - CRIT + - WARN + - ANY NotificationRuleUpdate: type: object properties: @@ -11612,33 +11617,33 @@ components: - inactive NotificationRuleDiscriminator: oneOf: - - $ref: "#/components/schemas/SlackNotificationRule" - - $ref: "#/components/schemas/SMTPNotificationRule" - - $ref: "#/components/schemas/PagerDutyNotificationRule" - - $ref: "#/components/schemas/HTTPNotificationRule" - - $ref: "#/components/schemas/TelegramNotificationRule" + - $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" + slack: ./SlackNotificationRule.yml + smtp: ./SMTPNotificationRule.yml + pagerduty: ./PagerDutyNotificationRule.yml + http: ./HTTPNotificationRule.yml + telegram: ./TelegramNotificationRule.yml NotificationRule: allOf: - - $ref: "#/components/schemas/NotificationRuleDiscriminator" + - $ref: '#/components/schemas/NotificationRuleDiscriminator' PostNotificationRule: allOf: - - $ref: "#/components/schemas/NotificationRuleDiscriminator" + - $ref: '#/components/schemas/NotificationRuleDiscriminator' NotificationRules: properties: notificationRules: type: array items: - $ref: "#/components/schemas/NotificationRule" + $ref: '#/components/schemas/NotificationRule' links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' NotificationRuleBase: type: object required: @@ -11651,7 +11656,7 @@ components: - endpointID properties: latestCompleted: - description: Timestamp of latest scheduled, completed run, RFC3339. + description: 'Timestamp of latest scheduled, completed run, RFC3339.' type: string format: date-time readOnly: true @@ -11673,6 +11678,9 @@ components: 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 @@ -11686,7 +11694,7 @@ components: format: date-time readOnly: true status: - $ref: "#/components/schemas/TaskStatusType" + $ref: '#/components/schemas/TaskStatusType' name: description: Human-readable name describing the notification rule. type: string @@ -11696,21 +11704,21 @@ components: description: The notification repetition interval. type: string offset: - description: Duration to delay after the schedule, before executing check. + 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. + description: 'Don''t notify me more than times every seconds. If set, limit cannot be empty.' type: integer limit: - description: Don't notify me more than times every seconds. If set, limitEvery cannot be empty. + description: 'Don''t notify me more than times every seconds. If set, limitEvery cannot be empty.' type: integer tagRules: description: List of tag rules the notification rule attempts to match. type: array items: - $ref: "#/components/schemas/TagRule" + $ref: '#/components/schemas/TagRule' description: description: An optional description of the notification rule. type: string @@ -11719,34 +11727,34 @@ components: type: array minItems: 1 items: - $ref: "#/components/schemas/StatusRule" + $ref: '#/components/schemas/StatusRule' labels: - $ref: "#/components/schemas/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" + 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" + $ref: '#/components/schemas/Link' labels: description: URL to retrieve labels for this notification rule. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' members: description: URL to retrieve members for this notification rule. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: description: URL to retrieve owners for this notification rule. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' query: description: URL to retrieve flux script for this notification rule. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' TagRule: type: object properties: @@ -11756,57 +11764,70 @@ components: type: string operator: type: string - enum: ["equal", "notequal", "equalregex", "notequalregex"] + enum: + - equal + - notequal + - equalregex + - notequalregex StatusRule: type: object properties: currentLevel: - $ref: "#/components/schemas/RuleStatusLevel" + $ref: '#/components/schemas/RuleStatusLevel' previousLevel: - $ref: "#/components/schemas/RuleStatusLevel" + $ref: '#/components/schemas/RuleStatusLevel' count: type: integer period: type: string HTTPNotificationRuleBase: type: object - required: [type] + required: + - type properties: type: type: string - enum: [http] + enum: + - http url: type: string HTTPNotificationRule: allOf: - - $ref: "#/components/schemas/NotificationRuleBase" - - $ref: "#/components/schemas/HTTPNotificationRuleBase" + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/HTTPNotificationRuleBase' SlackNotificationRuleBase: type: object - required: [type, messageTemplate] + required: + - type + - messageTemplate properties: type: type: string - enum: [slack] + enum: + - slack channel: type: string messageTemplate: type: string SlackNotificationRule: allOf: - - $ref: "#/components/schemas/NotificationRuleBase" - - $ref: "#/components/schemas/SlackNotificationRuleBase" + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/SlackNotificationRuleBase' SMTPNotificationRule: allOf: - - $ref: "#/components/schemas/NotificationRuleBase" - - $ref: "#/components/schemas/SMTPNotificationRuleBase" + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/SMTPNotificationRuleBase' SMTPNotificationRuleBase: type: object - required: [type, subjectTemplate, to] + required: + - type + - subjectTemplate + - to properties: type: type: string - enum: [smtp] + enum: + - smtp subjectTemplate: type: string bodyTemplate: @@ -11815,34 +11836,41 @@ components: type: string PagerDutyNotificationRule: allOf: - - $ref: "#/components/schemas/NotificationRuleBase" - - $ref: "#/components/schemas/PagerDutyNotificationRuleBase" + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/PagerDutyNotificationRuleBase' PagerDutyNotificationRuleBase: type: object - required: [type, messageTemplate] + required: + - type + - messageTemplate properties: type: type: string - enum: [pagerduty] + enum: + - pagerduty messageTemplate: type: string TelegramNotificationRule: allOf: - - $ref: "#/components/schemas/NotificationRuleBase" - - $ref: "#/components/schemas/TelegramNotificationRuleBase" + - $ref: '#/components/schemas/NotificationRuleBase' + - $ref: '#/components/schemas/TelegramNotificationRuleBase' TelegramNotificationRuleBase: type: object - required: [type, messageTemplate, channel] + required: + - type + - messageTemplate + - channel properties: type: description: The discriminator between other types of notification rules is "telegram". type: string - enum: [telegram] + 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" . + description: 'Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" .' type: string enum: - MarkdownV2 @@ -11853,7 +11881,6 @@ components: type: boolean NotificationEndpointUpdate: type: object - properties: name: type: string @@ -11866,34 +11893,36 @@ components: - inactive NotificationEndpointDiscrimator: oneOf: - - $ref: "#/components/schemas/SlackNotificationEndpoint" - - $ref: "#/components/schemas/PagerDutyNotificationEndpoint" - - $ref: "#/components/schemas/HTTPNotificationEndpoint" - - $ref: "#/components/schemas/TelegramNotificationEndpoint" + - $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" + slack: ./SlackNotificationEndpoint.yml + pagerduty: ./PagerDutyNotificationEndpoint.yml + http: ./HTTPNotificationEndpoint.yml + telegram: ./TelegramNotificationEndpoint.yml NotificationEndpoint: allOf: - - $ref: "#/components/schemas/NotificationEndpointDiscrimator" + - $ref: '#/components/schemas/NotificationEndpointDiscrimator' PostNotificationEndpoint: allOf: - - $ref: "#/components/schemas/NotificationEndpointDiscrimator" + - $ref: '#/components/schemas/NotificationEndpointDiscrimator' NotificationEndpoints: properties: notificationEndpoints: type: array items: - $ref: "#/components/schemas/NotificationEndpoint" + $ref: '#/components/schemas/NotificationEndpoint' links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' NotificationEndpointBase: type: object - required: [type, name] + required: + - type + - name properties: id: type: string @@ -11918,36 +11947,38 @@ components: description: The status of the endpoint. default: active type: string - enum: ["active", "inactive"] + enum: + - active + - inactive labels: - $ref: "#/components/schemas/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" + 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" + $ref: '#/components/schemas/Link' labels: description: URL to retrieve labels for this endpoint. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' members: description: URL to retrieve members for this endpoint. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' owners: description: URL to retrieve owners for this endpoint. - $ref: "#/components/schemas/Link" + $ref: '#/components/schemas/Link' type: - $ref: "#/components/schemas/NotificationEndpointType" + $ref: '#/components/schemas/NotificationEndpointType' SlackNotificationEndpoint: type: object allOf: - - $ref: "#/components/schemas/NotificationEndpointBase" + - $ref: '#/components/schemas/NotificationEndpointBase' - type: object properties: url: @@ -11959,9 +11990,10 @@ components: PagerDutyNotificationEndpoint: type: object allOf: - - $ref: "#/components/schemas/NotificationEndpointBase" + - $ref: '#/components/schemas/NotificationEndpointBase' - type: object - required: [routingKey] + required: + - routingKey properties: clientURL: type: string @@ -11970,9 +12002,12 @@ components: HTTPNotificationEndpoint: type: object allOf: - - $ref: "#/components/schemas/NotificationEndpointBase" + - $ref: '#/components/schemas/NotificationEndpointBase' - type: object - required: [url, authMethod, method] + required: + - url + - authMethod + - method properties: url: type: string @@ -11984,10 +12019,16 @@ components: type: string method: type: string - enum: ["POST", "GET", "PUT"] + enum: + - POST + - GET + - PUT authMethod: type: string - enum: ["none", "basic", "bearer"] + enum: + - none + - basic + - bearer contentTemplate: type: string headers: @@ -11998,19 +12039,25 @@ components: TelegramNotificationEndpoint: type: object allOf: - - $ref: "#/components/schemas/NotificationEndpointBase" + - $ref: '#/components/schemas/NotificationEndpointBase' - type: object - required: [token, channel] + required: + - token + - channel properties: token: - description: Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot . + description: 'Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot .' type: string channel: - description: ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage . + description: 'ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage .' type: string NotificationEndpointType: type: string - enum: ["slack", "pagerduty", "http", "telegram"] + enum: + - slack + - pagerduty + - http + - telegram DBRP: type: object properties: @@ -12037,24 +12084,24 @@ components: type: boolean description: Specify if this mapping represents the default retention policy for the database specificed. links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' oneOf: - required: - - orgID - - bucketID - - database - - retention_policy + - orgID + - bucketID + - database + - retention_policy - required: - - org - - bucketID - - database - - retention_policy + - org + - bucketID + - database + - retention_policy DBRPs: properties: content: type: array items: - $ref: "#/components/schemas/DBRP" + $ref: '#/components/schemas/DBRP' DBRPUpdate: properties: database: @@ -12066,7 +12113,279 @@ components: default: type: boolean links: - $ref: "#/components/schemas/Links" + $ref: '#/components/schemas/Links' + 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' + Permission: + required: + - action + - resource + properties: + action: + type: string + enum: + - read + - write + resource: + $ref: '#/components/schemas/Resource' + Resource: + type: object + required: + - type + properties: + type: + type: string + enum: + - authorizations + - buckets + - dashboards + - orgs + - sources + - tasks + - telegrafs + - users + - variables + - scrapers + - secrets + - labels + - views + - documents + - notificationRules + - notificationEndpoints + - checks + - dbrp + 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. + User: + 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 + required: + - name + Users: + type: object + 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 + 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` + 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' securitySchemes: BasicAuth: type: http From af76f83d757dedf702b8400adc467b452bf3c874 Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Sat, 24 Apr 2021 06:25:25 +0200 Subject: [PATCH 3/5] feat: regenerate APIs from swagger --- packages/apis/resources/operations.json | 4489 ++++++++--------- .../apis/src/generated/AuthorizationsAPI.ts | 3 - packages/apis/src/generated/MeAPI.ts | 4 +- packages/apis/src/generated/UsersAPI.ts | 60 +- packages/apis/src/generated/VariablesAPI.ts | 142 +- packages/apis/src/generated/types.ts | 535 +- 6 files changed, 2631 insertions(+), 2602 deletions(-) diff --git a/packages/apis/resources/operations.json b/packages/apis/resources/operations.json index b6c759bc9..36884eb01 100644 --- a/packages/apis/resources/operations.json +++ b/packages/apis/resources/operations.json @@ -132,129 +132,6 @@ } ] }, - { - "server": "/api/v2", - "path": "/setup", - "operation": "get", - "operationId": "GetSetup", - "basicAuth": false, - "summary": "Check if database has default user, org, bucket", - "positionalParams": [], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": null, - "responses": [ - { - "code": "200", - "description": "allowed true or false", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "IsOnboarding" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/setup", - "operation": "post", - "operationId": "PostSetup", - "basicAuth": false, - "summary": "Set up initial user, org and bucket", - "positionalParams": [], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "description": "Source to create", - "required": true, - "mediaType": "application/json", - "type": "OnboardingRequest" - }, - "responses": [ - { - "code": "201", - "description": "Created default user, bucket, org", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "OnboardingResponse" - } - ] - }, - { - "code": "default", - "description": "Unexpected error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/setup/user", - "operation": "post", - "operationId": "PostSetupUser", - "basicAuth": false, - "summary": "Set up a new user, org and bucket", - "positionalParams": [], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "description": "Source to create", - "required": true, - "mediaType": "application/json", - "type": "OnboardingRequest" - }, - "responses": [ - { - "code": "201", - "description": "Created default user, bucket, org", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "OnboardingResponse" - } - ] - }, - { - "code": "default", - "description": "Unexpected error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, { "server": "/api/v2", "path": "/documents/templates", @@ -2457,57 +2334,43 @@ }, { "server": "/api/v2", - "path": "/variables", + "path": "/variables/{variableID}/labels", "operation": "get", - "operationId": "GetVariables", + "operationId": "GetVariablesIDLabels", "basicAuth": false, - "summary": "Get all variables", - "positionalParams": [], - "headerParams": [ + "summary": "List all labels for a variable", + "positionalParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "variableID", + "description": "The variable ID.", + "required": true, "type": "string" } ], - "queryParams": [ - { - "name": "org", - "description": "The organization name.", - "type": "string" - }, + "headerParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], + "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "All variables for an organization", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Variables" - } - ] - }, - { - "code": "400", - "description": "Invalid request", + "description": "A list of all labels for a variable", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "LabelsResponse" } ] }, { "code": "default", - "description": "Internal server error", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -2519,12 +2382,19 @@ }, { "server": "/api/v2", - "path": "/variables", + "path": "/variables/{variableID}/labels", "operation": "post", - "operationId": "PostVariables", + "operationId": "PostVariablesIDLabels", "basicAuth": false, - "summary": "Create a variable", - "positionalParams": [], + "summary": "Add a label to a variable", + "positionalParams": [ + { + "name": "variableID", + "description": "The variable ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -2535,25 +2405,25 @@ ], "queryParams": [], "bodyParam": { - "description": "Variable to create", + "description": "Label to add", "required": true, "mediaType": "application/json", - "type": "Variable" + "type": "LabelMapping" }, "responses": [ { "code": "201", - "description": "Variable created", + "description": "The newly added label", "mediaTypes": [ { "mediaType": "application/json", - "type": "Variable" + "type": "LabelResponse" } ] }, { "code": "default", - "description": "Internal server error", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -2565,17 +2435,23 @@ }, { "server": "/api/v2", - "path": "/variables/{variableID}", - "operation": "get", - "operationId": "GetVariablesID", + "path": "/variables/{variableID}/labels/{labelID}", + "operation": "delete", + "operationId": "DeleteVariablesIDLabelsID", "basicAuth": false, - "summary": "Get a variable", + "summary": "Delete a label from a variable", "positionalParams": [ { "name": "variableID", "description": "The variable ID.", "required": true, "type": "string" + }, + { + "name": "labelID", + "description": "The label ID to delete.", + "required": true, + "type": "string" } ], "headerParams": [ @@ -2590,14 +2466,9 @@ "bodyParam": null, "responses": [ { - "code": "200", - "description": "Variable found", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Variable" - } - ] + "code": "204", + "description": "Delete has been accepted", + "mediaTypes": [] }, { "code": "404", @@ -2611,7 +2482,7 @@ }, { "code": "default", - "description": "Internal server error", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -2623,321 +2494,12 @@ }, { "server": "/api/v2", - "path": "/variables/{variableID}", - "operation": "put", - "operationId": "PutVariablesID", + "path": "/write", + "operation": "post", + "operationId": "PostWrite", "basicAuth": false, - "summary": "Replace a variable", - "positionalParams": [ - { - "name": "variableID", - "description": "The variable ID.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "description": "Variable to replace", - "required": true, - "mediaType": "application/json", - "type": "Variable" - }, - "responses": [ - { - "code": "200", - "description": "Variable updated", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Variable" - } - ] - }, - { - "code": "default", - "description": "Internal server error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/variables/{variableID}", - "operation": "patch", - "operationId": "PatchVariablesID", - "basicAuth": false, - "summary": "Update a variable", - "positionalParams": [ - { - "name": "variableID", - "description": "The variable ID.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "description": "Variable update to apply", - "required": true, - "mediaType": "application/json", - "type": "Variable" - }, - "responses": [ - { - "code": "200", - "description": "Variable updated", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Variable" - } - ] - }, - { - "code": "default", - "description": "Internal server error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/variables/{variableID}", - "operation": "delete", - "operationId": "DeleteVariablesID", - "basicAuth": false, - "summary": "Delete a variable", - "positionalParams": [ - { - "name": "variableID", - "description": "The variable ID.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": null, - "responses": [ - { - "code": "204", - "description": "Variable deleted", - "mediaTypes": [] - }, - { - "code": "default", - "description": "Internal server error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/variables/{variableID}/labels", - "operation": "get", - "operationId": "GetVariablesIDLabels", - "basicAuth": false, - "summary": "List all labels for a variable", - "positionalParams": [ - { - "name": "variableID", - "description": "The variable ID.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": null, - "responses": [ - { - "code": "200", - "description": "A list of all labels for a variable", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "LabelsResponse" - } - ] - }, - { - "code": "default", - "description": "Unexpected error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/variables/{variableID}/labels", - "operation": "post", - "operationId": "PostVariablesIDLabels", - "basicAuth": false, - "summary": "Add a label to a variable", - "positionalParams": [ - { - "name": "variableID", - "description": "The variable ID.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "description": "Label to add", - "required": true, - "mediaType": "application/json", - "type": "LabelMapping" - }, - "responses": [ - { - "code": "201", - "description": "The newly added label", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "LabelResponse" - } - ] - }, - { - "code": "default", - "description": "Unexpected error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/variables/{variableID}/labels/{labelID}", - "operation": "delete", - "operationId": "DeleteVariablesIDLabelsID", - "basicAuth": false, - "summary": "Delete a label from a variable", - "positionalParams": [ - { - "name": "variableID", - "description": "The variable ID.", - "required": true, - "type": "string" - }, - { - "name": "labelID", - "description": "The label ID to delete.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": null, - "responses": [ - { - "code": "204", - "description": "Delete has been accepted", - "mediaTypes": [] - }, - { - "code": "404", - "description": "Variable not found", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, - { - "code": "default", - "description": "Unexpected error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/write", - "operation": "post", - "operationId": "PostWrite", - "basicAuth": false, - "summary": "Write time series data into InfluxDB", - "positionalParams": [], + "summary": "Write time series data into InfluxDB", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -3116,129 +2678,37 @@ }, { "code": "400", - "description": "invalid request.", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, - { - "code": "403", - "description": "no token was sent or does not have sufficient permissions.", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, - { - "code": "404", - "description": "the bucket or organization is not found.", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, - { - "code": "default", - "description": "internal server error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/ready", - "operation": "get", - "operationId": "GetReady", - "basicAuth": false, - "summary": "Get the readiness of an instance at startup", - "positionalParams": [], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": null, - "responses": [ - { - "code": "200", - "description": "The instance is ready", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Ready" - } - ] - }, - { - "code": "default", - "description": "Unexpected error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - } - ] - }, - { - "server": "/api/v2", - "path": "/health", - "operation": "get", - "operationId": "GetHealth", - "basicAuth": false, - "summary": "Get the health of an instance", - "positionalParams": [], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": null, - "responses": [ + "description": "Invalid request.", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + }, { - "code": "200", - "description": "The instance is healthy", + "code": "403", + "description": "no token was sent or does not have sufficient permissions.", "mediaTypes": [ { "mediaType": "application/json", - "type": "HealthCheck" + "type": "Error" } ] }, { - "code": "503", - "description": "The instance is unhealthy", + "code": "404", + "description": "the bucket or organization is not found.", "mediaTypes": [ { "mediaType": "application/json", - "type": "HealthCheck" + "type": "Error" } ] }, { "code": "default", - "description": "Unexpected error", + "description": "internal server error", "mediaTypes": [ { "mediaType": "application/json", @@ -4981,7 +4451,242 @@ }, { "code": "default", - "description": "Unexpected error", + "description": "Unexpected error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/dashboards/{dashboardID}/owners/{userID}", + "operation": "delete", + "operationId": "DeleteDashboardsIDOwnersID", + "basicAuth": false, + "summary": "Remove an owner from a dashboard", + "positionalParams": [ + { + "name": "userID", + "description": "The ID of the owner to remove.", + "required": true, + "type": "string" + }, + { + "name": "dashboardID", + "description": "The dashboard ID.", + "required": true, + "type": "string" + } + ], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": null, + "responses": [ + { + "code": "204", + "description": "Owner removed", + "mediaTypes": [] + }, + { + "code": "default", + "description": "Unexpected error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/query/ast", + "operation": "post", + "operationId": "PostQueryAst", + "basicAuth": false, + "positionalParams": [], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + }, + { + "name": "Content-Type", + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "description": "Analyzed Flux query to generate abstract syntax tree.", + "required": false, + "mediaType": "application/json", + "type": "LanguageRequest" + }, + "responses": [ + { + "code": "200", + "description": "Abstract syntax tree of flux query.", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "ASTResponse" + } + ] + }, + { + "code": "default", + "description": "Any response other than 200 is an internal server error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/query/suggestions", + "operation": "get", + "operationId": "GetQuerySuggestions", + "basicAuth": false, + "positionalParams": [], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": null, + "responses": [ + { + "code": "200", + "description": "Suggestions for next functions in call chain", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "FluxSuggestions" + } + ] + }, + { + "code": "default", + "description": "Any response other than 200 is an internal server error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/query/suggestions/{name}", + "operation": "get", + "operationId": "GetQuerySuggestionsName", + "basicAuth": false, + "positionalParams": [ + { + "name": "name", + "description": "The name of the branching suggestion.", + "required": true, + "type": "string" + } + ], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": null, + "responses": [ + { + "code": "200", + "description": "Suggestions for next functions in call chain", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "FluxSuggestion" + } + ] + }, + { + "code": "default", + "description": "Any response other than 200 is an internal server error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/query/analyze", + "operation": "post", + "operationId": "PostQueryAnalyze", + "basicAuth": false, + "summary": "Analyze an InfluxQL or Flux query", + "positionalParams": [], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + }, + { + "name": "Content-Type", + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "description": "Flux or InfluxQL query to analyze", + "required": false, + "mediaType": "application/json", + "type": "Query" + }, + "responses": [ + { + "code": "200", + "description": "Query analyze results. Errors will be empty if the query is valid.", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "AnalyzeQueryResponse" + } + ] + }, + { + "code": "default", + "description": "Internal server error", "mediaTypes": [ { "mediaType": "application/json", @@ -4993,44 +4698,70 @@ }, { "server": "/api/v2", - "path": "/dashboards/{dashboardID}/owners/{userID}", - "operation": "delete", - "operationId": "DeleteDashboardsIDOwnersID", + "path": "/query", + "operation": "post", + "operationId": "PostQuery", "basicAuth": false, - "summary": "Remove an owner from a dashboard", - "positionalParams": [ + "summary": "Query InfluxDB", + "positionalParams": [], + "headerParams": [ { - "name": "userID", - "description": "The ID of the owner to remove.", - "required": true, + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" }, { - "name": "dashboardID", - "description": "The dashboard ID.", - "required": true, + "name": "Accept-Encoding", + "description": "The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.", + "type": "string" + }, + { + "name": "Content-Type", "type": "string" } ], - "headerParams": [ + "queryParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "org", + "description": "Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.", + "type": "string" + }, + { + "name": "orgID", + "description": "Specifies the ID of the organization executing the query. If both `orgID` and `org` are specified, `org` takes precedence.", "type": "string" } ], - "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Flux query or specification to execute", + "required": false, + "mediaType": "application/json", + "type": "Query | InfluxQLQuery" + }, "responses": [ { - "code": "204", - "description": "Owner removed", + "code": "200", + "description": "Query results", + "mediaTypes": [ + { + "mediaType": "text/csv", + "type": "string" + }, + { + "mediaType": "application/vnd.influx.arrow", + "type": "string" + } + ] + }, + { + "code": "429", + "description": "Token is temporarily over quota. The Retry-After header describes when to try the read again.", "mediaTypes": [] }, { "code": "default", - "description": "Unexpected error", + "description": "Error processing query", "mediaTypes": [ { "mediaType": "application/json", @@ -5042,10 +4773,11 @@ }, { "server": "/api/v2", - "path": "/query/ast", - "operation": "post", - "operationId": "PostQueryAst", + "path": "/buckets", + "operation": "get", + "operationId": "GetBuckets", "basicAuth": false, + "summary": "List all buckets", "positionalParams": [], "headerParams": [ { @@ -5053,33 +4785,56 @@ "description": "OpenTracing span context", "required": false, "type": "string" + } + ], + "queryParams": [ + { + "name": "offset", + "required": false, + "type": "number" + }, + { + "name": "limit", + "required": false, + "type": "number" + }, + { + "name": "after", + "description": "The last resource ID from which to seek from (but not including). This is to be used instead of `offset`.\n", + "required": false, + "type": "string" }, { - "name": "Content-Type", + "name": "org", + "description": "The organization name.", + "type": "string" + }, + { + "name": "orgID", + "description": "The organization ID.", + "type": "string" + }, + { + "name": "name", + "description": "Only returns buckets with a specific name.", "type": "string" } ], - "queryParams": [], - "bodyParam": { - "description": "Analyzed Flux query to generate abstract syntax tree.", - "required": false, - "mediaType": "application/json", - "type": "LanguageRequest" - }, + "bodyParam": null, "responses": [ { "code": "200", - "description": "Abstract syntax tree of flux query.", + "description": "A list of buckets", "mediaTypes": [ { "mediaType": "application/json", - "type": "ASTResponse" + "type": "Buckets" } ] }, { "code": "default", - "description": "Any response other than 200 is an internal server error", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -5091,10 +4846,11 @@ }, { "server": "/api/v2", - "path": "/query/suggestions", - "operation": "get", - "operationId": "GetQuerySuggestions", + "path": "/buckets", + "operation": "post", + "operationId": "PostBuckets", "basicAuth": false, + "summary": "Create a bucket", "positionalParams": [], "headerParams": [ { @@ -5105,21 +4861,36 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Bucket to create", + "required": true, + "mediaType": "application/json", + "type": "PostBucketRequest" + }, "responses": [ { - "code": "200", - "description": "Suggestions for next functions in call chain", + "code": "201", + "description": "Bucket created", "mediaTypes": [ { "mediaType": "application/json", - "type": "FluxSuggestions" + "type": "Bucket" + } + ] + }, + { + "code": "422", + "description": "Request body failed validation", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" } ] }, { "code": "default", - "description": "Any response other than 200 is an internal server error", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -5131,14 +4902,15 @@ }, { "server": "/api/v2", - "path": "/query/suggestions/{name}", + "path": "/buckets/{bucketID}", "operation": "get", - "operationId": "GetQuerySuggestionsName", + "operationId": "GetBucketsID", "basicAuth": false, + "summary": "Retrieve a bucket", "positionalParams": [ { - "name": "name", - "description": "The name of the branching suggestion.", + "name": "bucketID", + "description": "The bucket ID.", "required": true, "type": "string" } @@ -5156,17 +4928,17 @@ "responses": [ { "code": "200", - "description": "Suggestions for next functions in call chain", + "description": "Bucket details", "mediaTypes": [ { "mediaType": "application/json", - "type": "FluxSuggestion" + "type": "Bucket" } ] }, { "code": "default", - "description": "Any response other than 200 is an internal server error", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -5178,56 +4950,42 @@ }, { "server": "/api/v2", - "path": "/authorizations", - "operation": "get", - "operationId": "GetAuthorizations", + "path": "/buckets/{bucketID}", + "operation": "patch", + "operationId": "PatchBucketsID", "basicAuth": false, - "summary": "List all authorizations", - "positionalParams": [], - "headerParams": [ + "summary": "Update a bucket", + "positionalParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "bucketID", + "description": "The bucket ID.", + "required": true, "type": "string" } ], - "queryParams": [ - { - "name": "userID", - "description": "Only show authorizations that belong to a user ID.", - "type": "string" - }, - { - "name": "user", - "description": "Only show authorizations that belong to a user name.", - "type": "string" - }, - { - "name": "orgID", - "description": "Only show authorizations that belong to an organization ID.", - "type": "string" - }, - { - "name": "org", - "description": "Only show authorizations that belong to a organization name.", - "type": "string" - }, + "headerParams": [ { - "name": "token", - "description": "Find a token by value.", + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], - "bodyParam": null, + "queryParams": [], + "bodyParam": { + "description": "Bucket update to apply", + "required": true, + "mediaType": "application/json", + "type": "Bucket" + }, "responses": [ { "code": "200", - "description": "A list of authorizations", + "description": "An updated bucket", "mediaTypes": [ { "mediaType": "application/json", - "type": "Authorizations" + "type": "Bucket" } ] }, @@ -5245,12 +5003,19 @@ }, { "server": "/api/v2", - "path": "/authorizations", - "operation": "post", - "operationId": "PostAuthorizations", + "path": "/buckets/{bucketID}", + "operation": "delete", + "operationId": "DeleteBucketsID", "basicAuth": false, - "summary": "Create an authorization", - "positionalParams": [], + "summary": "Delete a bucket", + "positionalParams": [ + { + "name": "bucketID", + "description": "The ID of the bucket to delete.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -5260,26 +5025,16 @@ } ], "queryParams": [], - "bodyParam": { - "description": "Authorization to create", - "required": true, - "mediaType": "application/json", - "type": "Authorization" - }, + "bodyParam": null, "responses": [ { - "code": "201", - "description": "Authorization created", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Authorization" - } - ] + "code": "204", + "description": "Delete has been accepted", + "mediaTypes": [] }, { - "code": "400", - "description": "Invalid request", + "code": "404", + "description": "Bucket not found", "mediaTypes": [ { "mediaType": "application/json", @@ -5301,15 +5056,15 @@ }, { "server": "/api/v2", - "path": "/authorizations/{authID}", + "path": "/buckets/{bucketID}/labels", "operation": "get", - "operationId": "GetAuthorizationsID", + "operationId": "GetBucketsIDLabels", "basicAuth": false, - "summary": "Retrieve an authorization", + "summary": "List all labels for a bucket", "positionalParams": [ { - "name": "authID", - "description": "The ID of the authorization to get.", + "name": "bucketID", + "description": "The bucket ID.", "required": true, "type": "string" } @@ -5327,11 +5082,11 @@ "responses": [ { "code": "200", - "description": "Authorization details", + "description": "A list of all labels for a bucket", "mediaTypes": [ { "mediaType": "application/json", - "type": "Authorization" + "type": "LabelsResponse" } ] }, @@ -5349,15 +5104,15 @@ }, { "server": "/api/v2", - "path": "/authorizations/{authID}", - "operation": "patch", - "operationId": "PatchAuthorizationsID", + "path": "/buckets/{bucketID}/labels", + "operation": "post", + "operationId": "PostBucketsIDLabels", "basicAuth": false, - "summary": "Update an authorization to be active or inactive", + "summary": "Add a label to a bucket", "positionalParams": [ { - "name": "authID", - "description": "The ID of the authorization to update.", + "name": "bucketID", + "description": "The bucket ID.", "required": true, "type": "string" } @@ -5372,19 +5127,19 @@ ], "queryParams": [], "bodyParam": { - "description": "Authorization to update", + "description": "Label to add", "required": true, "mediaType": "application/json", - "type": "AuthorizationUpdateRequest" + "type": "LabelMapping" }, "responses": [ { - "code": "200", - "description": "The active or inactie authorization", + "code": "201", + "description": "The newly added label", "mediaTypes": [ { "mediaType": "application/json", - "type": "Authorization" + "type": "LabelResponse" } ] }, @@ -5402,15 +5157,21 @@ }, { "server": "/api/v2", - "path": "/authorizations/{authID}", + "path": "/buckets/{bucketID}/labels/{labelID}", "operation": "delete", - "operationId": "DeleteAuthorizationsID", + "operationId": "DeleteBucketsIDLabelsID", "basicAuth": false, - "summary": "Delete an authorization", + "summary": "Delete a label from a bucket", "positionalParams": [ { - "name": "authID", - "description": "The ID of the authorization to delete.", + "name": "bucketID", + "description": "The bucket ID.", + "required": true, + "type": "string" + }, + { + "name": "labelID", + "description": "The ID of the label to delete.", "required": true, "type": "string" } @@ -5428,9 +5189,19 @@ "responses": [ { "code": "204", - "description": "Authorization deleted", + "description": "Delete has been accepted", "mediaTypes": [] }, + { + "code": "404", + "description": "Bucket not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + }, { "code": "default", "description": "Unexpected error", @@ -5445,45 +5216,43 @@ }, { "server": "/api/v2", - "path": "/query/analyze", - "operation": "post", - "operationId": "PostQueryAnalyze", + "path": "/buckets/{bucketID}/members", + "operation": "get", + "operationId": "GetBucketsIDMembers", "basicAuth": false, - "summary": "Analyze an InfluxQL or Flux query", - "positionalParams": [], + "summary": "List all users with member privileges for a bucket", + "positionalParams": [ + { + "name": "bucketID", + "description": "The bucket ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", "description": "OpenTracing span context", "required": false, "type": "string" - }, - { - "name": "Content-Type", - "type": "string" } ], "queryParams": [], - "bodyParam": { - "description": "Flux or InfluxQL query to analyze", - "required": false, - "mediaType": "application/json", - "type": "Query" - }, + "bodyParam": null, "responses": [ { "code": "200", - "description": "Query analyze results. Errors will be empty if the query is valid.", + "description": "A list of bucket members", "mediaTypes": [ { "mediaType": "application/json", - "type": "AnalyzeQueryResponse" + "type": "ResourceMembers" } ] }, { "code": "default", - "description": "Internal server error", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -5495,70 +5264,48 @@ }, { "server": "/api/v2", - "path": "/query", + "path": "/buckets/{bucketID}/members", "operation": "post", - "operationId": "PostQuery", + "operationId": "PostBucketsIDMembers", "basicAuth": false, - "summary": "Query InfluxDB", - "positionalParams": [], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - }, - { - "name": "Accept-Encoding", - "description": "The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.", - "type": "string" - }, + "summary": "Add a member to a bucket", + "positionalParams": [ { - "name": "Content-Type", + "name": "bucketID", + "description": "The bucket ID.", + "required": true, "type": "string" } ], - "queryParams": [ - { - "name": "org", - "description": "Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.", - "type": "string" - }, + "headerParams": [ { - "name": "orgID", - "description": "Specifies the ID of the organization executing the query. If both `orgID` and `org` are specified, `org` takes precedence.", + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], + "queryParams": [], "bodyParam": { - "description": "Flux query or specification to execute", - "required": false, + "description": "User to add as member", + "required": true, "mediaType": "application/json", - "type": "Query | InfluxQLQuery" + "type": "AddResourceMemberRequestBody" }, "responses": [ { - "code": "200", - "description": "Query results", + "code": "201", + "description": "Member added to bucket", "mediaTypes": [ { - "mediaType": "text/csv", - "type": "string" - }, - { - "mediaType": "application/vnd.influx.arrow", - "type": "string" + "mediaType": "application/json", + "type": "ResourceMember" } ] }, - { - "code": "429", - "description": "Token is temporarily over quota. The Retry-After header describes when to try the read again.", - "mediaTypes": [] - }, { "code": "default", - "description": "Error processing query", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -5570,12 +5317,25 @@ }, { "server": "/api/v2", - "path": "/buckets", - "operation": "get", - "operationId": "GetBuckets", + "path": "/buckets/{bucketID}/members/{userID}", + "operation": "delete", + "operationId": "DeleteBucketsIDMembersID", "basicAuth": false, - "summary": "List all buckets", - "positionalParams": [], + "summary": "Remove a member from a bucket", + "positionalParams": [ + { + "name": "userID", + "description": "The ID of the member to remove.", + "required": true, + "type": "string" + }, + { + "name": "bucketID", + "description": "The bucket ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -5584,48 +5344,59 @@ "type": "string" } ], - "queryParams": [ - { - "name": "offset", - "required": false, - "type": "number" - }, - { - "name": "limit", - "required": false, - "type": "number" - }, + "queryParams": [], + "bodyParam": null, + "responses": [ { - "name": "after", - "description": "The last resource ID from which to seek from (but not including). This is to be used instead of `offset`.\n", - "required": false, - "type": "string" + "code": "204", + "description": "Member removed", + "mediaTypes": [] }, { - "name": "org", - "description": "The organization name.", - "type": "string" - }, + "code": "default", + "description": "Unexpected error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/buckets/{bucketID}/owners", + "operation": "get", + "operationId": "GetBucketsIDOwners", + "basicAuth": false, + "summary": "List all owners of a bucket", + "positionalParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "bucketID", + "description": "The bucket ID.", + "required": true, "type": "string" - }, + } + ], + "headerParams": [ { - "name": "name", - "description": "Only returns buckets with a specific name.", + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], + "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of buckets", + "description": "A list of bucket owners", "mediaTypes": [ { "mediaType": "application/json", - "type": "Buckets" + "type": "ResourceOwners" } ] }, @@ -5643,12 +5414,19 @@ }, { "server": "/api/v2", - "path": "/buckets", + "path": "/buckets/{bucketID}/owners", "operation": "post", - "operationId": "PostBuckets", + "operationId": "PostBucketsIDOwners", "basicAuth": false, - "summary": "Create a bucket", - "positionalParams": [], + "summary": "Add an owner to a bucket", + "positionalParams": [ + { + "name": "bucketID", + "description": "The bucket ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -5659,29 +5437,19 @@ ], "queryParams": [], "bodyParam": { - "description": "Bucket to create", + "description": "User to add as owner", "required": true, "mediaType": "application/json", - "type": "PostBucketRequest" + "type": "AddResourceMemberRequestBody" }, "responses": [ { "code": "201", - "description": "Bucket created", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Bucket" - } - ] - }, - { - "code": "422", - "description": "Request body failed validation", + "description": "Bucket owner added", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "ResourceOwner" } ] }, @@ -5699,12 +5467,18 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}", - "operation": "get", - "operationId": "GetBucketsID", + "path": "/buckets/{bucketID}/owners/{userID}", + "operation": "delete", + "operationId": "DeleteBucketsIDOwnersID", "basicAuth": false, - "summary": "Retrieve a bucket", + "summary": "Remove an owner from a bucket", "positionalParams": [ + { + "name": "userID", + "description": "The ID of the owner to remove.", + "required": true, + "type": "string" + }, { "name": "bucketID", "description": "The bucket ID.", @@ -5724,14 +5498,9 @@ "bodyParam": null, "responses": [ { - "code": "200", - "description": "Bucket details", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Bucket" - } - ] + "code": "204", + "description": "Owner removed", + "mediaTypes": [] }, { "code": "default", @@ -5747,42 +5516,61 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}", - "operation": "patch", - "operationId": "PatchBucketsID", + "path": "/orgs", + "operation": "get", + "operationId": "GetOrgs", "basicAuth": false, - "summary": "Update a bucket", - "positionalParams": [ + "summary": "List all organizations", + "positionalParams": [], + "headerParams": [ { - "name": "bucketID", - "description": "The bucket ID.", - "required": true, + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], - "headerParams": [ + "queryParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", + "name": "offset", + "required": false, + "type": "number" + }, + { + "name": "limit", + "required": false, + "type": "number" + }, + { + "name": "descending", "required": false, + "type": "any" + }, + { + "name": "org", + "description": "Filter organizations to a specific organization name.", + "type": "string" + }, + { + "name": "orgID", + "description": "Filter organizations to a specific organization ID.", + "type": "string" + }, + { + "name": "userID", + "description": "Filter organizations to a specific user ID.", "type": "string" } ], - "queryParams": [], - "bodyParam": { - "description": "Bucket update to apply", - "required": true, - "mediaType": "application/json", - "type": "Bucket" - }, + "bodyParam": null, "responses": [ { "code": "200", - "description": "An updated bucket", + "description": "A list of organizations", "mediaTypes": [ { "mediaType": "application/json", - "type": "Bucket" + "type": "Organizations" } ] }, @@ -5800,19 +5588,12 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}", - "operation": "delete", - "operationId": "DeleteBucketsID", + "path": "/orgs", + "operation": "post", + "operationId": "PostOrgs", "basicAuth": false, - "summary": "Delete a bucket", - "positionalParams": [ - { - "name": "bucketID", - "description": "The ID of the bucket to delete.", - "required": true, - "type": "string" - } - ], + "summary": "Create an organization", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -5822,20 +5603,20 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Organization to create", + "required": true, + "mediaType": "application/json", + "type": "Organization" + }, "responses": [ { - "code": "204", - "description": "Delete has been accepted", - "mediaTypes": [] - }, - { - "code": "404", - "description": "Bucket not found", + "code": "201", + "description": "Organization created", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "Organization" } ] }, @@ -5853,15 +5634,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/labels", + "path": "/orgs/{orgID}", "operation": "get", - "operationId": "GetBucketsIDLabels", + "operationId": "GetOrgsID", "basicAuth": false, - "summary": "List all labels for a bucket", + "summary": "Retrieve an organization", "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The ID of the organization to get.", "required": true, "type": "string" } @@ -5879,11 +5660,11 @@ "responses": [ { "code": "200", - "description": "A list of all labels for a bucket", + "description": "Organization details", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelsResponse" + "type": "Organization" } ] }, @@ -5901,15 +5682,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/labels", - "operation": "post", - "operationId": "PostBucketsIDLabels", + "path": "/orgs/{orgID}", + "operation": "patch", + "operationId": "PatchOrgsID", "basicAuth": false, - "summary": "Add a label to a bucket", + "summary": "Update an organization", "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The ID of the organization to get.", "required": true, "type": "string" } @@ -5924,19 +5705,19 @@ ], "queryParams": [], "bodyParam": { - "description": "Label to add", + "description": "Organization update to apply", "required": true, "mediaType": "application/json", - "type": "LabelMapping" + "type": "Organization" }, "responses": [ { - "code": "201", - "description": "The newly added label", + "code": "200", + "description": "Organization updated", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelResponse" + "type": "Organization" } ] }, @@ -5954,21 +5735,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/labels/{labelID}", + "path": "/orgs/{orgID}", "operation": "delete", - "operationId": "DeleteBucketsIDLabelsID", + "operationId": "DeleteOrgsID", "basicAuth": false, - "summary": "Delete a label from a bucket", + "summary": "Delete an organization", "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", - "required": true, - "type": "string" - }, - { - "name": "labelID", - "description": "The ID of the label to delete.", + "name": "orgID", + "description": "The ID of the organization to delete.", "required": true, "type": "string" } @@ -5991,7 +5766,7 @@ }, { "code": "404", - "description": "Bucket not found", + "description": "Organization not found", "mediaTypes": [ { "mediaType": "application/json", @@ -6013,15 +5788,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/members", + "path": "/orgs/{orgID}/secrets", "operation": "get", - "operationId": "GetBucketsIDMembers", + "operationId": "GetOrgsIDSecrets", "basicAuth": false, - "summary": "List all users with member privileges for a bucket", + "summary": "List all secret keys for an organization", "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The organization ID.", "required": true, "type": "string" } @@ -6039,11 +5814,11 @@ "responses": [ { "code": "200", - "description": "A list of bucket members", + "description": "A list of all secret keys", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceMembers" + "type": "SecretKeysResponse" } ] }, @@ -6061,15 +5836,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/members", - "operation": "post", - "operationId": "PostBucketsIDMembers", + "path": "/orgs/{orgID}/secrets", + "operation": "patch", + "operationId": "PatchOrgsIDSecrets", "basicAuth": false, - "summary": "Add a member to a bucket", + "summary": "Update secrets in an organization", "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The organization ID.", "required": true, "type": "string" } @@ -6084,21 +5859,16 @@ ], "queryParams": [], "bodyParam": { - "description": "User to add as member", + "description": "Secret key value pairs to update/add", "required": true, "mediaType": "application/json", - "type": "AddResourceMemberRequestBody" + "type": "Secrets" }, "responses": [ { - "code": "201", - "description": "Member added to bucket", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "ResourceMember" - } - ] + "code": "204", + "description": "Keys successfully patched", + "mediaTypes": [] }, { "code": "default", @@ -6114,21 +5884,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/members/{userID}", - "operation": "delete", - "operationId": "DeleteBucketsIDMembersID", + "path": "/orgs/{orgID}/secrets/delete", + "operation": "post", + "operationId": "PostOrgsIDSecrets", "basicAuth": false, - "summary": "Remove a member from a bucket", - "positionalParams": [ - { - "name": "userID", - "description": "The ID of the member to remove.", - "required": true, - "type": "string" - }, + "summary": "Delete secrets from an organization", + "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The organization ID.", "required": true, "type": "string" } @@ -6142,11 +5906,16 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Secret key to delete", + "required": true, + "mediaType": "application/json", + "type": "SecretKeys" + }, "responses": [ { "code": "204", - "description": "Member removed", + "description": "Keys successfully patched", "mediaTypes": [] }, { @@ -6163,15 +5932,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/owners", + "path": "/orgs/{orgID}/members", "operation": "get", - "operationId": "GetBucketsIDOwners", + "operationId": "GetOrgsIDMembers", "basicAuth": false, - "summary": "List all owners of a bucket", + "summary": "List all members of an organization", "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The organization ID.", "required": true, "type": "string" } @@ -6189,11 +5958,21 @@ "responses": [ { "code": "200", - "description": "A list of bucket owners", + "description": "A list of organization members", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceOwners" + "type": "ResourceMembers" + } + ] + }, + { + "code": "404", + "description": "Organization not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" } ] }, @@ -6211,15 +5990,15 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/owners", + "path": "/orgs/{orgID}/members", "operation": "post", - "operationId": "PostBucketsIDOwners", + "operationId": "PostOrgsIDMembers", "basicAuth": false, - "summary": "Add an owner to a bucket", + "summary": "Add a member to an organization", "positionalParams": [ { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The organization ID.", "required": true, "type": "string" } @@ -6234,7 +6013,7 @@ ], "queryParams": [], "bodyParam": { - "description": "User to add as owner", + "description": "User to add as member", "required": true, "mediaType": "application/json", "type": "AddResourceMemberRequestBody" @@ -6242,11 +6021,11 @@ "responses": [ { "code": "201", - "description": "Bucket owner added", + "description": "Added to organization created", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceOwner" + "type": "ResourceMember" } ] }, @@ -6264,21 +6043,21 @@ }, { "server": "/api/v2", - "path": "/buckets/{bucketID}/owners/{userID}", + "path": "/orgs/{orgID}/members/{userID}", "operation": "delete", - "operationId": "DeleteBucketsIDOwnersID", + "operationId": "DeleteOrgsIDMembersID", "basicAuth": false, - "summary": "Remove an owner from a bucket", + "summary": "Remove a member from an organization", "positionalParams": [ { "name": "userID", - "description": "The ID of the owner to remove.", + "description": "The ID of the member to remove.", "required": true, "type": "string" }, { - "name": "bucketID", - "description": "The bucket ID.", + "name": "orgID", + "description": "The organization ID.", "required": true, "type": "string" } @@ -6296,7 +6075,7 @@ "responses": [ { "code": "204", - "description": "Owner removed", + "description": "Member removed", "mediaTypes": [] }, { @@ -6313,61 +6092,47 @@ }, { "server": "/api/v2", - "path": "/orgs", + "path": "/orgs/{orgID}/owners", "operation": "get", - "operationId": "GetOrgs", + "operationId": "GetOrgsIDOwners", "basicAuth": false, - "summary": "List all organizations", - "positionalParams": [], - "headerParams": [ + "summary": "List all owners of an organization", + "positionalParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "orgID", + "description": "The organization ID.", + "required": true, "type": "string" } ], - "queryParams": [ - { - "name": "offset", - "required": false, - "type": "number" - }, - { - "name": "limit", - "required": false, - "type": "number" - }, + "headerParams": [ { - "name": "descending", + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", "required": false, - "type": "any" - }, - { - "name": "org", - "description": "Filter organizations to a specific organization name.", - "type": "string" - }, - { - "name": "orgID", - "description": "Filter organizations to a specific organization ID.", - "type": "string" - }, - { - "name": "userID", - "description": "Filter organizations to a specific user ID.", "type": "string" } ], + "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of organizations", + "description": "A list of organization owners", "mediaTypes": [ { "mediaType": "application/json", - "type": "Organizations" + "type": "ResourceOwners" + } + ] + }, + { + "code": "404", + "description": "Organization not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" } ] }, @@ -6385,12 +6150,19 @@ }, { "server": "/api/v2", - "path": "/orgs", + "path": "/orgs/{orgID}/owners", "operation": "post", - "operationId": "PostOrgs", + "operationId": "PostOrgsIDOwners", "basicAuth": false, - "summary": "Create an organization", - "positionalParams": [], + "summary": "Add an owner to an organization", + "positionalParams": [ + { + "name": "orgID", + "description": "The organization ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -6401,19 +6173,19 @@ ], "queryParams": [], "bodyParam": { - "description": "Organization to create", + "description": "User to add as owner", "required": true, "mediaType": "application/json", - "type": "Organization" + "type": "AddResourceMemberRequestBody" }, "responses": [ { "code": "201", - "description": "Organization created", + "description": "Organization owner added", "mediaTypes": [ { "mediaType": "application/json", - "type": "Organization" + "type": "ResourceOwner" } ] }, @@ -6431,15 +6203,21 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}", - "operation": "get", - "operationId": "GetOrgsID", + "path": "/orgs/{orgID}/owners/{userID}", + "operation": "delete", + "operationId": "DeleteOrgsIDOwnersID", "basicAuth": false, - "summary": "Retrieve an organization", + "summary": "Remove an owner from an organization", "positionalParams": [ + { + "name": "userID", + "description": "The ID of the owner to remove.", + "required": true, + "type": "string" + }, { "name": "orgID", - "description": "The ID of the organization to get.", + "description": "The organization ID.", "required": true, "type": "string" } @@ -6456,14 +6234,9 @@ "bodyParam": null, "responses": [ { - "code": "200", - "description": "Organization details", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Organization" - } - ] + "code": "204", + "description": "Owner removed", + "mediaTypes": [] }, { "code": "default", @@ -6479,42 +6252,40 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}", - "operation": "patch", - "operationId": "PatchOrgsID", + "path": "/stacks", + "operation": "get", + "operationId": "ListStacks", "basicAuth": false, - "summary": "Update an organization", - "positionalParams": [ + "summary": "Grab a list of installed InfluxDB Templates", + "positionalParams": [], + "headerParams": [], + "queryParams": [ { "name": "orgID", - "description": "The ID of the organization to get.", + "description": "The organization id of the stacks", "required": true, "type": "string" - } - ], - "headerParams": [ + }, { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "name", + "description": "A collection of names to filter the list by.", + "type": "string" + }, + { + "name": "stackID", + "description": "A collection of stackIDs to filter the list by.", "type": "string" } ], - "queryParams": [], - "bodyParam": { - "description": "Organization update to apply", - "required": true, - "mediaType": "application/json", - "type": "Organization" - }, + "bodyParam": null, "responses": [ { "code": "200", - "description": "Organization updated", + "description": "Influx stacks found", "mediaTypes": [ { "mediaType": "application/json", - "type": "Organization" + "type": "{\n stacks?: Stack[];\n}" } ] }, @@ -6532,42 +6303,28 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}", - "operation": "delete", - "operationId": "DeleteOrgsID", + "path": "/stacks", + "operation": "post", + "operationId": "CreateStack", "basicAuth": false, - "summary": "Delete an organization", - "positionalParams": [ - { - "name": "orgID", - "description": "The ID of the organization to delete.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], + "summary": "Create a new stack", + "positionalParams": [], + "headerParams": [], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Stack to create.", + "required": true, + "mediaType": "application/json", + "type": "{\n orgID?: string;\n name?: string;\n description?: string;\n urls?: string[];\n}" + }, "responses": [ { - "code": "204", - "description": "Delete has been accepted", - "mediaTypes": [] - }, - { - "code": "404", - "description": "Organization not found", + "code": "201", + "description": "InfluxDB Stack created", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "Stack" } ] }, @@ -6585,37 +6342,30 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/secrets", + "path": "/stacks/{stack_id}", "operation": "get", - "operationId": "GetOrgsIDSecrets", + "operationId": "ReadStack", "basicAuth": false, - "summary": "List all secret keys for an organization", + "summary": "Grab a stack by its ID", "positionalParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "stack_id", + "description": "The stack id", "required": true, "type": "string" } ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], + "headerParams": [], "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of all secret keys", + "description": "Read an influx stack by ID", "mediaTypes": [ { "mediaType": "application/json", - "type": "SecretKeysResponse" + "type": "Stack" } ] }, @@ -6633,39 +6383,37 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/secrets", + "path": "/stacks/{stack_id}", "operation": "patch", - "operationId": "PatchOrgsIDSecrets", + "operationId": "UpdateStack", "basicAuth": false, - "summary": "Update secrets in an organization", + "summary": "Update an InfluxDB Stack", "positionalParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "stack_id", + "description": "The stack id", "required": true, "type": "string" } ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], + "headerParams": [], "queryParams": [], "bodyParam": { - "description": "Secret key value pairs to update/add", + "description": "Influx stack to update.", "required": true, "mediaType": "application/json", - "type": "Secrets" + "type": "{\n name?: string;\n description?: string;\n templateURLs?: string[];\n additionalResources?: Array<{\n resourceID: string;\n kind: string;\n templateMetaName?: string;\n}>;\n}" }, "responses": [ { - "code": "204", - "description": "Keys successfully patched", - "mediaTypes": [] + "code": "200", + "description": "Influx stack updated", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Stack" + } + ] }, { "code": "default", @@ -6681,38 +6429,33 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/secrets/delete", - "operation": "post", - "operationId": "PostOrgsIDSecrets", + "path": "/stacks/{stack_id}", + "operation": "delete", + "operationId": "DeleteStack", "basicAuth": false, - "summary": "Delete secrets from an organization", + "summary": "Delete a stack and remove all its associated resources", "positionalParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "stack_id", + "description": "The stack id", "required": true, "type": "string" } ], - "headerParams": [ + "headerParams": [], + "queryParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "orgID", + "description": "The organization id of the user", + "required": true, "type": "string" } ], - "queryParams": [], - "bodyParam": { - "description": "Secret key to delete", - "required": true, - "mediaType": "application/json", - "type": "SecretKeys" - }, + "bodyParam": null, "responses": [ { "code": "204", - "description": "Keys successfully patched", + "description": "Stack and all its associated resources are deleted", "mediaTypes": [] }, { @@ -6729,49 +6472,80 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/members", - "operation": "get", - "operationId": "GetOrgsIDMembers", + "path": "/stacks/{stack_id}/uninstall", + "operation": "post", + "operationId": "UninstallStack", "basicAuth": false, - "summary": "List all members of an organization", + "summary": "Uninstall an InfluxDB Stack", "positionalParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "stack_id", + "description": "The stack id", "required": true, "type": "string" } ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], + "headerParams": [], "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of organization members", + "description": "Influx stack uninstalled", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceMembers" + "type": "Stack" } ] }, { - "code": "404", - "description": "Organization not found", + "code": "default", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", "type": "Error" } ] + } + ] + }, + { + "server": "/api/v2", + "path": "/templates/apply", + "operation": "post", + "operationId": "ApplyTemplate", + "basicAuth": false, + "summary": "Apply or dry-run an InfluxDB Template", + "positionalParams": [], + "headerParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "mediaType": "application/json", + "type": "TemplateApply" + }, + "responses": [ + { + "code": "200", + "description": "Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources that do not exist at the time of the dry run.\n", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "TemplateSummary" + } + ] + }, + { + "code": "201", + "description": "Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before the package is applied with the changes the application will impose. This corresponds to `\"dryRun\": true`\n", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "TemplateSummary" + } + ] }, { "code": "default", @@ -6787,19 +6561,55 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/members", + "path": "/templates/export", "operation": "post", - "operationId": "PostOrgsIDMembers", + "operationId": "ExportTemplate", "basicAuth": false, - "summary": "Add a member to an organization", - "positionalParams": [ + "summary": "Export a new Influx Template", + "positionalParams": [], + "headerParams": [], + "queryParams": [], + "bodyParam": { + "description": "Export resources as an InfluxDB template.", + "required": false, + "mediaType": "application/json", + "type": "TemplateExportByID | TemplateExportByName" + }, + "responses": [ { - "name": "orgID", - "description": "The organization ID.", - "required": true, - "type": "string" + "code": "200", + "description": "InfluxDB template created", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Template" + }, + { + "mediaType": "application/x-yaml", + "type": "Template" + } + ] + }, + { + "code": "default", + "description": "Unexpected error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] } - ], + ] + }, + { + "server": "/api/v2", + "path": "/tasks", + "operation": "get", + "operationId": "GetTasks", + "basicAuth": false, + "summary": "List all tasks", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -6808,21 +6618,52 @@ "type": "string" } ], - "queryParams": [], - "bodyParam": { - "description": "User to add as member", - "required": true, - "mediaType": "application/json", - "type": "AddResourceMemberRequestBody" - }, + "queryParams": [ + { + "name": "name", + "description": "Returns task with a specific name.", + "type": "string" + }, + { + "name": "after", + "description": "Return tasks after a specified ID.", + "type": "string" + }, + { + "name": "user", + "description": "Filter tasks to a specific user ID.", + "type": "string" + }, + { + "name": "org", + "description": "Filter tasks to a specific organization name.", + "type": "string" + }, + { + "name": "orgID", + "description": "Filter tasks to a specific organization ID.", + "type": "string" + }, + { + "name": "status", + "description": "Filter tasks by a status--\"inactive\" or \"active\".", + "type": "string" + }, + { + "name": "limit", + "description": "The number of tasks to return", + "type": "number" + } + ], + "bodyParam": null, "responses": [ { - "code": "201", - "description": "Added to organization created", + "code": "200", + "description": "A list of tasks", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceMember" + "type": "Tasks" } ] }, @@ -6840,25 +6681,12 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/members/{userID}", - "operation": "delete", - "operationId": "DeleteOrgsIDMembersID", + "path": "/tasks", + "operation": "post", + "operationId": "PostTasks", "basicAuth": false, - "summary": "Remove a member from an organization", - "positionalParams": [ - { - "name": "userID", - "description": "The ID of the member to remove.", - "required": true, - "type": "string" - }, - { - "name": "orgID", - "description": "The organization ID.", - "required": true, - "type": "string" - } - ], + "summary": "Create a new task", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -6868,12 +6696,22 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Task to create", + "required": true, + "mediaType": "application/json", + "type": "TaskCreateRequest" + }, "responses": [ { - "code": "204", - "description": "Member removed", - "mediaTypes": [] + "code": "201", + "description": "Task created", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Task" + } + ] }, { "code": "default", @@ -6889,15 +6727,15 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/owners", + "path": "/tasks/{taskID}", "operation": "get", - "operationId": "GetOrgsIDOwners", + "operationId": "GetTasksID", "basicAuth": false, - "summary": "List all owners of an organization", + "summary": "Retrieve a task", "positionalParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "taskID", + "description": "The task ID.", "required": true, "type": "string" } @@ -6915,21 +6753,11 @@ "responses": [ { "code": "200", - "description": "A list of organization owners", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "ResourceOwners" - } - ] - }, - { - "code": "404", - "description": "Organization not found", + "description": "Task details", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "Task" } ] }, @@ -6947,15 +6775,15 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/owners", - "operation": "post", - "operationId": "PostOrgsIDOwners", + "path": "/tasks/{taskID}", + "operation": "patch", + "operationId": "PatchTasksID", "basicAuth": false, - "summary": "Add an owner to an organization", + "summary": "Update a task", "positionalParams": [ { - "name": "orgID", - "description": "The organization ID.", + "name": "taskID", + "description": "The task ID.", "required": true, "type": "string" } @@ -6970,19 +6798,19 @@ ], "queryParams": [], "bodyParam": { - "description": "User to add as owner", + "description": "Task update to apply", "required": true, "mediaType": "application/json", - "type": "AddResourceMemberRequestBody" + "type": "TaskUpdateRequest" }, "responses": [ { - "code": "201", - "description": "Organization owner added", + "code": "200", + "description": "Task updated", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceOwner" + "type": "Task" } ] }, @@ -7000,21 +6828,15 @@ }, { "server": "/api/v2", - "path": "/orgs/{orgID}/owners/{userID}", + "path": "/tasks/{taskID}", "operation": "delete", - "operationId": "DeleteOrgsIDOwnersID", + "operationId": "DeleteTasksID", "basicAuth": false, - "summary": "Remove an owner from an organization", + "summary": "Delete a task", "positionalParams": [ { - "name": "userID", - "description": "The ID of the owner to remove.", - "required": true, - "type": "string" - }, - { - "name": "orgID", - "description": "The organization ID.", + "name": "taskID", + "description": "The ID of the task to delete.", "required": true, "type": "string" } @@ -7032,7 +6854,7 @@ "responses": [ { "code": "204", - "description": "Owner removed", + "description": "Task deleted", "mediaTypes": [] }, { @@ -7049,28 +6871,46 @@ }, { "server": "/api/v2", - "path": "/stacks", + "path": "/tasks/{taskID}/runs", "operation": "get", - "operationId": "ListStacks", + "operationId": "GetTasksIDRuns", "basicAuth": false, - "summary": "Grab a list of installed InfluxDB Templates", - "positionalParams": [], - "headerParams": [], - "queryParams": [ + "summary": "List runs for a task", + "positionalParams": [ { - "name": "orgID", - "description": "The organization id of the stacks", + "name": "taskID", + "description": "The ID of the task to get runs for.", "required": true, "type": "string" + } + ], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], + "queryParams": [ + { + "name": "after", + "description": "Returns runs after a specific ID.", + "type": "string" }, { - "name": "name", - "description": "A collection of names to filter the list by.", + "name": "limit", + "description": "The number of runs to return", + "type": "number" + }, + { + "name": "afterTime", + "description": "Filter runs to those scheduled after this time, RFC3339", "type": "string" }, { - "name": "stackID", - "description": "A collection of stackIDs to filter the list by.", + "name": "beforeTime", + "description": "Filter runs to those scheduled before this time, RFC3339", "type": "string" } ], @@ -7078,11 +6918,11 @@ "responses": [ { "code": "200", - "description": "Influx stacks found", + "description": "A list of task runs", "mediaTypes": [ { "mediaType": "application/json", - "type": "{\n stacks?: Stack[];\n}" + "type": "Runs" } ] }, @@ -7100,28 +6940,40 @@ }, { "server": "/api/v2", - "path": "/stacks", + "path": "/tasks/{taskID}/runs", "operation": "post", - "operationId": "CreateStack", + "operationId": "PostTasksIDRuns", "basicAuth": false, - "summary": "Create a new stack", - "positionalParams": [], - "headerParams": [], + "summary": "Manually start a task run, overriding the current schedule", + "positionalParams": [ + { + "name": "taskID", + "required": true, + "type": "string" + } + ], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], "queryParams": [], "bodyParam": { - "description": "Stack to create.", - "required": true, + "required": false, "mediaType": "application/json", - "type": "{\n orgID?: string;\n name?: string;\n description?: string;\n urls?: string[];\n}" + "type": "RunManually" }, "responses": [ { "code": "201", - "description": "InfluxDB Stack created", + "description": "Run scheduled to start", "mediaTypes": [ { "mediaType": "application/json", - "type": "Stack" + "type": "Run" } ] }, @@ -7139,76 +6991,43 @@ }, { "server": "/api/v2", - "path": "/stacks/{stack_id}", + "path": "/tasks/{taskID}/runs/{runID}", "operation": "get", - "operationId": "ReadStack", + "operationId": "GetTasksIDRunsID", "basicAuth": false, - "summary": "Grab a stack by its ID", + "summary": "Retrieve a single run for a task", "positionalParams": [ { - "name": "stack_id", - "description": "The stack id", + "name": "taskID", + "description": "The task ID.", "required": true, "type": "string" - } - ], - "headerParams": [], - "queryParams": [], - "bodyParam": null, - "responses": [ - { - "code": "200", - "description": "Read an influx stack by ID", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Stack" - } - ] }, { - "code": "default", - "description": "Unexpected error", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] + "name": "runID", + "description": "The run ID.", + "required": true, + "type": "string" } - ] - }, - { - "server": "/api/v2", - "path": "/stacks/{stack_id}", - "operation": "patch", - "operationId": "UpdateStack", - "basicAuth": false, - "summary": "Update an InfluxDB Stack", - "positionalParams": [ + ], + "headerParams": [ { - "name": "stack_id", - "description": "The stack id", - "required": true, + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], - "headerParams": [], - "queryParams": [], - "bodyParam": { - "description": "Influx stack to update.", - "required": true, - "mediaType": "application/json", - "type": "{\n name?: string;\n description?: string;\n templateURLs?: string[];\n additionalResources?: Array<{\n resourceID: string;\n kind: string;\n templateMetaName?: string;\n}>;\n}" - }, + "queryParams": [], + "bodyParam": null, "responses": [ { "code": "200", - "description": "Influx stack updated", + "description": "The run record", "mediaTypes": [ { "mediaType": "application/json", - "type": "Stack" + "type": "Run" } ] }, @@ -7226,33 +7045,39 @@ }, { "server": "/api/v2", - "path": "/stacks/{stack_id}", + "path": "/tasks/{taskID}/runs/{runID}", "operation": "delete", - "operationId": "DeleteStack", + "operationId": "DeleteTasksIDRunsID", "basicAuth": false, - "summary": "Delete a stack and remove all its associated resources", + "summary": "Cancel a running task", "positionalParams": [ { - "name": "stack_id", - "description": "The stack id", + "name": "taskID", + "description": "The task ID.", + "required": true, + "type": "string" + }, + { + "name": "runID", + "description": "The run ID.", "required": true, "type": "string" } ], - "headerParams": [], - "queryParams": [ + "headerParams": [ { - "name": "orgID", - "description": "The organization id of the user", - "required": true, + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], + "queryParams": [], "bodyParam": null, "responses": [ { "code": "204", - "description": "Stack and all its associated resources are deleted", + "description": "Delete has been accepted", "mediaTypes": [] }, { @@ -7269,30 +7094,43 @@ }, { "server": "/api/v2", - "path": "/stacks/{stack_id}/uninstall", + "path": "/tasks/{taskID}/runs/{runID}/retry", "operation": "post", - "operationId": "UninstallStack", + "operationId": "PostTasksIDRunsIDRetry", "basicAuth": false, - "summary": "Uninstall an InfluxDB Stack", + "summary": "Retry a task run", "positionalParams": [ { - "name": "stack_id", - "description": "The stack id", + "name": "taskID", + "description": "The task ID.", + "required": true, + "type": "string" + }, + { + "name": "runID", + "description": "The run ID.", "required": true, "type": "string" } ], - "headerParams": [], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "Influx stack uninstalled", + "description": "Run that has been queued", "mediaTypes": [ { "mediaType": "application/json", - "type": "Stack" + "type": "Run" } ] }, @@ -7310,37 +7148,37 @@ }, { "server": "/api/v2", - "path": "/templates/apply", - "operation": "post", - "operationId": "ApplyTemplate", + "path": "/tasks/{taskID}/logs", + "operation": "get", + "operationId": "GetTasksIDLogs", "basicAuth": false, - "summary": "Apply or dry-run an InfluxDB Template", - "positionalParams": [], - "headerParams": [], + "summary": "Retrieve all logs for a task", + "positionalParams": [ + { + "name": "taskID", + "description": "The task ID.", + "required": true, + "type": "string" + } + ], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], "queryParams": [], - "bodyParam": { - "required": true, - "mediaType": "application/json", - "type": "TemplateApply" - }, + "bodyParam": null, "responses": [ { "code": "200", - "description": "Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources that do not exist at the time of the dry run.\n", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "TemplateSummary" - } - ] - }, - { - "code": "201", - "description": "Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before the package is applied with the changes the application will impose. This corresponds to `\"dryRun\": true`\n", + "description": "All logs for a task", "mediaTypes": [ { "mediaType": "application/json", - "type": "TemplateSummary" + "type": "Logs" } ] }, @@ -7358,32 +7196,43 @@ }, { "server": "/api/v2", - "path": "/templates/export", - "operation": "post", - "operationId": "ExportTemplate", + "path": "/tasks/{taskID}/runs/{runID}/logs", + "operation": "get", + "operationId": "GetTasksIDRunsIDLogs", "basicAuth": false, - "summary": "Export a new Influx Template", - "positionalParams": [], - "headerParams": [], + "summary": "Retrieve all logs for a run", + "positionalParams": [ + { + "name": "taskID", + "description": "ID of task to get logs for.", + "required": true, + "type": "string" + }, + { + "name": "runID", + "description": "ID of run to get logs for.", + "required": true, + "type": "string" + } + ], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], "queryParams": [], - "bodyParam": { - "description": "Export resources as an InfluxDB template.", - "required": false, - "mediaType": "application/json", - "type": "TemplateExportByID | TemplateExportByName" - }, + "bodyParam": null, "responses": [ { "code": "200", - "description": "InfluxDB template created", + "description": "All logs for a run", "mediaTypes": [ { "mediaType": "application/json", - "type": "Template" - }, - { - "mediaType": "application/x-yaml", - "type": "Template" + "type": "Logs" } ] }, @@ -7401,12 +7250,19 @@ }, { "server": "/api/v2", - "path": "/tasks", + "path": "/tasks/{taskID}/labels", "operation": "get", - "operationId": "GetTasks", + "operationId": "GetTasksIDLabels", "basicAuth": false, - "summary": "List all tasks", - "positionalParams": [], + "summary": "List all labels for a task", + "positionalParams": [ + { + "name": "taskID", + "description": "The task ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -7415,52 +7271,69 @@ "type": "string" } ], - "queryParams": [ - { - "name": "name", - "description": "Returns task with a specific name.", - "type": "string" - }, - { - "name": "after", - "description": "Return tasks after a specified ID.", - "type": "string" - }, + "queryParams": [], + "bodyParam": null, + "responses": [ { - "name": "user", - "description": "Filter tasks to a specific user ID.", - "type": "string" + "code": "200", + "description": "A list of all labels for a task", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "LabelsResponse" + } + ] }, { - "name": "org", - "description": "Filter tasks to a specific organization name.", - "type": "string" - }, + "code": "default", + "description": "Unexpected error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/tasks/{taskID}/labels", + "operation": "post", + "operationId": "PostTasksIDLabels", + "basicAuth": false, + "summary": "Add a label to a task", + "positionalParams": [ { - "name": "orgID", - "description": "Filter tasks to a specific organization ID.", + "name": "taskID", + "description": "The task ID.", + "required": true, "type": "string" - }, + } + ], + "headerParams": [ { - "name": "status", - "description": "Filter tasks by a status--\"inactive\" or \"active\".", + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" - }, - { - "name": "limit", - "description": "The number of tasks to return", - "type": "number" } ], - "bodyParam": null, + "queryParams": [], + "bodyParam": { + "description": "Label to add", + "required": true, + "mediaType": "application/json", + "type": "LabelMapping" + }, "responses": [ { - "code": "200", - "description": "A list of tasks", + "code": "201", + "description": "A list of all labels for a task", "mediaTypes": [ { "mediaType": "application/json", - "type": "Tasks" + "type": "LabelResponse" } ] }, @@ -7477,13 +7350,26 @@ ] }, { - "server": "/api/v2", - "path": "/tasks", - "operation": "post", - "operationId": "PostTasks", + "server": "/api/v2", + "path": "/tasks/{taskID}/labels/{labelID}", + "operation": "delete", + "operationId": "DeleteTasksIDLabelsID", "basicAuth": false, - "summary": "Create a new task", - "positionalParams": [], + "summary": "Delete a label from a task", + "positionalParams": [ + { + "name": "taskID", + "description": "The task ID.", + "required": true, + "type": "string" + }, + { + "name": "labelID", + "description": "The label ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -7493,20 +7379,20 @@ } ], "queryParams": [], - "bodyParam": { - "description": "Task to create", - "required": true, - "mediaType": "application/json", - "type": "TaskCreateRequest" - }, + "bodyParam": null, "responses": [ { - "code": "201", - "description": "Task created", + "code": "204", + "description": "Delete has been accepted", + "mediaTypes": [] + }, + { + "code": "404", + "description": "Task not found", "mediaTypes": [ { "mediaType": "application/json", - "type": "Task" + "type": "Error" } ] }, @@ -7524,19 +7410,12 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}", + "path": "/flags", "operation": "get", - "operationId": "GetTasksID", + "operationId": "GetFlags", "basicAuth": false, - "summary": "Retrieve a task", - "positionalParams": [ - { - "name": "taskID", - "description": "The task ID.", - "required": true, - "type": "string" - } - ], + "summary": "Return the feature flags for the currently authenticated user", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -7550,11 +7429,11 @@ "responses": [ { "code": "200", - "description": "Task details", + "description": "Feature flags for the currently authenticated user", "mediaTypes": [ { "mediaType": "application/json", - "type": "Task" + "type": "Flags" } ] }, @@ -7572,19 +7451,12 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}", - "operation": "patch", - "operationId": "PatchTasksID", + "path": "/me", + "operation": "get", + "operationId": "GetMe", "basicAuth": false, - "summary": "Update a task", - "positionalParams": [ - { - "name": "taskID", - "description": "The task ID.", - "required": true, - "type": "string" - } - ], + "summary": "Return the current authenticated user", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -7594,20 +7466,15 @@ } ], "queryParams": [], - "bodyParam": { - "description": "Task update to apply", - "required": true, - "mediaType": "application/json", - "type": "TaskUpdateRequest" - }, + "bodyParam": null, "responses": [ { "code": "200", - "description": "Task updated", + "description": "Currently authenticated user", "mediaTypes": [ { "mediaType": "application/json", - "type": "Task" + "type": "UserResponse" } ] }, @@ -7625,19 +7492,12 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}", - "operation": "delete", - "operationId": "DeleteTasksID", - "basicAuth": false, - "summary": "Delete a task", - "positionalParams": [ - { - "name": "taskID", - "description": "The ID of the task to delete.", - "required": true, - "type": "string" - } - ], + "path": "/me/password", + "operation": "put", + "operationId": "PutMePassword", + "basicAuth": true, + "summary": "Update a password", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -7647,16 +7507,21 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "New password", + "required": true, + "mediaType": "application/json", + "type": "PasswordResetBody" + }, "responses": [ { "code": "204", - "description": "Task deleted", + "description": "Password successfully updated", "mediaTypes": [] }, { "code": "default", - "description": "Unexpected error", + "description": "Unsuccessful authentication", "mediaTypes": [ { "mediaType": "application/json", @@ -7668,15 +7533,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/runs", + "path": "/tasks/{taskID}/members", "operation": "get", - "operationId": "GetTasksIDRuns", + "operationId": "GetTasksIDMembers", "basicAuth": false, - "summary": "List runs for a task", + "summary": "List all task members", "positionalParams": [ { "name": "taskID", - "description": "The ID of the task to get runs for.", + "description": "The task ID.", "required": true, "type": "string" } @@ -7689,37 +7554,16 @@ "type": "string" } ], - "queryParams": [ - { - "name": "after", - "description": "Returns runs after a specific ID.", - "type": "string" - }, - { - "name": "limit", - "description": "The number of runs to return", - "type": "number" - }, - { - "name": "afterTime", - "description": "Filter runs to those scheduled after this time, RFC3339", - "type": "string" - }, - { - "name": "beforeTime", - "description": "Filter runs to those scheduled before this time, RFC3339", - "type": "string" - } - ], + "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of task runs", + "description": "A list of users who have member privileges for a task", "mediaTypes": [ { "mediaType": "application/json", - "type": "Runs" + "type": "ResourceMembers" } ] }, @@ -7737,14 +7581,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/runs", + "path": "/tasks/{taskID}/members", "operation": "post", - "operationId": "PostTasksIDRuns", + "operationId": "PostTasksIDMembers", "basicAuth": false, - "summary": "Manually start a task run, overriding the current schedule", + "summary": "Add a member to a task", "positionalParams": [ { "name": "taskID", + "description": "The task ID.", "required": true, "type": "string" } @@ -7759,18 +7604,19 @@ ], "queryParams": [], "bodyParam": { - "required": false, + "description": "User to add as member", + "required": true, "mediaType": "application/json", - "type": "RunManually" + "type": "AddResourceMemberRequestBody" }, "responses": [ { "code": "201", - "description": "Run scheduled to start", + "description": "Added to task members", "mediaTypes": [ { "mediaType": "application/json", - "type": "Run" + "type": "ResourceMember" } ] }, @@ -7788,21 +7634,21 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/runs/{runID}", - "operation": "get", - "operationId": "GetTasksIDRunsID", + "path": "/tasks/{taskID}/members/{userID}", + "operation": "delete", + "operationId": "DeleteTasksIDMembersID", "basicAuth": false, - "summary": "Retrieve a single run for a task", + "summary": "Remove a member from a task", "positionalParams": [ { - "name": "taskID", - "description": "The task ID.", + "name": "userID", + "description": "The ID of the member to remove.", "required": true, "type": "string" }, { - "name": "runID", - "description": "The run ID.", + "name": "taskID", + "description": "The task ID.", "required": true, "type": "string" } @@ -7819,14 +7665,9 @@ "bodyParam": null, "responses": [ { - "code": "200", - "description": "The run record", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Run" - } - ] + "code": "204", + "description": "Member removed", + "mediaTypes": [] }, { "code": "default", @@ -7842,23 +7683,17 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/runs/{runID}", - "operation": "delete", - "operationId": "DeleteTasksIDRunsID", + "path": "/tasks/{taskID}/owners", + "operation": "get", + "operationId": "GetTasksIDOwners", "basicAuth": false, - "summary": "Cancel a running task", + "summary": "List all owners of a task", "positionalParams": [ { "name": "taskID", "description": "The task ID.", "required": true, "type": "string" - }, - { - "name": "runID", - "description": "The run ID.", - "required": true, - "type": "string" } ], "headerParams": [ @@ -7873,9 +7708,14 @@ "bodyParam": null, "responses": [ { - "code": "204", - "description": "Delete has been accepted", - "mediaTypes": [] + "code": "200", + "description": "A list of users who have owner privileges for a task", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "ResourceOwners" + } + ] }, { "code": "default", @@ -7891,23 +7731,17 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/runs/{runID}/retry", + "path": "/tasks/{taskID}/owners", "operation": "post", - "operationId": "PostTasksIDRunsIDRetry", + "operationId": "PostTasksIDOwners", "basicAuth": false, - "summary": "Retry a task run", + "summary": "Add an owner to a task", "positionalParams": [ { "name": "taskID", "description": "The task ID.", "required": true, "type": "string" - }, - { - "name": "runID", - "description": "The run ID.", - "required": true, - "type": "string" } ], "headerParams": [ @@ -7919,15 +7753,20 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "User to add as owner", + "required": true, + "mediaType": "application/json", + "type": "AddResourceMemberRequestBody" + }, "responses": [ { - "code": "200", - "description": "Run that has been queued", + "code": "201", + "description": "Added to task owners", "mediaTypes": [ { "mediaType": "application/json", - "type": "Run" + "type": "ResourceOwner" } ] }, @@ -7945,12 +7784,18 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/logs", - "operation": "get", - "operationId": "GetTasksIDLogs", + "path": "/tasks/{taskID}/owners/{userID}", + "operation": "delete", + "operationId": "DeleteTasksIDOwnersID", "basicAuth": false, - "summary": "Retrieve all logs for a task", + "summary": "Remove an owner from a task", "positionalParams": [ + { + "name": "userID", + "description": "The ID of the owner to remove.", + "required": true, + "type": "string" + }, { "name": "taskID", "description": "The task ID.", @@ -7970,14 +7815,9 @@ "bodyParam": null, "responses": [ { - "code": "200", - "description": "All logs for a task", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Logs" - } - ] + "code": "204", + "description": "Owner removed", + "mediaTypes": [] }, { "code": "default", @@ -7993,21 +7833,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/runs/{runID}/logs", - "operation": "get", - "operationId": "GetTasksIDRunsIDLogs", - "basicAuth": false, - "summary": "Retrieve all logs for a run", + "path": "/users/{userID}/password", + "operation": "post", + "operationId": "PostUsersIDPassword", + "basicAuth": true, + "summary": "Update a password", "positionalParams": [ { - "name": "taskID", - "description": "ID of task to get logs for.", - "required": true, - "type": "string" - }, - { - "name": "runID", - "description": "ID of run to get logs for.", + "name": "userID", + "description": "The user ID.", "required": true, "type": "string" } @@ -8021,21 +7855,21 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "New password", + "required": true, + "mediaType": "application/json", + "type": "PasswordResetBody" + }, "responses": [ { - "code": "200", - "description": "All logs for a run", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Logs" - } - ] + "code": "204", + "description": "Password successfully updated", + "mediaTypes": [] }, { "code": "default", - "description": "Unexpected error", + "description": "Unsuccessful authentication", "mediaTypes": [ { "mediaType": "application/json", @@ -8047,37 +7881,47 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/labels", + "path": "/checks", "operation": "get", - "operationId": "GetTasksIDLabels", + "operationId": "GetChecks", "basicAuth": false, - "summary": "List all labels for a task", - "positionalParams": [ + "summary": "Get all checks", + "positionalParams": [], + "headerParams": [ { - "name": "taskID", - "description": "The task ID.", - "required": true, + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], - "headerParams": [ + "queryParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", + "name": "offset", "required": false, + "type": "number" + }, + { + "name": "limit", + "required": false, + "type": "number" + }, + { + "name": "orgID", + "description": "Only show checks that belong to a specific organization ID.", + "required": true, "type": "string" } ], - "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of all labels for a task", + "description": "A list of checks", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelsResponse" + "type": "Checks" } ] }, @@ -8095,42 +7939,28 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/labels", + "path": "/checks", "operation": "post", - "operationId": "PostTasksIDLabels", + "operationId": "CreateCheck", "basicAuth": false, - "summary": "Add a label to a task", - "positionalParams": [ - { - "name": "taskID", - "description": "The task ID.", - "required": true, - "type": "string" - } - ], - "headerParams": [ - { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, - "type": "string" - } - ], + "summary": "Add new check", + "positionalParams": [], + "headerParams": [], "queryParams": [], "bodyParam": { - "description": "Label to add", + "description": "Check to create", "required": true, "mediaType": "application/json", - "type": "LabelMapping" + "type": "PostCheck" }, "responses": [ { "code": "201", - "description": "A list of all labels for a task", + "description": "Check created", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelResponse" + "type": "Check" } ] }, @@ -8148,21 +7978,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/labels/{labelID}", - "operation": "delete", - "operationId": "DeleteTasksIDLabelsID", + "path": "/checks/{checkID}", + "operation": "get", + "operationId": "GetChecksID", "basicAuth": false, - "summary": "Delete a label from a task", + "summary": "Get a check", "positionalParams": [ { - "name": "taskID", - "description": "The task ID.", - "required": true, - "type": "string" - }, - { - "name": "labelID", - "description": "The label ID.", + "name": "checkID", + "description": "The check ID.", "required": true, "type": "string" } @@ -8179,17 +8003,12 @@ "bodyParam": null, "responses": [ { - "code": "204", - "description": "Delete has been accepted", - "mediaTypes": [] - }, - { - "code": "404", - "description": "Task not found", + "code": "200", + "description": "The check requested", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "Check" } ] }, @@ -8207,12 +8026,19 @@ }, { "server": "/api/v2", - "path": "/flags", - "operation": "get", - "operationId": "GetFlags", + "path": "/checks/{checkID}", + "operation": "put", + "operationId": "PutChecksID", "basicAuth": false, - "summary": "Return the feature flags for the currently authenticated user", - "positionalParams": [], + "summary": "Update a check", + "positionalParams": [ + { + "name": "checkID", + "description": "The check ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -8222,15 +8048,30 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Check update to apply", + "required": true, + "mediaType": "application/json", + "type": "Check" + }, "responses": [ { "code": "200", - "description": "Feature flags for the currently authenticated user", + "description": "An updated check", "mediaTypes": [ { "mediaType": "application/json", - "type": "Flags" + "type": "Check" + } + ] + }, + { + "code": "404", + "description": "The check was not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" } ] }, @@ -8248,12 +8089,19 @@ }, { "server": "/api/v2", - "path": "/me", - "operation": "get", - "operationId": "GetMe", + "path": "/checks/{checkID}", + "operation": "patch", + "operationId": "PatchChecksID", "basicAuth": false, - "summary": "Return the current authenticated user", - "positionalParams": [], + "summary": "Update a check", + "positionalParams": [ + { + "name": "checkID", + "description": "The check ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -8263,15 +8111,30 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Check update to apply", + "required": true, + "mediaType": "application/json", + "type": "CheckPatch" + }, "responses": [ { "code": "200", - "description": "Currently authenticated user", + "description": "An updated check", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Check" + } + ] + }, + { + "code": "404", + "description": "The check was not found", "mediaTypes": [ { "mediaType": "application/json", - "type": "User" + "type": "Error" } ] }, @@ -8289,12 +8152,19 @@ }, { "server": "/api/v2", - "path": "/me/password", - "operation": "put", - "operationId": "PutMePassword", - "basicAuth": true, - "summary": "Update a password", - "positionalParams": [], + "path": "/checks/{checkID}", + "operation": "delete", + "operationId": "DeleteChecksID", + "basicAuth": false, + "summary": "Delete a check", + "positionalParams": [ + { + "name": "checkID", + "description": "The check ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -8304,21 +8174,26 @@ } ], "queryParams": [], - "bodyParam": { - "description": "New password", - "required": true, - "mediaType": "application/json", - "type": "PasswordResetBody" - }, + "bodyParam": null, "responses": [ { "code": "204", - "description": "Password successfully updated", + "description": "Delete has been accepted", "mediaTypes": [] }, + { + "code": "404", + "description": "The check was not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + }, { "code": "default", - "description": "Unsuccessful authentication", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -8330,15 +8205,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/members", + "path": "/checks/{checkID}/labels", "operation": "get", - "operationId": "GetTasksIDMembers", + "operationId": "GetChecksIDLabels", "basicAuth": false, - "summary": "List all task members", + "summary": "List all labels for a check", "positionalParams": [ { - "name": "taskID", - "description": "The task ID.", + "name": "checkID", + "description": "The check ID.", "required": true, "type": "string" } @@ -8356,11 +8231,11 @@ "responses": [ { "code": "200", - "description": "A list of users who have member privileges for a task", + "description": "A list of all labels for a check", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceMembers" + "type": "LabelsResponse" } ] }, @@ -8378,15 +8253,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/members", + "path": "/checks/{checkID}/labels", "operation": "post", - "operationId": "PostTasksIDMembers", + "operationId": "PostChecksIDLabels", "basicAuth": false, - "summary": "Add a member to a task", + "summary": "Add a label to a check", "positionalParams": [ { - "name": "taskID", - "description": "The task ID.", + "name": "checkID", + "description": "The check ID.", "required": true, "type": "string" } @@ -8401,19 +8276,19 @@ ], "queryParams": [], "bodyParam": { - "description": "User to add as member", + "description": "Label to add", "required": true, "mediaType": "application/json", - "type": "AddResourceMemberRequestBody" + "type": "LabelMapping" }, "responses": [ { "code": "201", - "description": "Added to task members", + "description": "The label was added to the check", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceMember" + "type": "LabelResponse" } ] }, @@ -8431,21 +8306,21 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/members/{userID}", + "path": "/checks/{checkID}/labels/{labelID}", "operation": "delete", - "operationId": "DeleteTasksIDMembersID", + "operationId": "DeleteChecksIDLabelsID", "basicAuth": false, - "summary": "Remove a member from a task", + "summary": "Delete label from a check", "positionalParams": [ { - "name": "userID", - "description": "The ID of the member to remove.", + "name": "checkID", + "description": "The check ID.", "required": true, "type": "string" }, { - "name": "taskID", - "description": "The task ID.", + "name": "labelID", + "description": "The ID of the label to delete.", "required": true, "type": "string" } @@ -8463,9 +8338,19 @@ "responses": [ { "code": "204", - "description": "Member removed", + "description": "Delete has been accepted", "mediaTypes": [] }, + { + "code": "404", + "description": "Check or label not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + }, { "code": "default", "description": "Unexpected error", @@ -8480,15 +8365,122 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/owners", + "path": "/notificationRules", "operation": "get", - "operationId": "GetTasksIDOwners", + "operationId": "GetNotificationRules", "basicAuth": false, - "summary": "List all owners of a task", + "summary": "Get all notification rules", + "positionalParams": [], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], + "queryParams": [ + { + "name": "offset", + "required": false, + "type": "number" + }, + { + "name": "limit", + "required": false, + "type": "number" + }, + { + "name": "orgID", + "description": "Only show notification rules that belong to a specific organization ID.", + "required": true, + "type": "string" + }, + { + "name": "checkID", + "description": "Only show notifications that belong to the specific check ID.", + "type": "string" + }, + { + "name": "tag", + "description": "Only return notification rules that \"would match\" statuses which contain the tag key value pairs provided.", + "type": "string" + } + ], + "bodyParam": null, + "responses": [ + { + "code": "200", + "description": "A list of notification rules", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "NotificationRules" + } + ] + }, + { + "code": "default", + "description": "Unexpected error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/notificationRules", + "operation": "post", + "operationId": "CreateNotificationRule", + "basicAuth": false, + "summary": "Add a notification rule", + "positionalParams": [], + "headerParams": [], + "queryParams": [], + "bodyParam": { + "description": "Notification rule to create", + "required": true, + "mediaType": "application/json", + "type": "PostNotificationRule" + }, + "responses": [ + { + "code": "201", + "description": "Notification rule created", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "NotificationRule" + } + ] + }, + { + "code": "default", + "description": "Unexpected error", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/checks/{checkID}/query", + "operation": "get", + "operationId": "GetChecksIDQuery", + "basicAuth": false, + "summary": "Get a check query", "positionalParams": [ { - "name": "taskID", - "description": "The task ID.", + "name": "checkID", + "description": "The check ID.", "required": true, "type": "string" } @@ -8506,11 +8498,31 @@ "responses": [ { "code": "200", - "description": "A list of users who have owner privileges for a task", + "description": "The check query requested", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceOwners" + "type": "FluxResponse" + } + ] + }, + { + "code": "400", + "description": "Invalid request", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + }, + { + "code": "404", + "description": "Check not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" } ] }, @@ -8528,15 +8540,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/owners", - "operation": "post", - "operationId": "PostTasksIDOwners", + "path": "/notificationRules/{ruleID}", + "operation": "get", + "operationId": "GetNotificationRulesID", "basicAuth": false, - "summary": "Add an owner to a task", + "summary": "Get a notification rule", "positionalParams": [ { - "name": "taskID", - "description": "The task ID.", + "name": "ruleID", + "description": "The notification rule ID.", "required": true, "type": "string" } @@ -8550,20 +8562,15 @@ } ], "queryParams": [], - "bodyParam": { - "description": "User to add as owner", - "required": true, - "mediaType": "application/json", - "type": "AddResourceMemberRequestBody" - }, + "bodyParam": null, "responses": [ { - "code": "201", - "description": "Added to task owners", + "code": "200", + "description": "The notification rule requested", "mediaTypes": [ { "mediaType": "application/json", - "type": "ResourceOwner" + "type": "NotificationRule" } ] }, @@ -8581,21 +8588,15 @@ }, { "server": "/api/v2", - "path": "/tasks/{taskID}/owners/{userID}", - "operation": "delete", - "operationId": "DeleteTasksIDOwnersID", + "path": "/notificationRules/{ruleID}", + "operation": "put", + "operationId": "PutNotificationRulesID", "basicAuth": false, - "summary": "Remove an owner from a task", + "summary": "Update a notification rule", "positionalParams": [ { - "name": "userID", - "description": "The ID of the owner to remove.", - "required": true, - "type": "string" - }, - { - "name": "taskID", - "description": "The task ID.", + "name": "ruleID", + "description": "The notification rule ID.", "required": true, "type": "string" } @@ -8609,12 +8610,32 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Notification rule update to apply", + "required": true, + "mediaType": "application/json", + "type": "NotificationRule" + }, "responses": [ { - "code": "204", - "description": "Owner removed", - "mediaTypes": [] + "code": "200", + "description": "An updated notification rule", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "NotificationRule" + } + ] + }, + { + "code": "404", + "description": "The notification rule was not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] }, { "code": "default", @@ -8630,12 +8651,19 @@ }, { "server": "/api/v2", - "path": "/users", - "operation": "get", - "operationId": "GetUsers", + "path": "/notificationRules/{ruleID}", + "operation": "patch", + "operationId": "PatchNotificationRulesID", "basicAuth": false, - "summary": "List all users", - "positionalParams": [], + "summary": "Update a notification rule", + "positionalParams": [ + { + "name": "ruleID", + "description": "The notification rule ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -8645,15 +8673,30 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Notification rule update to apply", + "required": true, + "mediaType": "application/json", + "type": "NotificationRuleUpdate" + }, "responses": [ { "code": "200", - "description": "A list of users", + "description": "An updated notification rule", "mediaTypes": [ { "mediaType": "application/json", - "type": "Users" + "type": "NotificationRule" + } + ] + }, + { + "code": "404", + "description": "The notification rule was not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" } ] }, @@ -8671,12 +8714,19 @@ }, { "server": "/api/v2", - "path": "/users", - "operation": "post", - "operationId": "PostUsers", + "path": "/notificationRules/{ruleID}", + "operation": "delete", + "operationId": "DeleteNotificationRulesID", "basicAuth": false, - "summary": "Create a user", - "positionalParams": [], + "summary": "Delete a notification rule", + "positionalParams": [ + { + "name": "ruleID", + "description": "The notification rule ID.", + "required": true, + "type": "string" + } + ], "headerParams": [ { "name": "Zap-Trace-Span", @@ -8686,20 +8736,20 @@ } ], "queryParams": [], - "bodyParam": { - "description": "User to create", - "required": true, - "mediaType": "application/json", - "type": "User" - }, + "bodyParam": null, "responses": [ { - "code": "201", - "description": "User created", + "code": "204", + "description": "Delete has been accepted", + "mediaTypes": [] + }, + { + "code": "404", + "description": "The check was not found", "mediaTypes": [ { "mediaType": "application/json", - "type": "User" + "type": "Error" } ] }, @@ -8717,15 +8767,15 @@ }, { "server": "/api/v2", - "path": "/users/{userID}", + "path": "/notificationRules/{ruleID}/labels", "operation": "get", - "operationId": "GetUsersID", + "operationId": "GetNotificationRulesIDLabels", "basicAuth": false, - "summary": "Retrieve a user", + "summary": "List all labels for a notification rule", "positionalParams": [ { - "name": "userID", - "description": "The user ID.", + "name": "ruleID", + "description": "The notification rule ID.", "required": true, "type": "string" } @@ -8743,11 +8793,11 @@ "responses": [ { "code": "200", - "description": "User details", + "description": "A list of all labels for a notification rule", "mediaTypes": [ { "mediaType": "application/json", - "type": "User" + "type": "LabelsResponse" } ] }, @@ -8765,15 +8815,15 @@ }, { "server": "/api/v2", - "path": "/users/{userID}", - "operation": "patch", - "operationId": "PatchUsersID", + "path": "/notificationRules/{ruleID}/labels", + "operation": "post", + "operationId": "PostNotificationRuleIDLabels", "basicAuth": false, - "summary": "Update a user", + "summary": "Add a label to a notification rule", "positionalParams": [ { - "name": "userID", - "description": "The ID of the user to update.", + "name": "ruleID", + "description": "The notification rule ID.", "required": true, "type": "string" } @@ -8788,19 +8838,19 @@ ], "queryParams": [], "bodyParam": { - "description": "User update to apply", + "description": "Label to add", "required": true, "mediaType": "application/json", - "type": "User" + "type": "LabelMapping" }, "responses": [ { - "code": "200", - "description": "User updated", + "code": "201", + "description": "The label was added to the notification rule", "mediaTypes": [ { "mediaType": "application/json", - "type": "User" + "type": "LabelResponse" } ] }, @@ -8818,15 +8868,21 @@ }, { "server": "/api/v2", - "path": "/users/{userID}", + "path": "/notificationRules/{ruleID}/labels/{labelID}", "operation": "delete", - "operationId": "DeleteUsersID", + "operationId": "DeleteNotificationRulesIDLabelsID", "basicAuth": false, - "summary": "Delete a user", + "summary": "Delete label from a notification rule", "positionalParams": [ { - "name": "userID", - "description": "The ID of the user to delete.", + "name": "ruleID", + "description": "The notification rule ID.", + "required": true, + "type": "string" + }, + { + "name": "labelID", + "description": "The ID of the label to delete.", "required": true, "type": "string" } @@ -8844,9 +8900,19 @@ "responses": [ { "code": "204", - "description": "User deleted", + "description": "Delete has been accepted", "mediaTypes": [] }, + { + "code": "404", + "description": "Rule or label not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + }, { "code": "default", "description": "Unexpected error", @@ -8861,15 +8927,15 @@ }, { "server": "/api/v2", - "path": "/users/{userID}/password", - "operation": "post", - "operationId": "PostUsersIDPassword", - "basicAuth": true, - "summary": "Update a password", + "path": "/notificationRules/{ruleID}/query", + "operation": "get", + "operationId": "GetNotificationRulesIDQuery", + "basicAuth": false, + "summary": "Get a notification rule query", "positionalParams": [ { - "name": "userID", - "description": "The user ID.", + "name": "ruleID", + "description": "The notification rule ID.", "required": true, "type": "string" } @@ -8883,21 +8949,41 @@ } ], "queryParams": [], - "bodyParam": { - "description": "New password", - "required": true, - "mediaType": "application/json", - "type": "PasswordResetBody" - }, + "bodyParam": null, "responses": [ { - "code": "204", - "description": "Password successfully updated", - "mediaTypes": [] + "code": "200", + "description": "The notification rule query requested", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "FluxResponse" + } + ] + }, + { + "code": "400", + "description": "Invalid request", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] + }, + { + "code": "404", + "description": "Notification rule not found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Error" + } + ] }, { "code": "default", - "description": "Unsuccessful authentication", + "description": "Unexpected error", "mediaTypes": [ { "mediaType": "application/json", @@ -8909,11 +8995,11 @@ }, { "server": "/api/v2", - "path": "/checks", + "path": "/notificationEndpoints", "operation": "get", - "operationId": "GetChecks", + "operationId": "GetNotificationEndpoints", "basicAuth": false, - "summary": "Get all checks", + "summary": "Get all notification endpoints", "positionalParams": [], "headerParams": [ { @@ -8936,7 +9022,7 @@ }, { "name": "orgID", - "description": "Only show checks that belong to a specific organization ID.", + "description": "Only show notification endpoints that belong to specific organization ID.", "required": true, "type": "string" } @@ -8945,11 +9031,11 @@ "responses": [ { "code": "200", - "description": "A list of checks", + "description": "A list of notification endpoints", "mediaTypes": [ { "mediaType": "application/json", - "type": "Checks" + "type": "NotificationEndpoints" } ] }, @@ -8967,28 +9053,28 @@ }, { "server": "/api/v2", - "path": "/checks", + "path": "/notificationEndpoints", "operation": "post", - "operationId": "CreateCheck", + "operationId": "CreateNotificationEndpoint", "basicAuth": false, - "summary": "Add new check", + "summary": "Add a notification endpoint", "positionalParams": [], "headerParams": [], "queryParams": [], "bodyParam": { - "description": "Check to create", + "description": "Notification endpoint to create", "required": true, "mediaType": "application/json", - "type": "PostCheck" + "type": "PostNotificationEndpoint" }, "responses": [ { "code": "201", - "description": "Check created", + "description": "Notification endpoint created", "mediaTypes": [ { "mediaType": "application/json", - "type": "Check" + "type": "NotificationEndpoint" } ] }, @@ -9006,15 +9092,15 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}", + "path": "/notificationEndpoints/{endpointID}", "operation": "get", - "operationId": "GetChecksID", + "operationId": "GetNotificationEndpointsID", "basicAuth": false, - "summary": "Get a check", + "summary": "Get a notification endpoint", "positionalParams": [ { - "name": "checkID", - "description": "The check ID.", + "name": "endpointID", + "description": "The notification endpoint ID.", "required": true, "type": "string" } @@ -9032,11 +9118,11 @@ "responses": [ { "code": "200", - "description": "The check requested", + "description": "The notification endpoint requested", "mediaTypes": [ { "mediaType": "application/json", - "type": "Check" + "type": "NotificationEndpoint" } ] }, @@ -9054,15 +9140,15 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}", + "path": "/notificationEndpoints/{endpointID}", "operation": "put", - "operationId": "PutChecksID", + "operationId": "PutNotificationEndpointsID", "basicAuth": false, - "summary": "Update a check", + "summary": "Update a notification endpoint", "positionalParams": [ { - "name": "checkID", - "description": "The check ID.", + "name": "endpointID", + "description": "The notification endpoint ID.", "required": true, "type": "string" } @@ -9077,25 +9163,25 @@ ], "queryParams": [], "bodyParam": { - "description": "Check update to apply", + "description": "A new notification endpoint to replace the existing endpoint with", "required": true, "mediaType": "application/json", - "type": "Check" + "type": "NotificationEndpoint" }, "responses": [ { "code": "200", - "description": "An updated check", + "description": "An updated notification endpoint", "mediaTypes": [ { "mediaType": "application/json", - "type": "Check" + "type": "NotificationEndpoint" } ] }, { "code": "404", - "description": "The check was not found", + "description": "The notification endpoint was not found", "mediaTypes": [ { "mediaType": "application/json", @@ -9117,15 +9203,15 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}", + "path": "/notificationEndpoints/{endpointID}", "operation": "patch", - "operationId": "PatchChecksID", + "operationId": "PatchNotificationEndpointsID", "basicAuth": false, - "summary": "Update a check", + "summary": "Update a notification endpoint", "positionalParams": [ { - "name": "checkID", - "description": "The check ID.", + "name": "endpointID", + "description": "The notification endpoint ID.", "required": true, "type": "string" } @@ -9143,22 +9229,22 @@ "description": "Check update to apply", "required": true, "mediaType": "application/json", - "type": "CheckPatch" + "type": "NotificationEndpointUpdate" }, "responses": [ { "code": "200", - "description": "An updated check", + "description": "An updated notification endpoint", "mediaTypes": [ { "mediaType": "application/json", - "type": "Check" + "type": "NotificationEndpoint" } ] }, { "code": "404", - "description": "The check was not found", + "description": "The notification endpoint was not found", "mediaTypes": [ { "mediaType": "application/json", @@ -9180,15 +9266,15 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}", + "path": "/notificationEndpoints/{endpointID}", "operation": "delete", - "operationId": "DeleteChecksID", + "operationId": "DeleteNotificationEndpointsID", "basicAuth": false, - "summary": "Delete a check", + "summary": "Delete a notification endpoint", "positionalParams": [ { - "name": "checkID", - "description": "The check ID.", + "name": "endpointID", + "description": "The notification endpoint ID.", "required": true, "type": "string" } @@ -9211,7 +9297,7 @@ }, { "code": "404", - "description": "The check was not found", + "description": "The endpoint was not found", "mediaTypes": [ { "mediaType": "application/json", @@ -9233,15 +9319,15 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}/labels", + "path": "/notificationEndpoints/{endpointID}/labels", "operation": "get", - "operationId": "GetChecksIDLabels", + "operationId": "GetNotificationEndpointsIDLabels", "basicAuth": false, - "summary": "List all labels for a check", + "summary": "List all labels for a notification endpoint", "positionalParams": [ { - "name": "checkID", - "description": "The check ID.", + "name": "endpointID", + "description": "The notification endpoint ID.", "required": true, "type": "string" } @@ -9259,7 +9345,7 @@ "responses": [ { "code": "200", - "description": "A list of all labels for a check", + "description": "A list of all labels for a notification endpoint", "mediaTypes": [ { "mediaType": "application/json", @@ -9281,15 +9367,15 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}/labels", + "path": "/notificationEndpoints/{endpointID}/labels", "operation": "post", - "operationId": "PostChecksIDLabels", + "operationId": "PostNotificationEndpointIDLabels", "basicAuth": false, - "summary": "Add a label to a check", + "summary": "Add a label to a notification endpoint", "positionalParams": [ { - "name": "checkID", - "description": "The check ID.", + "name": "endpointID", + "description": "The notification endpoint ID.", "required": true, "type": "string" } @@ -9312,7 +9398,7 @@ "responses": [ { "code": "201", - "description": "The label was added to the check", + "description": "The label was added to the notification endpoint", "mediaTypes": [ { "mediaType": "application/json", @@ -9334,15 +9420,15 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}/labels/{labelID}", + "path": "/notificationEndpoints/{endpointID}/labels/{labelID}", "operation": "delete", - "operationId": "DeleteChecksIDLabelsID", + "operationId": "DeleteNotificationEndpointsIDLabelsID", "basicAuth": false, - "summary": "Delete label from a check", + "summary": "Delete a label from a notification endpoint", "positionalParams": [ { - "name": "checkID", - "description": "The check ID.", + "name": "endpointID", + "description": "The notification endpoint ID.", "required": true, "type": "string" }, @@ -9371,7 +9457,7 @@ }, { "code": "404", - "description": "Check or label not found", + "description": "Endpoint or label not found", "mediaTypes": [ { "mediaType": "application/json", @@ -9393,11 +9479,11 @@ }, { "server": "/api/v2", - "path": "/notificationRules", + "path": "/health", "operation": "get", - "operationId": "GetNotificationRules", + "operationId": "GetHealth", "basicAuth": false, - "summary": "Get all notification rules", + "summary": "Get the health of an instance", "positionalParams": [], "headerParams": [ { @@ -9407,43 +9493,26 @@ "type": "string" } ], - "queryParams": [ - { - "name": "offset", - "required": false, - "type": "number" - }, - { - "name": "limit", - "required": false, - "type": "number" - }, - { - "name": "orgID", - "description": "Only show notification rules that belong to a specific organization ID.", - "required": true, - "type": "string" - }, - { - "name": "checkID", - "description": "Only show notifications that belong to the specific check ID.", - "type": "string" - }, - { - "name": "tag", - "description": "Only return notification rules that \"would match\" statuses which contain the tag key value pairs provided.", - "type": "string" - } - ], + "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of notification rules", + "description": "The instance is healthy", "mediaTypes": [ { "mediaType": "application/json", - "type": "NotificationRules" + "type": "HealthCheck" + } + ] + }, + { + "code": "503", + "description": "The instance is unhealthy", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "HealthCheck" } ] }, @@ -9461,28 +9530,30 @@ }, { "server": "/api/v2", - "path": "/notificationRules", - "operation": "post", - "operationId": "CreateNotificationRule", + "path": "/ready", + "operation": "get", + "operationId": "GetReady", "basicAuth": false, - "summary": "Add a notification rule", + "summary": "Get the readiness of an instance at startup", "positionalParams": [], - "headerParams": [], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], "queryParams": [], - "bodyParam": { - "description": "Notification rule to create", - "required": true, - "mediaType": "application/json", - "type": "PostNotificationRule" - }, + "bodyParam": null, "responses": [ { - "code": "201", - "description": "Notification rule created", + "code": "200", + "description": "The instance is ready", "mediaTypes": [ { "mediaType": "application/json", - "type": "NotificationRule" + "type": "Ready" } ] }, @@ -9500,19 +9571,12 @@ }, { "server": "/api/v2", - "path": "/checks/{checkID}/query", + "path": "/users", "operation": "get", - "operationId": "GetChecksIDQuery", + "operationId": "GetUsers", "basicAuth": false, - "summary": "Get a check query", - "positionalParams": [ - { - "name": "checkID", - "description": "The check ID.", - "required": true, - "type": "string" - } - ], + "summary": "List all users", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -9526,31 +9590,11 @@ "responses": [ { "code": "200", - "description": "The check query requested", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "FluxResponse" - } - ] - }, - { - "code": "400", - "description": "Invalid request", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, - { - "code": "404", - "description": "Check not found", + "description": "A list of users", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "Users" } ] }, @@ -9568,19 +9612,12 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}", - "operation": "get", - "operationId": "GetNotificationRulesID", + "path": "/users", + "operation": "post", + "operationId": "PostUsers", "basicAuth": false, - "summary": "Get a notification rule", - "positionalParams": [ - { - "name": "ruleID", - "description": "The notification rule ID.", - "required": true, - "type": "string" - } - ], + "summary": "Create a user", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -9590,15 +9627,20 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "User to create", + "required": true, + "mediaType": "application/json", + "type": "User" + }, "responses": [ { - "code": "200", - "description": "The notification rule requested", + "code": "201", + "description": "User created", "mediaTypes": [ { "mediaType": "application/json", - "type": "NotificationRule" + "type": "UserResponse" } ] }, @@ -9616,15 +9658,15 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}", - "operation": "put", - "operationId": "PutNotificationRulesID", + "path": "/users/{userID}", + "operation": "get", + "operationId": "GetUsersID", "basicAuth": false, - "summary": "Update a notification rule", + "summary": "Retrieve a user", "positionalParams": [ { - "name": "ruleID", - "description": "The notification rule ID.", + "name": "userID", + "description": "The user ID.", "required": true, "type": "string" } @@ -9638,30 +9680,15 @@ } ], "queryParams": [], - "bodyParam": { - "description": "Notification rule update to apply", - "required": true, - "mediaType": "application/json", - "type": "NotificationRule" - }, - "responses": [ - { - "code": "200", - "description": "An updated notification rule", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "NotificationRule" - } - ] - }, + "bodyParam": null, + "responses": [ { - "code": "404", - "description": "The notification rule was not found", + "code": "200", + "description": "User details", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "UserResponse" } ] }, @@ -9679,15 +9706,15 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}", + "path": "/users/{userID}", "operation": "patch", - "operationId": "PatchNotificationRulesID", + "operationId": "PatchUsersID", "basicAuth": false, - "summary": "Update a notification rule", + "summary": "Update a user", "positionalParams": [ { - "name": "ruleID", - "description": "The notification rule ID.", + "name": "userID", + "description": "The ID of the user to update.", "required": true, "type": "string" } @@ -9702,29 +9729,19 @@ ], "queryParams": [], "bodyParam": { - "description": "Notification rule update to apply", + "description": "User update to apply", "required": true, "mediaType": "application/json", - "type": "NotificationRuleUpdate" + "type": "User" }, "responses": [ { "code": "200", - "description": "An updated notification rule", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "NotificationRule" - } - ] - }, - { - "code": "404", - "description": "The notification rule was not found", + "description": "User updated", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "UserResponse" } ] }, @@ -9742,15 +9759,15 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}", + "path": "/users/{userID}", "operation": "delete", - "operationId": "DeleteNotificationRulesID", + "operationId": "DeleteUsersID", "basicAuth": false, - "summary": "Delete a notification rule", + "summary": "Delete a user", "positionalParams": [ { - "name": "ruleID", - "description": "The notification rule ID.", + "name": "userID", + "description": "The ID of the user to delete.", "required": true, "type": "string" } @@ -9768,19 +9785,9 @@ "responses": [ { "code": "204", - "description": "Delete has been accepted", + "description": "User deleted", "mediaTypes": [] }, - { - "code": "404", - "description": "The check was not found", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, { "code": "default", "description": "Unexpected error", @@ -9795,19 +9802,43 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}/labels", + "path": "/setup", "operation": "get", - "operationId": "GetNotificationRulesIDLabels", + "operationId": "GetSetup", "basicAuth": false, - "summary": "List all labels for a notification rule", - "positionalParams": [ + "summary": "Check if database has default user, org, bucket", + "positionalParams": [], + "headerParams": [ { - "name": "ruleID", - "description": "The notification rule ID.", - "required": true, + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, "type": "string" } ], + "queryParams": [], + "bodyParam": null, + "responses": [ + { + "code": "200", + "description": "allowed true or false", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "IsOnboarding" + } + ] + } + ] + }, + { + "server": "/api/v2", + "path": "/setup", + "operation": "post", + "operationId": "PostSetup", + "basicAuth": false, + "summary": "Set up initial user, org and bucket", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -9817,15 +9848,20 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Source to create", + "required": true, + "mediaType": "application/json", + "type": "OnboardingRequest" + }, "responses": [ { - "code": "200", - "description": "A list of all labels for a notification rule", + "code": "201", + "description": "Created default user, bucket, org", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelsResponse" + "type": "OnboardingResponse" } ] }, @@ -9843,19 +9879,12 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}/labels", + "path": "/setup/user", "operation": "post", - "operationId": "PostNotificationRuleIDLabels", + "operationId": "PostSetupUser", "basicAuth": false, - "summary": "Add a label to a notification rule", - "positionalParams": [ - { - "name": "ruleID", - "description": "The notification rule ID.", - "required": true, - "type": "string" - } - ], + "summary": "Set up a new user, org and bucket", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -9866,19 +9895,19 @@ ], "queryParams": [], "bodyParam": { - "description": "Label to add", + "description": "Source to create", "required": true, "mediaType": "application/json", - "type": "LabelMapping" + "type": "OnboardingRequest" }, "responses": [ { "code": "201", - "description": "The label was added to the notification rule", + "description": "Created default user, bucket, org", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelResponse" + "type": "OnboardingResponse" } ] }, @@ -9896,48 +9925,51 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}/labels/{labelID}", - "operation": "delete", - "operationId": "DeleteNotificationRulesIDLabelsID", + "path": "/authorizations", + "operation": "get", + "operationId": "GetAuthorizations", "basicAuth": false, - "summary": "Delete label from a notification rule", - "positionalParams": [ + "summary": "List all authorizations", + "positionalParams": [], + "headerParams": [ { - "name": "ruleID", - "description": "The notification rule ID.", - "required": true, + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], + "queryParams": [ + { + "name": "userID", + "description": "Only show authorizations that belong to a user ID.", "type": "string" }, { - "name": "labelID", - "description": "The ID of the label to delete.", - "required": true, + "name": "user", + "description": "Only show authorizations that belong to a user name.", "type": "string" - } - ], - "headerParams": [ + }, { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "orgID", + "description": "Only show authorizations that belong to an organization ID.", + "type": "string" + }, + { + "name": "org", + "description": "Only show authorizations that belong to a organization name.", "type": "string" } ], - "queryParams": [], "bodyParam": null, "responses": [ { - "code": "204", - "description": "Delete has been accepted", - "mediaTypes": [] - }, - { - "code": "404", - "description": "Rule or label not found", + "code": "200", + "description": "A list of authorizations", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "Authorizations" } ] }, @@ -9955,19 +9987,12 @@ }, { "server": "/api/v2", - "path": "/notificationRules/{ruleID}/query", - "operation": "get", - "operationId": "GetNotificationRulesIDQuery", + "path": "/authorizations", + "operation": "post", + "operationId": "PostAuthorizations", "basicAuth": false, - "summary": "Get a notification rule query", - "positionalParams": [ - { - "name": "ruleID", - "description": "The notification rule ID.", - "required": true, - "type": "string" - } - ], + "summary": "Create an authorization", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -9977,15 +10002,20 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Authorization to create", + "required": true, + "mediaType": "application/json", + "type": "Authorization" + }, "responses": [ { - "code": "200", - "description": "The notification rule query requested", + "code": "201", + "description": "Authorization created", "mediaTypes": [ { "mediaType": "application/json", - "type": "FluxResponse" + "type": "Authorization" } ] }, @@ -9999,16 +10029,6 @@ } ] }, - { - "code": "404", - "description": "Notification rule not found", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, { "code": "default", "description": "Unexpected error", @@ -10023,47 +10043,37 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints", + "path": "/authorizations/{authID}", "operation": "get", - "operationId": "GetNotificationEndpoints", + "operationId": "GetAuthorizationsID", "basicAuth": false, - "summary": "Get all notification endpoints", - "positionalParams": [], - "headerParams": [ + "summary": "Retrieve an authorization", + "positionalParams": [ { - "name": "Zap-Trace-Span", - "description": "OpenTracing span context", - "required": false, + "name": "authID", + "description": "The ID of the authorization to get.", + "required": true, "type": "string" } ], - "queryParams": [ - { - "name": "offset", - "required": false, - "type": "number" - }, + "headerParams": [ { - "name": "limit", + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", "required": false, - "type": "number" - }, - { - "name": "orgID", - "description": "Only show notification endpoints that belong to specific organization ID.", - "required": true, "type": "string" } ], + "queryParams": [], "bodyParam": null, "responses": [ { "code": "200", - "description": "A list of notification endpoints", + "description": "Authorization details", "mediaTypes": [ { "mediaType": "application/json", - "type": "NotificationEndpoints" + "type": "Authorization" } ] }, @@ -10081,28 +10091,42 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints", - "operation": "post", - "operationId": "CreateNotificationEndpoint", + "path": "/authorizations/{authID}", + "operation": "patch", + "operationId": "PatchAuthorizationsID", "basicAuth": false, - "summary": "Add a notification endpoint", - "positionalParams": [], - "headerParams": [], + "summary": "Update an authorization to be active or inactive", + "positionalParams": [ + { + "name": "authID", + "description": "The ID of the authorization to update.", + "required": true, + "type": "string" + } + ], + "headerParams": [ + { + "name": "Zap-Trace-Span", + "description": "OpenTracing span context", + "required": false, + "type": "string" + } + ], "queryParams": [], "bodyParam": { - "description": "Notification endpoint to create", + "description": "Authorization to update", "required": true, "mediaType": "application/json", - "type": "PostNotificationEndpoint" + "type": "AuthorizationUpdateRequest" }, "responses": [ { - "code": "201", - "description": "Notification endpoint created", + "code": "200", + "description": "The active or inactie authorization", "mediaTypes": [ { "mediaType": "application/json", - "type": "NotificationEndpoint" + "type": "Authorization" } ] }, @@ -10120,15 +10144,15 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints/{endpointID}", - "operation": "get", - "operationId": "GetNotificationEndpointsID", + "path": "/authorizations/{authID}", + "operation": "delete", + "operationId": "DeleteAuthorizationsID", "basicAuth": false, - "summary": "Get a notification endpoint", + "summary": "Delete an authorization", "positionalParams": [ { - "name": "endpointID", - "description": "The notification endpoint ID.", + "name": "authID", + "description": "The ID of the authorization to delete.", "required": true, "type": "string" } @@ -10145,14 +10169,9 @@ "bodyParam": null, "responses": [ { - "code": "200", - "description": "The notification endpoint requested", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "NotificationEndpoint" - } - ] + "code": "204", + "description": "Authorization deleted", + "mediaTypes": [] }, { "code": "default", @@ -10168,19 +10187,12 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints/{endpointID}", - "operation": "put", - "operationId": "PutNotificationEndpointsID", + "path": "/variables", + "operation": "get", + "operationId": "GetVariables", "basicAuth": false, - "summary": "Update a notification endpoint", - "positionalParams": [ - { - "name": "endpointID", - "description": "The notification endpoint ID.", - "required": true, - "type": "string" - } - ], + "summary": "Get all variables", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -10189,27 +10201,33 @@ "type": "string" } ], - "queryParams": [], - "bodyParam": { - "description": "A new notification endpoint to replace the existing endpoint with", - "required": true, - "mediaType": "application/json", - "type": "NotificationEndpoint" - }, + "queryParams": [ + { + "name": "org", + "description": "The organization name.", + "type": "string" + }, + { + "name": "orgID", + "description": "The organization ID.", + "type": "string" + } + ], + "bodyParam": null, "responses": [ { "code": "200", - "description": "An updated notification endpoint", + "description": "All variables for an organization", "mediaTypes": [ { "mediaType": "application/json", - "type": "NotificationEndpoint" + "type": "Variables" } ] }, { - "code": "404", - "description": "The notification endpoint was not found", + "code": "400", + "description": "Invalid request", "mediaTypes": [ { "mediaType": "application/json", @@ -10219,7 +10237,7 @@ }, { "code": "default", - "description": "Unexpected error", + "description": "Internal server error", "mediaTypes": [ { "mediaType": "application/json", @@ -10231,19 +10249,12 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints/{endpointID}", - "operation": "patch", - "operationId": "PatchNotificationEndpointsID", + "path": "/variables", + "operation": "post", + "operationId": "PostVariables", "basicAuth": false, - "summary": "Update a notification endpoint", - "positionalParams": [ - { - "name": "endpointID", - "description": "The notification endpoint ID.", - "required": true, - "type": "string" - } - ], + "summary": "Create a variable", + "positionalParams": [], "headerParams": [ { "name": "Zap-Trace-Span", @@ -10254,35 +10265,25 @@ ], "queryParams": [], "bodyParam": { - "description": "Check update to apply", + "description": "Variable to create", "required": true, "mediaType": "application/json", - "type": "NotificationEndpointUpdate" + "type": "Variable" }, "responses": [ { - "code": "200", - "description": "An updated notification endpoint", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "NotificationEndpoint" - } - ] - }, - { - "code": "404", - "description": "The notification endpoint was not found", + "code": "201", + "description": "Variable created", "mediaTypes": [ { "mediaType": "application/json", - "type": "Error" + "type": "Variable" } ] }, { "code": "default", - "description": "Unexpected error", + "description": "Internal server error", "mediaTypes": [ { "mediaType": "application/json", @@ -10294,15 +10295,15 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints/{endpointID}", - "operation": "delete", - "operationId": "DeleteNotificationEndpointsID", + "path": "/variables/{variableID}", + "operation": "get", + "operationId": "GetVariablesID", "basicAuth": false, - "summary": "Delete a notification endpoint", + "summary": "Get a variable", "positionalParams": [ { - "name": "endpointID", - "description": "The notification endpoint ID.", + "name": "variableID", + "description": "The variable ID.", "required": true, "type": "string" } @@ -10319,13 +10320,18 @@ "bodyParam": null, "responses": [ { - "code": "204", - "description": "Delete has been accepted", - "mediaTypes": [] + "code": "200", + "description": "Variable found", + "mediaTypes": [ + { + "mediaType": "application/json", + "type": "Variable" + } + ] }, { "code": "404", - "description": "The endpoint was not found", + "description": "Variable not found", "mediaTypes": [ { "mediaType": "application/json", @@ -10335,7 +10341,7 @@ }, { "code": "default", - "description": "Unexpected error", + "description": "Internal server error", "mediaTypes": [ { "mediaType": "application/json", @@ -10347,15 +10353,15 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints/{endpointID}/labels", - "operation": "get", - "operationId": "GetNotificationEndpointsIDLabels", + "path": "/variables/{variableID}", + "operation": "put", + "operationId": "PutVariablesID", "basicAuth": false, - "summary": "List all labels for a notification endpoint", + "summary": "Replace a variable", "positionalParams": [ { - "name": "endpointID", - "description": "The notification endpoint ID.", + "name": "variableID", + "description": "The variable ID.", "required": true, "type": "string" } @@ -10369,21 +10375,26 @@ } ], "queryParams": [], - "bodyParam": null, + "bodyParam": { + "description": "Variable to replace", + "required": true, + "mediaType": "application/json", + "type": "Variable" + }, "responses": [ { "code": "200", - "description": "A list of all labels for a notification endpoint", + "description": "Variable updated", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelsResponse" + "type": "Variable" } ] }, { "code": "default", - "description": "Unexpected error", + "description": "Internal server error", "mediaTypes": [ { "mediaType": "application/json", @@ -10395,15 +10406,15 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints/{endpointID}/labels", - "operation": "post", - "operationId": "PostNotificationEndpointIDLabels", + "path": "/variables/{variableID}", + "operation": "patch", + "operationId": "PatchVariablesID", "basicAuth": false, - "summary": "Add a label to a notification endpoint", + "summary": "Update a variable", "positionalParams": [ { - "name": "endpointID", - "description": "The notification endpoint ID.", + "name": "variableID", + "description": "The variable ID.", "required": true, "type": "string" } @@ -10418,25 +10429,25 @@ ], "queryParams": [], "bodyParam": { - "description": "Label to add", + "description": "Variable update to apply", "required": true, "mediaType": "application/json", - "type": "LabelMapping" + "type": "Variable" }, "responses": [ { - "code": "201", - "description": "The label was added to the notification endpoint", + "code": "200", + "description": "Variable updated", "mediaTypes": [ { "mediaType": "application/json", - "type": "LabelResponse" + "type": "Variable" } ] }, { "code": "default", - "description": "Unexpected error", + "description": "Internal server error", "mediaTypes": [ { "mediaType": "application/json", @@ -10448,21 +10459,15 @@ }, { "server": "/api/v2", - "path": "/notificationEndpoints/{endpointID}/labels/{labelID}", + "path": "/variables/{variableID}", "operation": "delete", - "operationId": "DeleteNotificationEndpointsIDLabelsID", + "operationId": "DeleteVariablesID", "basicAuth": false, - "summary": "Delete a label from a notification endpoint", + "summary": "Delete a variable", "positionalParams": [ { - "name": "endpointID", - "description": "The notification endpoint ID.", - "required": true, - "type": "string" - }, - { - "name": "labelID", - "description": "The ID of the label to delete.", + "name": "variableID", + "description": "The variable ID.", "required": true, "type": "string" } @@ -10480,22 +10485,12 @@ "responses": [ { "code": "204", - "description": "Delete has been accepted", + "description": "Variable deleted", "mediaTypes": [] }, - { - "code": "404", - "description": "Endpoint or label not found", - "mediaTypes": [ - { - "mediaType": "application/json", - "type": "Error" - } - ] - }, { "code": "default", - "description": "Unexpected error", + "description": "Internal server error", "mediaTypes": [ { "mediaType": "application/json", diff --git a/packages/apis/src/generated/AuthorizationsAPI.ts b/packages/apis/src/generated/AuthorizationsAPI.ts index d9a79e61d..14ccc1f69 100644 --- a/packages/apis/src/generated/AuthorizationsAPI.ts +++ b/packages/apis/src/generated/AuthorizationsAPI.ts @@ -15,8 +15,6 @@ export interface GetAuthorizationsRequest { orgID?: string /** Only show authorizations that belong to a organization name. */ org?: string - /** Find a token by value. */ - token?: string } export interface PostAuthorizationsRequest { /** Authorization to create */ @@ -68,7 +66,6 @@ export class AuthorizationsAPI { 'user', 'orgID', 'org', - 'token', ])}`, request, requestOptions diff --git a/packages/apis/src/generated/MeAPI.ts b/packages/apis/src/generated/MeAPI.ts index 6d4173bdb..7bfce09d2 100644 --- a/packages/apis/src/generated/MeAPI.ts +++ b/packages/apis/src/generated/MeAPI.ts @@ -1,6 +1,6 @@ import {InfluxDB} from '@influxdata/influxdb-client' import {APIBase, RequestOptions} from '../APIBase' -import {PasswordResetBody, User} from './types' +import {PasswordResetBody, UserResponse} from './types' export interface GetMeRequest {} export interface PutMePasswordRequest { @@ -32,7 +32,7 @@ export class MeAPI { getMe( request?: GetMeRequest, requestOptions?: RequestOptions - ): Promise { + ): Promise { return this.base.request('GET', `/api/v2/me`, request, requestOptions) } /** diff --git a/packages/apis/src/generated/UsersAPI.ts b/packages/apis/src/generated/UsersAPI.ts index 23b7ecc22..e88135d85 100644 --- a/packages/apis/src/generated/UsersAPI.ts +++ b/packages/apis/src/generated/UsersAPI.ts @@ -1,7 +1,14 @@ import {InfluxDB} from '@influxdata/influxdb-client' import {APIBase, RequestOptions} from '../APIBase' -import {PasswordResetBody, User, Users} from './types' +import {PasswordResetBody, User, UserResponse, Users} from './types' +export interface PostUsersIDPasswordRequest { + /** The user ID. */ + userID: string + auth: {user: string; password: string} + /** New password */ + body: PasswordResetBody +} export interface GetUsersRequest {} export interface PostUsersRequest { /** User to create */ @@ -21,13 +28,6 @@ export interface DeleteUsersIDRequest { /** The ID of the user to delete. */ userID: string } -export interface PostUsersIDPasswordRequest { - /** The user ID. */ - userID: string - auth: {user: string; password: string} - /** New password */ - body: PasswordResetBody -} /** * Users API */ @@ -42,6 +42,25 @@ export class UsersAPI { constructor(influxDB: InfluxDB) { this.base = new APIBase(influxDB) } + /** + * Update a password. + * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/PostUsersIDPassword } + * @param request - request parameters and body (if supported) + * @param requestOptions - optional transport options + * @returns promise of response + */ + postUsersIDPassword( + request: PostUsersIDPasswordRequest, + requestOptions?: RequestOptions + ): Promise { + return this.base.request( + 'POST', + `/api/v2/users/${request.userID}/password`, + request, + requestOptions, + 'application/json' + ) + } /** * List all users. * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/GetUsers } @@ -65,7 +84,7 @@ export class UsersAPI { postUsers( request: PostUsersRequest, requestOptions?: RequestOptions - ): Promise { + ): Promise { return this.base.request( 'POST', `/api/v2/users`, @@ -84,7 +103,7 @@ export class UsersAPI { getUsersID( request: GetUsersIDRequest, requestOptions?: RequestOptions - ): Promise { + ): Promise { return this.base.request( 'GET', `/api/v2/users/${request.userID}`, @@ -102,7 +121,7 @@ export class UsersAPI { patchUsersID( request: PatchUsersIDRequest, requestOptions?: RequestOptions - ): Promise { + ): Promise { return this.base.request( 'PATCH', `/api/v2/users/${request.userID}`, @@ -129,23 +148,4 @@ export class UsersAPI { requestOptions ) } - /** - * Update a password. - * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/PostUsersIDPassword } - * @param request - request parameters and body (if supported) - * @param requestOptions - optional transport options - * @returns promise of response - */ - postUsersIDPassword( - request: PostUsersIDPasswordRequest, - requestOptions?: RequestOptions - ): Promise { - return this.base.request( - 'POST', - `/api/v2/users/${request.userID}/password`, - request, - requestOptions, - 'application/json' - ) - } } diff --git a/packages/apis/src/generated/VariablesAPI.ts b/packages/apis/src/generated/VariablesAPI.ts index b3c3d9b41..a5f4a2a57 100644 --- a/packages/apis/src/generated/VariablesAPI.ts +++ b/packages/apis/src/generated/VariablesAPI.ts @@ -8,6 +8,22 @@ import { Variables, } from './types' +export interface GetVariablesIDLabelsRequest { + /** The variable ID. */ + variableID: string +} +export interface PostVariablesIDLabelsRequest { + /** The variable ID. */ + variableID: string + /** Label to add */ + body: LabelMapping +} +export interface DeleteVariablesIDLabelsIDRequest { + /** The variable ID. */ + variableID: string + /** The label ID to delete. */ + labelID: string +} export interface GetVariablesRequest { /** The organization name. */ org?: string @@ -38,22 +54,6 @@ export interface DeleteVariablesIDRequest { /** The variable ID. */ variableID: string } -export interface GetVariablesIDLabelsRequest { - /** The variable ID. */ - variableID: string -} -export interface PostVariablesIDLabelsRequest { - /** The variable ID. */ - variableID: string - /** Label to add */ - body: LabelMapping -} -export interface DeleteVariablesIDLabelsIDRequest { - /** The variable ID. */ - variableID: string - /** The label ID to delete. */ - labelID: string -} /** * Variables API */ @@ -68,6 +68,61 @@ export class VariablesAPI { constructor(influxDB: InfluxDB) { this.base = new APIBase(influxDB) } + /** + * List all labels for a variable. + * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/GetVariablesIDLabels } + * @param request - request parameters and body (if supported) + * @param requestOptions - optional transport options + * @returns promise of response + */ + getVariablesIDLabels( + request: GetVariablesIDLabelsRequest, + requestOptions?: RequestOptions + ): Promise { + return this.base.request( + 'GET', + `/api/v2/variables/${request.variableID}/labels`, + request, + requestOptions + ) + } + /** + * Add a label to a variable. + * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/PostVariablesIDLabels } + * @param request - request parameters and body (if supported) + * @param requestOptions - optional transport options + * @returns promise of response + */ + postVariablesIDLabels( + request: PostVariablesIDLabelsRequest, + requestOptions?: RequestOptions + ): Promise { + return this.base.request( + 'POST', + `/api/v2/variables/${request.variableID}/labels`, + request, + requestOptions, + 'application/json' + ) + } + /** + * Delete a label from a variable. + * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/DeleteVariablesIDLabelsID } + * @param request - request parameters and body (if supported) + * @param requestOptions - optional transport options + * @returns promise of response + */ + deleteVariablesIDLabelsID( + request: DeleteVariablesIDLabelsIDRequest, + requestOptions?: RequestOptions + ): Promise { + return this.base.request( + 'DELETE', + `/api/v2/variables/${request.variableID}/labels/${request.labelID}`, + request, + requestOptions + ) + } /** * Get all variables. * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/GetVariables } @@ -179,59 +234,4 @@ export class VariablesAPI { requestOptions ) } - /** - * List all labels for a variable. - * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/GetVariablesIDLabels } - * @param request - request parameters and body (if supported) - * @param requestOptions - optional transport options - * @returns promise of response - */ - getVariablesIDLabels( - request: GetVariablesIDLabelsRequest, - requestOptions?: RequestOptions - ): Promise { - return this.base.request( - 'GET', - `/api/v2/variables/${request.variableID}/labels`, - request, - requestOptions - ) - } - /** - * Add a label to a variable. - * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/PostVariablesIDLabels } - * @param request - request parameters and body (if supported) - * @param requestOptions - optional transport options - * @returns promise of response - */ - postVariablesIDLabels( - request: PostVariablesIDLabelsRequest, - requestOptions?: RequestOptions - ): Promise { - return this.base.request( - 'POST', - `/api/v2/variables/${request.variableID}/labels`, - request, - requestOptions, - 'application/json' - ) - } - /** - * Delete a label from a variable. - * See {@link https://v2.docs.influxdata.com/v2.0/api/#operation/DeleteVariablesIDLabelsID } - * @param request - request parameters and body (if supported) - * @param requestOptions - optional transport options - * @returns promise of response - */ - deleteVariablesIDLabelsID( - request: DeleteVariablesIDLabelsIDRequest, - requestOptions?: RequestOptions - ): Promise { - return this.base.request( - 'DELETE', - `/api/v2/variables/${request.variableID}/labels/${request.labelID}`, - request, - requestOptions - ) - } } diff --git a/packages/apis/src/generated/types.ts b/packages/apis/src/generated/types.ts index 8c74d5e80..294cbf890 100644 --- a/packages/apis/src/generated/types.ts +++ b/packages/apis/src/generated/types.ts @@ -3,7 +3,7 @@ // [0]: https://github.com/influxdata/oats export interface Error { - /** Code is the machine-readable error code. */ + /** code is the machine-readable error code. */ readonly code: | 'internal error' | 'not found' @@ -16,8 +16,13 @@ export interface Error { | 'too many requests' | 'unauthorized' | 'method not allowed' - /** Message is a human-readable message. */ + | 'request too large' + /** message is a human-readable message. */ readonly message: string + /** op describes the logical code operation during error. Useful for debugging. */ + readonly op?: string + /** err is a stack of errors that occurred during processing of the request. Useful for debugging. */ + readonly err?: string } export interface Routes { @@ -52,179 +57,6 @@ export interface Routes { write?: string } -export interface IsOnboarding { - /** True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. */ - allowed?: boolean -} - -export interface OnboardingRequest { - username: string - password?: string - org: string - bucket: string - retentionPeriodSeconds?: number - /** 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` - */ - retentionPeriodHrs?: number -} - -export interface OnboardingResponse { - user?: User - org?: Organization - bucket?: Bucket - auth?: Authorization -} - -export interface User { - readonly id?: string - oauthID?: string - name: string - /** If inactive the user is inactive. */ - status?: 'active' | 'inactive' - readonly links?: { - self?: string - } -} - -export interface Organization { - readonly links?: { - self?: Link - members?: Link - owners?: Link - labels?: Link - secrets?: Link - buckets?: Link - tasks?: Link - dashboards?: Link - } - readonly id?: string - name: string - description?: string - readonly createdAt?: string - readonly updatedAt?: string - /** If inactive the organization is inactive. */ - status?: 'active' | 'inactive' -} - -/** - * URI of resource. - */ -export type Link = string - -export interface Bucket { - readonly links?: { - /** URL to retrieve labels for this bucket */ - labels?: Link - /** URL to retrieve members that can read this bucket */ - members?: Link - /** URL to retrieve parent organization for this bucket */ - org?: Link - /** URL to retrieve owners that can read and write to this bucket. */ - owners?: Link - /** URL for this bucket */ - self?: Link - /** URL to write line protocol for this bucket */ - write?: Link - } - readonly id?: string - readonly type?: 'user' | 'system' - name: string - description?: string - orgID?: string - rp?: string - readonly createdAt?: string - readonly updatedAt?: string - retentionRules: RetentionRules - labels?: Labels -} - -/** - * Rules to expire or retain data. No rules means data never expires. - */ -export type RetentionRules = RetentionRule[] - -export interface RetentionRule { - type: 'expire' - /** Duration in seconds for how long data will be kept in the database. 0 means infinite. */ - everySeconds: number - /** Shard duration measured in seconds. */ - shardGroupDurationSeconds?: number -} - -export type Labels = Label[] - -export interface Label { - readonly id?: string - readonly orgID?: string - name?: string - /** Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. */ - properties?: any -} - -export type Authorization = AuthorizationUpdateRequest & { - readonly createdAt?: string - readonly updatedAt?: string - /** ID of org that authorization is scoped to. */ - orgID?: string - /** List of permissions for an auth. An auth must have at least one Permission. */ - permissions?: Permission[] - readonly id?: string - /** Passed via the Authorization Header and Token Authentication type. */ - readonly token?: string - /** ID of user that created and owns the token. */ - readonly userID?: string - /** Name of user that created and owns the token. */ - readonly user?: string - /** Name of the org token is scoped to. */ - readonly org?: string - readonly links?: { - readonly self?: Link - readonly user?: Link - } -} - -export interface AuthorizationUpdateRequest { - /** If inactive the token is inactive and requests using the token will be rejected. */ - status?: 'active' | 'inactive' - /** A description of the token. */ - description?: string -} - -export interface Permission { - action: 'read' | 'write' - resource: Resource -} - -export interface Resource { - type: - | 'authorizations' - | 'buckets' - | 'dashboards' - | 'orgs' - | 'sources' - | 'tasks' - | 'telegrafs' - | 'users' - | 'variables' - | 'scrapers' - | 'secrets' - | 'labels' - | 'views' - | 'documents' - | 'notificationRules' - | 'notificationEndpoints' - | 'checks' - | 'dbrp' - /** 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. */ - id?: string - /** Optional name of the resource if the resource has a name field. */ - name?: string - /** 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. */ - orgID?: string - /** Optional name of the organization of the organization with orgID. */ - org?: string -} - export interface Documents { documents?: DocumentListEntry[] } @@ -249,6 +81,21 @@ export interface DocumentMeta { readonly updatedAt?: string } +export type Labels = Label[] + +export interface Label { + readonly id?: string + readonly orgID?: string + name?: string + /** Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. */ + properties?: any +} + +/** + * URI of resource. + */ +export type Link = string + export interface DocumentCreate { meta: DocumentMeta content: any @@ -372,10 +219,21 @@ export interface ResourceMembers { users?: ResourceMember[] } -export type ResourceMember = User & { +export type ResourceMember = UserResponse & { role?: 'member' } +export interface UserResponse { + readonly id?: string + oauthID?: string + name: string + /** If inactive the user is inactive. */ + status?: 'active' | 'inactive' + readonly links?: { + self?: string + } +} + export interface AddResourceMemberRequestBody { id: string name?: string @@ -388,7 +246,7 @@ export interface ResourceOwners { users?: ResourceOwner[] } -export type ResourceOwner = User & { +export type ResourceOwner = UserResponse & { role?: 'owner' } @@ -426,50 +284,6 @@ export interface ScraperTargetRequest { allowInsecure?: boolean } -export interface Variables { - variables?: Variable[] -} - -export interface Variable { - readonly links?: { - self?: string - org?: string - labels?: string - } - readonly id?: string - orgID: string - name: string - description?: string - selected?: string[] - labels?: Labels - arguments: VariableProperties - createdAt?: string - updatedAt?: string -} - -export type VariableProperties = - | QueryVariableProperties - | ConstantVariableProperties - | MapVariableProperties - -export interface QueryVariableProperties { - type?: 'query' - values?: { - query?: string - language?: string - } -} - -export interface ConstantVariableProperties { - type?: 'constant' - values?: string[] -} - -export interface MapVariableProperties { - type?: 'map' - values?: any -} - export interface LineProtocolError { /** Code is the machine-readable error code. */ readonly code: @@ -510,21 +324,6 @@ export interface DeletePredicateRequest { predicate?: string } -export interface Ready { - status?: 'ready' - started?: string - up?: string -} - -export interface HealthCheck { - name: string - message?: string - checks?: HealthCheck[] - status: 'pass' | 'fail' - version?: string - commit?: string -} - export interface Sources { links?: { self?: string @@ -556,11 +355,60 @@ export interface Source { readonly languages?: Array<'flux' | 'influxql'> } +export interface HealthCheck { + name: string + message?: string + checks?: HealthCheck[] + status: 'pass' | 'fail' + version?: string + commit?: string +} + export interface Buckets { readonly links?: Links buckets?: Bucket[] } +export interface Bucket { + readonly links?: { + /** URL to retrieve labels for this bucket */ + labels?: Link + /** URL to retrieve members that can read this bucket */ + members?: Link + /** URL to retrieve parent organization for this bucket */ + org?: Link + /** URL to retrieve owners that can read and write to this bucket. */ + owners?: Link + /** URL for this bucket */ + self?: Link + /** URL to write line protocol for this bucket */ + write?: Link + } + readonly id?: string + readonly type?: 'user' | 'system' + name: string + description?: string + orgID?: string + rp?: string + readonly createdAt?: string + readonly updatedAt?: string + retentionRules: RetentionRules + labels?: Labels +} + +/** + * Rules to expire or retain data. No rules means data never expires. + */ +export type RetentionRules = RetentionRule[] + +export interface RetentionRule { + type: 'expire' + /** Duration in seconds for how long data will be kept in the database. 0 means infinite. */ + everySeconds: number + /** Shard duration measured in seconds. */ + shardGroupDurationSeconds?: number +} + export interface LabelCreateRequest { orgID: string name: string @@ -674,6 +522,7 @@ export interface LinePlusSingleStatProperties { showNoteWhenEmpty: boolean axes: Axes staticLegend?: StaticLegend + legend?: Legend xColumn?: string generateXAxisTicks?: string[] xTotalTicks?: number @@ -774,7 +623,7 @@ export interface Axis { export type AxisScale = 'log' | 'linear' /** - * The options specific to the static legend + * StaticLegend represents the options specific to the static legend */ export interface StaticLegend { colorizeRows?: boolean @@ -785,6 +634,16 @@ export interface StaticLegend { widthRatio?: number } +/** + * Legend define encoding of data into a view's legend + */ +export interface Legend { + /** The style of the legend. */ + type?: 'static' + /** orientation is the location of the legend with respect to the view graph */ + orientation?: 'top' | 'bottom' | 'left' | 'right' +} + /** * Indicates whether decimal places should be enforced, and how many digits it should show. */ @@ -807,6 +666,7 @@ export interface XYViewProperties { showNoteWhenEmpty: boolean axes: Axes staticLegend?: StaticLegend + legend?: Legend xColumn?: string generateXAxisTicks?: string[] xTotalTicks?: number @@ -841,6 +701,8 @@ export interface SingleStatViewProperties { tickPrefix: string suffix: string tickSuffix: string + staticLegend?: StaticLegend + legend?: Legend decimalPlaces: DecimalPlaces } @@ -877,6 +739,8 @@ export interface GaugeViewProperties { tickPrefix: string suffix: string tickSuffix: string + staticLegend?: StaticLegend + legend?: Legend decimalPlaces: DecimalPlaces } @@ -970,6 +834,8 @@ export interface CheckBase { name: string /** The ID of the organization that owns this check. */ orgID: string + /** The ID of the task associated with this check. */ + taskID?: string /** The ID of creator used to create this check. */ readonly ownerID?: string readonly createdAt?: string @@ -1165,6 +1031,7 @@ export interface BandViewProperties { /** If true, will display note when empty */ showNoteWhenEmpty: boolean axes: Axes + legend?: Legend staticLegend?: StaticLegend xColumn?: string generateXAxisTicks?: string[] @@ -1714,11 +1581,6 @@ export interface FluxSuggestion { params?: any } -export interface Authorizations { - readonly links?: Links - authorizations?: Authorization[] -} - /** * Query influx using the Flux language */ @@ -1783,6 +1645,26 @@ export interface Organizations { orgs?: Organization[] } +export interface Organization { + readonly links?: { + self?: Link + members?: Link + owners?: Link + labels?: Link + secrets?: Link + buckets?: Link + tasks?: Link + dashboards?: Link + } + readonly id?: string + name: string + description?: string + readonly createdAt?: string + readonly updatedAt?: string + /** If inactive the organization is inactive. */ + status?: 'active' | 'inactive' +} + export type SecretKeysResponse = SecretKeys & { readonly links?: { self?: string @@ -2275,6 +2157,29 @@ export type TelegramNotificationEndpoint = NotificationEndpointBase & { channel: string } +export type VariableProperties = + | QueryVariableProperties + | ConstantVariableProperties + | MapVariableProperties + +export interface QueryVariableProperties { + type?: 'query' + values?: { + query?: string + language?: string + } +} + +export interface ConstantVariableProperties { + type?: 'constant' + values?: string[] +} + +export interface MapVariableProperties { + type?: 'map' + values?: any +} + export interface TemplateExportByID { stackID?: string orgIDs?: Array<{ @@ -2432,13 +2337,6 @@ export interface PasswordResetBody { password: string } -export interface Users { - links?: { - self?: string - } - users?: User[] -} - export interface Checks { checks?: Check[] links?: Links @@ -2478,6 +2376,8 @@ export interface NotificationRuleBase { endpointID: string /** The ID of the organization that owns this notification rule. */ orgID: string + /** The ID of the task associated with this notification rule. */ + taskID?: string /** The ID of creator used to create this notification rule. */ readonly ownerID?: string readonly createdAt?: string @@ -2615,3 +2515,140 @@ export interface NotificationEndpointUpdate { description?: string status?: 'active' | 'inactive' } + +export interface Ready { + status?: 'ready' + started?: string + up?: string +} + +export interface Users { + links?: { + self?: string + } + users?: UserResponse[] +} + +export interface User { + readonly id?: string + oauthID?: string + name: string + /** If inactive the user is inactive. */ + status?: 'active' | 'inactive' +} + +export interface IsOnboarding { + /** True means that the influxdb instance has NOT had initial setup; false means that the database has been setup. */ + allowed?: boolean +} + +export interface OnboardingRequest { + username: string + password?: string + org: string + bucket: string + retentionPeriodSeconds?: number + /** 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` + */ + retentionPeriodHrs?: number + /** Authentication token to set on the initial user. If not specified, the server will generate a token. + */ + token?: string +} + +export interface OnboardingResponse { + user?: UserResponse + org?: Organization + bucket?: Bucket + auth?: Authorization +} + +export type Authorization = AuthorizationUpdateRequest & { + readonly createdAt?: string + readonly updatedAt?: string + /** ID of org that authorization is scoped to. */ + orgID?: string + /** List of permissions for an auth. An auth must have at least one Permission. */ + permissions?: Permission[] + readonly id?: string + /** Passed via the Authorization Header and Token Authentication type. */ + readonly token?: string + /** ID of user that created and owns the token. */ + readonly userID?: string + /** Name of user that created and owns the token. */ + readonly user?: string + /** Name of the org token is scoped to. */ + readonly org?: string + readonly links?: { + readonly self?: Link + readonly user?: Link + } +} + +export interface AuthorizationUpdateRequest { + /** If inactive the token is inactive and requests using the token will be rejected. */ + status?: 'active' | 'inactive' + /** A description of the token. */ + description?: string +} + +export interface Permission { + action: 'read' | 'write' + resource: Resource +} + +export interface Resource { + type: + | 'authorizations' + | 'buckets' + | 'dashboards' + | 'orgs' + | 'sources' + | 'tasks' + | 'telegrafs' + | 'users' + | 'variables' + | 'scrapers' + | 'secrets' + | 'labels' + | 'views' + | 'documents' + | 'notificationRules' + | 'notificationEndpoints' + | 'checks' + | 'dbrp' + /** 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. */ + id?: string + /** Optional name of the resource if the resource has a name field. */ + name?: string + /** 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. */ + orgID?: string + /** Optional name of the organization of the organization with orgID. */ + org?: string +} + +export interface Authorizations { + readonly links?: Links + authorizations?: Authorization[] +} + +export interface Variables { + variables?: Variable[] +} + +export interface Variable { + readonly links?: { + self?: string + org?: string + labels?: string + } + readonly id?: string + orgID: string + name: string + description?: string + selected?: string[] + labels?: Labels + arguments: VariableProperties + createdAt?: string + updatedAt?: string +} From 45ca2d18f2685d18a20ad4ef2711b9c062585b4b Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Sat, 24 Apr 2021 06:27:19 +0200 Subject: [PATCH 4/5] chore: update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9546c2ad7..8caee8ab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### Features 1. [#326](https://github.com/influxdata/influxdb-client-js/pull/326): Apply gzip compression to writes. -1. [#331](https://github.com/influxdata/influxdb-client-js/pull/331): Regenerate APIs from swagger. +1. [#332](https://github.com/influxdata/influxdb-client-js/pull/331): Regenerate APIs from [oss.yml](https://github.com/influxdata/openapi/blob/master/contracts/oss.yml). ### Bug Fixes From 23b3d0b078dce86a70994970f2b0a1e258839491 Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Sat, 24 Apr 2021 06:33:07 +0200 Subject: [PATCH 5/5] chore: update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8caee8ab2..961381ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ compression work fine in the node.js environment, but it does not work OOTB in the browser. The browser transport must be customized to do gzip, an example is provided in the `decorateRequest` field of [FetchTransport](https://github.com/influxdata/influxdb-client-js/blob/master/packages/core/src/impl/browser/FetchTransport.ts). +1. [#332](https://github.com/influxdata/influxdb-client-js/pull/328): There are a few incompatible changes in the types used by + `UsersAPI`, it now uses a `UserResponse` type where a `User` type was used before. A `UserResponse` includes all properties of + a `User` type. ## 1.12.0 [2021-04-01]