fix(api): remove curly braces from URL paths and clean up section pages

- Fix apiPathToSlug() to strip curly braces from path parameters
  (e.g., {db} → db) to avoid URL encoding issues in Hugo
- Update Quick start tag description to include intro sentence:
  "Authenticate, write, and query with the API:"
- Remove {{< children >}} shortcode from API section _index.md files
  (layout's section-children.html partial already handles tag listing)
- Delete old cloud-serverless API pages with curly braces in paths
- Regenerate article data for all products
claude/api-code-samples-plan-MEkQO
Jason Stirnaman 2026-01-08 10:56:05 -06:00
parent befbc9f868
commit eb6feb75d2
98 changed files with 1661 additions and 1171 deletions

View File

@ -141,6 +141,8 @@ tags:
description: Query data using SQL or InfluxQL
- name: Quick start
description: |
Authenticate, write, and query with the API:
1. [Create an admin token](#section/Authentication) to authorize API requests.
```bash

View File

@ -118,6 +118,8 @@ tags:
description: Query data using SQL or InfluxQL
- name: Quick start
description: |
Authenticate, write, and query with the API:
1. [Create an admin token](#section/Authentication) to authorize API requests.
```bash
curl -X POST "http://localhost:8181/api/v3/configure/token/admin"

View File

@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.LINK_PATTERN = exports.MARKDOWN_FIELDS = exports.productConfigs = void 0;
exports.processProduct = processProduct;
@ -370,10 +380,12 @@ ${yaml.dump(frontmatter)}---
* - Removes leading "/api" prefix (added by parent directory structure)
* - Ensures all paths have a version prefix (defaults to v1 if none)
* - Removes leading slash
* - Removes curly braces from path parameters (e.g., {db} db)
*
* Examples:
* - "/write" "v1/write"
* - "/api/v3/configure/database" "v3/configure/database"
* - "/api/v3/configure/database/{db}" "v3/configure/database/db"
* - "/api/v2/write" "v2/write"
* - "/health" "v1/health"
*
@ -389,6 +401,9 @@ function apiPathToSlug(apiPath) {
if (!/^v\d+\//.test(normalizedPath)) {
normalizedPath = `v1/${normalizedPath}`;
}
// Remove curly braces from path parameters (e.g., {db} → db)
// to avoid URL encoding issues in Hugo
normalizedPath = normalizedPath.replace(/[{}]/g, '');
return normalizedPath;
}
/**
@ -552,6 +567,7 @@ const productConfigs = {
description: 'InfluxDB Clustered',
menuKey: 'influxdb3_clustered',
skipParentMenu: true,
useTagBasedGeneration: true,
},
};
exports.productConfigs = productConfigs;

View File

@ -547,10 +547,12 @@ interface GenerateOperationPagesOptions {
* - Removes leading "/api" prefix (added by parent directory structure)
* - Ensures all paths have a version prefix (defaults to v1 if none)
* - Removes leading slash
* - Removes curly braces from path parameters (e.g., {db} db)
*
* Examples:
* - "/write" "v1/write"
* - "/api/v3/configure/database" "v3/configure/database"
* - "/api/v3/configure/database/{db}" "v3/configure/database/db"
* - "/api/v2/write" "v2/write"
* - "/health" "v1/health"
*
@ -568,6 +570,10 @@ function apiPathToSlug(apiPath: string): string {
normalizedPath = `v1/${normalizedPath}`;
}
// Remove curly braces from path parameters (e.g., {db} → db)
// to avoid URL encoding issues in Hugo
normalizedPath = normalizedPath.replace(/[{}]/g, '');
return normalizedPath;
}

View File

@ -8,5 +8,3 @@ type: api
---
Use the {{% product-name %}} HTTP API to write data, query data, and manage databases, tables, and tokens.
{{< children >}}

View File

@ -1,12 +0,0 @@
---
title: Delete an authorization
description: API reference for DELETE /api/v2/authorizations/{authID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-authorizations-authID.yaml
matchPaths: delete
operationId: DeleteAuthorizationsID
method: DELETE
apiPath: /api/v2/authorizations/{authID}
tag: Security and access endpoints
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve an authorization
description: API reference for GET /api/v2/authorizations/{authID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-authorizations-authID.yaml
matchPaths: get
operationId: GetAuthorizationsID
method: GET
apiPath: /api/v2/authorizations/{authID}
tag: Security and access endpoints
---

View File

@ -1,12 +0,0 @@
---
title: Update an API token to be active or inactive
description: API reference for PATCH /api/v2/authorizations/{authID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-authorizations-authID.yaml
matchPaths: patch
operationId: PatchAuthorizationsID
method: PATCH
apiPath: /api/v2/authorizations/{authID}
tag: Security and access endpoints
---

View File

@ -1,12 +0,0 @@
---
title: Delete a bucket
description: API reference for DELETE /api/v2/buckets/{bucketID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID.yaml
matchPaths: delete
operationId: DeleteBucketsID
method: DELETE
apiPath: /api/v2/buckets/{bucketID}
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a bucket
description: API reference for GET /api/v2/buckets/{bucketID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID.yaml
matchPaths: get
operationId: GetBucketsID
method: GET
apiPath: /api/v2/buckets/{bucketID}
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: List all labels for a bucket
description: API reference for GET /api/v2/buckets/{bucketID}/labels
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-labels.yaml
matchPaths: get
operationId: GetBucketsIDLabels
method: GET
apiPath: /api/v2/buckets/{bucketID}/labels
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: Add a label to a bucket
description: API reference for POST /api/v2/buckets/{bucketID}/labels
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-labels.yaml
matchPaths: post
operationId: PostBucketsIDLabels
method: POST
apiPath: /api/v2/buckets/{bucketID}/labels
tag: Buckets
---

View File

@ -1,13 +0,0 @@
---
title: Delete a label from a bucket
description: API reference for DELETE /api/v2/buckets/{bucketID}/labels/{labelID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-labels-labelID.yaml
matchPaths: delete
operationId: DeleteBucketsIDLabelsID
method: DELETE
apiPath: /api/v2/buckets/{bucketID}/labels/{labelID}
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: List all users with member privileges for a bucket
description: API reference for GET /api/v2/buckets/{bucketID}/members
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-members.yaml
matchPaths: get
operationId: GetBucketsIDMembers
method: GET
apiPath: /api/v2/buckets/{bucketID}/members
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: Add a member to a bucket
description: API reference for POST /api/v2/buckets/{bucketID}/members
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-members.yaml
matchPaths: post
operationId: PostBucketsIDMembers
method: POST
apiPath: /api/v2/buckets/{bucketID}/members
tag: Buckets
---

View File

@ -1,13 +0,0 @@
---
title: Remove a member from a bucket
description: API reference for DELETE /api/v2/buckets/{bucketID}/members/{userID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-members-userID.yaml
matchPaths: delete
operationId: DeleteBucketsIDMembersID
method: DELETE
apiPath: /api/v2/buckets/{bucketID}/members/{userID}
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: List all owners of a bucket
description: API reference for GET /api/v2/buckets/{bucketID}/owners
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-owners.yaml
matchPaths: get
operationId: GetBucketsIDOwners
method: GET
apiPath: /api/v2/buckets/{bucketID}/owners
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: Add an owner to a bucket
description: API reference for POST /api/v2/buckets/{bucketID}/owners
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-owners.yaml
matchPaths: post
operationId: PostBucketsIDOwners
method: POST
apiPath: /api/v2/buckets/{bucketID}/owners
tag: Buckets
---

View File

@ -1,13 +0,0 @@
---
title: Remove an owner from a bucket
description: API reference for DELETE /api/v2/buckets/{bucketID}/owners/{userID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-owners-userID.yaml
matchPaths: delete
operationId: DeleteBucketsIDOwnersID
method: DELETE
apiPath: /api/v2/buckets/{bucketID}/owners/{userID}
tag: Buckets
---

View File

@ -1,12 +0,0 @@
---
title: Update a bucket
description: API reference for PATCH /api/v2/buckets/{bucketID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID.yaml
matchPaths: patch
operationId: PatchBucketsID
method: PATCH
apiPath: /api/v2/buckets/{bucketID}
tag: Buckets
---

View File

@ -1,13 +0,0 @@
---
title: List measurement schemas of a bucket
description: API reference for GET /api/v2/buckets/{bucketID}/schema/measurements
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-schema-measurements.yaml
matchPaths: get
operationId: getMeasurementSchemas
method: GET
apiPath: /api/v2/buckets/{bucketID}/schema/measurements
tag: Bucket Schemas
---

View File

@ -1,13 +0,0 @@
---
title: Create a measurement schema for a bucket
description: API reference for POST /api/v2/buckets/{bucketID}/schema/measurements
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-schema-measurements.yaml
matchPaths: post
operationId: createMeasurementSchema
method: POST
apiPath: /api/v2/buckets/{bucketID}/schema/measurements
tag: Bucket Schemas
---

View File

@ -1,15 +0,0 @@
---
title: Retrieve a measurement schema
description: >-
API reference for GET
/api/v2/buckets/{bucketID}/schema/measurements/{measurementID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-schema-measurements-measurementID.yaml
matchPaths: get
operationId: getMeasurementSchema
method: GET
apiPath: /api/v2/buckets/{bucketID}/schema/measurements/{measurementID}
tag: Bucket Schemas
---

View File

@ -1,15 +0,0 @@
---
title: Update a measurement schema
description: >-
API reference for PATCH
/api/v2/buckets/{bucketID}/schema/measurements/{measurementID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-buckets-bucketID-schema-measurements-measurementID.yaml
matchPaths: patch
operationId: updateMeasurementSchema
method: PATCH
apiPath: /api/v2/buckets/{bucketID}/schema/measurements/{measurementID}
tag: Bucket Schemas
---

View File

@ -1,12 +0,0 @@
---
title: Delete a database retention policy
description: API reference for DELETE /api/v2/dbrps/{dbrpID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-dbrps-dbrpID.yaml
matchPaths: delete
operationId: DeleteDBRPID
method: DELETE
apiPath: /api/v2/dbrps/{dbrpID}
tag: DBRPs
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a database retention policy mapping
description: API reference for GET /api/v2/dbrps/{dbrpID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-dbrps-dbrpID.yaml
matchPaths: get
operationId: GetDBRPsID
method: GET
apiPath: /api/v2/dbrps/{dbrpID}
tag: DBRPs
---

View File

@ -1,12 +0,0 @@
---
title: Update a database retention policy mapping
description: API reference for PATCH /api/v2/dbrps/{dbrpID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-dbrps-dbrpID.yaml
matchPaths: patch
operationId: PatchDBRPID
method: PATCH
apiPath: /api/v2/dbrps/{dbrpID}
tag: DBRPs
---

View File

@ -1,12 +0,0 @@
---
title: Delete an organization
description: API reference for DELETE /api/v2/orgs/{orgID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID.yaml
matchPaths: delete
operationId: DeleteOrgsID
method: DELETE
apiPath: /api/v2/orgs/{orgID}
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve an organization
description: API reference for GET /api/v2/orgs/{orgID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID.yaml
matchPaths: get
operationId: GetOrgsID
method: GET
apiPath: /api/v2/orgs/{orgID}
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve limits for an organization
description: API reference for GET /api/v2/orgs/{orgID}/limits
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-limits.yaml
matchPaths: get
operationId: GetOrgLimitsID
method: GET
apiPath: /api/v2/orgs/{orgID}/limits
tag: Limits
---

View File

@ -1,12 +0,0 @@
---
title: List all members of an organization
description: API reference for GET /api/v2/orgs/{orgID}/members
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-members.yaml
matchPaths: get
operationId: GetOrgsIDMembers
method: GET
apiPath: /api/v2/orgs/{orgID}/members
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Add a member to an organization
description: API reference for POST /api/v2/orgs/{orgID}/members
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-members.yaml
matchPaths: post
operationId: PostOrgsIDMembers
method: POST
apiPath: /api/v2/orgs/{orgID}/members
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Remove a member from an organization
description: API reference for DELETE /api/v2/orgs/{orgID}/members/{userID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-members-userID.yaml
matchPaths: delete
operationId: DeleteOrgsIDMembersID
method: DELETE
apiPath: /api/v2/orgs/{orgID}/members/{userID}
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: List all owners of an organization
description: API reference for GET /api/v2/orgs/{orgID}/owners
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-owners.yaml
matchPaths: get
operationId: GetOrgsIDOwners
method: GET
apiPath: /api/v2/orgs/{orgID}/owners
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Add an owner to an organization
description: API reference for POST /api/v2/orgs/{orgID}/owners
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-owners.yaml
matchPaths: post
operationId: PostOrgsIDOwners
method: POST
apiPath: /api/v2/orgs/{orgID}/owners
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Remove an owner from an organization
description: API reference for DELETE /api/v2/orgs/{orgID}/owners/{userID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-owners-userID.yaml
matchPaths: delete
operationId: DeleteOrgsIDOwnersID
method: DELETE
apiPath: /api/v2/orgs/{orgID}/owners/{userID}
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Update an organization
description: API reference for PATCH /api/v2/orgs/{orgID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID.yaml
matchPaths: patch
operationId: PatchOrgsID
method: PATCH
apiPath: /api/v2/orgs/{orgID}
tag: Organizations
---

View File

@ -1,12 +0,0 @@
---
title: Delete secrets from an organization
description: API reference for POST /api/v2/orgs/{orgID}/secrets/delete
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-secrets-delete.yaml
matchPaths: post
operationId: PostOrgsIDSecrets
method: POST
apiPath: /api/v2/orgs/{orgID}/secrets/delete
tag: Secrets
---

View File

@ -1,12 +0,0 @@
---
title: List all secret keys for an organization
description: API reference for GET /api/v2/orgs/{orgID}/secrets
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-secrets.yaml
matchPaths: get
operationId: GetOrgsIDSecrets
method: GET
apiPath: /api/v2/orgs/{orgID}/secrets
tag: Secrets
---

View File

@ -1,12 +0,0 @@
---
title: Update secrets in an organization
description: API reference for PATCH /api/v2/orgs/{orgID}/secrets
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-secrets.yaml
matchPaths: patch
operationId: PatchOrgsIDSecrets
method: PATCH
apiPath: /api/v2/orgs/{orgID}/secrets
tag: Secrets
---

View File

@ -1,13 +0,0 @@
---
title: Delete a secret from an organization
description: API reference for DELETE /api/v2/orgs/{orgID}/secrets/{secretID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-secrets-secretID.yaml
matchPaths: delete
operationId: DeleteOrgsIDSecretsID
method: DELETE
apiPath: /api/v2/orgs/{orgID}/secrets/{secretID}
tag: Secrets
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve usage for an organization
description: API reference for GET /api/v2/orgs/{orgID}/usage
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-orgs-orgID-usage.yaml
matchPaths: get
operationId: GetOrgUsageID
method: GET
apiPath: /api/v2/orgs/{orgID}/usage
tag: Usage
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a query suggestion for a branching suggestion
description: API reference for GET /api/v2/query/suggestions/{name}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-query-suggestions-name.yaml
matchPaths: get
operationId: GetQuerySuggestionsName
method: GET
apiPath: /api/v2/query/suggestions/{name}
tag: Query
---

View File

@ -1,12 +0,0 @@
---
title: Delete a script
description: API reference for DELETE /api/v2/scripts/{scriptID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-scripts-scriptID.yaml
matchPaths: delete
operationId: DeleteScriptsID
method: DELETE
apiPath: /api/v2/scripts/{scriptID}
tag: Invokable Scripts
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a script
description: API reference for GET /api/v2/scripts/{scriptID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-scripts-scriptID.yaml
matchPaths: get
operationId: GetScriptsID
method: GET
apiPath: /api/v2/scripts/{scriptID}
tag: Invokable Scripts
---

View File

@ -1,12 +0,0 @@
---
title: Invoke a script
description: API reference for POST /api/v2/scripts/{scriptID}/invoke
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-scripts-scriptID-invoke.yaml
matchPaths: post
operationId: PostScriptsIDInvoke
method: POST
apiPath: /api/v2/scripts/{scriptID}/invoke
tag: Invokable Scripts
---

View File

@ -1,12 +0,0 @@
---
title: Find script parameters.
description: API reference for GET /api/v2/scripts/{scriptID}/params
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-scripts-scriptID-params.yaml
matchPaths: get
operationId: GetScriptsIDParams
method: GET
apiPath: /api/v2/scripts/{scriptID}/params
tag: Invokable Scripts
---

View File

@ -1,12 +0,0 @@
---
title: Update a script
description: API reference for PATCH /api/v2/scripts/{scriptID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-scripts-scriptID.yaml
matchPaths: patch
operationId: PatchScriptsID
method: PATCH
apiPath: /api/v2/scripts/{scriptID}
tag: Invokable Scripts
---

View File

@ -1,12 +0,0 @@
---
title: Delete a stack and associated resources
description: API reference for DELETE /api/v2/stacks/{stack_id}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-stacks-stack_id.yaml
matchPaths: delete
operationId: DeleteStack
method: DELETE
apiPath: /api/v2/stacks/{stack_id}
tag: Templates
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a stack
description: API reference for GET /api/v2/stacks/{stack_id}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-stacks-stack_id.yaml
matchPaths: get
operationId: ReadStack
method: GET
apiPath: /api/v2/stacks/{stack_id}
tag: Templates
---

View File

@ -1,12 +0,0 @@
---
title: Update a stack
description: API reference for PATCH /api/v2/stacks/{stack_id}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-stacks-stack_id.yaml
matchPaths: patch
operationId: UpdateStack
method: PATCH
apiPath: /api/v2/stacks/{stack_id}
tag: Templates
---

View File

@ -1,12 +0,0 @@
---
title: Uninstall a stack
description: API reference for POST /api/v2/stacks/{stack_id}/uninstall
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-stacks-stack_id-uninstall.yaml
matchPaths: post
operationId: UninstallStack
method: POST
apiPath: /api/v2/stacks/{stack_id}/uninstall
tag: Templates
---

View File

@ -1,12 +0,0 @@
---
title: Delete a task
description: API reference for DELETE /api/v2/tasks/{taskID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID.yaml
matchPaths: delete
operationId: DeleteTasksID
method: DELETE
apiPath: /api/v2/tasks/{taskID}
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a task
description: API reference for GET /api/v2/tasks/{taskID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID.yaml
matchPaths: get
operationId: GetTasksID
method: GET
apiPath: /api/v2/tasks/{taskID}
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: List labels for a task
description: API reference for GET /api/v2/tasks/{taskID}/labels
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-labels.yaml
matchPaths: get
operationId: GetTasksIDLabels
method: GET
apiPath: /api/v2/tasks/{taskID}/labels
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Add a label to a task
description: API reference for POST /api/v2/tasks/{taskID}/labels
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-labels.yaml
matchPaths: post
operationId: PostTasksIDLabels
method: POST
apiPath: /api/v2/tasks/{taskID}/labels
tag: Tasks
---

View File

@ -1,13 +0,0 @@
---
title: Delete a label from a task
description: API reference for DELETE /api/v2/tasks/{taskID}/labels/{labelID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-labels-labelID.yaml
matchPaths: delete
operationId: DeleteTasksIDLabelsID
method: DELETE
apiPath: /api/v2/tasks/{taskID}/labels/{labelID}
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve all logs for a task
description: API reference for GET /api/v2/tasks/{taskID}/logs
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-logs.yaml
matchPaths: get
operationId: GetTasksIDLogs
method: GET
apiPath: /api/v2/tasks/{taskID}/logs
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: List all task members
description: API reference for GET /api/v2/tasks/{taskID}/members
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-members.yaml
matchPaths: get
operationId: GetTasksIDMembers
method: GET
apiPath: /api/v2/tasks/{taskID}/members
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Add a member to a task
description: API reference for POST /api/v2/tasks/{taskID}/members
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-members.yaml
matchPaths: post
operationId: PostTasksIDMembers
method: POST
apiPath: /api/v2/tasks/{taskID}/members
tag: Tasks
---

View File

@ -1,13 +0,0 @@
---
title: Remove a member from a task
description: API reference for DELETE /api/v2/tasks/{taskID}/members/{userID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-members-userID.yaml
matchPaths: delete
operationId: DeleteTasksIDMembersID
method: DELETE
apiPath: /api/v2/tasks/{taskID}/members/{userID}
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: List all owners of a task
description: API reference for GET /api/v2/tasks/{taskID}/owners
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-owners.yaml
matchPaths: get
operationId: GetTasksIDOwners
method: GET
apiPath: /api/v2/tasks/{taskID}/owners
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Add an owner for a task
description: API reference for POST /api/v2/tasks/{taskID}/owners
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-owners.yaml
matchPaths: post
operationId: PostTasksIDOwners
method: POST
apiPath: /api/v2/tasks/{taskID}/owners
tag: Tasks
---

View File

@ -1,13 +0,0 @@
---
title: Remove an owner from a task
description: API reference for DELETE /api/v2/tasks/{taskID}/owners/{userID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-owners-userID.yaml
matchPaths: delete
operationId: DeleteTasksIDOwnersID
method: DELETE
apiPath: /api/v2/tasks/{taskID}/owners/{userID}
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Update a task
description: API reference for PATCH /api/v2/tasks/{taskID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID.yaml
matchPaths: patch
operationId: PatchTasksID
method: PATCH
apiPath: /api/v2/tasks/{taskID}
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: List runs for a task
description: API reference for GET /api/v2/tasks/{taskID}/runs
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-runs.yaml
matchPaths: get
operationId: GetTasksIDRuns
method: GET
apiPath: /api/v2/tasks/{taskID}/runs
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Start a task run, overriding the schedule
description: API reference for POST /api/v2/tasks/{taskID}/runs
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-runs.yaml
matchPaths: post
operationId: PostTasksIDRuns
method: POST
apiPath: /api/v2/tasks/{taskID}/runs
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Cancel a running task
description: API reference for DELETE /api/v2/tasks/{taskID}/runs/{runID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-runs-runID.yaml
matchPaths: delete
operationId: DeleteTasksIDRunsID
method: DELETE
apiPath: /api/v2/tasks/{taskID}/runs/{runID}
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a run for a task.
description: API reference for GET /api/v2/tasks/{taskID}/runs/{runID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-runs-runID.yaml
matchPaths: get
operationId: GetTasksIDRunsID
method: GET
apiPath: /api/v2/tasks/{taskID}/runs/{runID}
tag: Tasks
---

View File

@ -1,13 +0,0 @@
---
title: Retrieve all logs for a run
description: API reference for GET /api/v2/tasks/{taskID}/runs/{runID}/logs
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-runs-runID-logs.yaml
matchPaths: get
operationId: GetTasksIDRunsIDLogs
method: GET
apiPath: /api/v2/tasks/{taskID}/runs/{runID}/logs
tag: Tasks
---

View File

@ -1,13 +0,0 @@
---
title: Retry a task run
description: API reference for POST /api/v2/tasks/{taskID}/runs/{runID}/retry
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-tasks-taskID-runs-runID-retry.yaml
matchPaths: post
operationId: PostTasksIDRunsIDRetry
method: POST
apiPath: /api/v2/tasks/{taskID}/runs/{runID}/retry
tag: Tasks
---

View File

@ -1,12 +0,0 @@
---
title: Delete a Telegraf configuration
description: API reference for DELETE /api/v2/telegrafs/{telegrafID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID.yaml
matchPaths: delete
operationId: DeleteTelegrafsID
method: DELETE
apiPath: /api/v2/telegrafs/{telegrafID}
tag: Telegrafs
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a Telegraf configuration
description: API reference for GET /api/v2/telegrafs/{telegrafID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID.yaml
matchPaths: get
operationId: GetTelegrafsID
method: GET
apiPath: /api/v2/telegrafs/{telegrafID}
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: List all labels for a Telegraf config
description: API reference for GET /api/v2/telegrafs/{telegrafID}/labels
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-labels.yaml
matchPaths: get
operationId: GetTelegrafsIDLabels
method: GET
apiPath: /api/v2/telegrafs/{telegrafID}/labels
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: Add a label to a Telegraf config
description: API reference for POST /api/v2/telegrafs/{telegrafID}/labels
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-labels.yaml
matchPaths: post
operationId: PostTelegrafsIDLabels
method: POST
apiPath: /api/v2/telegrafs/{telegrafID}/labels
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: Delete a label from a Telegraf config
description: API reference for DELETE /api/v2/telegrafs/{telegrafID}/labels/{labelID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-labels-labelID.yaml
matchPaths: delete
operationId: DeleteTelegrafsIDLabelsID
method: DELETE
apiPath: /api/v2/telegrafs/{telegrafID}/labels/{labelID}
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: List all users with member privileges for a Telegraf config
description: API reference for GET /api/v2/telegrafs/{telegrafID}/members
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-members.yaml
matchPaths: get
operationId: GetTelegrafsIDMembers
method: GET
apiPath: /api/v2/telegrafs/{telegrafID}/members
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: Add a member to a Telegraf config
description: API reference for POST /api/v2/telegrafs/{telegrafID}/members
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-members.yaml
matchPaths: post
operationId: PostTelegrafsIDMembers
method: POST
apiPath: /api/v2/telegrafs/{telegrafID}/members
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: Remove a member from a Telegraf config
description: API reference for DELETE /api/v2/telegrafs/{telegrafID}/members/{userID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-members-userID.yaml
matchPaths: delete
operationId: DeleteTelegrafsIDMembersID
method: DELETE
apiPath: /api/v2/telegrafs/{telegrafID}/members/{userID}
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: List all owners of a Telegraf configuration
description: API reference for GET /api/v2/telegrafs/{telegrafID}/owners
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-owners.yaml
matchPaths: get
operationId: GetTelegrafsIDOwners
method: GET
apiPath: /api/v2/telegrafs/{telegrafID}/owners
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: Add an owner to a Telegraf configuration
description: API reference for POST /api/v2/telegrafs/{telegrafID}/owners
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-owners.yaml
matchPaths: post
operationId: PostTelegrafsIDOwners
method: POST
apiPath: /api/v2/telegrafs/{telegrafID}/owners
tag: Telegrafs
---

View File

@ -1,13 +0,0 @@
---
title: Remove an owner from a Telegraf config
description: API reference for DELETE /api/v2/telegrafs/{telegrafID}/owners/{userID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID-owners-userID.yaml
matchPaths: delete
operationId: DeleteTelegrafsIDOwnersID
method: DELETE
apiPath: /api/v2/telegrafs/{telegrafID}/owners/{userID}
tag: Telegrafs
---

View File

@ -1,12 +0,0 @@
---
title: Update a Telegraf configuration
description: API reference for PUT /api/v2/telegrafs/{telegrafID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-telegrafs-telegrafID.yaml
matchPaths: put
operationId: PutTelegrafsID
method: PUT
apiPath: /api/v2/telegrafs/{telegrafID}
tag: Telegrafs
---

View File

@ -1,12 +0,0 @@
---
title: Delete a variable
description: API reference for DELETE /api/v2/variables/{variableID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-variables-variableID.yaml
matchPaths: delete
operationId: DeleteVariablesID
method: DELETE
apiPath: /api/v2/variables/{variableID}
tag: Variables
---

View File

@ -1,12 +0,0 @@
---
title: Retrieve a variable
description: API reference for GET /api/v2/variables/{variableID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-variables-variableID.yaml
matchPaths: get
operationId: GetVariablesID
method: GET
apiPath: /api/v2/variables/{variableID}
tag: Variables
---

View File

@ -1,13 +0,0 @@
---
title: List all labels for a variable
description: API reference for GET /api/v2/variables/{variableID}/labels
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-variables-variableID-labels.yaml
matchPaths: get
operationId: GetVariablesIDLabels
method: GET
apiPath: /api/v2/variables/{variableID}/labels
tag: Variables
---

View File

@ -1,13 +0,0 @@
---
title: Add a label to a variable
description: API reference for POST /api/v2/variables/{variableID}/labels
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-variables-variableID-labels.yaml
matchPaths: post
operationId: PostVariablesIDLabels
method: POST
apiPath: /api/v2/variables/{variableID}/labels
tag: Variables
---

View File

@ -1,13 +0,0 @@
---
title: Delete a label from a variable
description: API reference for DELETE /api/v2/variables/{variableID}/labels/{labelID}
type: api-operation
layout: operation
specFile: >-
/openapi/influxdb-cloud-serverless/paths/api-v2-variables-variableID-labels-labelID.yaml
matchPaths: delete
operationId: DeleteVariablesIDLabelsID
method: DELETE
apiPath: /api/v2/variables/{variableID}/labels/{labelID}
tag: Variables
---

View File

@ -1,12 +0,0 @@
---
title: Update a variable
description: API reference for PATCH /api/v2/variables/{variableID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-variables-variableID.yaml
matchPaths: patch
operationId: PatchVariablesID
method: PATCH
apiPath: /api/v2/variables/{variableID}
tag: Variables
---

View File

@ -1,12 +0,0 @@
---
title: Replace a variable
description: API reference for PUT /api/v2/variables/{variableID}
type: api-operation
layout: operation
specFile: /openapi/influxdb-cloud-serverless/paths/api-v2-variables-variableID.yaml
matchPaths: put
operationId: PutVariablesID
method: PUT
apiPath: /api/v2/variables/{variableID}
tag: Variables
---

File diff suppressed because one or more lines are too long

View File

@ -1,24 +1,682 @@
articles:
- path: api/accounts/{accountId}/clusters
- path: api/authentication
fields:
name: /accounts/{accountId}/clusters
name: Authentication
describes: []
title: Authentication
description: >
With InfluxDB 3 Cloud Dedicated, the InfluxDB Management API endpoints
require the following credentials:
- `ACCOUNT_ID`: The ID of the
[account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster)
that the cluster belongs to. To view account ID and cluster ID, [list
cluster
details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).
- `CLUSTER_ID`: The ID of the
[cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster)
that you want to manage. To view account ID and cluster ID, [list
cluster
details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).
- `Authorization MANAGEMENT_TOKEN`: the `Authorization` HTTP header with
a [management
token](/influxdb3/cloud-dedicated/admin/tokens/management/).
See how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/).
By default, management tokens in InfluxDB 3 are short-lived tokens issued by an OAuth2 identity provider that grant a specific user administrative access to your InfluxDB cluster. However, for automation purposes, you can manually create management tokens that authenticate directly with your InfluxDB cluster and do not require human interaction with your identity provider.
<!-- ReDoc-Inject: <security-definitions> -->
tag: Authentication
isConceptual: true
menuGroup: Concepts
operations: []
tagDescription: >
With InfluxDB 3 Cloud Dedicated, the InfluxDB Management API endpoints
require the following credentials:
- `ACCOUNT_ID`: The ID of the
[account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster)
that the cluster belongs to. To view account ID and cluster ID, [list
cluster
details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).
- `CLUSTER_ID`: The ID of the
[cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster)
that you want to manage. To view account ID and cluster ID, [list
cluster
details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).
- `Authorization MANAGEMENT_TOKEN`: the `Authorization` HTTP header with
a [management
token](/influxdb3/cloud-dedicated/admin/tokens/management/).
See how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/).
By default, management tokens in InfluxDB 3 are short-lived tokens issued by an OAuth2 identity provider that grant a specific user administrative access to your InfluxDB cluster. However, for automation purposes, you can manually create management tokens that authenticate directly with your InfluxDB cluster and do not require human interaction with your identity provider.
<!-- ReDoc-Inject: <security-definitions> -->
showSecuritySchemes: true
source: >-
static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-authentication.yaml
staticFilePath: >-
/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-authentication.yaml
- path: api/database-tokens
fields:
name: Database tokens
describes:
- /accounts/{accountId}/clusters/{clusterId}/tokens
- /accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}
title: Database tokens
description: Manage database read/write tokens for a cluster
tag: Database tokens
isConceptual: false
menuGroup: Other
operations:
- operationId: GetDatabaseTokens
method: GET
path: /accounts/{accountId}/clusters/{clusterId}/tokens
summary: Get all database tokens for a cluster
tags:
- Database tokens
- operationId: CreateDatabaseToken
method: POST
path: /accounts/{accountId}/clusters/{clusterId}/tokens
summary: Create a database token
tags:
- Database tokens
- operationId: GetDatabaseToken
method: GET
path: /accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}
summary: Get a database token
tags:
- Database tokens
- operationId: UpdateDatabaseToken
method: PATCH
path: /accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}
summary: Update a database token
tags:
- Database tokens
- operationId: DeleteDatabaseToken
method: DELETE
path: /accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}
summary: Delete a database token
tags:
- Database tokens
tagDescription: Manage database read/write tokens for a cluster
source: >-
static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-database-tokens.yaml
staticFilePath: >-
/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-database-tokens.yaml
- path: api/databases
fields:
name: Databases
describes:
- /accounts/{accountId}/clusters/{clusterId}/databases
- /accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}
title: Databases
description: Manage databases for a cluster
tag: Databases
isConceptual: false
menuGroup: Other
operations:
- operationId: GetClusterDatabases
method: GET
path: /accounts/{accountId}/clusters/{clusterId}/databases
summary: Get all databases for a cluster
tags:
- Databases
- operationId: CreateClusterDatabase
method: POST
path: /accounts/{accountId}/clusters/{clusterId}/databases
summary: Create a database
tags:
- Databases
- operationId: UpdateClusterDatabase
method: PATCH
path: /accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}
summary: Update a database
tags:
- Databases
- operationId: DeleteClusterDatabase
method: DELETE
path: /accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}
summary: Delete a database
tags:
- Databases
tagDescription: Manage databases for a cluster
source: >-
static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-databases.yaml
staticFilePath: >-
/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-databases.yaml
- path: api/quickstart
fields:
name: Quickstart
describes: []
title: Quickstart
description: >
The following example script shows how to use `curl` to make database
and token management requests:
```shell
#!/bin/bash
# Usage:
# Note the leading space in the command below to keep secrets out of the shell history
#
# ```
# MANAGEMENT_TOKEN=<MANAGEMENT_TOKEN> ACCOUNT_ID=<ACCOUNT_ID> CLUSTER_ID=<CLUSTER_ID> ./scripts/test_http_api_v0_endpoints.sh
# ```
# Env var validation
if [ -z "${MANAGEMENT_TOKEN}" ]; then
echo "
[Error]:
\$MANAGEMENT_TOKEN env var is required.
"
exit 1
fi
if [ -z "${ACCOUNT_ID}" ]; then
echo "
[Error]:
\$ACCOUNT_ID env var is required.
"
exit 1
fi
if [ -z "${CLUSTER_ID}" ]; then
echo "
[Error]:
\$CLUSTER_ID env var is required.
"
exit 1
fi
HOST="https://console.influxdata.com"
# Database request functions
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"
}
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"
}
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_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"
}
# Token request functions
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"
}
create_token () {
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": "my test token",
"permissions": [
{
"action": "write",
"resource": "database_one"
},
{
"action": "read",
"resource": "database_two"
}
]
}' \
)
echo "$response"
}
get_token () {
local token_id=$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"
}
update_token () {
local token_id=$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": "my updated test token",
"permissions": [
{
"action": "database_one",
"resource": "read"
}
]
}' \
)
echo "$response"
}
delete_token () {
local token_id=$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"
}
# Test database endpoints
databaseName="test_database_$RANDOM"
printf "\n🏗 Creating database... 🏗️\n\n"
response="$(create_database $databaseName)"
echo $response | jq
printf "\n🏗 Creating database successful 🏗️\n\n"
printf "\n⬆ Updating database... ⬆️\n\n"
response="$(update_database $databaseName)"
echo $response | jq
printf "\n⬆ Updating database successful ⬆️\n\n"
printf "\n⬇ Listing databases... ⬇️\n\n"
response="$(list_databases)"
echo $response | jq
printf "\n⬇ Listing databases successful ⬇️\n\n"
printf "\n🗑 Deleting database... 🗑️\n\n"
response="$(delete_database $databaseName)"
echo $response | jq
printf "\n🗑 Deleting database successful 🗑️\n\n"
# Test token endpoints
printf "\n🏗 Creating token... 🏗️\n\n"
response="$(create_token)"
echo $response | jq
tokenId=$(echo $response | jq '.id')
printf "\n🏗 Creating token successful 🏗️\n\n"
printf "\n⬇ Getting token... ⬇️\n\n"
response="$(get_token $tokenId)"
echo $response | jq
printf "\n⬇ Getting token successful ⬇️\n\n"
printf "\n⬆ Updating token... ⬆️\n\n"
response="$(update_token $tokenId)"
echo $response | jq
printf "\n⬆ Updating token successful ⬆️\n\n"
printf "\n📋 Listing tokens... 📋\n\n"
response="$(list_tokens)"
echo $response | jq
printf "\n📋 Listing tokens successful 📋\n\n"
printf "\n🗑 Deleting token... 🗑️\n\n"
response="$(delete_token $tokenId)"
echo $response | jq
printf "\n🗑 Deleting token successful 🗑️\n\n"
```
tag: Quickstart
isConceptual: true
menuGroup: Other
operations: []
tagDescription: >
The following example script shows how to use `curl` to make database
and token management requests:
```shell
#!/bin/bash
# Usage:
# Note the leading space in the command below to keep secrets out of the shell history
#
# ```
# MANAGEMENT_TOKEN=<MANAGEMENT_TOKEN> ACCOUNT_ID=<ACCOUNT_ID> CLUSTER_ID=<CLUSTER_ID> ./scripts/test_http_api_v0_endpoints.sh
# ```
# Env var validation
if [ -z "${MANAGEMENT_TOKEN}" ]; then
echo "
[Error]:
\$MANAGEMENT_TOKEN env var is required.
"
exit 1
fi
if [ -z "${ACCOUNT_ID}" ]; then
echo "
[Error]:
\$ACCOUNT_ID env var is required.
"
exit 1
fi
if [ -z "${CLUSTER_ID}" ]; then
echo "
[Error]:
\$CLUSTER_ID env var is required.
"
exit 1
fi
HOST="https://console.influxdata.com"
# Database request functions
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"
}
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"
}
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_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"
}
# Token request functions
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"
}
create_token () {
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": "my test token",
"permissions": [
{
"action": "write",
"resource": "database_one"
},
{
"action": "read",
"resource": "database_two"
}
]
}' \
)
echo "$response"
}
get_token () {
local token_id=$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"
}
update_token () {
local token_id=$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": "my updated test token",
"permissions": [
{
"action": "database_one",
"resource": "read"
}
]
}' \
)
echo "$response"
}
delete_token () {
local token_id=$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"
}
# Test database endpoints
databaseName="test_database_$RANDOM"
printf "\n🏗 Creating database... 🏗️\n\n"
response="$(create_database $databaseName)"
echo $response | jq
printf "\n🏗 Creating database successful 🏗️\n\n"
printf "\n⬆ Updating database... ⬆️\n\n"
response="$(update_database $databaseName)"
echo $response | jq
printf "\n⬆ Updating database successful ⬆️\n\n"
printf "\n⬇ Listing databases... ⬇️\n\n"
response="$(list_databases)"
echo $response | jq
printf "\n⬇ Listing databases successful ⬇️\n\n"
printf "\n🗑 Deleting database... 🗑️\n\n"
response="$(delete_database $databaseName)"
echo $response | jq
printf "\n🗑 Deleting database successful 🗑️\n\n"
# Test token endpoints
printf "\n🏗 Creating token... 🏗️\n\n"
response="$(create_token)"
echo $response | jq
tokenId=$(echo $response | jq '.id')
printf "\n🏗 Creating token successful 🏗️\n\n"
printf "\n⬇ Getting token... ⬇️\n\n"
response="$(get_token $tokenId)"
echo $response | jq
printf "\n⬇ Getting token successful ⬇️\n\n"
printf "\n⬆ Updating token... ⬆️\n\n"
response="$(update_token $tokenId)"
echo $response | jq
printf "\n⬆ Updating token successful ⬆️\n\n"
printf "\n📋 Listing tokens... 📋\n\n"
response="$(list_tokens)"
echo $response | jq
printf "\n📋 Listing tokens successful 📋\n\n"
printf "\n🗑 Deleting token... 🗑️\n\n"
response="$(delete_token $tokenId)"
echo $response | jq
printf "\n🗑 Deleting token successful 🗑️\n\n"
```
source: >-
static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-quickstart.yaml
staticFilePath: >-
/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-quickstart.yaml
- path: api/tables
fields:
name: Tables
describes:
- >-
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables
- /accounts/{accountId}/clusters/{clusterId}/tokens
- /accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}
menuName: /accounts/{accountId}/clusters
title: /accounts/{accountId}/clusters
tags:
- accounts-{accountId}
- clusters
apiTags:
- Databases
- Tables
- Database tokens
title: Tables
description: Manage tables in a database
tag: Tables
isConceptual: false
menuGroup: Other
operations:
- operationId: CreateClusterDatabaseTable
method: POST
path: >-
/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables
summary: Create a database table
tags:
- Tables
tagDescription: Manage tables in a database
source: >-
static/openapi/influxdb-cloud-dedicated/paths/influxdb-cloud-dedicated-accounts-{accountId}-clusters.yaml
static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-tables.yaml
staticFilePath: >-
/openapi/influxdb-cloud-dedicated/paths/influxdb-cloud-dedicated-accounts-{accountId}-clusters.yaml
/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-tables.yaml

File diff suppressed because one or more lines are too long

View File

@ -1,48 +1,617 @@
articles:
- path: api/databases/{databaseName}/tables
- path: api/authentication
fields:
name: /databases/{databaseName}/tables
describes:
- /databases/{databaseName}/tables
menuName: /databases/{databaseName}/tables
title: /databases/{databaseName}/tables
tags:
- databases-{databaseName}
- tables
apiTags:
- Tables
name: Authentication
describes: []
title: Authentication
description: >
With InfluxDB 3 Clustered, InfluxDB Management API endpoints require the
following credential:
- `Authorization MANAGEMENT_TOKEN`: the `Authorization` HTTP header with
a [management token](/influxdb3/clustered/admin/tokens/management/).
See how to [create a management token](/influxdb3/clustered/admin/tokens/management/).
By default, management tokens in InfluxDB 3 are short-lived tokens issued by an OAuth2 identity provider that grant a specific user administrative access to your InfluxDB cluster. However, for automation purposes, you can manually create management tokens that authenticate directly with your InfluxDB cluster and do not require human interaction with your identity provider.
tag: Authentication
isConceptual: true
menuGroup: Concepts
operations: []
tagDescription: >
With InfluxDB 3 Clustered, InfluxDB Management API endpoints require the
following credential:
- `Authorization MANAGEMENT_TOKEN`: the `Authorization` HTTP header with
a [management token](/influxdb3/clustered/admin/tokens/management/).
See how to [create a management token](/influxdb3/clustered/admin/tokens/management/).
By default, management tokens in InfluxDB 3 are short-lived tokens issued by an OAuth2 identity provider that grant a specific user administrative access to your InfluxDB cluster. However, for automation purposes, you can manually create management tokens that authenticate directly with your InfluxDB cluster and do not require human interaction with your identity provider.
showSecuritySchemes: true
source: >-
static/openapi/influxdb-clustered/paths/influxdb-clustered-databases-{databaseName}-tables.yaml
static/openapi/influxdb-clustered/tags/tags/influxdb-clustered-authentication.yaml
staticFilePath: >-
/openapi/influxdb-clustered/paths/influxdb-clustered-databases-{databaseName}-tables.yaml
- path: api/databases
/openapi/influxdb-clustered/tags/tags/influxdb-clustered-authentication.yaml
- path: api/database-tokens
fields:
name: /databases
describes:
- /databases
- /databases/{databaseName}
menuName: /databases
title: /databases
tags:
- ''
- databases
apiTags:
- Databases
source: >-
static/openapi/influxdb-clustered/paths/influxdb-clustered-databases.yaml
staticFilePath: /openapi/influxdb-clustered/paths/influxdb-clustered-databases.yaml
- path: api/tokens
fields:
name: /tokens
name: Database tokens
describes:
- /tokens
- /tokens/{tokenId}
menuName: /tokens
title: /tokens
tags:
- ''
- tokens
apiTags:
- Database tokens
source: static/openapi/influxdb-clustered/paths/influxdb-clustered-tokens.yaml
staticFilePath: /openapi/influxdb-clustered/paths/influxdb-clustered-tokens.yaml
title: Database tokens
description: Manage database read/write tokens for a cluster
tag: Database tokens
isConceptual: false
menuGroup: Other
operations:
- operationId: GetDatabaseTokens
method: GET
path: /tokens
summary: Get all database tokens for a cluster
tags:
- Database tokens
- operationId: CreateDatabaseToken
method: POST
path: /tokens
summary: Create a database token
tags:
- Database tokens
- operationId: GetDatabaseToken
method: GET
path: /tokens/{tokenId}
summary: Get a database token
tags:
- Database tokens
- operationId: UpdateDatabaseToken
method: PATCH
path: /tokens/{tokenId}
summary: Update a database token
tags:
- Database tokens
- operationId: DeleteDatabaseToken
method: DELETE
path: /tokens/{tokenId}
summary: Delete a database token
tags:
- Database tokens
tagDescription: Manage database read/write tokens for a cluster
source: >-
static/openapi/influxdb-clustered/tags/tags/influxdb-clustered-database-tokens.yaml
staticFilePath: >-
/openapi/influxdb-clustered/tags/tags/influxdb-clustered-database-tokens.yaml
- path: api/databases
fields:
name: Databases
describes:
- /databases
- /databases/{databaseName}
title: Databases
description: Manage databases for a cluster
tag: Databases
isConceptual: false
menuGroup: Other
operations:
- operationId: GetClusterDatabases
method: GET
path: /databases
summary: Get all databases for a cluster
tags:
- Databases
- operationId: CreateClusterDatabase
method: POST
path: /databases
summary: Create a database
tags:
- Databases
- operationId: UpdateClusterDatabase
method: PATCH
path: /databases/{databaseName}
summary: Update a database
tags:
- Databases
- operationId: DeleteClusterDatabase
method: DELETE
path: /databases/{databaseName}
summary: Delete a database
tags:
- Databases
tagDescription: Manage databases for a cluster
source: >-
static/openapi/influxdb-clustered/tags/tags/influxdb-clustered-databases.yaml
staticFilePath: /openapi/influxdb-clustered/tags/tags/influxdb-clustered-databases.yaml
- path: api/quickstart
fields:
name: Quickstart
describes: []
title: Quickstart
description: >
The following example script shows how to use `curl` to make database
and token management requests:
```shell
#!/bin/bash
# Usage:
# Note the leading space in the command below to keep secrets out of the shell history
#
# ```
# MANAGEMENT_TOKEN=<MANAGEMENT_TOKEN> ./scripts/test_http_api_v0_endpoints.sh
# ```
# Env var validation
if [ -z "${MANAGEMENT_TOKEN}" ]; then
echo "
[Error]:
\$MANAGEMENT_TOKEN env var is required.
"
exit 1
fi
HOST="https://cluster-host.com"
# Database request functions
list_databases () {
local response=$( \
curl \
--location "$HOST/api/v0/databases" \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
create_database () {
local databaseName=$1
local response=$( \
curl \
--location "$HOST/api/v0/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"
}
update_database () {
local databaseName=$1
local response=$( \
curl \
--location "$HOST/api/v0/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_database () {
local databaseName=$1
local response=$( \
curl \
--location "$HOST/api/v0/databases/$databaseName" \
--request DELETE \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
# Token request functions
list_tokens () {
local response=$( \
curl \
--location "$HOST/api/v0/tokens" \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
create_token () {
local response=$( \
curl \
--location "$HOST/api/v0/tokens" \
--header "Accept: application/json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
--data '{
"description": "my test token",
"permissions": [
{
"action": "write",
"resource": "database_one"
},
{
"action": "read",
"resource": "database_two"
}
]
}' \
)
echo "$response"
}
get_token () {
local token_id=$1
local response=$( \
curl \
--location "$HOST/api/v0/tokens/$tokenId" \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
update_token () {
local token_id=$1
local response=$( \
curl \
--location "$HOST/api/v0/tokens/$tokenId" \
--request PATCH \
--header "Accept: application/json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
--data '{
"description": "my updated test token",
"permissions": [
{
"action": "database_one",
"resource": "read"
}
]
}' \
)
echo "$response"
}
delete_token () {
local token_id=$1
local response=$( \
curl \
--location "$HOST/api/v0/tokens/$tokenId" \
--request DELETE \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
# Test database endpoints
databaseName="test_database_$RANDOM"
printf "\n🏗 Creating database... 🏗️\n\n"
response="$(create_database $databaseName)"
echo $response | jq
printf "\n🏗 Creating database successful 🏗️\n\n"
printf "\n⬆ Updating database... ⬆️\n\n"
response="$(update_database $databaseName)"
echo $response | jq
printf "\n⬆ Updating database successful ⬆️\n\n"
printf "\n⬇ Listing databases... ⬇️\n\n"
response="$(list_databases)"
echo $response | jq
printf "\n⬇ Listing databases successful ⬇️\n\n"
printf "\n🗑 Deleting database... 🗑️\n\n"
response="$(delete_database $databaseName)"
echo $response | jq
printf "\n🗑 Deleting database successful 🗑️\n\n"
# Test token endpoints
printf "\n🏗 Creating token... 🏗️\n\n"
response="$(create_token)"
echo $response | jq
tokenId=$(echo $response | jq '.id')
printf "\n🏗 Creating token successful 🏗️\n\n"
printf "\n⬇ Getting token... ⬇️\n\n"
response="$(get_token $tokenId)"
echo $response | jq
printf "\n⬇ Getting token successful ⬇️\n\n"
printf "\n⬆ Updating token... ⬆️\n\n"
response="$(update_token $tokenId)"
echo $response | jq
printf "\n⬆ Updating token successful ⬆️\n\n"
printf "\n📋 Listing tokens... 📋\n\n"
response="$(list_tokens)"
echo $response | jq
printf "\n📋 Listing tokens successful 📋\n\n"
printf "\n🗑 Deleting token... 🗑️\n\n"
response="$(delete_token $tokenId)"
echo $response | jq
printf "\n🗑 Deleting token successful 🗑️\n\n"
```
tag: Quickstart
isConceptual: true
menuGroup: Other
operations: []
tagDescription: >
The following example script shows how to use `curl` to make database
and token management requests:
```shell
#!/bin/bash
# Usage:
# Note the leading space in the command below to keep secrets out of the shell history
#
# ```
# MANAGEMENT_TOKEN=<MANAGEMENT_TOKEN> ./scripts/test_http_api_v0_endpoints.sh
# ```
# Env var validation
if [ -z "${MANAGEMENT_TOKEN}" ]; then
echo "
[Error]:
\$MANAGEMENT_TOKEN env var is required.
"
exit 1
fi
HOST="https://cluster-host.com"
# Database request functions
list_databases () {
local response=$( \
curl \
--location "$HOST/api/v0/databases" \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
create_database () {
local databaseName=$1
local response=$( \
curl \
--location "$HOST/api/v0/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"
}
update_database () {
local databaseName=$1
local response=$( \
curl \
--location "$HOST/api/v0/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_database () {
local databaseName=$1
local response=$( \
curl \
--location "$HOST/api/v0/databases/$databaseName" \
--request DELETE \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
# Token request functions
list_tokens () {
local response=$( \
curl \
--location "$HOST/api/v0/tokens" \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
create_token () {
local response=$( \
curl \
--location "$HOST/api/v0/tokens" \
--header "Accept: application/json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
--data '{
"description": "my test token",
"permissions": [
{
"action": "write",
"resource": "database_one"
},
{
"action": "read",
"resource": "database_two"
}
]
}' \
)
echo "$response"
}
get_token () {
local token_id=$1
local response=$( \
curl \
--location "$HOST/api/v0/tokens/$tokenId" \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
update_token () {
local token_id=$1
local response=$( \
curl \
--location "$HOST/api/v0/tokens/$tokenId" \
--request PATCH \
--header "Accept: application/json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
--data '{
"description": "my updated test token",
"permissions": [
{
"action": "database_one",
"resource": "read"
}
]
}' \
)
echo "$response"
}
delete_token () {
local token_id=$1
local response=$( \
curl \
--location "$HOST/api/v0/tokens/$tokenId" \
--request DELETE \
--header "Accept: application/json" \
--header "Authorization: Bearer $MANAGEMENT_TOKEN" \
)
echo "$response"
}
# Test database endpoints
databaseName="test_database_$RANDOM"
printf "\n🏗 Creating database... 🏗️\n\n"
response="$(create_database $databaseName)"
echo $response | jq
printf "\n🏗 Creating database successful 🏗️\n\n"
printf "\n⬆ Updating database... ⬆️\n\n"
response="$(update_database $databaseName)"
echo $response | jq
printf "\n⬆ Updating database successful ⬆️\n\n"
printf "\n⬇ Listing databases... ⬇️\n\n"
response="$(list_databases)"
echo $response | jq
printf "\n⬇ Listing databases successful ⬇️\n\n"
printf "\n🗑 Deleting database... 🗑️\n\n"
response="$(delete_database $databaseName)"
echo $response | jq
printf "\n🗑 Deleting database successful 🗑️\n\n"
# Test token endpoints
printf "\n🏗 Creating token... 🏗️\n\n"
response="$(create_token)"
echo $response | jq
tokenId=$(echo $response | jq '.id')
printf "\n🏗 Creating token successful 🏗️\n\n"
printf "\n⬇ Getting token... ⬇️\n\n"
response="$(get_token $tokenId)"
echo $response | jq
printf "\n⬇ Getting token successful ⬇️\n\n"
printf "\n⬆ Updating token... ⬆️\n\n"
response="$(update_token $tokenId)"
echo $response | jq
printf "\n⬆ Updating token successful ⬆️\n\n"
printf "\n📋 Listing tokens... 📋\n\n"
response="$(list_tokens)"
echo $response | jq
printf "\n📋 Listing tokens successful 📋\n\n"
printf "\n🗑 Deleting token... 🗑️\n\n"
response="$(delete_token $tokenId)"
echo $response | jq
printf "\n🗑 Deleting token successful 🗑️\n\n"
```
source: >-
static/openapi/influxdb-clustered/tags/tags/influxdb-clustered-quickstart.yaml
staticFilePath: /openapi/influxdb-clustered/tags/tags/influxdb-clustered-quickstart.yaml
- path: api/tables
fields:
name: Tables
describes:
- /databases/{databaseName}/tables
title: Tables
description: Manage tables in a database
tag: Tables
isConceptual: false
menuGroup: Other
operations:
- operationId: CreateClusterDatabaseTable
method: POST
path: /databases/{databaseName}/tables
summary: Create a database table
tags:
- Tables
tagDescription: Manage tables in a database
source: >-
static/openapi/influxdb-clustered/tags/tags/influxdb-clustered-tables.yaml
staticFilePath: /openapi/influxdb-clustered/tags/tags/influxdb-clustered-tables.yaml

View File

@ -481,12 +481,12 @@
"name": "Quick start",
"describes": [],
"title": "Quick start",
"description": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n\n If all data is written, the response is `204 No Content`.\n\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Core, see the [Get started](/influxdb3/core/get-started/) guide.\n",
"description": "Authenticate, write, and query with the API:\n\n1. [Create an admin token](#section/Authentication) to authorize API requests.\n\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n\n If all data is written, the response is `204 No Content`.\n\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Core, see the [Get started](/influxdb3/core/get-started/) guide.\n",
"tag": "Quick start",
"isConceptual": true,
"menuGroup": "Concepts",
"operations": [],
"tagDescription": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n\n If all data is written, the response is `204 No Content`.\n\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Core, see the [Get started](/influxdb3/core/get-started/) guide.\n",
"tagDescription": "Authenticate, write, and query with the API:\n\n1. [Create an admin token](#section/Authentication) to authorize API requests.\n\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n\n If all data is written, the response is `204 No Content`.\n\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Core, see the [Get started](/influxdb3/core/get-started/) guide.\n",
"source": "static/openapi/influxdb3-core/tags/tags/influxdb3-core-quick-start.yaml",
"staticFilePath": "/openapi/influxdb3-core/tags/tags/influxdb3-core-quick-start.yaml"
}

View File

@ -714,6 +714,9 @@ articles:
describes: []
title: Quick start
description: >
Authenticate, write, and query with the API:
1. [Create an admin token](#section/Authentication) to authorize API
requests.
@ -762,6 +765,9 @@ articles:
menuGroup: Concepts
operations: []
tagDescription: >
Authenticate, write, and query with the API:
1. [Create an admin token](#section/Authentication) to authorize API
requests.

View File

@ -511,12 +511,12 @@
"name": "Quick start",
"describes": [],
"title": "Quick start",
"description": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n If all data is written, the response is `204 No Content`.\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
"description": "Authenticate, write, and query with the API:\n\n1. [Create an admin token](#section/Authentication) to authorize API requests.\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n If all data is written, the response is `204 No Content`.\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
"tag": "Quick start",
"isConceptual": true,
"menuGroup": "Concepts",
"operations": [],
"tagDescription": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n If all data is written, the response is `204 No Content`.\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
"tagDescription": "Authenticate, write, and query with the API:\n\n1. [Create an admin token](#section/Authentication) to authorize API requests.\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n If all data is written, the response is `204 No Content`.\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
"source": "static/openapi/influxdb3-enterprise/tags/tags/influxdb3-enterprise-quick-start.yaml",
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/influxdb3-enterprise-quick-start.yaml"
}

View File

@ -707,6 +707,9 @@ articles:
describes: []
title: Quick start
description: >
Authenticate, write, and query with the API:
1. [Create an admin token](#section/Authentication) to authorize API
requests.
```bash
@ -747,6 +750,9 @@ articles:
menuGroup: Concepts
operations: []
tagDescription: >
Authenticate, write, and query with the API:
1. [Create an admin token](#section/Authentication) to authorize API
requests.
```bash