2195 lines
80 KiB
YAML
2195 lines
80 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: InfluxDB 3 Cloud Dedicated Management API
|
|
description: |
|
|
The Management API for InfluxDB 3 Cloud Dedicated provides a programmatic interface for managing a Cloud Dedicated cluster.
|
|
The Management API lets you integrate functions such as creating and managing databases, permissions, and tokens into your workflow or application.
|
|
|
|
This documentation is generated from the
|
|
InfluxDB OpenAPI specification.
|
|
version: ''
|
|
license:
|
|
name: MIT
|
|
url: https://opensource.org/licenses/MIT
|
|
contact:
|
|
name: InfluxData
|
|
url: https://www.influxdata.com
|
|
email: support@influxdata.com
|
|
x-influxdata-short-title: Management API
|
|
servers:
|
|
- url: https://{baseurl}/api/v0
|
|
description: InfluxDB 3 Cloud Dedicated Management API URL
|
|
variables:
|
|
baseurl:
|
|
enum:
|
|
- console.influxdata.com
|
|
default: console.influxdata.com
|
|
description: InfluxDB 3 Cloud Dedicated Console URL
|
|
security:
|
|
- bearerAuthManagementToken: []
|
|
bearerAuthJwt: []
|
|
tags:
|
|
- name: Database tokens
|
|
description: Create and manage database tokens that authorize read and write access to InfluxDB 3 Cloud Dedicated databases.
|
|
x-related:
|
|
- title: Manage database tokens
|
|
href: /influxdb3/cloud-dedicated/admin/tokens/database/
|
|
- title: Delete a database token
|
|
href: /influxdb3/cloud-dedicated/admin/tokens/database/delete/
|
|
- title: Authenticate Telegraf using tokens in your OS secret store
|
|
href: https://github.com/influxdata/telegraf/tree/master/plugins/secretstores/os
|
|
- name: Databases
|
|
description: Create and manage databases in an InfluxDB 3 Cloud Dedicated cluster, including setting retention periods and custom partition templates.
|
|
x-related:
|
|
- title: Manage databases
|
|
href: /influxdb3/cloud-dedicated/admin/databases/
|
|
- title: Custom partitions
|
|
href: /influxdb3/cloud-dedicated/admin/custom-partitions/
|
|
- title: Partition templates
|
|
href: /influxdb3/cloud-dedicated/admin/custom-partitions/partition-templates/
|
|
- name: Quick start
|
|
x-traitTag: true
|
|
description: Get started creating a database, issuing tokens, and writing data with the InfluxDB 3 Cloud Dedicated Management API.
|
|
x-related:
|
|
- title: Get started with Cloud Dedicated
|
|
href: /influxdb3/cloud-dedicated/get-started/
|
|
- title: Set up your cluster
|
|
href: /influxdb3/cloud-dedicated/get-started/setup/
|
|
- name: Tables
|
|
description: Manage tables in an InfluxDB 3 Cloud Dedicated database, including creating tables with custom column schemas.
|
|
x-related:
|
|
- title: Manage tables
|
|
href: /influxdb3/cloud-dedicated/admin/tables/
|
|
- title: Create a table with custom partitioning
|
|
href: /influxdb3/cloud-dedicated/admin/tables/#create-a-table-with-custom-partitioning
|
|
- title: Custom partitions
|
|
href: /influxdb3/cloud-dedicated/admin/custom-partitions/
|
|
paths:
|
|
/accounts/{accountId}/clusters/{clusterId}/databases:
|
|
get:
|
|
operationId: GetClusterDatabases
|
|
summary: Get all databases for a cluster
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account to get the databases for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster to get the databases for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
responses:
|
|
'200':
|
|
description: The cluster databases were successfully retrieved
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
maxTables:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxTables'
|
|
maxColumnsPerTable:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxColumnsPerTable'
|
|
retentionPeriod:
|
|
$ref: '#/components/schemas/ClusterDatabaseRetentionPeriod'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- name
|
|
- maxTables
|
|
- maxColumnsPerTable
|
|
- retentionPeriod
|
|
example:
|
|
- accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseOne
|
|
maxTables: 500
|
|
maxColumnsPerTable: 200
|
|
retentionPeriod: 0
|
|
- accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseTwo
|
|
maxTables: 100
|
|
maxColumnsPerTable: 50
|
|
retentionPeriod: 300000000000
|
|
partitionTemplate:
|
|
- type: time
|
|
value: '%Y'
|
|
- type: tag
|
|
value: bananas
|
|
- type: tag
|
|
value: plátanos
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: ''
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
list_databases () {
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases" \
|
|
--header "Accept: application/json" \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
)
|
|
echo "$response"
|
|
}
|
|
tags:
|
|
- Databases
|
|
post:
|
|
operationId: CreateClusterDatabase
|
|
summary: Create a database
|
|
description: |
|
|
Create a database for a cluster.
|
|
|
|
The database name must be unique within the cluster.
|
|
|
|
**Default maximum number of columns**: 250
|
|
**Default maximum number of tables**: 500
|
|
|
|
The retention period is specified in nanoseconds. For example, to set a retention period of 1 hour, use `3600000000000`.
|
|
|
|
InfluxDB Cloud Dedicated lets you define a custom partitioning strategy for each database and table.
|
|
A _partition_ is a logical grouping of data stored in Apache Parquet.
|
|
By default, data is partitioned by day,
|
|
but, depending on your schema and workload, customizing the partitioning
|
|
strategy can improve query performance.
|
|
|
|
To use custom partitioning, you define a partition template.
|
|
If a table doesn't have a custom partition template, it inherits the database's template.
|
|
The partition template is set at the time of database creation and cannot be changed later.
|
|
tags:
|
|
- Databases
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account to create the database for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster to create the database for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
maxTables:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxTables'
|
|
maxColumnsPerTable:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxColumnsPerTable'
|
|
retentionPeriod:
|
|
$ref: '#/components/schemas/ClusterDatabaseRetentionPeriod'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- name
|
|
examples:
|
|
requiredFieldsOnly:
|
|
summary: Required Fields Only
|
|
value:
|
|
name: DatabaseOne
|
|
allFields:
|
|
summary: All Fields
|
|
value:
|
|
name: DatabaseTwo
|
|
maxTables: 100
|
|
maxColumnsPerTable: 50
|
|
retentionPeriod: 300000000000
|
|
partitionTemplate:
|
|
- type: time
|
|
value: '%Y'
|
|
- type: tag
|
|
value: bananas
|
|
- type: tag
|
|
value: plátanos
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
responses:
|
|
'200':
|
|
description: The cluster database was successfully created
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
maxTables:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxTables'
|
|
maxColumnsPerTable:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxColumnsPerTable'
|
|
retentionPeriod:
|
|
$ref: '#/components/schemas/ClusterDatabaseRetentionPeriod'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- name
|
|
- maxTables
|
|
- maxColumnsPerTable
|
|
- retentionPeriod
|
|
examples:
|
|
requiredFieldsOnly:
|
|
summary: Required Fields Only
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseOne
|
|
maxTables: 500
|
|
maxColumnsPerTable: 200
|
|
retentionPeriod: 0
|
|
allFields:
|
|
summary: All Fields
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseTwo
|
|
maxTables: 100
|
|
maxColumnsPerTable: 50
|
|
retentionPeriod: 300000000000
|
|
partitionTemplate:
|
|
- type: time
|
|
value: '%Y'
|
|
- type: tag
|
|
value: a
|
|
- type: tag
|
|
value: c
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'409':
|
|
$ref: '#/components/responses/Conflict'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
create_database () {
|
|
local databaseName=$1
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases" \
|
|
--header "Accept: application/json" \
|
|
--header 'Content-Type: application/json' \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
--data '{
|
|
"name": "'$databaseName'",
|
|
"maxTables": 75,
|
|
"maxColumnsPerTable": 90,
|
|
"retentionPeriod": 600000000000,
|
|
"partitionTemplate": [
|
|
{
|
|
"type": "tag",
|
|
"value": "abc"
|
|
},
|
|
{
|
|
"type": "bucket",
|
|
"value": {
|
|
"tagName": "def",
|
|
"numberOfBuckets": 5
|
|
}
|
|
}
|
|
]
|
|
}' \
|
|
)
|
|
echo "$response"
|
|
}
|
|
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}:
|
|
patch:
|
|
operationId: UpdateClusterDatabase
|
|
summary: Update a database
|
|
tags:
|
|
- Databases
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseName
|
|
in: path
|
|
description: The name of the database to update
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
maxTables:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxTables'
|
|
maxColumnsPerTable:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxColumnsPerTable'
|
|
retentionPeriod:
|
|
$ref: '#/components/schemas/ClusterDatabaseRetentionPeriod'
|
|
minProperties: 1
|
|
examples:
|
|
allFields:
|
|
summary: Update All Fields
|
|
value:
|
|
maxTables: 300
|
|
maxColumnsPerTable: 150
|
|
retentionPeriod: 600000000000
|
|
maxTablesOnly:
|
|
summary: Update Max Tables Only
|
|
value:
|
|
maxTables: 300
|
|
maxColumnsPerTableOnly:
|
|
summary: Update Max Columns Per Table Only
|
|
value:
|
|
maxColumnsPerTable: 150
|
|
retentionPeriodOnly:
|
|
summary: Update Retention Period Only
|
|
value:
|
|
retentionPeriod: 600000000000
|
|
responses:
|
|
'200':
|
|
description: The cluster database was successfully updated.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
maxTables:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxTables'
|
|
maxColumnsPerTable:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxColumnsPerTable'
|
|
retentionPeriod:
|
|
$ref: '#/components/schemas/ClusterDatabaseRetentionPeriod'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- maxTables
|
|
- maxColumnsPerTable
|
|
- retentionPeriod
|
|
- name
|
|
examples:
|
|
allFields:
|
|
summary: Update All Fields
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseOne
|
|
maxTables: 300
|
|
maxColumnsPerTable: 150
|
|
retentionPeriod: 600000000000
|
|
maxTablesOnly:
|
|
summary: Update Max Tables Only
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseOne
|
|
maxTables: 300
|
|
maxColumnsPerTable: 200
|
|
retentionPeriod: 0
|
|
maxColumnsPerTableOnly:
|
|
summary: Update Max Columns Per Table Only
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseOne
|
|
maxTables: 500
|
|
maxColumnsPerTable: 150
|
|
retentionPeriod: 0
|
|
retentionPeriodOnly:
|
|
summary: Update Retention Period Only
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
name: DatabaseOne
|
|
maxTables: 500
|
|
maxColumnsPerTable: 200
|
|
retentionPeriod: 600000000000
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
update_database () {
|
|
local databaseName=$1
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases/$databaseName" \
|
|
--request PATCH \
|
|
--header "Accept: application/json" \
|
|
--header 'Content-Type: application/json' \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
--data '{
|
|
"maxTables": 150,
|
|
"maxColumnsPerTable": 180,
|
|
"retentionPeriod": 1200000000000
|
|
}' \
|
|
)
|
|
echo "$response"
|
|
}
|
|
delete:
|
|
operationId: DeleteClusterDatabase
|
|
summary: Delete a database
|
|
tags:
|
|
- Databases
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseName
|
|
in: path
|
|
description: The name of the database to delete
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
responses:
|
|
'204':
|
|
description: The cluster database was successfully deleted
|
|
$ref: '#/components/responses/NoContent'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
delete_database () {
|
|
local databaseName=$1
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases/$databaseName" \
|
|
--request DELETE \
|
|
--header "Accept: application/json" \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
)
|
|
echo "$response"
|
|
}
|
|
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables:
|
|
post:
|
|
operationId: CreateClusterDatabaseTable
|
|
summary: Create a database table
|
|
description: |
|
|
Create a table. The database must already exist. With InfluxDB Cloud Dedicated, tables and measurements are synonymous.
|
|
|
|
Typically, tables are created automatically on write using the measurement name
|
|
specified in line protocol written to InfluxDB.
|
|
However, to apply a custom partition template
|
|
to a table, you must manually create the table with custom partitioning before you write any data to it.
|
|
|
|
Partitioning defaults to `%Y-%m-%d` (daily).
|
|
When a partition template is applied to a database, it becomes the default template
|
|
for all tables in that database, but can be overridden when creating a
|
|
table.
|
|
tags:
|
|
- Tables
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account to create the database table for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster to create the database table for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseName
|
|
in: path
|
|
description: The name of the database to create the database table for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseTableName'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- name
|
|
examples:
|
|
requiredFieldsOnly:
|
|
summary: Required Fields Only
|
|
value:
|
|
name: TableOne
|
|
allFields:
|
|
summary: All Fields
|
|
value:
|
|
name: TableTwo
|
|
partitionTemplate:
|
|
- type: time
|
|
value: '%Y'
|
|
- type: tag
|
|
value: bananas
|
|
- type: tag
|
|
value: plátanos
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
responses:
|
|
'200':
|
|
description: The cluster database table was successfully created
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database table belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database table belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
databaseName:
|
|
description: The name of the database that the database table belongs to
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
name:
|
|
description: The name of the database table
|
|
$ref: '#/components/schemas/ClusterDatabaseTableName'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- databaseName
|
|
- name
|
|
examples:
|
|
requiredFieldsOnly:
|
|
summary: Required Fields Only
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
databaseName: DatabaseOne
|
|
name: TableOne
|
|
allFields:
|
|
summary: All Fields
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
databaseName: DatabaseOne
|
|
name: TableTwo
|
|
partitionTemplate:
|
|
- type: time
|
|
value: '%Y'
|
|
- type: tag
|
|
value: a
|
|
- type: tag
|
|
value: c
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'409':
|
|
$ref: '#/components/responses/Conflict'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables/{tableName}:
|
|
delete:
|
|
operationId: DeleteClusterDatabaseTable
|
|
summary: Delete a database table
|
|
tags:
|
|
- Tables
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseName
|
|
in: path
|
|
description: The name of the database that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
- name: tableName
|
|
in: path
|
|
description: The name of the database table to delete
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseTableName'
|
|
responses:
|
|
'204':
|
|
description: The cluster database table was successfully deleted
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables/{tableName}/rename:
|
|
put:
|
|
operationId: RenameClusterDatabaseTable
|
|
summary: Rename a database table
|
|
tags:
|
|
- Tables
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseName
|
|
in: path
|
|
description: The name of the database that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
- name: tableName
|
|
in: path
|
|
description: The name of the database table to rename
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseTableName'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseTableName'
|
|
required:
|
|
- name
|
|
examples:
|
|
allFields:
|
|
summary: All Fields
|
|
value:
|
|
name: RenamedTableName
|
|
responses:
|
|
'200':
|
|
description: The cluster database table was successfully renamed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database table belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database table belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
databaseName:
|
|
description: The name of the database that the table belongs to
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
id:
|
|
description: The ID of the table
|
|
type: integer
|
|
format: int64
|
|
name:
|
|
description: The name of the table
|
|
$ref: '#/components/schemas/ClusterDatabaseTableName'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- databaseName
|
|
- id
|
|
- name
|
|
example:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
databaseName: DatabaseName
|
|
id: 12345
|
|
name: RenamedDatabaseTable
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'409':
|
|
$ref: '#/components/responses/Conflict'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables/{tableId}/undelete:
|
|
put:
|
|
operationId: UndeleteClusterDatabaseTable
|
|
summary: Undelete a database table
|
|
description: |
|
|
Restores a previously deleted database table.
|
|
|
|
This operation can only be performed on tables that have been soft-deleted and are still within the recovery window.
|
|
tags:
|
|
- Tables
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseName
|
|
in: path
|
|
description: The name of the database that the table belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
- name: tableId
|
|
in: path
|
|
description: The ID of the table to undelete
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
format: int64
|
|
responses:
|
|
'200':
|
|
description: The cluster database table was successfully undeleted
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database table belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database table belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
databaseName:
|
|
description: The name of the database that the table belongs to
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
id:
|
|
description: The ID of the table
|
|
type: integer
|
|
format: int64
|
|
name:
|
|
description: The name of the table
|
|
$ref: '#/components/schemas/ClusterDatabaseTableName'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- databaseName
|
|
- id
|
|
- name
|
|
example:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
databaseName: DatabaseOne
|
|
id: 12345
|
|
name: TableOne
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseId}/undelete:
|
|
put:
|
|
operationId: UndeleteClusterDatabase
|
|
summary: Undelete a database
|
|
description: |
|
|
Restores a previously deleted database.
|
|
|
|
This operation can only be performed on databases that have been soft-deleted and are still within the recovery window.
|
|
tags:
|
|
- Databases
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseId
|
|
in: path
|
|
description: The ID of the database to undelete
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseId'
|
|
responses:
|
|
'200':
|
|
description: The cluster database was successfully undeleted
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
id:
|
|
description: The ID of the database
|
|
$ref: '#/components/schemas/ClusterDatabaseId'
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
maxTables:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxTables'
|
|
maxColumnsPerTable:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxColumnsPerTable'
|
|
retentionPeriod:
|
|
$ref: '#/components/schemas/ClusterDatabaseRetentionPeriod'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- id
|
|
- name
|
|
- maxTables
|
|
- maxColumnsPerTable
|
|
example:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 12345
|
|
name: DatabaseOne
|
|
maxTables: 500
|
|
maxColumnsPerTable: 200
|
|
retentionPeriod: 300000000000
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/rename:
|
|
put:
|
|
operationId: RenameClusterDatabase
|
|
summary: Rename a database
|
|
description: |
|
|
Renames an existing database.
|
|
|
|
This operation can only be performed on databases that are currently active.
|
|
tags:
|
|
- Databases
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: databaseName
|
|
in: path
|
|
description: The name of the database to rename
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
required:
|
|
- name
|
|
examples:
|
|
allFields:
|
|
summary: All Fields
|
|
value:
|
|
name: RenamedDatabaseName
|
|
responses:
|
|
'200':
|
|
description: The cluster database was successfully renamed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
id:
|
|
description: The ID of the database
|
|
$ref: '#/components/schemas/ClusterDatabaseId'
|
|
name:
|
|
$ref: '#/components/schemas/ClusterDatabaseName'
|
|
maxTables:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxTables'
|
|
maxColumnsPerTable:
|
|
$ref: '#/components/schemas/ClusterDatabaseMaxColumnsPerTable'
|
|
retentionPeriod:
|
|
$ref: '#/components/schemas/ClusterDatabaseRetentionPeriod'
|
|
partitionTemplate:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplate'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- id
|
|
- name
|
|
- maxTables
|
|
- maxColumnsPerTable
|
|
example:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 12345
|
|
name: RenamedDatabaseName
|
|
maxTables: 500
|
|
maxColumnsPerTable: 200
|
|
retentionPeriod: 300000000000
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'409':
|
|
$ref: '#/components/responses/Conflict'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
/accounts/{accountId}/clusters/{clusterId}/tokens:
|
|
get:
|
|
operationId: GetDatabaseTokens
|
|
summary: Get all database tokens for a cluster
|
|
tags:
|
|
- Database tokens
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account to get the database tokens for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster to get the database tokens for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
responses:
|
|
'200':
|
|
description: The database tokens were successfully retrieved
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
id:
|
|
description: The ID of the database token
|
|
$ref: '#/components/schemas/UuidV4'
|
|
description:
|
|
$ref: '#/components/schemas/DatabaseTokenDescription'
|
|
permissions:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissions'
|
|
createdAt:
|
|
$ref: '#/components/schemas/DatabaseTokenCreatedAt'
|
|
expiresAt:
|
|
$ref: '#/components/schemas/DatabaseTokenExpiresAt'
|
|
revokedAt:
|
|
$ref: '#/components/schemas/DatabaseTokenRevokedAt'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- id
|
|
- description
|
|
- permissions
|
|
- createdAt
|
|
example:
|
|
- accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 55555555-5555-4555-8555-555555555555
|
|
description: Limited Access Token
|
|
permissions:
|
|
- action: read
|
|
resource: DatabaseOne
|
|
- action: write
|
|
resource: DatabaseTwo
|
|
createdAt: '2023-12-21T17:32:28.000Z'
|
|
- accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 66666666-6666-4666-8666-666666666666
|
|
description: Full Access Token
|
|
permissions:
|
|
- action: write
|
|
resource: '*'
|
|
createdAt: '2024-03-02T04:20:19.000Z'
|
|
- accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 77777777-7777-4777-8777-777777777777
|
|
description: No Access Token
|
|
permissions: []
|
|
createdAt: '2024-03-02T04:20:19.000Z'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
list_tokens () {
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens" \
|
|
--header "Accept: application/json" \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
)
|
|
echo "$response"
|
|
}
|
|
post:
|
|
operationId: CreateDatabaseToken
|
|
summary: Create a database token
|
|
tags:
|
|
- Database tokens
|
|
description: |
|
|
Create a database token for a cluster.
|
|
|
|
The token returned on the `accessToken` property in the response can be used to authenticate query and write requests to the cluster.
|
|
|
|
### Notable behaviors
|
|
|
|
- InfluxDB might take some time--from a few seconds to a few minutes--to activate and synchronize new tokens. If a new database token doesn't immediately work (you receive a `401 Unauthorized` error) for querying or writing, wait and then try your request again.
|
|
|
|
- Token strings are viewable _only_ on token creation and aren't stored by InfluxDB; you can't recover a lost token.
|
|
|
|
#### Store secure tokens in a secret store
|
|
|
|
We recommend storing database tokens in a **secure secret store**.
|
|
For example, see how to authenticate Telegraf using tokens in your OS secret store.
|
|
|
|
If you lose a token, delete the token from InfluxDB and create a new one.
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account to create the database token for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster to create the database token for
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
description:
|
|
$ref: '#/components/schemas/DatabaseTokenDescription'
|
|
permissions:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissions'
|
|
expiresAt:
|
|
$ref: '#/components/schemas/DatabaseTokenExpiresAt'
|
|
required:
|
|
- description
|
|
examples:
|
|
limitedAccessToken:
|
|
summary: Limited Access Token
|
|
value:
|
|
description: Limited Access Token
|
|
permissions:
|
|
- action: read
|
|
resource: DatabaseOne
|
|
- action: write
|
|
resource: DatabaseTwo
|
|
fullAccessToken:
|
|
summary: Full Access Token
|
|
value:
|
|
description: Full Access Token
|
|
permissions:
|
|
- action: write
|
|
resource: '*'
|
|
noAccessToken:
|
|
summary: No Access Token
|
|
value:
|
|
description: No Access Token
|
|
permissions: []
|
|
responses:
|
|
'200':
|
|
description: The database token was successfully created
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
id:
|
|
description: The ID of the database token
|
|
$ref: '#/components/schemas/UuidV4'
|
|
description:
|
|
$ref: '#/components/schemas/DatabaseTokenDescription'
|
|
permissions:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissions'
|
|
createdAt:
|
|
$ref: '#/components/schemas/DatabaseTokenCreatedAt'
|
|
accessToken:
|
|
$ref: '#/components/schemas/DatabaseTokenAccessToken'
|
|
expiresAt:
|
|
$ref: '#/components/schemas/DatabaseTokenExpiresAt'
|
|
revokedAt:
|
|
$ref: '#/components/schemas/DatabaseTokenRevokedAt'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- id
|
|
- description
|
|
- permissions
|
|
- createdAt
|
|
- accessToken
|
|
examples:
|
|
limitedAccessToken:
|
|
summary: Limited Access Token
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 55555555-5555-4555-8555-555555555555
|
|
description: Limited Access Token
|
|
permissions:
|
|
- action: read
|
|
resource: DatabaseOne
|
|
- action: write
|
|
resource: DatabaseTwo
|
|
createdAt: '2023-12-21T17:32:28.000Z'
|
|
accessToken: apiv1_5555555555555555555555555555555555555555555555555555555555555555
|
|
fullAccessToken:
|
|
summary: Full Access Token
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 66666666-6666-4666-8666-666666666666
|
|
description: Full Access Token
|
|
permissions:
|
|
- action: write
|
|
resource: '*'
|
|
createdAt: '2024-03-02T04:20:19.000Z'
|
|
accessToken: apiv1_6666666666666666666666666666666666666666666666666666666666666666
|
|
noAccessToken:
|
|
summary: No Access Token
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 66666666-6666-4666-8666-666666666666
|
|
description: No Access Token
|
|
permissions: []
|
|
createdAt: '2024-03-02T04:20:19.000Z'
|
|
accessToken: apiv1_7777777777777777777777777777777777777777777777777777777777777777
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'409':
|
|
$ref: '#/components/responses/Conflict'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
create_token () {
|
|
local description=$1
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens" \
|
|
--header "Accept: application/json" \
|
|
--header 'Content-Type: application/json' \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
--data '{
|
|
"description": "'$description'",
|
|
"permissions": [
|
|
{
|
|
"action": "read",
|
|
"resource": "DatabaseOne"
|
|
},
|
|
{
|
|
"action": "write",
|
|
"resource": "DatabaseTwo"
|
|
}
|
|
]
|
|
}' \
|
|
)
|
|
echo "$response"
|
|
}
|
|
/accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}:
|
|
get:
|
|
operationId: GetDatabaseToken
|
|
summary: Get a database token
|
|
description: |
|
|
Retrieve metadata details for a database token.
|
|
|
|
#### Store secure tokens in a secret store
|
|
|
|
We recommend storing database tokens in a **secure secret store**.
|
|
|
|
Token strings are viewable _only_ on token creation and aren't stored by InfluxDB; you can't recover a lost token.
|
|
tags:
|
|
- Database tokens
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database token belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database token belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: tokenId
|
|
in: path
|
|
description: The ID of the database token to get
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
responses:
|
|
'200':
|
|
description: The database token was successfully retrieved.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
id:
|
|
description: The ID of the database token
|
|
$ref: '#/components/schemas/UuidV4'
|
|
description:
|
|
$ref: '#/components/schemas/DatabaseTokenDescription'
|
|
permissions:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissions'
|
|
createdAt:
|
|
$ref: '#/components/schemas/DatabaseTokenCreatedAt'
|
|
expiresAt:
|
|
$ref: '#/components/schemas/DatabaseTokenExpiresAt'
|
|
revokedAt:
|
|
$ref: '#/components/schemas/DatabaseTokenRevokedAt'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- id
|
|
- description
|
|
- permissions
|
|
- createdAt
|
|
examples:
|
|
limitedAccessToken:
|
|
summary: Limited Access Token
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 55555555-5555-4555-8555-555555555555
|
|
description: Limited Access Token
|
|
permissions:
|
|
- action: read
|
|
resource: DatabaseOne
|
|
- action: write
|
|
resource: DatabaseTwo
|
|
createdAt: '2023-12-21T17:32:28.000Z'
|
|
fullAccessToken:
|
|
summary: Full Access Token
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 66666666-6666-4666-8666-666666666666
|
|
description: Full Access Token
|
|
permissions:
|
|
- action: write
|
|
resource: '*'
|
|
createdAt: '2024-03-02T04:20:19.000Z'
|
|
noAccessToken:
|
|
summary: No Access Token
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 77777777-7777-4777-8777-777777777777
|
|
description: No Access Token
|
|
permissions: []
|
|
createdAt: '2024-03-02T04:20:19.000Z'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
get_token () {
|
|
local tokenId=$1
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId" \
|
|
--header "Accept: application/json" \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
)
|
|
echo "$response"
|
|
}
|
|
patch:
|
|
operationId: UpdateDatabaseToken
|
|
summary: Update a database token
|
|
description: |
|
|
Update the description and permissions of a database token.
|
|
tags:
|
|
- Database tokens
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database token belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database token belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: tokenId
|
|
in: path
|
|
description: The ID of the database token to update
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
description:
|
|
$ref: '#/components/schemas/DatabaseTokenDescription'
|
|
permissions:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissions'
|
|
minProperties: 1
|
|
examples:
|
|
allFields:
|
|
summary: Update All Fields
|
|
value:
|
|
description: Updated Limited Access Token
|
|
permissions:
|
|
- action: write
|
|
resource: DatabaseOne
|
|
- action: read
|
|
resource: DatabaseTwo
|
|
- action: write
|
|
resource: DatabaseThree
|
|
descriptionOnly:
|
|
summary: Update Description Only
|
|
value:
|
|
description: Updated Limited Access Token
|
|
permissionsOnly:
|
|
summary: Update Permissions Only
|
|
value:
|
|
permissions:
|
|
- action: write
|
|
resource: DatabaseOne
|
|
- action: read
|
|
resource: DatabaseTwo
|
|
- action: write
|
|
resource: DatabaseThree
|
|
removeAllPermissions:
|
|
summary: Remove All Permissions
|
|
value:
|
|
permissions: []
|
|
responses:
|
|
'200':
|
|
description: The database token was successfully updated
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
accountId:
|
|
description: The ID of the account that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
clusterId:
|
|
description: The ID of the cluster that the database token belongs to
|
|
$ref: '#/components/schemas/UuidV4'
|
|
id:
|
|
description: The ID of the database token
|
|
$ref: '#/components/schemas/UuidV4'
|
|
description:
|
|
$ref: '#/components/schemas/DatabaseTokenDescription'
|
|
permissions:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissions'
|
|
createdAt:
|
|
$ref: '#/components/schemas/DatabaseTokenCreatedAt'
|
|
expiresAt:
|
|
$ref: '#/components/schemas/DatabaseTokenExpiresAt'
|
|
revokedAt:
|
|
$ref: '#/components/schemas/DatabaseTokenRevokedAt'
|
|
required:
|
|
- accountId
|
|
- clusterId
|
|
- id
|
|
- description
|
|
- permissions
|
|
- createdAt
|
|
examples:
|
|
allFields:
|
|
summary: Update All Fields
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 55555555-5555-4555-8555-555555555555
|
|
description: Updated Limited Access Token
|
|
permissions:
|
|
- action: write
|
|
resource: DatabaseOne
|
|
- action: read
|
|
resource: DatabaseTwo
|
|
- action: write
|
|
resource: DatabaseThree
|
|
createdAt: '2023-12-21T17:32:28.000Z'
|
|
descriptionOnly:
|
|
summary: Update Description Only
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 55555555-5555-4555-8555-555555555555
|
|
description: Updated Limited Access Token
|
|
permissions:
|
|
- action: read
|
|
resource: DatabaseOne
|
|
- action: write
|
|
resource: DatabaseTwo
|
|
createdAt: '2023-12-21T17:32:28.000Z'
|
|
permissionsOnly:
|
|
summary: Update Permissions Only
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 55555555-5555-4555-8555-555555555555
|
|
description: Limited Access Token
|
|
permissions:
|
|
- action: write
|
|
resource: DatabaseOne
|
|
- action: read
|
|
resource: DatabaseTwo
|
|
- action: write
|
|
resource: DatabaseThree
|
|
createdAt: '2023-12-21T17:32:28.000Z'
|
|
removeAllPermissions:
|
|
summary: Remove All Permissions
|
|
value:
|
|
accountId: 11111111-1111-4111-8111-111111111111
|
|
clusterId: 33333333-3333-4333-8333-333333333333
|
|
id: 55555555-5555-4555-8555-555555555555
|
|
description: Limited Access Token
|
|
permissions: []
|
|
createdAt: '2023-12-21T17:32:28.000Z'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'409':
|
|
$ref: '#/components/responses/Conflict'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
update_token () {
|
|
local tokenId=$1
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId" \
|
|
--request PATCH \
|
|
--header "Accept: application/json" \
|
|
--header 'Content-Type: application/json' \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
--data '{
|
|
"description": "Updated Limited Access Token",
|
|
"permissions": [
|
|
{
|
|
"action": "write",
|
|
"resource": "DatabaseOne"
|
|
},
|
|
{
|
|
"action": "read",
|
|
"resource": "DatabaseTwo"
|
|
},
|
|
{
|
|
"action": "write",
|
|
"resource": "DatabaseThree"
|
|
}
|
|
]
|
|
}' \
|
|
)
|
|
echo "$response"
|
|
}
|
|
delete:
|
|
operationId: DeleteDatabaseToken
|
|
summary: Delete a database token
|
|
tags:
|
|
- Database tokens
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
description: The ID of the account that the database token belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: clusterId
|
|
in: path
|
|
description: The ID of the cluster that the database token belongs to
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
- name: tokenId
|
|
in: path
|
|
description: The ID of the database token to delete
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/UuidV4'
|
|
responses:
|
|
'204':
|
|
description: The database token was successfully deleted
|
|
$ref: '#/components/responses/NoContent'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest'
|
|
'401':
|
|
$ref: '#/components/responses/Unauthorized'
|
|
'403':
|
|
$ref: '#/components/responses/Forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/NotFound'
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError'
|
|
x-codeSamples:
|
|
- label: cURL
|
|
lang: Shell
|
|
source: |
|
|
HOST="https://console.influxdata.com"
|
|
|
|
delete_token () {
|
|
local tokenId=$1
|
|
local response=$( \
|
|
curl \
|
|
--location "$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId" \
|
|
--request DELETE \
|
|
--header "Accept: application/json" \
|
|
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
|
|
)
|
|
echo "$response"
|
|
}
|
|
components:
|
|
schemas:
|
|
Error:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: integer
|
|
message:
|
|
type: string
|
|
examples:
|
|
- code: 400
|
|
message: bad request
|
|
- code: 401
|
|
message: unauthorized
|
|
- code: 403
|
|
message: forbidden
|
|
- code: 404
|
|
message: not found
|
|
- code: 409
|
|
message: conflict
|
|
- code: 500
|
|
message: internal server error
|
|
required:
|
|
- code
|
|
- message
|
|
DateTimeRfc3339:
|
|
type: string
|
|
format: date-time
|
|
examples:
|
|
- '2023-12-21T17:32:28Z'
|
|
UuidV4:
|
|
type: string
|
|
format: uuid
|
|
examples:
|
|
- 11111111-1111-4111-8111-111111111111
|
|
- 22222222-1111-4111-8111-111111111111
|
|
ClusterDatabaseName:
|
|
description: The name of the cluster database
|
|
type: string
|
|
examples:
|
|
- DatabaseOne
|
|
- DatabaseTwo
|
|
maxLength: 64
|
|
minLength: 1
|
|
ClusterDatabaseId:
|
|
description: The ID of the cluster database
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
ClusterDatabaseRetentionPeriod:
|
|
description: |
|
|
The retention period of the cluster database in nanoseconds, if applicable
|
|
|
|
If the retention period is not set or is set to 0, the database will have infinite retention
|
|
type: integer
|
|
format: int64
|
|
default: 0
|
|
examples:
|
|
- 300000000000
|
|
- 600000000000
|
|
minimum: 0
|
|
ClusterDatabaseMaxTables:
|
|
description: The maximum number of tables for the cluster database
|
|
type: integer
|
|
format: int32
|
|
default: 500
|
|
examples:
|
|
- 100
|
|
- 300
|
|
minimum: 1
|
|
ClusterDatabaseMaxColumnsPerTable:
|
|
description: The maximum number of columns per table for the cluster database
|
|
type: integer
|
|
format: int32
|
|
default: 200
|
|
examples:
|
|
- 50
|
|
- 150
|
|
minimum: 1
|
|
ClusterDatabasePartitionTemplate:
|
|
description: |
|
|
A template for partitioning a cluster database.
|
|
|
|
Each partition template part is evaluated in sequence.
|
|
The outputs from each part are concatenated with the
|
|
`|` delimiter to form the final partition key.
|
|
|
|
For example, using the partition template below:
|
|
|
|
```json
|
|
[
|
|
{
|
|
"type": "time",
|
|
"value": "%Y"
|
|
},
|
|
{
|
|
"type": "tag",
|
|
"value": "bananas"
|
|
},
|
|
{
|
|
"type": "tag",
|
|
"value": "plátanos"
|
|
},
|
|
{
|
|
"type": "bucket",
|
|
"value": {
|
|
"tagName": "c",
|
|
"numberOfBuckets": 10
|
|
}
|
|
}
|
|
]
|
|
```
|
|
|
|
The following partition keys are derived:
|
|
|
|
* `time=2023-01-01, a=bananas, b=plátanos, c=ananas` -> `2023|bananas|plátanos|5`
|
|
* `time=2023-01-01, b=plátanos` -> `2023|!|plátanos|!`
|
|
* `time=2023-01-01, another=cat, b=plátanos` -> `2023|!|plátanos|!`
|
|
* `time=2023-01-01` -> `2023|!|!|!`
|
|
* `time=2023-01-01, a=cat|dog, b=!, c=!` -> `2023|cat%7Cdog|%21|8`
|
|
* `time=2023-01-01, a=%50, c=%50` -> `2023|%2550|!|9`
|
|
* `time=2023-01-01, a=, c=` -> `2023|^|!|0`
|
|
* `time=2023-01-01, a=<long string>` -> `2023|<long string>#|!|!`
|
|
* `time=2023-01-01, c=<long string>` -> `2023|!|!|<bucket ID for untruncated long string>`
|
|
|
|
When using the default partitioning template (YYYY-MM-DD) there is no
|
|
encoding necessary, as the derived partition key contains a single part, and
|
|
no reserved characters. [`TemplatePart::Bucket`] parts by definition will
|
|
always be within the part length limit and contain no restricted characters
|
|
so are also not percent-encoded and/or truncated.
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/ClusterDatabasePartitionTemplatePart'
|
|
examples:
|
|
- - type: time
|
|
value: '%Y'
|
|
- type: tag
|
|
value: bananas
|
|
- type: tag
|
|
value: plátanos
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
maxItems: 8
|
|
minItems: 1
|
|
uniqueItems: true
|
|
ClusterDatabasePartitionTemplatePart:
|
|
description: A sub-part of a `PartitionTemplate`
|
|
anyOf:
|
|
- $ref: '#/components/schemas/ClusterDatabasePartitionTemplatePartTagValue'
|
|
- $ref: '#/components/schemas/ClusterDatabasePartitionTemplatePartTimeFormat'
|
|
- $ref: '#/components/schemas/ClusterDatabasePartitionTemplatePartBucket'
|
|
examples:
|
|
- type: time
|
|
value: '%Y'
|
|
- type: tag
|
|
value: bananas
|
|
- type: tag
|
|
value: plátanos
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
ClusterDatabasePartitionTemplatePartTagValue:
|
|
description: |
|
|
A tag value matcher that extracts a string value from the specified tag name
|
|
|
|
If a row does not contain a value for the specified tag name, the NULL/missing partition key part `!` is rendered.
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- tag
|
|
value:
|
|
type: string
|
|
minLength: 1
|
|
examples:
|
|
- type: tag
|
|
value: bananas
|
|
- type: tag
|
|
value: plátanos
|
|
ClusterDatabasePartitionTemplatePartTimeFormat:
|
|
description: A time format matcher that accepts a "strftime"-like format string and evaluates it against the "time" column
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- time
|
|
value:
|
|
type: string
|
|
minLength: 1
|
|
examples:
|
|
- type: time
|
|
value: '%Y'
|
|
ClusterDatabasePartitionTemplatePartBucket:
|
|
description: |
|
|
A bucketing matcher that sorts data through a uniform hash function on the values of the given tag name.
|
|
|
|
If a row does not contain a value for the specified tag name, the NULL/missing partition key part `!` is rendered.
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- bucket
|
|
value:
|
|
type: object
|
|
properties:
|
|
tagName:
|
|
description: The name of the tag used to derive the bucket the data belongs in
|
|
type: string
|
|
minLength: 1
|
|
numberOfBuckets:
|
|
description: The number of buckets tag values are distributed across
|
|
type: integer
|
|
format: int32
|
|
maximum: 100000
|
|
minimum: 1
|
|
examples:
|
|
- type: bucket
|
|
value:
|
|
tagName: c
|
|
numberOfBuckets: 10
|
|
ClusterDatabaseTableName:
|
|
description: The name of the cluster database table
|
|
type: string
|
|
examples:
|
|
- TableOne
|
|
- TableTwo
|
|
minLength: 1
|
|
DatabaseTokenDescription:
|
|
description: The description of the database token
|
|
type: string
|
|
examples:
|
|
- Limited Access Token
|
|
- Full Access Token
|
|
DatabaseTokenResourceAllDatabases:
|
|
description: A resource value for a database token permission that refers to all databases
|
|
type: string
|
|
enum:
|
|
- '*'
|
|
DatabaseTokenPermissionAction:
|
|
description: The action the database token permission allows
|
|
type: string
|
|
DatabaseTokenPermissionResource:
|
|
description: The resource the database token permission applies to
|
|
anyOf:
|
|
- $ref: '#/components/schemas/ClusterDatabaseName'
|
|
- $ref: '#/components/schemas/DatabaseTokenResourceAllDatabases'
|
|
examples:
|
|
- DatabaseOne
|
|
- DatabaseTwo
|
|
- '*'
|
|
DatabaseTokenPermission:
|
|
description: The description of the database token
|
|
type: object
|
|
properties:
|
|
action:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissionAction'
|
|
resource:
|
|
$ref: '#/components/schemas/DatabaseTokenPermissionResource'
|
|
examples:
|
|
- action: read
|
|
resource: DatabaseOne
|
|
- action: write
|
|
resource: DatabaseTwo
|
|
- action: write
|
|
resource: '*'
|
|
DatabaseTokenPermissions:
|
|
description: The list of permissions the database token allows
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/DatabaseTokenPermission'
|
|
examples:
|
|
- - action: read
|
|
resource: DatabaseOne
|
|
- action: write
|
|
resource: DatabaseTwo
|
|
- - action: write
|
|
resource: '*'
|
|
DatabaseTokenCreatedAt:
|
|
description: |
|
|
The date and time that the database token was created
|
|
|
|
Uses RFC3339 format
|
|
$ref: '#/components/schemas/DateTimeRfc3339'
|
|
examples:
|
|
- '2023-12-21T17:32:28.000Z'
|
|
- '2024-03-02T04:20:19.000Z'
|
|
DatabaseTokenExpiresAt:
|
|
description: |
|
|
The date and time that the database token expires, if applicable
|
|
|
|
Uses RFC3339 format
|
|
$ref: '#/components/schemas/DateTimeRfc3339'
|
|
DatabaseTokenRevokedAt:
|
|
description: |
|
|
The date and time that the database token was revoked, if applicable
|
|
|
|
Uses RFC3339 format
|
|
$ref: '#/components/schemas/DateTimeRfc3339'
|
|
DatabaseTokenAccessToken:
|
|
description: |
|
|
The access token that can be used to authenticate query and write requests to the cluster
|
|
|
|
The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
|
|
type: string
|
|
examples:
|
|
- apiv1_5555555555555555555555555555555555555555555555555555555555555555
|
|
- apiv1_6666666666666666666666666666666666666666666666666666666666666666
|
|
minLength: 64
|
|
responses:
|
|
BadRequest:
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
code:
|
|
type: integer
|
|
enum:
|
|
- 400
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
code: 400
|
|
message: bad request
|
|
Unauthorized:
|
|
description: Unauthorized
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
code:
|
|
type: integer
|
|
enum:
|
|
- 401
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
code: 401
|
|
message: unauthorized
|
|
Forbidden:
|
|
description: Forbidden
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
code:
|
|
type: integer
|
|
enum:
|
|
- 403
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
code: 403
|
|
message: forbidden
|
|
NotFound:
|
|
description: Not Found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
code:
|
|
type: integer
|
|
enum:
|
|
- 404
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
code: 404
|
|
message: not found
|
|
Conflict:
|
|
description: Conflict
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
code:
|
|
type: integer
|
|
enum:
|
|
- 409
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
code: 409
|
|
message: conflict
|
|
InternalServerError:
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
code:
|
|
type: integer
|
|
enum:
|
|
- 500
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
code: 500
|
|
message: internal server error
|
|
NoContent:
|
|
description: No Content
|
|
securitySchemes:
|
|
bearerAuthManagementToken:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: Management Token
|
|
bearerAuthJwt:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|