Permalink
Branch: master
Find file Copy path
6976 lines (6976 sloc) 191 KB
openapi: "3.0.0"
info:
title: Influx API Service
version: 0.1.0
servers:
- url: /api/v2
paths:
/signin:
post:
summary: Exchange basic auth credentials for session
security:
- basicAuth: []
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'204':
description: succesfully authenticated
'401':
description: unauthorized access
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unsuccessful authentication
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/signout:
post:
summary: Expire the current session
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'204':
description: session successfully expired
'401':
description: unauthorized access
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unsuccessful session exipry
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/:
get:
summary: Map of all top level routes available
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
default:
description: All routes
content:
application/json:
schema:
$ref: "#/components/schemas/Routes"
/protos:
get:
tags:
- Protos
summary: List of available protos (templates of tasks/dashboards/etc)
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'200':
description: List of protos
content:
application/json:
schema:
$ref: "#/components/schemas/Protos"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/protos/{protoID}/dashboards:
post:
tags:
- Protos
summary: Create instance of a proto dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: protoID
schema:
type: string
required: true
description: ID of proto
requestBody:
description: organization that the dashboard will be created as
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateProtoResourcesRequest"
responses:
'201':
description: List of dashboards that was created
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboards"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/setup:
get:
tags:
- Setup
summary: check if database has default user, org, bucket created, returns true if not.
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'200':
description:
allowed true or false
content:
application/json:
schema:
$ref: "#/components/schemas/IsOnboarding"
post:
tags:
- Setup
summary: post onboarding request, to setup 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"
/telegrafs:
get:
tags:
- Telegrafs
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: orgID
description: specifies the organization of the resource
required: true
schema:
type: string
responses:
'200':
description: a list of telegraf configs
content:
application/json:
schema:
$ref: "#/components/schemas/Telegrafs"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Telegrafs
summary: Create a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: telegraf config to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TelegrafRequest"
responses:
'201':
description: Telegraf config created
content:
application/json:
schema:
$ref: "#/components/schemas/Telegraf"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/telegrafs/{telegrafID}':
get:
tags:
- Telegrafs
summary: Retrieve a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of telegraf config
responses:
'200':
description: telegraf config details
content:
application/json:
schema:
$ref: "#/components/schemas/Telegraf"
application/toml:
example: "[agent]\ninterval = \"10s\""
schema:
type: string
application/octet-stream:
example: "[agent]\ninterval = \"10s\""
schema:
type: string
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
put:
tags:
- Telegrafs
summary: Update a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of telegraf config
requestBody:
description: telegraf config update to apply
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TelegrafRequest"
responses:
'200':
description: An updated telegraf
content:
application/json:
schema:
$ref: "#/components/schemas/Telegraf"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
delete:
tags:
- Telegrafs
summary: delete a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of telegraf config
responses:
'200':
description: An updated telegraf
content:
application/json:
schema:
$ref: "#/components/schemas/Telegraf"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/telegrafs/{telegrafID}/labels':
get:
tags:
- Telegrafs
summary: list all labels for a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
responses:
'200':
description: a list of all labels for a telegraf config
content:
application/json:
schema:
$ref: "#/components/schemas/LabelsResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Telegrafs
summary: add a label to a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
requestBody:
description: label to add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LabelMapping"
responses:
'200':
description: a list of all labels for a telegraf config
content:
application/json:
schema:
$ref: "#/components/schemas/LabelsResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/telegrafs/{telegrafID}/labels/{labelID}':
delete:
tags:
- Telegrafs
summary: delete a label from a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
- in: path
name: labelID
schema:
type: string
required: true
description: the label ID
responses:
'204':
description: delete has been accepted
'404':
description: telegraf config not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/telegrafs/{telegrafID}/members':
get:
tags:
- Users
- Telegrafs
summary: List all users with member privileges for a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
responses:
'200':
description: a list of telegraf config members
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMembers"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Telegrafs
summary: Add telegraf config member
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
requestBody:
description: user to add as member
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: member added to telegraf
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMember"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/telegrafs/{telegrafID}/members/{userID}':
delete:
tags:
- Users
- Telegrafs
summary: removes a member from a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of member to remove
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf
responses:
'204':
description: member removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/telegrafs/{telegrafID}/owners':
get:
tags:
- Users
- Telegrafs
summary: List all owners of a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
responses:
'200':
description: a list of telegraf config owners
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwners"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Telegrafs
summary: Add telegraf config owner
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
requestBody:
description: user to add as owner
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: telegraf config owner added
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwner"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/telegrafs/{telegrafID}/owners/{userID}':
delete:
tags:
- Users
- Telegrafs
summary: removes an owner from a telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of owner to remove
- in: path
name: telegrafID
schema:
type: string
required: true
description: ID of the telegraf config
responses:
'204':
description: owner removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/scrapers:
get:
tags:
- ScraperTargets
summary: get all scraper targets
responses:
'200':
description: all scraper targets
content:
application/json:
schema:
$ref: "#/components/schemas/ScraperTargetResponses"
post:
summary: create a scraper target
tags:
- ScraperTargets
requestBody:
description: scraper target to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ScraperTargetRequest"
responses:
'201':
description: scraper target created
content:
application/json:
schema:
$ref: "#/components/schemas/ScraperTargetResponse"
default:
description: internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/scrapers/{scraperTargetID}':
delete:
tags:
- ScraperTargets
summary: delete a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
required: true
schema:
type: string
description: id of the scraper target
responses:
'204':
description: scraper target deleted
default:
description: internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
summary: update a scraper target
tags:
- ScraperTargets
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
required: true
schema:
type: string
description: id of the scraper target
requestBody:
description: scraper target update to apply
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ScraperTargetRequest"
responses:
'200':
description: scraper target updated
content:
application/json:
schema:
$ref: "#/components/schemas/ScraperTargetResponse"
default:
description: internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/scrapers/{scraperTargetID}/labels':
get:
tags:
- ScraperTargets
summary: list all labels for a scraper targets
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
responses:
'200':
description: a list of all labels for a scraper target
content:
application/json:
schema:
type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
links:
$ref: "#/components/schemas/Links"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- ScraperTargets
summary: add a label to a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
requestBody:
description: label to add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Label"
responses:
'200':
description: a list of all labels for a scraper target
content:
application/json:
schema:
type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
links:
$ref: "#/components/schemas/Links"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/scrapers/{scraperTargetID}/labels/{labelID}':
delete:
tags:
- ScraperTargets
summary: delete a label from a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
- in: path
name: label
schema:
type: string
required: true
description: the label name
responses:
'204':
description: delete has been accepted
'404':
description: scraper target not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- ScraperTargets
summary: update a label from a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
- in: path
name: labelID
schema:
type: string
required: true
description: the label name
requestBody:
description: label update to apply
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Label"
responses:
'200':
description: updated successfully
'404':
description: scraper target not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/scrapers/{scraperTargetID}/members':
get:
tags:
- Users
- ScraperTargets
summary: List all users with member privileges for a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
responses:
'200':
description: a list of scraper target members
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMembers"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- ScraperTargets
summary: Add scraper target member
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
requestBody:
description: user to add as member
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: member added to scraper targets
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMember"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/scrapers/{scraperTargetID}/members/{userID}':
delete:
tags:
- Users
- ScraperTargets
summary: removes a member from a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of member to remove
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
responses:
'204':
description: member removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/scrapers/{scraperTargetID}/owners':
get:
tags:
- Users
- ScraperTargets
summary: List all owners of a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
responses:
'200':
description: a list of scraper target owners
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwners"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- ScraperTargets
summary: Add scraper target owner
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
requestBody:
description: user to add as owner
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: scraper target owner added
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwner"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/scrapers/{scraperTargetID}/owners/{userID}':
delete:
tags:
- Users
- ScraperTargets
summary: removes an owner from a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of owner to remove
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
responses:
'204':
description: owner removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/variables:
get:
tags:
- Variables
summary: get all variables
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: org
description: specifies the organization name of the resource
schema:
type: string
- in: query
name: orgID
description: specifies the organization id of the resource
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:
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}':
delete:
tags:
- Variables
summary: delete a variable
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: variableID
required: true
schema:
type: string
description: id of the variable
responses:
'204':
description: variable deleted
default:
description: internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
summary: update a variable
tags:
- Variables
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: variableID
required: true
schema:
type: string
description: id of the variable
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:
summary: replace a variable
tags:
- Variables
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: variableID
required: true
schema:
type: string
description: id of the variable
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"
/write:
post:
tags:
- Write
summary: write time-series data into influxdb
requestBody:
description: line protocol body
required: true
content:
text/plain:
schema:
type: string
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: header
name: Content-Encoding
description: when present, its value indicates to the database that compression is applied to the line-protocol body.
schema:
type: string
description: specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
default: identity
enum:
- gzip
- identity
- in: header
name: Content-Type
description: Content-Type is used to indicate the format of the data sent to the server.
schema:
type: string
description: text/plain specifies the text line protocol; charset is assumed to be utf-8.
default: text/plain; charset=utf-8
enum:
- text/plain
- text/plain; charset=utf-8
- 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.
schema:
type: integer
description: The length in decimal number of octets.
- in: header
name: Accept
description: specifies the return content format.
schema:
type: string
description: return format of any errors
default: application/json
enum:
- application/json
- in: query
name: org
description: specifies the destination organization for writes
required: true
schema:
type: string
description: all points within batch are written to this organization.
- in: query
name: bucket
description: specifies the destination bucket for writes
required: true
schema:
type: string
description: all points within batch are written to this bucket.
- in: query
name: precision
description: specifies the precision for the unix timestamps within the body line-protocol
schema:
$ref: "#/components/schemas/WritePrecision"
responses:
'204':
description: write data is correctly formatted and accepted for writing to the bucket.
'400':
description: line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
content:
application/json:
schema:
$ref: "#/components/schemas/LineProtocolError"
'401':
description: token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'403':
description: no token was sent and they are required.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'413':
description: write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
content:
application/json:
schema:
$ref: "#/components/schemas/LineProtocolLengthError"
'429':
description: token is temporarily over quota. The Retry-After header describes when to try the write again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
'503':
description: server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
default:
description: internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/ready:
get:
tags:
- Ready
summary: Get the readiness of a instance at startup. Allow us to confirm the instance is prepared to accept requests.
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'200':
description: the instance is ready
content:
application/json:
schema:
$ref: "#/components/schemas/Check"
'503':
description: the instance is not ready yet
content:
application/json:
schema:
$ref: "#/components/schemas/Check"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/health:
get:
tags:
- Health
summary: Get the health of an instance anytime during execution. Allow us to check if the instance is still healthy.
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'200':
description: the instance is healthy
content:
application/json:
schema:
$ref: "#/components/schemas/Check"
'503':
description: the instance is unhealthy
content:
application/json:
schema:
$ref: "#/components/schemas/Check"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/sources:
post:
tags:
- Sources
summary: Creates a Source
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: source to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Source"
responses:
'201':
description: Created Source
content:
application/json:
schema:
$ref: "#/components/schemas/Source"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
get:
tags:
- Sources
summary: Get all sources
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: org
description: specifies the organization of the resource
required: true
schema:
type: string
responses:
'200':
description: all sources
content:
application/json:
schema:
$ref: "#/components/schemas/Sources"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/sources/{sourceID}:
delete:
tags:
- Sources
summary: Delete a source
parameters:
- in: path
name: sourceID
schema:
type: string
required: true
description: ID of the source
responses:
'204':
description: delete has been accepted
'404':
description: view not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Sources
summary: Updates a Source
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: sourceID
schema:
type: string
required: true
description: ID of the source
requestBody:
description: source update
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Source"
responses:
'200':
description: Created Source
content:
application/json:
schema:
$ref: "#/components/schemas/Source"
'404':
description: source not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
get:
tags:
- Sources
summary: Get a source
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: sourceID
schema:
type: string
required: true
description: ID of the source
responses:
'200':
description: a source
content:
application/json:
schema:
$ref: "#/components/schemas/Source"
'404':
description: source not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/sources/{sourceID}/health:
get:
tags:
- Sources
summary: Get a sources health
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: sourceID
schema:
type: string
required: true
description: ID of the source
responses:
'200':
description: the source is healthy
content:
application/json:
schema:
$ref: "#/components/schemas/Check"
'503':
description: the source is not healthy
content:
application/json:
schema:
$ref: "#/components/schemas/Check"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/sources/{sourceID}/buckets:
get:
tags:
- Sources
- Buckets
summary: Get a sources buckets (will return dbrps in the form of buckets if it is a v1 source)
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: sourceID
schema:
type: string
required: true
description: ID of the source
- in: query
name: org
description: specifies the organization of the resource
required: true
schema:
type: string
responses:
'200':
description: a source
content:
application/json:
schema:
$ref: "#/components/schemas/Buckets"
'404':
description: source not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/labels:
post:
tags:
- Labels
summary: Create a label
requestBody:
description: label to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Label"
responses:
'201':
description: Added label
content:
application/json:
schema:
$ref: "#/components/schemas/LabelResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
get:
tags:
- Labels
summary: Get all labels
responses:
'200':
description: all labels
content:
application/json:
schema:
$ref: "#/components/schemas/LabelsResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/labels/{labelID}:
get:
tags:
- Labels
summary: Get a label
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: labelID
schema:
type: string
required: true
description: ID of label to update
responses:
'200':
description: a label
content:
application/json:
schema:
$ref: "#/components/schemas/LabelResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Labels
summary: Update a single label
requestBody:
description: label update
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LabelUpdate"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: labelID
schema:
type: string
required: true
description: ID of label to update
responses:
'200':
description: Updated label
content:
application/json:
schema:
$ref: "#/components/schemas/LabelResponse"
'404':
description: label not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
delete:
tags:
- Labels
summary: Delete a label
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: labelID
schema:
type: string
required: true
description: ID of label to delete
responses:
'204':
description: delete has been accepted
'404':
description: label not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/dashboards:
post:
tags:
- Dashboards
summary: Create a dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: dashboard to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboard"
responses:
'201':
description: Added dashboard
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboard"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
get:
tags:
- Dashboards
summary: Get all dashboards
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: owner
description: specifies the owner id to return resources for
schema:
type: string
- in: query
name: sortBy
description: specifies the owner id to return resources for
schema:
type: string
enum:
- "ID"
- "CreatedAt"
- "UpdatedAt"
- in: query
name: id
description: ID list of dashboards to return. If both this and owner are specified, only ids is used.
schema:
type: array
items:
type: string
- in: query
name: orgID
description: specifies the organization id of the resource
schema:
type: string
- in: query
name: org
description: specifies the organization name of the resource
schema:
type: string
responses:
'200':
description: all dashboards
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboards"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}':
get:
tags:
- Dashboards
summary: Get a single Dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to update
responses:
'200':
description: get a single dashboard
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboard"
'404':
description: dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Dashboards
summary: Update a single dashboard
requestBody:
description: patching of a dashboard
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboard"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to update
responses:
'200':
description: Updated dashboard
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboard"
'404':
description: dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
delete:
tags:
- Dashboards
summary: Delete a dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to update
responses:
'204':
description: delete has been accepted
'404':
description: dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/cells':
put:
tags:
- Cells
- Dashboards
summary: Replace a dashboards cells
requestBody:
description: batch replaces all of a dashboards cells (this is used primarily to update the positional information of all of the cells)
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Cells"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to update
responses:
'200':
description: Replaced dashboard cells
content:
application/json:
schema:
$ref: "#/components/schemas/Dashboard"
'404':
description: dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Cells
- Dashboards
summary: Create a dashboard cell
requestBody:
description: cell that will be added
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateCell"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to update
responses:
'201':
description: Cell successfully added
content:
application/json:
schema:
$ref: "#/components/schemas/Cell"
'404':
description: dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/cells/{cellID}':
patch:
tags:
- Cells
- Dashboards
summary: Update the non positional information related to a cell (because updates to a single cells positional data could cause grid conflicts)
requestBody:
description: updates the non positional information related to a cell
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CellUpdate"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to update
- in: path
name: cellID
schema:
type: string
required: true
description: ID of cell to update
responses:
'200':
description: Updated dashboard cell
content:
application/json:
schema:
$ref: "#/components/schemas/Cell"
'404':
description: cell or dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
delete:
tags:
- Cells
- Dashboards
summary: Delete a dashboard cell
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to delte
- in: path
name: cellID
schema:
type: string
required: true
description: ID of cell to delete
responses:
'204':
description: Cell successfully deleted
'404':
description: cell or dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/cells/{cellID}/view':
get:
tags:
- Cells
- Dashboards
- Views
summary: Retrieve the view for a cell in a dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard
- in: path
name: cellID
schema:
type: string
required: true
description: ID of cell
responses:
'200':
description: A dashboard cells view
content:
application/json:
schema:
$ref: "#/components/schemas/View"
'404':
description: cell or dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Cells
- Dashboards
- Views
summary: Update the view for a cell
requestBody:
description: updates the view for a cell
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/View"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of dashboard to update
- in: path
name: cellID
schema:
type: string
required: true
description: ID of cell to update
responses:
'200':
description: Updated cell view
content:
application/json:
schema:
$ref: "#/components/schemas/View"
'404':
description: cell or dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/labels':
get:
tags:
- Dashboards
summary: list all labels for a dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
responses:
'200':
description: a list of all labels for a dashboard
content:
application/json:
schema:
$ref: "#/components/schemas/LabelsResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Dashboards
summary: add a label to a dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
requestBody:
description: label to add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LabelMapping"
responses:
'200':
description: a list of all labels for a dashboard
content:
application/json:
schema:
$ref: "#/components/schemas/LabelResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/labels/{labelID}':
delete:
tags:
- Dashboards
summary: delete a label from a dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
- in: path
name: labelID
schema:
type: string
required: true
description: the label id to delete
responses:
'204':
description: delete has been accepted
'404':
description: dashboard not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/members':
get:
tags:
- Users
- Dashboards
summary: List all dashboard members
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
responses:
'200':
description: a list of users who have member privileges for a dashboard
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMembers"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Dashboards
summary: Add dashboard member
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
requestBody:
description: user to add as member
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: added to dashboard members
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMember"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/members/{userID}':
delete:
tags:
- Users
- Dashboards
summary: removes a member from an dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of member to remove
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
responses:
'204':
description: member removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/owners':
get:
tags:
- Users
- Dashboards
summary: List all dashboard owners
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
responses:
'200':
description: a list of users who have owner privileges for a dashboard
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwners"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Dashboards
summary: Add dashboard owner
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
requestBody:
description: user to add as owner
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: added to dashboard owners
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwner"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/dashboards/{dashboardID}/owners/{userID}':
delete:
tags:
- Users
- Dashboards
summary: removes an owner from an dashboard
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of owner to remove
- in: path
name: dashboardID
schema:
type: string
required: true
description: ID of the dashboard
responses:
'204':
description: owner removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/query/ast:
post:
description: analyzes flux query and generates a query specification.
tags:
- Query
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: header
name: Content-Type
schema:
type: string
enum:
- application/json
requestBody:
description: analyzed flux query to generate abstract syntax tree.
content:
application/json:
schema:
$ref: "#/components/schemas/LanguageRequest"
responses:
'200':
description: Abstract syntax tree of flux query.
content:
application/json:
schema:
$ref: "#/components/schemas/ASTResponse"
default:
description: Any response other than 200 is an internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/query/spec:
post:
description: analyzes flux query and generates a query specification.
tags:
- Query
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: header
name: Content-Type
schema:
type: string
enum:
- application/json
requestBody:
description: analyzed flux query to generate specification.
content:
application/json:
schema:
$ref: "#/components/schemas/LanguageRequest"
responses:
'200':
description: Specification of flux query.
content:
application/json:
schema:
$ref: "#/components/schemas/QuerySpecification"
default:
description: Any response other than 200 is an internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/query/suggestions:
get:
tags:
- Query
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'200':
description: Suggestions for next functions in call chain
content:
application/json:
schema:
$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}:
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: name
schema:
type: string
required: true
description: name of branching suggestion
get:
tags:
- Query
responses:
'200':
description: Suggestions for next functions in call chain
content:
application/json:
schema:
$ref: "#/components/schemas/FluxSuggestions"
default:
description: Any response other than 200 is an internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/authorizations:
get:
tags:
- Authorizations
summary: List all authorizations
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: userID
schema:
type: string
description: filter authorizations belonging to a user id
- in: query
name: user
schema:
type: string
description: filter authorizations belonging to a user 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:
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:
tags:
- Authorizations
summary: Retrieve an authorization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: authID
schema:
type: string
required: true
description: ID of 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:
tags:
- Authorizations
summary: update authorization to be active or inactive. requests using an inactive authorization will be rejected.
requestBody:
description: authorization to update to apply
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Authorization"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: authID
schema:
type: string
required: true
description: ID of 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:
tags:
- Authorizations
summary: Delete a authorization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: authID
schema:
type: string
required: true
description: ID of authorization to delete
responses:
'204':
description: authorization deleted
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/query/analyze:
post:
tags:
- Query
summary: analyze an influxql or flux query
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: header
name: Content-Type
schema:
type: string
enum:
- application/json
requestBody:
description: flux or influxql query to analyze
content:
application/json:
schema:
$ref: "#/components/schemas/Query"
responses:
'200':
description: query analyze results. Errors will be empty if the query is valid.
content:
application/json:
schema:
$ref: "#/components/schemas/AnalyzeQueryResponse"
default:
description: internal server error
headers:
X-Influx-Error:
description: error string describing the problem
schema:
type: string
X-Influx-Reference:
description: reference code unique to the error type
schema:
type: integer
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/query:
post:
tags:
- Query
summary: query an influx
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: header
name: Accept
description: specifies the return content format. Each response content type will have its own dialect options.
schema:
type: string
description: return format of either CSV or Arrow buffers
default: text/csv
enum:
- text/csv
- application/vnd.influx.arrow
- in: header
name: Content-Type
schema:
type: string
enum:
- application/json
- application/vnd.flux
- in: query
name: org
description: specifies the name of the organization executing the query.
schema:
type: string
- in: query
name: orgID
description: specifies the ID of the organization executing the query.
schema:
type: string
requestBody:
description: flux query or specification to execute
content:
application/json:
schema:
$ref: "#/components/schemas/Query"
application/vnd.flux:
schema:
type: string
responses:
'200':
description: query results
content:
text/csv:
schema:
type: string
example: >
result,table,_start,_stop,_time,region,host,_value
mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43
mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25
mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62
application/vnd.influx.arrow:
schema:
type: string
format: binary
'400':
description: error processing query
headers:
X-Influx-Error:
description: error string describing the problem
schema:
type: string
X-Influx-Reference:
description: reference code unique to the error type
schema:
type: integer
content:
text/csv:
schema:
type: string
example: >
error,reference
Failed to parse query,897
application/vnd.influx.arrow:
schema:
type: string
format: binary
default:
description: internal server error
headers:
X-Influx-Error:
description: error string describing the problem
schema:
type: string
X-Influx-Reference:
description: reference code unique to the error type
schema:
type: integer
content:
text/csv:
schema:
type: string
example: >
error,reference
Failed to parse query,897
application/vnd.influx.arrow:
schema:
type: string
format: binary
/buckets:
get:
tags:
- Buckets
summary: List all buckets
parameters:
- $ref: '#/components/parameters/TraceSpan'
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
- in: query
name: org
description: specifies the organization name of the resource
schema:
type: string
- in: query
name: orgID
description: specifies the organization id of the resource
schema:
type: string
- in: query
name: name
description: only returns buckets with the specified name
schema:
type: string
responses:
'200':
description: a list of buckets
content:
application/json:
schema:
$ref: "#/components/schemas/Buckets"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Buckets
summary: Create a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: bucket to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Bucket"
responses:
'201':
description: Bucket created
content:
application/json:
schema:
$ref: "#/components/schemas/Bucket"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/buckets/{bucketID}':
get:
tags:
- Buckets
summary: Retrieve a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of bucket to get
responses:
'200':
description: bucket details
content:
application/json:
schema:
$ref: "#/components/schemas/Bucket"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Buckets
summary: Update a bucket
requestBody:
description: bucket update to apply
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Bucket"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of bucket to update
responses:
'200':
description: An updated bucket
content:
application/json:
schema:
$ref: "#/components/schemas/Bucket"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
delete:
tags:
- Buckets
summary: Delete a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of bucket to delete
responses:
'204':
description: delete has been accepted
'404':
description: bucket not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/buckets/{bucketID}/labels':
get:
tags:
- Buckets
summary: list all labels for a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
responses:
'200':
description: a list of all labels for a bucket
content:
application/json:
schema:
type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
links:
$ref: "#/components/schemas/Links"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Buckets
summary: add a label to a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
requestBody:
description: label to add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LabelMapping"
responses:
'200':
description: a list of all labels for a bucket
content:
application/json:
schema:
type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
links:
$ref: "#/components/schemas/Links"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/buckets/{bucketID}/labels/{labelID}':
delete:
tags:
- Buckets
summary: delete a label from a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
- in: path
name: labelID
schema:
type: string
required: true
description: the label id to delete
responses:
'204':
description: delete has been accepted
'404':
description: bucket not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/buckets/{bucketID}/members':
get:
tags:
- Users
- Buckets
summary: List all users with member privileges for a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
responses:
'200':
description: a list of bucket members
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwners"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Buckets
summary: Add bucket member
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
requestBody:
description: user to add as member
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: member added to bucket
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMember"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/buckets/{bucketID}/members/{userID}':
delete:
tags:
- Users
- Buckets
summary: removes a member from an bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of member to remove
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
responses:
'204':
description: member removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/buckets/{bucketID}/owners':
get:
tags:
- Users
- Buckets
summary: List all owners of a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
responses:
'200':
description: a list of bucket owners
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMembers"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Buckets
summary: Add bucket owner
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
requestBody:
description: user to add as owner
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: bucket owner added
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwner"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/buckets/{bucketID}/owners/{userID}':
delete:
tags:
- Users
- Buckets
summary: removes an owner from a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of owner to remove
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
responses:
'204':
description: owner removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/orgs:
get:
tags:
- Organizations
summary: List all organizations
responses:
'200':
description: A list of organizations
content:
application/json:
schema:
$ref: "#/components/schemas/Organizations"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Organizations
summary: Create an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: organization to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Organization"
responses:
'201':
description: organization created
content:
application/json:
schema:
$ref: "#/components/schemas/Organization"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}':
get:
tags:
- Organizations
summary: Retrieve an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of organization to get
responses:
'200':
description: organization details
content:
application/json:
schema:
$ref: "#/components/schemas/Organization"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Organizations
summary: Update an organization
requestBody:
description: organization update to apply
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Organization"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of organization to get
responses:
'200':
description: organization updated
content:
application/json:
schema:
$ref: "#/components/schemas/Organization"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
delete:
tags:
- Organizations
summary: Delete an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of organization to delete
responses:
'204':
description: delete has been accepted
'404':
description: organization not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/labels':
get:
tags:
- Organizations
summary: list all labels for a organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
responses:
'200':
description: a list of all labels for an organization
content:
application/json:
schema:
type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
links:
$ref: "#/components/schemas/Links"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Organizations
summary: add a label to an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
requestBody:
description: label to add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LabelMapping"
responses:
'200':
description: returns the created label
content:
application/json:
schema:
$ref: "#/components/schemas/LabelResponse"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/labels/{labelID}':
delete:
tags:
- Organizations
summary: delete a label from an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
- in: path
name: labelID
schema:
type: string
required: true
description: the label id
responses:
'204':
description: delete has been accepted
'404':
description: organization not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/secrets':
get:
tags:
- Secrets
- Organizations
summary: List all secret keys for an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
responses:
'200':
description: a list of all secret keys
content:
application/json:
schema:
$ref: "#/components/schemas/SecretKeys"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Secrets
- Organizations
summary: Apply patch to the provided secrets
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
requestBody:
description: secret key value pairs to update/add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Secrets"
responses:
'204':
description: keys successfully patched
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/secrets/delete': # had to make this because swagger wouldn't let me have a request body with a DELETE
post:
tags:
- Secrets
- Organizations
summary: delete provided secrets
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
requestBody:
description: secret key to deleted
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/SecretKeys"
responses:
'204':
description: keys successfully patched
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/members':
get:
tags:
- Users
- Organizations
summary: List all members of an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
responses:
'200':
description: a list of organization members
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMembers"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Organizations
summary: Add organization member
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
requestBody:
description: user to add as member
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: added to organization created
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceMember"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/members/{userID}':
delete:
tags:
- Users
- Organizations
summary: removes a member from an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of member to remove
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
responses:
'204':
description: member removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/owners':
get:
tags:
- Users
- Organizations
summary: List all owners of an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
responses:
'200':
description: a list of organization owners
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwners"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Users
- Organizations
summary: Add organization owner
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
requestBody:
description: user to add as owner
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AddResourceMemberRequestBody"
responses:
'201':
description: organization owner added
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceOwner"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/orgs/{orgID}/owners/{userID}':
delete:
tags:
- Users
- Organizations
summary: removes an owner from an organization
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: userID
schema:
type: string
required: true
description: ID of owner to remove
- in: path
name: orgID
schema:
type: string
required: true
description: ID of the organization
responses:
'204':
description: owner removed
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/tasks:
get:
tags:
- Tasks
summary: List tasks.
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: after
schema:
type: string
description: returns tasks after specified ID
- in: query
name: user
schema:
type: string
description: filter tasks to a specific user ID
- in: query
name: org
schema:
type: string
description: filter tasks to a specific organization ID
- in: query
name: limit
schema:
type: integer
minimum: 1
maximum: 500
default: 100
description: the number of tasks to return
responses:
'200':
description: A list of tasks
content:
application/json:
schema:
type: object
properties:
tasks:
type: array
items:
$ref: "#/components/schemas/Task"
links:
$ref: "#/components/schemas/Links"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
tags:
- Tasks
summary: Create a new task
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: task to create
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TaskCreateRequest"
responses:
'201':
description: Task created
content:
application/json:
schema:
$ref: "#/components/schemas/Task"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'/tasks/{taskID}':
get:
tags:
- Tasks
summary: Retrieve an task
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: taskID
schema:
type: string
required: true
description: ID of task to get
responses:
'200':
description: task details
content:
application/json:
schema:
$ref: "#/components/schemas/Task"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
patch:
tags:
- Tasks
summary: Update a task
description: Update a task. This will cancel all queued runs.
requestBody:
description: task update to apply
required: true