diff --git a/.ci/vale/styles/InfluxDB3-Core/Branding.yml b/.ci/vale/styles/InfluxDB3-Core/Branding.yml new file mode 100644 index 000000000..491104f79 --- /dev/null +++ b/.ci/vale/styles/InfluxDB3-Core/Branding.yml @@ -0,0 +1,11 @@ +extends: substitution +message: Did you mean '%s' instead of '%s' +level: warning +ignorecase: false +# swap maps tokens in form of bad: good + # NOTE: The left-hand (bad) side can match the right-hand (good) side; + # Vale ignores alerts that match the intended form. +swap: + 'cloud-serverless|cloud-dedicated|clustered': core + 'Cloud Serverless|Cloud Dedicated|Clustered': Core + 'API token': database token diff --git a/.ci/vale/styles/InfluxDB3-Core/v3Schema.yml b/.ci/vale/styles/InfluxDB3-Core/v3Schema.yml new file mode 100644 index 000000000..a95342af8 --- /dev/null +++ b/.ci/vale/styles/InfluxDB3-Core/v3Schema.yml @@ -0,0 +1,10 @@ +extends: substitution +message: Did you mean '%s' instead of '%s' +level: warning +ignorecase: false +# swap maps tokens in form of bad: good + # NOTE: The left-hand (bad) side can match the right-hand (good) side; + # Vale ignores alerts that match the intended form. +swap: + '(?i)bucket': database + '(?i)measurement': table \ No newline at end of file diff --git a/.frontmatter-schema.json b/.frontmatter-schema.json new file mode 100644 index 000000000..b57b6af36 --- /dev/null +++ b/.frontmatter-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page" + }, + "description": { + "type": "string", + "description": "Page description that supports multi-line text" + }, + "menu": { + "type": "object", + "properties": { + "influxdb3_core": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Menu item name" + } + }, + "required": ["name"] + } + } + }, + "weight": { + "type": "integer", + "description": "Order weight for menu items", + "minimum": 0 + }, + "source": { + "type": "string", + "description": "Path to source content file", + "pattern": "^/shared/.+\\.md$" + } + }, + "required": ["title", "description", "menu", "weight"] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 254ec132e..445d595f8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ node_modules *.log /resources .hugo_build.lock -/content/influxdb/*/api/**/*.html +/content/influxdb*/**/api/**/*.html /api-docs/redoc-static.html* .vscode/* .idea diff --git a/.vscode/settings.json b/.vscode/settings.json index 4e9df44ce..9f74fc71e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,17 @@ { - "vale.valeCLI.config": " \"${workspaceFolder}/.vale.ini\"", + "commentAnchors.tags.anchors": + { "SOURCE": { + "scope": "file", + "behavior": "link", + "iconColor": "#FF0000", + "highlightColor": "#FF0000", + "style": "bold" + }}, + "commentAnchors.workspace.matchFiles": "**/*.{md,ini,json,yaml,yml}", + "commentAnchors.workspace.enabled": true, + "yaml.schemas": { + "./.frontmatter-schema.json": "${workspaceFolder}/content/**/*.md" + }, + "vale.valeCLI.config": "${workspaceFolder}/.vale.ini", "vale.valeCLI.minAlertLevel": "warning", } \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e38f0b9e9..985642224 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,9 +46,10 @@ To install dependencies listed in package.json: 4. Install the Yarn package manager and run `yarn` to install project dependencies. `package.json` contains dependencies for linting and running Git hooks. +docs-v2 uses [Lefthook](https://github.com/evilmartians/lefthook) to configure and manage pre-commit hooks for linting and testing Markdown content. + +Other dependencies used in the project: -- **[husky](https://github.com/typicode/husky)**: manages Git hooks, including the pre-commit hook for linting and testing -- **[lint-staged](https://github.com/lint-staged/lint-staged)**: passes staged files to commands - **[prettier](https://prettier.io/docs/en/)**: formats code, including Markdown, according to style rules for consistency ### Install Docker @@ -65,13 +66,24 @@ The tests defined in `compose.yaml` use the dependencies and execution environment from this image. ```bash -docker build -t influxdata:docs-pytest -f Dockerfile.pytest . +docker build -t influxdata/docs-pytest:latest -f Dockerfile.pytest . ``` ### Run the documentation locally (optional) To run the documentation locally, follow the instructions provided in the README. +### Install Visual Studio Code extensions + +If you use Microsoft Visual Studio (VS) Code, you can install extensions +to help you navigate, check, and edit files. + +docs-v2 contains a `./.vscode/settings.json` that configures the following extensions: + +- Comment Anchors: recognizes tags (for example, `//SOURCE`) and makes links and filepaths clickable in comments. +- Vale: shows linter errors and suggestions in the editor. +- YAML Schemas: validates frontmatter attributes. + ### Make your changes Make your suggested changes being sure to follow the [style and formatting guidelines](#style--formatting) outline below. @@ -80,15 +92,15 @@ Make your suggested changes being sure to follow the [style and formatting guide ### Automatic pre-commit checks -docs-v2 uses Husky to manage Git hook scripts. -When you try to commit your changes (for example, `git commit`), Git runs -scripts configured in `.husky/pre-commit`, including linting and tests for your **staged** files. +docs-v2 uses Lefthook to manage Git hooks, such as pre-commit hooks that lint Markdown and test code blocks. +When you try to commit changes (`git commit`), Git runs +the commands configured in `lefthook.yml` which pass your **staged** files to Vale, Prettier, and Pytest (in a Docker container). ### Skip pre-commit hooks **We strongly recommend running linting and tests**, but you can skip them (and avoid installing dependencies) -by including the `HUSKY=0` environment variable or the `--no-verify` flag with +by including the `LEFTHOOK=0` environment variable or the `--no-verify` flag with your commit--for example: ```sh @@ -96,11 +108,9 @@ git commit -m "" --no-verify ``` ```sh -HUSKY=0 git commit +LEFTHOOK=0 git commit ``` -For more options, see the [Husky documentation](https://typicode.github.io/husky/how-to.html#skipping-git-hooks). - ### Set up test scripts and credentials To set up your docs-v2 instance to run tests locally, do the following: diff --git a/Dockerfile.pytest b/Dockerfile.pytest index d6c9e2fd2..c624960f3 100644 --- a/Dockerfile.pytest +++ b/Dockerfile.pytest @@ -32,7 +32,13 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \ python3-venv \ rsync \ telegraf \ - wget + wget \ + yq + +# Install InfluxDB 3 Core +RUN curl -O https://www.influxdata.com/d/install_influxdb3.sh \ +&& chmod +x install_influxdb3.sh \ +&& bash -c yes | ./install_influxdb3.sh RUN ln -s /usr/bin/python3 /usr/bin/python diff --git a/api-docs/README.md b/api-docs/README.md index 3c8d121db..3e59d120c 100755 --- a/api-docs/README.md +++ b/api-docs/README.md @@ -237,7 +237,7 @@ InfluxDB Cloud releases are frequent and not versioned, so the Cloud API spec is We regenerate API reference docs from `influxdata/openapi` **master** branch as features are released. -### InfluxDB OSS version +### InfluxDB OSS v2 version Given that `influxdata/openapi` **master** may contain OSS spec changes not implemented diff --git a/api-docs/generate-api-docs.sh b/api-docs/generate-api-docs.sh index 07d42eda1..1e7820a7e 100755 --- a/api-docs/generate-api-docs.sh +++ b/api-docs/generate-api-docs.sh @@ -41,7 +41,6 @@ function generateHtml { local productName="$3" local api="$4" local configPath="$5" - local isDefault=$6 # Use the product name to define the menu for the Hugo template local menu="$(echo $productVersion | sed 's/\./_/g;s/-/_/g;s/\//_/g;')" @@ -55,12 +54,23 @@ function generateHtml { # Use the title and summary defined in the product API's info.yml file. local title=$(yq '.title' $productVersion/$apiName/content/info.yml) local menuTitle=$(yq '.x-influxdata-short-title' $productVersion/$apiName/content/info.yml) - local description=$(yq '.summary' $productVersion/$apiName/content/info.yml) + # Get the shortened description to use for metadata. + local shortDescription=$(yq '.x-influxdata-short-description' $productVersion/$apiName/content/info.yml) + # Get the aliases array from the configuration file. + local aliases=$(yq e ".apis | .$api | .x-influxdata-docs-aliases" "$configPath") + # If aliases is null, set it to an empty YAML array. + if [[ "$aliases" == "null" ]]; then + aliases='[]' + fi + local weight=102 + if [[ $apiName == "v1-compatibility" ]]; then + weight=304 + fi # Define the file name for the Redoc HTML output. local specbundle=redoc-static_index.html # Define the temporary file for the Hugo template and Redoc HTML. local tmpfile="${productVersion}-${api}_index.tmp" - + echo "Bundling $specPath" # Use npx to install and run the specified version of redoc-cli. @@ -70,75 +80,31 @@ function generateHtml { npm_config_yes=true npx redoc-cli@0.12.3 bundle $specPath \ --config $configPath \ -t template.hbs \ - --title=$title \ + --title="$title" \ --options.sortPropsAlphabetically \ --options.menuToggle \ --options.hideDownloadButton \ --options.hideHostname \ --options.noAutoAuth \ --output=$specbundle \ - --templateOptions.description=$description \ + --templateOptions.description="$shortDescription" \ --templateOptions.product="$productVersion" \ --templateOptions.productName="$productName" - if [[ $apiName == "v1-compatibility" ]]; then - frontmatter="--- -title: $title -description: $description -layout: api -menu: - $menu: - parent: InfluxDB HTTP API - name: $menuTitle - identifier: api-reference-$apiName -weight: 304 -aliases: - - /influxdb/$versionDir/api/v1/ + local frontmatter=$(yq eval -n \ + ".title = \"$title\" | + .description = \"$shortDescription\" | + .layout = \"api\" | + .weight = $weight | + .menu.[\"$menu\"].parent = \"InfluxDB HTTP API\" | + .menu.[\"$menu\"].name = \"$menuTitle\" | + .menu.[\"$menu\"].identifier = \"api-reference-$apiName\" | + .aliases = \"$aliases\"") + + frontmatter="--- +$frontmatter --- " - elif [[ $apiVersion == "0" ]]; then - echo $productName $apiName - frontmatter="--- -title: $title -description: $description -layout: api -weight: 102 -menu: - $menu: - parent: InfluxDB HTTP API - name: $menuTitle - identifier: api-reference-$apiName ---- -" - elif [[ $isDefault == true ]]; then - frontmatter="--- -title: $title -description: $description -layout: api -menu: - $menu: - parent: InfluxDB HTTP API - name: $menuTitle - identifier: api-reference-$apiName -weight: 102 -aliases: - - /influxdb/$versionDir/api/ ---- -" - else - frontmatter="--- -title: $title -description: $description -layout: api -menu: - $menu: - parent: InfluxDB HTTP API - name: $menuTitle - identifier: api-reference-$apiName -weight: 102 ---- -" - fi # Create the Hugo template file with the frontmatter and Redoc HTML echo "$frontmatter" >> $tmpfile @@ -174,9 +140,10 @@ function build { # Get the version API configuration file. local configPath="$version/.config.yml" if [ ! -f "$configPath" ]; then - configPath=".config.yml" + # Skip to the next version if the configuration file doesn't exist. + continue fi - echo "Using config $configPath" + echo "Using config $version $configPath" # Get the product name from the configuration. local versionName versionName=$(yq e '.x-influxdata-product-name' "$configPath") @@ -198,13 +165,7 @@ function build { if [ -d "$specPath" ] || [ ! -f "$specPath" ]; then echo "OpenAPI spec $specPath doesn't exist." fi - # Get default status from the configuration. - local isDefault=false - local defaultStatus - defaultStatus=$(yq e ".apis | .$api | .x-influxdata-default" "$configPath") - if [[ $defaultStatus == "true" ]]; then - isDefault=true - fi + # If the spec file differs from master, regenerate the HTML. local update=0 @@ -218,9 +179,9 @@ function build { if [[ $update -eq 0 ]]; then echo "Regenerating $version $api" - generateHtml "$specPath" "$version" "$versionName" "$api" "$configPath" "$isDefault" + generateHtml "$specPath" "$version" "$versionName" "$api" "$configPath" fi - echo "========Done with $version $api========" + echo -e "========Finished $version $api========\n\n" done <<< "$apis" done } diff --git a/api-docs/getswagger.sh b/api-docs/getswagger.sh index 3b650fd5f..c3c9a36a1 100755 --- a/api-docs/getswagger.sh +++ b/api-docs/getswagger.sh @@ -62,7 +62,7 @@ function showHelp { subcommand=$1 case "$subcommand" in - cloud-dedicated-v2|cloud-dedicated-management|cloud-serverless-v2|clustered-v2|cloud-v2|v2|v1-compat|all) + cloud-dedicated-v2|cloud-dedicated-management|cloud-serverless-v2|clustered-v2|cloud-v2|v2|v1-compat|core-v3|enterprise-v3|all) product=$1 shift @@ -176,17 +176,6 @@ function updateCloudDedicatedV2 { postProcess $outFile 'influxdb3/cloud-dedicated/.config.yml' v2@2 } -function updateClusteredV2 { - outFile="influxdb3/clustered/v2/ref.yml" - if [[ -z "$baseUrl" ]]; - then - echo "Using existing $outFile" - else - curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile - fi - postProcess $outFile 'influxdb3/clustered/.config.yml' v2@2 -} - function updateCloudServerlessV2 { outFile="influxdb3/cloud-serverless/v2/ref.yml" if [[ -z "$baseUrl" ]]; @@ -198,15 +187,50 @@ function updateCloudServerlessV2 { postProcess $outFile 'influxdb3/cloud-serverless/.config.yml' v2@2 } +function updateClusteredV2 { + outFile="influxdb3/clustered/v2/ref.yml" + if [[ -z "$baseUrl" ]]; + then + echo "Using existing $outFile" + else + curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile + fi + postProcess $outFile 'influxdb3/clustered/.config.yml' v2@2 +} + +function updateCoreV3 { + outFile="influxdb3/core/v3/ref.yml" + if [[ -z "$baseUrl" ]]; + then + echo "Using existing $outFile" + else + local url="${baseUrl}/TO_BE_DECIDED" + curl $UPDATE_OPTIONS $url -o $outFile + fi + postProcess $outFile 'influxdb3/core/.config.yml' v3@3 +} + +function updateEnterpriseV3 { + outFile="influxdb3/enterprise/v3/ref.yml" + if [[ -z "$baseUrl" ]]; + then + echo "Using existing $outFile" + else + local url="${baseUrl}/TO_BE_DECIDED" + curl $UPDATE_OPTIONS $url -o $outFile + fi + postProcess $outFile 'influxdb3/enterprise/.config.yml' v3@3 +} + function updateOSSV2 { - outFile="influxdb/v2/ref.yml" + outFile="influxdb/v2/v2/ref.yml" if [[ -z "$baseUrlOSS" ]]; then echo "Using existing $outFile" else curl $UPDATE_OPTIONS ${baseUrlOSS}/contracts/ref/oss.yml -o $outFile fi - postProcess $outFile 'influxdb/v2/.config.yml' '@2' + postProcess $outFile 'influxdb/v2/.config.yml' 'v2@2' } function updateV1Compat { @@ -220,7 +244,7 @@ function updateV1Compat { postProcess $outFile 'influxdb/cloud/.config.yml' 'v1-compatibility' outFile="influxdb/v2/v1-compatibility/swaggerV1Compat.yml" - cp cloud/v1-compatibility/swaggerV1Compat.yml $outFile + cp influxdb/cloud/v1-compatibility/swaggerV1Compat.yml $outFile postProcess $outFile 'influxdb/v2/.config.yml' 'v1-compatibility' outFile="influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml" @@ -257,6 +281,12 @@ then elif [ "$product" = "clustered-v2" ]; then updateClusteredV2 +elif [ "$product" = "core-v3" ]; +then + updateCoreV3 +elif [ "$product" = "enterprise-v3" ]; +then + updateEnterpriseV3 elif [ "$product" = "v2" ]; then updateOSSV2 @@ -270,9 +300,11 @@ then updateCloudDedicatedManagement updateCloudServerlessV2 updateClusteredV2 + updateCoreV3 + updateEnterpriseV3 updateOSSV2 updateV1Compat else - echo "Provide a product argument: cloud-v2, cloud-serverless-v2, cloud-dedicated-v2, clustered-v2, v2, v1-compat, or all." + echo "Provide a product argument: cloud-v2, cloud-serverless-v2, cloud-dedicated-v2, cloud-dedicated-management, clustered-v2, core-v3, enterprise-v3, v2, v1-compat, or all." showHelp fi diff --git a/api-docs/influxdb/cloud/.config.yml b/api-docs/influxdb/cloud/.config.yml index 49632b887..e2c6e000f 100644 --- a/api-docs/influxdb/cloud/.config.yml +++ b/api-docs/influxdb/cloud/.config.yml @@ -8,6 +8,9 @@ x-influxdata-product-name: InfluxDB v2 Cloud apis: v2@2: root: v2/ref.yml - x-influxdata-default: true + x-influxdata-docs-aliases: + - /influxdb/cloud/api/ v1-compatibility@2: root: v1-compatibility/swaggerV1Compat.yml + x-influxdata-docs-aliases: + - /influxdb/cloud/api/v1/ diff --git a/api-docs/influxdb/cloud/v1-compatibility/content/info.yml b/api-docs/influxdb/cloud/v1-compatibility/content/info.yml index 07ae7e9e7..b6a8e2171 100644 --- a/api-docs/influxdb/cloud/v1-compatibility/content/info.yml +++ b/api-docs/influxdb/cloud/v1-compatibility/content/info.yml @@ -1,11 +1,17 @@ -title: InfluxDB v1 HTTP API for InfluxDB Cloud +title: InfluxDB v1 HTTP API for InfluxDB Cloud (TSM) x-influxdata-short-title: v1 Compatibility API -summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB Cloud using InfluxDB v1-compatible endpoints. +x-influxdata-short-description: The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB v2 bucket using InfluxDB v1 endpoints. description: | - The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. + The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB v2 bucket using InfluxDB v1 endpoints. + + The `/write` and `/query` endpoints support InfluxDB 1.x client libraries and third-party integrations such as Grafana. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml). license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com diff --git a/api-docs/influxdb/cloud/v1-compatibility/swaggerV1Compat.yml b/api-docs/influxdb/cloud/v1-compatibility/swaggerV1Compat.yml index 56853fefa..eff69ff75 100644 --- a/api-docs/influxdb/cloud/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/influxdb/cloud/v1-compatibility/swaggerV1Compat.yml @@ -1,16 +1,21 @@ openapi: 3.0.0 info: - title: InfluxDB v1 HTTP API for InfluxDB Cloud + title: InfluxDB v1 HTTP API for InfluxDB Cloud (TSM) version: '' description: | - The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. + The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB v2 bucket using InfluxDB v1 endpoints. + + The `/write` and `/query` endpoints support InfluxDB 1.x client libraries and third-party integrations such as Grafana. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml). license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB Cloud using InfluxDB v1-compatible endpoints. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: / security: @@ -276,9 +281,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -327,12 +332,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object InfluxQLCSVResponse: diff --git a/api-docs/influxdb/cloud/v2/content/info.yml b/api-docs/influxdb/cloud/v2/content/info.yml index 0504afa39..b8f780933 100644 --- a/api-docs/influxdb/cloud/v2/content/info.yml +++ b/api-docs/influxdb/cloud/v2/content/info.yml @@ -1,8 +1,9 @@ title: InfluxDB Cloud API Service x-influxdata-short-title: v2 API -summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. +x-influxdata-short-description: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. description: | - The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints. + The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. + Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml). @@ -10,3 +11,7 @@ version: 2.x license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb/cloud/v2/content/tag-groups.yml b/api-docs/influxdb/cloud/v2/content/tag-groups.yml index 62cc43226..7fcd8cc8d 100644 --- a/api-docs/influxdb/cloud/v2/content/tag-groups.yml +++ b/api-docs/influxdb/cloud/v2/content/tag-groups.yml @@ -6,8 +6,5 @@ - Headers - Pagination - Response codes - - Data I/O endpoints - - Security and access endpoints - - System information endpoints - name: All endpoints tags: [] diff --git a/api-docs/influxdb/cloud/v2/ref.yml b/api-docs/influxdb/cloud/v2/ref.yml index df84bf180..6bb9bb583 100644 --- a/api-docs/influxdb/cloud/v2/ref.yml +++ b/api-docs/influxdb/cloud/v2/ref.yml @@ -3,14 +3,18 @@ info: title: InfluxDB Cloud API Service version: 2.x description: | - The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints. + The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. + Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml). license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: https://{baseurl} description: InfluxDB Cloud API URL @@ -97,8 +101,8 @@ tags: - name: Dashboards - name: Data I/O endpoints - description: | - The InfluxDB 1.x data model includes [databases](/influxdb/v1.8/concepts/glossary/#database) - and [retention policies](/influxdb/v1.8/concepts/glossary/#retention-policy-rp). + The InfluxDB 1.x data model includes [databases](/influxdb/cloud/reference/glossary/#database) + and [retention policies](/influxdb/cloud/reference/glossary/#retention-policy-rp). InfluxDB 2.x replaces databases and retention policies with buckets. To support InfluxDB 1.x query and write patterns in InfluxDB 2.x, databases and retention policies are mapped to buckets using the @@ -410,7 +414,7 @@ paths: Specifies an authorization by its `token` property value and returns the authorization. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. @@ -437,11 +441,11 @@ paths: token used in the request has `read-user` permission for the users (`userID` property value) in those authorizations. - #### InfluxDB OSS + #### InfluxDB OSS v2 - **Warning**: The response body contains authorizations with their [API token](/influxdb/cloud/reference/glossary/#token) values in clear text. - - If the request uses an _[operator token](/influxdb/latest/security/tokens/#operator-token)_, + - If the request uses an _[operator token](/influxdb/v2/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. '400': $ref: '#/components/responses/GeneralServerError' @@ -593,11 +597,11 @@ paths: Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. - #### InfluxDB OSS + #### InfluxDB OSS v2 - InfluxDB OSS returns [API token](/influxdb/cloud/reference/glossary/#token) values in authorizations. - - If the request uses an _[operator token](/influxdb/latest/security/tokens/#operator-token)_, + - If the request uses an _[operator token](/influxdb/v2/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides @@ -710,7 +714,7 @@ paths: If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. - #### InfluxDB OSS + #### InfluxDB OSS v2 - If you use an _[operator token](/influxdb/cloud/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all @@ -742,7 +746,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Lists buckets for the specified organization. in: query @@ -757,7 +761,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. @@ -842,7 +846,7 @@ paths: [retention period](/influxdb/cloud/reference/glossary/#retention-period) is 30 days. - #### InfluxDB OSS + #### InfluxDB OSS v2 - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. @@ -985,7 +989,7 @@ paths: 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request, handles the delete synchronously, and then responds with success or failure. @@ -1016,7 +1020,7 @@ paths: #### InfluxDB Cloud - The bucket is queued for deletion. - #### InfluxDB OSS + #### InfluxDB OSS v2 - The bucket is deleted. '400': content: @@ -1153,7 +1157,7 @@ paths: - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't require `retentionRules`. @@ -3452,7 +3456,7 @@ paths: schema: type: string - description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp). + A [retention policy](/influxdb/cloud/reference/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. in: query name: rp @@ -3857,7 +3861,7 @@ paths: Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request, handles the delete synchronously, and then responds with success or failure. @@ -3891,7 +3895,7 @@ paths: - Deletes data from the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. @@ -3919,7 +3923,7 @@ paths: - Deletes data from the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. @@ -3973,7 +3977,7 @@ paths: Because writes are asynchronous, data might not yet be written when you receive the response. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Deleted the data. '400': @@ -3991,7 +3995,7 @@ paths: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': @@ -4031,16 +4035,12 @@ paths: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. - 2. Follow the instructions to [enable, disable, or override values for feature flags](/influxdb/cloud/reference/config-options/#feature-flags). + 2. Follow the instructions to enable, disable, or override values for feature flags. 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. - Send a request to the [`GET /api/v2/config` endpoint](#operation/GetConfig) to retrieve the current runtime server configuration. - - #### Related guides - - - [InfluxDB configuration options](/influxdb/cloud/reference/config-options/) operationId: GetFlags parameters: - $ref: '#/components/parameters/TraceSpan' @@ -4262,7 +4262,7 @@ paths: #### Related guides - [InfluxDB Cloud - Change your password](/influxdb/cloud/account-management/change-password/) - - [InfluxDB OSS - Change your password](/influxdb/latest/users/change-password/) + - [InfluxDB OSS - Change your password](/influxdb/v2/users/change-password/) operationId: PutMePassword parameters: - $ref: '#/components/parameters/TraceSpan' @@ -4298,7 +4298,7 @@ paths: - Doesn't let you manage user passwords through the API; always responds with this status. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't understand a value passed in the request. '401': @@ -5111,7 +5111,7 @@ paths: 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request, handles the delete synchronously, and then responds with success or failure. @@ -5141,7 +5141,7 @@ paths: #### InfluxDB Cloud - The organization is queued for deletion. - #### InfluxDB OSS + #### InfluxDB OSS v2 - The organization is deleted. '400': $ref: '#/components/responses/BadRequestError' @@ -6076,7 +6076,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. @@ -6092,7 +6092,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. @@ -6156,7 +6156,7 @@ paths: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': @@ -6172,7 +6172,7 @@ paths: [global limit](/influxdb/cloud/account-management/limits/#global-limits) - returns `Retry-After` header that describes when to try the write again. - #### InfluxDB OSS: + #### InfluxDB OSS v2: - doesn't return this error. headers: Retry-After: @@ -8508,7 +8508,7 @@ paths: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if an incorrect value is passed in the `org` parameter or `orgID` parameter. '401': @@ -9857,7 +9857,7 @@ paths: - Always returns this error; doesn't support cancelling tasks. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't return this error. '500': @@ -11184,7 +11184,7 @@ paths: #### Related guides - [InfluxDB Cloud - Change your password](/influxdb/cloud/account-management/change-password/) - - [InfluxDB OSS - Change your password](/influxdb/latest/users/change-password/) + - [InfluxDB OSS - Change your password](/influxdb/v2/users/change-password/) operationId: PostUsersIDPassword parameters: - $ref: '#/components/parameters/TraceSpan' @@ -11222,7 +11222,7 @@ paths: - Doesn't allow you to manage passwords through the API; always responds with this status. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't understand a value passed in the request. default: @@ -11259,7 +11259,7 @@ paths: #### Related guides - [InfluxDB Cloud - Change your password](/influxdb/cloud/account-management/change-password/) - - [InfluxDB OSS - Change your password](/influxdb/latest/users/change-password/) + - [InfluxDB OSS - Change your password](/influxdb/v2/users/change-password/) operationId: PutUsersIDPassword parameters: - $ref: '#/components/parameters/TraceSpan' @@ -11297,7 +11297,7 @@ paths: - Doesn't allow you to manage passwords through the API; always responds with this status. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't understand a value passed in the request. default: @@ -11600,7 +11600,7 @@ paths: Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; @@ -11671,7 +11671,7 @@ paths: - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns only `application/json` for format and limit errors. @@ -11695,7 +11695,7 @@ paths: - Writes data to the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. @@ -11715,7 +11715,7 @@ paths: - Writes data to the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. @@ -11772,7 +11772,7 @@ paths: - Validated and queued the request. - Handles the write asynchronously - the write might not have completed yet. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Successfully wrote all points in the batch. @@ -11807,7 +11807,7 @@ paths: - Returns this error for bucket schema conflicts. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': @@ -11848,7 +11848,7 @@ paths: - Returns this error if the payload exceeds the 50MB size limit. - Returns `Content-Type: text/html` for this error. - #### InfluxDB OSS: + #### InfluxDB OSS v2: - Returns this error only if the [Go (golang) `ioutil.ReadAll()`](https://pkg.go.dev/io/ioutil#ReadAll) function raises an error. - Returns `Content-Type: application/json` for this error. @@ -11866,7 +11866,7 @@ paths: Rates (data-in (writes), queries (reads), and deletes) accrue within a fixed five-minute window. Once a rate limit is exceeded, InfluxDB returns an error response until the current five-minute window resets. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't return this error. headers: @@ -12186,7 +12186,7 @@ paths: - description: | The database to query data from. This is mapped to an InfluxDB [bucket](/influxdb/cloud/reference/glossary/#bucket). - For more information, see [Database and retention policy mapping](/influxdb/cloud/api/influxdb-1x/dbrp/). + For more information, see [Database and retention policy mapping](/influxdb/cloud/api-guide/influxdb-1x/dbrp/). in: query name: db required: true @@ -12195,7 +12195,7 @@ paths: - description: | The retention policy to query data from. This is mapped to an InfluxDB [bucket](/influxdb/cloud/reference/glossary/#bucket). - For more information, see [Database and retention policy mapping](/influxdb/cloud/api/influxdb-1x/dbrp/). + For more information, see [Database and retention policy mapping](/influxdb/cloud/api-guide/influxdb-1x/dbrp/). in: query name: rp schema: @@ -12208,7 +12208,7 @@ paths: type: string - description: | A unix timestamp precision. - Formats timestamps as [unix (epoch) timestamps](/influxdb/cloud/reference/glossary/#unix-timestamp) the specified precision + Formats timestamps as [unix (epoch) timestamps](/influxdb/cloud/reference/glossary/#unix-timestamp) with the specified precision instead of [RFC3339 timestamps](/influxdb/cloud/reference/glossary/#rfc3339-timestamp) with nanosecond precision. in: query name: epoch @@ -12271,7 +12271,7 @@ paths: [global limit](/influxdb/cloud/account-management/limits/#global-limits) - returns `Retry-After` header that describes when to try the write again. - #### InfluxDB OSS: + #### InfluxDB OSS v2: - doesn't return this error. headers: Retry-After: @@ -12550,7 +12550,7 @@ components: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if an incorrect value is passed in the `org` parameter or `orgID` parameter. GeneralServerError: @@ -13448,7 +13448,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb/cloud/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string virtual: @@ -13491,7 +13491,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb/cloud/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string required: @@ -13515,7 +13515,7 @@ components: type: boolean retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb/cloud/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string DBRPs: @@ -14600,9 +14600,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -14651,12 +14651,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: @@ -15997,7 +15997,7 @@ components: - Doesn't use `shardGroupDurationsSeconds`. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Default value depends on the [bucket retention period](/influxdb/cloud/reference/internals/shards/#shard-group-duration). @@ -16130,7 +16130,7 @@ components: If you need compatibility with InfluxDB 1.x, specify a value for the `rp` property; otherwise, see the `retentionRules` property. - [Retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) + [Retention policy](/influxdb/cloud/reference/glossary/#retention-policy-rp) is an InfluxDB 1.x concept. The InfluxDB 2.x and Cloud equivalent is [retention period](/influxdb/cloud/reference/glossary/#retention-period). @@ -16147,7 +16147,7 @@ components: - Use `explicit` to enforce column names, tags, fields, and data types for your data. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't support `explicit` bucket schemas. required: @@ -16440,7 +16440,7 @@ components: - Does not use `shardGroupDurationsSeconds`. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Default value depends on the [bucket retention period](/influxdb/cloud/reference/internals/shards/#shard-group-duration). @@ -16463,7 +16463,7 @@ components: - `retentionRules` is required. - #### InfluxDB OSS + #### InfluxDB OSS v2 - `retentionRules` isn't required. items: @@ -19156,9 +19156,6 @@ x-tagGroups: - Headers - Pagination - Response codes - - Data I/O endpoints - - Security and access endpoints - - System information endpoints - name: All endpoints tags: - Authorizations (API tokens) diff --git a/api-docs/influxdb/v2/.config.yml b/api-docs/influxdb/v2/.config.yml index c7db819a6..d17efcdfc 100644 --- a/api-docs/influxdb/v2/.config.yml +++ b/api-docs/influxdb/v2/.config.yml @@ -6,8 +6,11 @@ extends: x-influxdata-product-name: InfluxDB v2 OSS apis: - '@2': - root: ref.yml - x-influxdata-default: true + v2@2: + root: v2/ref.yml + x-influxdata-docs-aliases: + - /influxdb/v2/api/ v1-compatibility@2: root: v1-compatibility/swaggerV1Compat.yml + x-influxdata-docs-aliases: + - /influxdb/v2/api/v1/ diff --git a/api-docs/influxdb/v2/content/info.yml b/api-docs/influxdb/v2/content/info.yml deleted file mode 100644 index 4a75f7efa..000000000 --- a/api-docs/influxdb/v2/content/info.yml +++ /dev/null @@ -1,12 +0,0 @@ -title: InfluxDB OSS API Service -x-influxdata-short-title: v2 API -summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. -description: | - The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints. - - This documentation is generated from the - [InfluxDB OpenAPI specification](https://github.com/influxdata/openapi/blob/influxdb-oss-v2.7.0/contracts/ref/oss.yml). -version: 2.x -license: - name: MIT - url: 'https://opensource.org/licenses/MIT' diff --git a/api-docs/influxdb/v2/v1-compatibility/content/info.yml b/api-docs/influxdb/v2/v1-compatibility/content/info.yml index f897815d3..f58bd21f1 100644 --- a/api-docs/influxdb/v2/v1-compatibility/content/info.yml +++ b/api-docs/influxdb/v2/v1-compatibility/content/info.yml @@ -1,12 +1,15 @@ title: InfluxDB v1 HTTP API for InfluxDB v2 OSS x-influxdata-short-title: v1 Compatibility API -summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB v2 using InfluxDB v1-compatible endpoints. description: | + The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB v2 bucket using InfluxDB v1 endpoints. The InfluxDB 1.x compatibility `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml). - license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb/v2/v1-compatibility/swaggerV1Compat.yml b/api-docs/influxdb/v2/v1-compatibility/swaggerV1Compat.yml index b008e0315..615df2a79 100644 --- a/api-docs/influxdb/v2/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/influxdb/v2/v1-compatibility/swaggerV1Compat.yml @@ -3,14 +3,18 @@ info: title: InfluxDB v1 HTTP API for InfluxDB v2 OSS version: '' description: | - The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. + The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB v2 bucket using InfluxDB v1 endpoints. + The InfluxDB 1.x compatibility `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml). license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB v2 using InfluxDB v1-compatible endpoints. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: / security: @@ -276,9 +280,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -327,12 +331,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object InfluxQLCSVResponse: @@ -463,19 +467,3 @@ components: For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/). -x-tagGroups: - - name: Using the InfluxDB HTTP API - tags: - - Quick start - - Authentication - - Supported operations - - Headers - - Pagination - - Response codes - - Data I/O endpoints - - Security and access endpoints - - System information endpoints - - name: All endpoints - tags: - - Query - - Write diff --git a/api-docs/influxdb/v2/v2/content/info.yml b/api-docs/influxdb/v2/v2/content/info.yml new file mode 100644 index 000000000..5edcba5c6 --- /dev/null +++ b/api-docs/influxdb/v2/v2/content/info.yml @@ -0,0 +1,17 @@ +title: InfluxDB OSS API Service +x-influxdata-short-title: v2 API +description: | + The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. + + The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints. + + This documentation is generated from the + [InfluxDB OpenAPI specification](https://github.com/influxdata/openapi/blob/influxdb-oss-v2.7.0/contracts/ref/oss.yml). +version: 2.x +license: + name: MIT + url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb/v2/content/tag-groups.yml b/api-docs/influxdb/v2/v2/content/tag-groups.yml similarity index 67% rename from api-docs/influxdb/v2/content/tag-groups.yml rename to api-docs/influxdb/v2/v2/content/tag-groups.yml index 62cc43226..7fcd8cc8d 100644 --- a/api-docs/influxdb/v2/content/tag-groups.yml +++ b/api-docs/influxdb/v2/v2/content/tag-groups.yml @@ -6,8 +6,5 @@ - Headers - Pagination - Response codes - - Data I/O endpoints - - Security and access endpoints - - System information endpoints - name: All endpoints tags: [] diff --git a/api-docs/influxdb/v2/ref.yml b/api-docs/influxdb/v2/v2/ref.yml similarity index 96% rename from api-docs/influxdb/v2/ref.yml rename to api-docs/influxdb/v2/v2/ref.yml index 28fbe371e..c2f5e9308 100644 --- a/api-docs/influxdb/v2/ref.yml +++ b/api-docs/influxdb/v2/v2/ref.yml @@ -3,6 +3,8 @@ info: title: InfluxDB OSS API Service version: 2.x description: | + The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. + The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints. This documentation is generated from the @@ -10,7 +12,10 @@ info: license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: / security: @@ -39,7 +44,7 @@ tags: Optionally, when creating an authorization, you can scope it to a specific user. If a user signs in with username and password, creating a _user session_, the session carries the permissions granted by all the user's authorizations. - For more information, see [how to assign a token to a specific user](/influxdb/latest/security/tokens/create-token/). + For more information, see [how to assign a token to a specific user](/influxdb/v2/security/tokens/create-token/). To create a user session, use the [`POST /api/v2/signin` endpoint](#operation/PostSignin). ### Related endpoints @@ -49,22 +54,22 @@ tags: ### Related guides - - [Authorize API requests](/influxdb/latest/api-guide/api_intro/#authentication) - - [Manage API tokens](/influxdb/latest/security/tokens/) - - [Assign a token to a specific user](/influxdb/latest/security/tokens/create-token/) + - [Authorize API requests](/influxdb/v2/api-guide/api_intro/#authentication) + - [Manage API tokens](/influxdb/v2/security/tokens/) + - [Assign a token to a specific user](/influxdb/v2/security/tokens/create-token/) name: Authorizations (API tokens) - name: Backup - description: | - Store your data in InfluxDB [buckets](/influxdb/latest/reference/glossary/#bucket). + Store your data in InfluxDB [buckets](/influxdb/v2/reference/glossary/#bucket). A bucket is a named location where time series data is stored. All buckets - have a [retention period](/influxdb/latest/reference/glossary/#retention-period), + have a [retention period](/influxdb/v2/reference/glossary/#retention-period), a duration of time that each data point persists. InfluxDB drops all points with timestamps older than the bucket’s retention period. A bucket belongs to an organization. ### Related guides - - [Manage buckets](/influxdb/latest/organizations/buckets/) + - [Manage buckets](/influxdb/v2/organizations/buckets/) name: Buckets - name: Cells - name: Checks @@ -77,18 +82,18 @@ tags: | Query parameter | Value type | Description | |:------------------------ |:--------------------- |:-------------------------------------------| - | `bucket` | string | The bucket name or ID ([find your bucket](/influxdb/latest/organizations/buckets/view-buckets/). | - | `bucketID` | string | The bucket ID ([find your bucket](/influxdb/latest/organizations/buckets/view-buckets/). | - | `org` | string | The organization name or ID ([find your organization](/influxdb/latest/organizations/view-orgs/). | - | `orgID` | 16-byte string | The organization ID ([find your organization](/influxdb/latest/organizations/view-orgs/). | + | `bucket` | string | The bucket name or ID ([find your bucket](/influxdb/v2/organizations/buckets/view-buckets/). | + | `bucketID` | string | The bucket ID ([find your bucket](/influxdb/v2/organizations/buckets/view-buckets/). | + | `org` | string | The organization name or ID ([find your organization](/influxdb/v2/organizations/view-orgs/). | + | `orgID` | 16-byte string | The organization ID ([find your organization](/influxdb/v2/organizations/view-orgs/). | name: Common parameters x-traitTag: true - name: Config - name: Dashboards - name: Data I/O endpoints - description: | - The InfluxDB 1.x data model includes [databases](/influxdb/v1.8/concepts/glossary/#database) - and [retention policies](/influxdb/v1.8/concepts/glossary/#retention-policy-rp). + The InfluxDB 1.x data model includes [databases](/influxdb/v2/reference/glossary/#database) + and [retention policies](/influxdb/v2/reference/glossary/#retention-policy-rp). InfluxDB 2.x replaces databases and retention policies with buckets. To support InfluxDB 1.x query and write patterns in InfluxDB 2.x, databases and retention policies are mapped to buckets using the @@ -98,7 +103,7 @@ tags: ### Related guides - - [Database and retention policy mapping](/influxdb/latest/reference/api/influxdb-1x/dbrp/) + - [Database and retention policy mapping](/influxdb/v2/reference/api/influxdb-1x/dbrp/) name: DBRPs - description: | Generate profiling and trace reports. @@ -141,7 +146,7 @@ tags: - name: NotificationEndpoints - name: NotificationRules - description: | - Create and manage your [organizations](/influxdb/latest/reference/glossary/#organization). + Create and manage your [organizations](/influxdb/v2/reference/glossary/#organization). An organization is a workspace for a group of users. Organizations can be used to separate different environments, projects, teams or users within InfluxDB. @@ -190,10 +195,10 @@ tags: Retrieve data, analyze queries, and get query suggestions. name: Query - description: | - See the [**API Quick Start**](/influxdb/latest/api-guide/api_intro/) + See the [**API Quick Start**](/influxdb/v2/api-guide/api_intro/) to get up and running authenticating with tokens, writing to buckets, and querying data. - [**InfluxDB API client libraries**](/influxdb/latest/api-guide/client-libraries/) + [**InfluxDB API client libraries**](/influxdb/v2/api-guide/client-libraries/) are available for popular languages and ready to import into your application. name: Quick start x-traitTag: true @@ -214,7 +219,7 @@ tags: | `200` | Success | | | `204` | Success. No content | InfluxDB doesn't return data for the request. | | `400` | Bad request | May indicate one of the following: | - | `401` | Unauthorized | May indicate one of the following: | + | `401` | Unauthorized | May indicate one of the following: | | `404` | Not found | Requested resource was not found. `message` in the response body provides details about the requested resource. | | `413` | Request entity too large | Request payload exceeds the size limit. | | `422` | Unprocessable entity | Request data is invalid. `code` and `message` in the response body provide details about the problem. | @@ -238,7 +243,7 @@ tags: x-traitTag: true - name: System information endpoints - description: | - Process and analyze your data with [tasks](/influxdb/latest/reference/glossary/#task) + Process and analyze your data with [tasks](/influxdb/v2/reference/glossary/#task) in the InfluxDB task engine. Use the `/api/v2/tasks` endpoints to schedule and manage tasks, retry task runs, and retrieve run logs. @@ -257,8 +262,8 @@ tags: ### Related guides - - [Get started with tasks](/influxdb/latest/process-data/get-started/) - - [Common data processing tasks](/influxdb/latest/process-data/common-tasks/) + - [Get started with tasks](/influxdb/v2/process-data/get-started/) + - [Common data processing tasks](/influxdb/v2/process-data/common-tasks/) name: Tasks - name: Telegraf Plugins - name: Telegrafs @@ -283,8 +288,8 @@ tags: ### Related guides - - [InfluxDB stacks](/influxdb/latest/influxdb-templates/stacks/) - - [InfluxDB templates](/influxdb/latest/influxdb-templates/) + - [InfluxDB stacks](/influxdb/v2/influxdb-templates/stacks/) + - [InfluxDB templates](/influxdb/v2/influxdb-templates/) name: Templates - description: | Manage users for your organization. @@ -301,13 +306,13 @@ tags: ### Related guides - - [Manage users](/influxdb/latest/influxdb/latest/users/) - - [Create a token scoped to a user](/influxdb/latest/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) + - [Manage users](/influxdb/v2/influxdb/v2/users/) + - [Create a token scoped to a user](/influxdb/v2/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) name: Users - name: Variables - name: Views - description: | - Write time series data to [buckets](/influxdb/latest/reference/glossary/#bucket). + Write time series data to [buckets](/influxdb/v2/reference/glossary/#bucket). name: Write paths: /api/v2: @@ -347,7 +352,7 @@ paths: #### InfluxDB Cloud - - InfluxDB Cloud doesn't expose [API token](/influxdb/latest/reference/glossary/#token) + - InfluxDB Cloud doesn't expose [API token](/influxdb/v2/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations. @@ -361,42 +366,42 @@ paths: #### Related guides - - [View tokens](/influxdb/latest/security/tokens/view-tokens/) + - [View tokens](/influxdb/v2/security/tokens/view-tokens/) operationId: GetAuthorizations parameters: - $ref: '#/components/parameters/TraceSpan' - description: | A user ID. - Only returns authorizations scoped to the specified [user](/influxdb/latest/reference/glossary/#user). + Only returns authorizations scoped to the specified [user](/influxdb/v2/reference/glossary/#user). in: query name: userID schema: type: string - description: | A user name. - Only returns authorizations scoped to the specified [user](/influxdb/latest/reference/glossary/#user). + Only returns authorizations scoped to the specified [user](/influxdb/v2/reference/glossary/#user). in: query name: user schema: type: string - - description: An organization ID. Only returns authorizations that belong to the specified [organization](/influxdb/latest/reference/glossary/#organization). + - description: An organization ID. Only returns authorizations that belong to the specified [organization](/influxdb/v2/reference/glossary/#organization). in: query name: orgID schema: type: string - description: | An organization name. - Only returns authorizations that belong to the specified [organization](/influxdb/latest/reference/glossary/#organization). + Only returns authorizations that belong to the specified [organization](/influxdb/v2/reference/glossary/#organization). in: query name: org schema: type: string - description: | - An API [token](/influxdb/latest/reference/glossary/#token) value. + An API [token](/influxdb/v2/reference/glossary/#token) value. Specifies an authorization by its `token` property value and returns the authorization. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. @@ -423,11 +428,11 @@ paths: token used in the request has `read-user` permission for the users (`userID` property value) in those authorizations. - #### InfluxDB OSS + #### InfluxDB OSS v2 - **Warning**: The response body contains authorizations with their - [API token](/influxdb/latest/reference/glossary/#token) values in clear text. - - If the request uses an _[operator token](/influxdb/latest/security/tokens/#operator-token)_, + [API token](/influxdb/v2/reference/glossary/#token) values in clear text. + - If the request uses an _[operator token](/influxdb/v2/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. '400': $ref: '#/components/responses/GeneralServerError' @@ -446,7 +451,7 @@ paths: post: description: | Creates an authorization and returns the authorization with the - generated API [token](/influxdb/latest/reference/glossary/#token). + generated API [token](/influxdb/v2/reference/glossary/#token). Use this endpoint to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. @@ -471,7 +476,7 @@ paths: #### Related guides - - [Create a token](/influxdb/latest/security/tokens/create-token/) + - [Create a token](/influxdb/v2/security/tokens/create-token/) operationId: PostAuthorizations parameters: - $ref: '#/components/parameters/TraceSpan' @@ -579,19 +584,19 @@ paths: Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. - #### InfluxDB OSS + #### InfluxDB OSS v2 - InfluxDB OSS returns - [API token](/influxdb/latest/reference/glossary/#token) values in authorizations. - - If the request uses an _[operator token](/influxdb/latest/security/tokens/#operator-token)_, + [API token](/influxdb/v2/reference/glossary/#token) values in authorizations. + - If the request uses an _[operator token](/influxdb/v2/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides - - [View tokens](/influxdb/latest/security/tokens/view-tokens/) + - [View tokens](/influxdb/v2/security/tokens/view-tokens/) externalDocs: description: View tokens - url: https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/ + url: https://docs.influxdata.com/influxdb/v2/security/tokens/view-tokens/ operationId: GetAuthorizationsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -768,7 +773,7 @@ paths: schema: format: int64 type: integer - - description: The earliest time [RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp) to include in the snapshot. + - description: The earliest time [RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp) to include in the snapshot. examples: RFC3339: summary: RFC3339 date/time format @@ -812,19 +817,19 @@ paths: /api/v2/buckets: get: description: | - Lists [buckets](/influxdb/latest/reference/glossary/#bucket). + Lists [buckets](/influxdb/v2/reference/glossary/#bucket). InfluxDB retrieves buckets owned by the - [organization](/influxdb/latest/reference/glossary/#organization) + [organization](/influxdb/v2/reference/glossary/#organization) associated with the authorization - ([API token](/influxdb/latest/reference/glossary/#token)). + ([API token](/influxdb/v2/reference/glossary/#token)). To limit which buckets are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. - #### InfluxDB OSS + #### InfluxDB OSS v2 - - If you use an _[operator token](/influxdb/latest/security/tokens/#operator-token)_ + - If you use an _[operator token](/influxdb/v2/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all organizations_ in the instance. To retrieve resources for only a specific organization, use the @@ -835,11 +840,11 @@ paths: | Action | Permission required | |:--------------------------|:--------------------| | Retrieve _user buckets_ | `read-buckets` | - | Retrieve [_system buckets_](/influxdb/latest/reference/internals/system-buckets/) | `read-orgs` | + | Retrieve [_system buckets_](/influxdb/v2/reference/internals/system-buckets/) | `read-orgs` | #### Related Guides - - [Manage buckets](/influxdb/latest/organizations/buckets/) + - [Manage buckets](/influxdb/v2/organizations/buckets/) operationId: GetBuckets parameters: - $ref: '#/components/parameters/TraceSpan' @@ -854,7 +859,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Lists buckets for the specified organization. in: query @@ -869,7 +874,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. @@ -948,13 +953,13 @@ paths: --header "Content-Type: application/json" post: description: | - Creates a [bucket](/influxdb/latest/reference/glossary/#bucket) + Creates a [bucket](/influxdb/v2/reference/glossary/#bucket) and returns the bucket resource. The default data - [retention period](/influxdb/latest/reference/glossary/#retention-period) + [retention period](/influxdb/v2/reference/glossary/#retention-period) is 30 days. - #### InfluxDB OSS + #### InfluxDB OSS v2 - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. @@ -970,8 +975,8 @@ paths: #### Related Guides - - [Create a bucket](/influxdb/latest/organizations/buckets/create-bucket/) - - [Create bucket CLI reference](/influxdb/latest/reference/cli/influx/bucket/create) + - [Create a bucket](/influxdb/v2/organizations/buckets/create-bucket/) + - [Create bucket CLI reference](/influxdb/v2/reference/cli/influx/bucket/create) operationId: PostBuckets parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1097,7 +1102,7 @@ paths: 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request, handles the delete synchronously, and then responds with success or failure. @@ -1108,7 +1113,7 @@ paths: #### Related Guides - - [Delete a bucket](/influxdb/latest/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui) + - [Delete a bucket](/influxdb/v2/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui) operationId: DeleteBucketsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1128,7 +1133,7 @@ paths: #### InfluxDB Cloud - The bucket is queued for deletion. - #### InfluxDB OSS + #### InfluxDB OSS v2 - The bucket is deleted. '400': content: @@ -1265,13 +1270,13 @@ paths: - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't require `retentionRules`. #### Related Guides - - [Update a bucket](/influxdb/latest/organizations/buckets/update-bucket/) + - [Update a bucket](/influxdb/v2/organizations/buckets/update-bucket/) operationId: PatchBucketsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1409,7 +1414,7 @@ paths: #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - - [Manage labels in the InfluxDB UI](/influxdb/latest/visualize-data/labels/) + - [Manage labels in the InfluxDB UI](/influxdb/v2/visualize-data/labels/) operationId: GetBucketsIDLabels parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1473,7 +1478,7 @@ paths: #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - - [Manage labels in the InfluxDB UI](/influxdb/latest/visualize-data/labels/) + - [Manage labels in the InfluxDB UI](/influxdb/v2/visualize-data/labels/) operationId: PostBucketsIDLabels parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1599,18 +1604,18 @@ paths: description: | Lists all users for a bucket. - InfluxDB [users](/influxdb/latest/reference/glossary/#user) have + InfluxDB [users](/influxdb/v2/reference/glossary/#user) have permission to access InfluxDB. - [Members](/influxdb/latest/reference/glossary/#member) are users in + [Members](/influxdb/v2/reference/glossary/#member) are users in an organization with access to the specified resource. Use this endpoint to retrieve all users with access to a bucket. #### Related guides - - [Manage users](/influxdb/latest/users/) - - [Manage members](/influxdb/latest/organizations/members/) + - [Manage users](/influxdb/v2/users/) + - [Manage members](/influxdb/v2/organizations/members/) operationId: GetBucketsIDMembers parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1669,18 +1674,18 @@ paths: description: | Add a user to a bucket and return the new user information. - InfluxDB [users](/influxdb/latest/reference/glossary/#user) have + InfluxDB [users](/influxdb/v2/reference/glossary/#user) have permission to access InfluxDB. - [Members](/influxdb/latest/reference/glossary/#member) are users in + [Members](/influxdb/v2/reference/glossary/#member) are users in an organization. Use this endpoint to give a user member privileges to a bucket. #### Related guides - - [Manage users](/influxdb/latest/users/) - - [Manage members](/influxdb/latest/organizations/members/) + - [Manage users](/influxdb/v2/users/) + - [Manage members](/influxdb/v2/organizations/members/) operationId: PostBucketsIDMembers parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1760,8 +1765,8 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/users/) - - [Manage members](/influxdb/latest/organizations/members/) + - [Manage users](/influxdb/v2/users/) + - [Manage members](/influxdb/v2/organizations/members/) operationId: DeleteBucketsIDMembersID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1802,7 +1807,7 @@ paths: /api/v2/buckets/{bucketID}/owners: get: description: | - Lists all [owners](/influxdb/latest/reference/glossary/#owner) + Lists all [owners](/influxdb/v2/reference/glossary/#owner) of a bucket. Bucket owners have permission to delete buckets and remove user and member @@ -1831,7 +1836,7 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/users/) + - [Manage users](/influxdb/v2/users/) operationId: GetBucketsIDOwners parameters: - $ref: '#/components/parameters/TraceSpan' @@ -1882,7 +1887,7 @@ paths: - Buckets post: description: | - Adds an owner to a bucket and returns the [owners](/influxdb/latest/reference/glossary/#owner) + Adds an owner to a bucket and returns the [owners](/influxdb/v2/reference/glossary/#owner) with role and user detail. Use this endpoint to create a _resource owner_ for the bucket. @@ -1911,7 +1916,7 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/users/) + - [Manage users](/influxdb/v2/users/) operationId: PostBucketsIDOwners parameters: - $ref: '#/components/parameters/TraceSpan' @@ -2013,7 +2018,7 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/users/) + - [Manage users](/influxdb/v2/users/) operationId: DeleteBucketsIDOwnersID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -2382,7 +2387,7 @@ paths: #### Related guides - - [View your runtime server configuration](/influxdb/latest/reference/config-options/#view-your-runtime-server-configuration) + - [View your runtime server configuration](/influxdb/v2/reference/config-options/#view-your-runtime-server-configuration) operationId: GetConfig parameters: - $ref: '#/components/parameters/TraceSpan' @@ -2406,18 +2411,18 @@ paths: /api/v2/dashboards: get: description: | - Lists [dashboards](/influxdb/latest/reference/glossary/#dashboard). + Lists [dashboards](/influxdb/v2/reference/glossary/#dashboard). #### Related guides - - [Manage dashboards](/influxdb/latest/visualize-data/dashboards/). + - [Manage dashboards](/influxdb/v2/visualize-data/dashboards/). operationId: GetDashboards parameters: - $ref: '#/components/parameters/TraceSpan' - $ref: '#/components/parameters/Offset' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Descending' - - description: A user ID. Only returns [dashboards](/influxdb/latest/reference/glossary/#dashboard) where the specified user has the `owner` role. + - description: A user ID. Only returns [dashboards](/influxdb/v2/reference/glossary/#dashboard) where the specified user has the `owner` role. in: query name: owner schema: @@ -2433,7 +2438,7 @@ paths: type: string - description: | A list of dashboard IDs. - Returns only the specified [dashboards](/influxdb/latest/reference/glossary/#dashboard). + Returns only the specified [dashboards](/influxdb/v2/reference/glossary/#dashboard). If you specify `id` and `owner`, only `id` is used. in: query name: id @@ -2443,16 +2448,16 @@ paths: type: array - description: | An organization ID. - Only returns [dashboards](/influxdb/latest/reference/glossary/#dashboard) that belong to the specified - [organization](/influxdb/latest/reference/glossary/#organization). + Only returns [dashboards](/influxdb/v2/reference/glossary/#dashboard) that belong to the specified + [organization](/influxdb/v2/reference/glossary/#organization). in: query name: orgID schema: type: string - description: | An organization name. - Only returns [dashboards](/influxdb/latest/reference/glossary/#dashboard) that belong to the specified - [organization](/influxdb/latest/reference/glossary/#organization). + Only returns [dashboards](/influxdb/v2/reference/glossary/#dashboard) that belong to the specified + [organization](/influxdb/v2/reference/glossary/#organization). in: query name: org schema: @@ -3153,7 +3158,7 @@ paths: #### Related guide - - [Database and retention policy mapping](/influxdb/latest/reference/api/influxdb-1x/dbrp/) + - [Database and retention policy mapping](/influxdb/v2/reference/api/influxdb-1x/dbrp/) operationId: GetDBRPs parameters: - $ref: '#/components/parameters/TraceSpan' @@ -3198,7 +3203,7 @@ paths: schema: type: string - description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp). + A [retention policy](/influxdb/v2/reference/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. in: query name: rp @@ -3264,7 +3269,7 @@ paths: #### Related guide - - [Database and retention policy mapping](/influxdb/latest/reference/api/influxdb-1x/dbrp/) + - [Database and retention policy mapping](/influxdb/v2/reference/api/influxdb-1x/dbrp/) operationId: PostDBRP parameters: - $ref: '#/components/parameters/TraceSpan' @@ -3279,7 +3284,7 @@ paths: Note that _`retention_policy`_ is a required parameter in the request body. The value of _`retention_policy`_ can be any arbitrary `string` name or value, with the default value commonly set as `autogen`. - The value of _`retention_policy`_ isn't a [retention_policy](/influxdb/latest/reference/glossary/#retention-policy-rp) + The value of _`retention_policy`_ isn't a [retention_policy](/influxdb/v2/reference/glossary/#retention-policy-rp) required: true responses: '201': @@ -3349,7 +3354,7 @@ paths: #### Related guide - - [Database and retention policy mapping](/influxdb/latest/reference/api/influxdb-1x/dbrp/) + - [Database and retention policy mapping](/influxdb/v2/reference/api/influxdb-1x/dbrp/) operationId: DeleteDBRPID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -3412,7 +3417,7 @@ paths: #### Related guide - - [Database and retention policy mapping](/influxdb/latest/reference/api/influxdb-1x/dbrp/) + - [Database and retention policy mapping](/influxdb/v2/reference/api/influxdb-1x/dbrp/) operationId: GetDBRPsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -3521,7 +3526,7 @@ paths: #### Related guide - - [Database and retention policy mapping](/influxdb/latest/reference/api/influxdb-1x/dbrp/) + - [Database and retention policy mapping](/influxdb/v2/reference/api/influxdb-1x/dbrp/) required: true responses: '200': @@ -3590,7 +3595,7 @@ paths: - **allocs**: All past memory allocations - **block**: Stack traces that led to blocking on synchronization primitives - **cpu**: (Optional) Program counters sampled from the executing stack. - Include by passing the `cpu` query parameter with a [duration](/influxdb/latest/reference/glossary/#duration) value. + Include by passing the `cpu` query parameter with a [duration](/influxdb/v2/reference/glossary/#duration) value. Equivalent to the report from [`GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS`](#operation/GetDebugPprofProfile). - **goroutine**: All current goroutines - **heap**: Memory allocations for live objects @@ -3600,13 +3605,13 @@ paths: parameters: - $ref: '#/components/parameters/TraceSpan' - description: | - Collects and returns CPU profiling data for the specified [duration](/influxdb/latest/reference/glossary/#duration). + Collects and returns CPU profiling data for the specified [duration](/influxdb/v2/reference/glossary/#duration). in: query name: cpu schema: externalDocs: description: InfluxDB duration - url: https://docs.influxdata.com/influxdb/latest/reference/glossary/#duration + url: https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration format: duration type: string responses: @@ -4329,7 +4334,7 @@ paths: Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request, handles the delete synchronously, and then responds with success or failure. @@ -4347,8 +4352,8 @@ paths: #### Related guides - - [Delete data](/influxdb/latest/write-data/delete-data/) - - Learn how to use [delete predicate syntax](/influxdb/latest/reference/syntax/delete-predicate/). + - [Delete data](/influxdb/v2/write-data/delete-data/) + - Learn how to use [delete predicate syntax](/influxdb/v2/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). operationId: PostDelete @@ -4363,7 +4368,7 @@ paths: - Deletes data from the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. @@ -4391,7 +4396,7 @@ paths: - Deletes data from the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. @@ -4425,8 +4430,8 @@ paths: #### Related guides - - [Delete data](/influxdb/latest/write-data/delete-data/) - - Learn how to use [delete predicate syntax](/influxdb/latest/reference/syntax/delete-predicate/). + - [Delete data](/influxdb/v2/write-data/delete-data/) + - Learn how to use [delete predicate syntax](/influxdb/v2/reference/syntax/delete-predicate/). required: true responses: '204': @@ -4445,7 +4450,7 @@ paths: Because writes are asynchronous, data might not yet be written when you receive the response. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Deleted the data. '400': @@ -4463,7 +4468,7 @@ paths: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': @@ -4503,7 +4508,7 @@ paths: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. - 2. Follow the instructions to [enable, disable, or override values for feature flags](/influxdb/latest/reference/config-options/#feature-flags). + 2. Follow the instructions to [enable, disable, or override values for feature flags](/influxdb/v2/reference/config-options/#feature-flags). 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. @@ -4512,7 +4517,7 @@ paths: #### Related guides - - [InfluxDB configuration options](/influxdb/latest/reference/config-options/) + - [InfluxDB configuration options](/influxdb/v2/reference/config-options/) operationId: GetFlags parameters: - $ref: '#/components/parameters/TraceSpan' @@ -4737,7 +4742,7 @@ paths: /api/v2/me/password: put: description: | - Updates the password for the signed-in [user](/influxdb/latest/reference/glossary/#user). + Updates the password for the signed-in [user](/influxdb/v2/reference/glossary/#user). This endpoint represents the third step in the following three-step process to let a user with a user session update their password: @@ -4763,18 +4768,18 @@ paths: #### Related guides - [InfluxDB Cloud - Change your password](/influxdb/cloud/account-management/change-password/) - - [InfluxDB OSS - Change your password](/influxdb/latest/users/change-password/) + - [InfluxDB OSS - Change your password](/influxdb/v2/users/change-password/) operationId: PutMePassword parameters: - $ref: '#/components/parameters/TraceSpan' - description: | The user session cookie for the - [user](/influxdb/latest/reference/glossary/#user) + [user](/influxdb/v2/reference/glossary/#user) signed in with [Basic authentication credentials](#section/Authentication/BasicAuthentication). #### Related guides - - [Manage users](/influxdb/v2.7/users/) + - [Manage users](/influxdb/v2/users/) example: influxdb-oss-session=19aaaZZZGOvP2GGryXVT2qYftlFKu3bIopurM6AGFow1yF1abhtOlbHfsc-d8gozZFC_6WxmlQIAwLMW5xs523w== in: cookie name: influxdb-oss-session @@ -4799,7 +4804,7 @@ paths: - Doesn't let you manage user passwords through the API; always responds with this status. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't understand a value passed in the request. '401': @@ -4824,9 +4829,9 @@ paths: #### Related guides - - For the list of metrics categories, see [InfluxDB OSS metrics](/influxdb/latest/reference/internals/metrics/). - - Learn how to use InfluxDB to [scrape Prometheus metrics](/influxdb/latest/write-data/developer-tools/scrape-prometheus-metrics/). - - Learn how InfluxDB [parses the Prometheus exposition format](/influxdb/latest/reference/prometheus-metrics/). + - For the list of metrics categories, see [InfluxDB OSS metrics](/influxdb/v2/reference/internals/metrics/). + - Learn how to use InfluxDB to [scrape Prometheus metrics](/influxdb/v2/write-data/developer-tools/scrape-prometheus-metrics/). + - Learn how InfluxDB [parses the Prometheus exposition format](/influxdb/v2/reference/prometheus-metrics/). operationId: GetMetrics parameters: - $ref: '#/components/parameters/TraceSpan' @@ -5487,7 +5492,7 @@ paths: /api/v2/orgs: get: description: | - Lists [organizations](/influxdb/latest/reference/glossary/#organization/). + Lists [organizations](/influxdb/v2/reference/glossary/#organization/). To limit which organizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`. @@ -5498,7 +5503,7 @@ paths: #### Related guides - - [View organizations](/influxdb/latest/organizations/view-orgs/) + - [View organizations](/influxdb/v2/organizations/view-orgs/) operationId: GetOrgs parameters: - $ref: '#/components/parameters/TraceSpan' @@ -5570,7 +5575,7 @@ paths: - Security and access endpoints post: description: | - Creates an [organization](/influxdb/latest/reference/glossary/#organization) + Creates an [organization](/influxdb/v2/reference/glossary/#organization) and returns the newly created organization. #### InfluxDB Cloud @@ -5579,7 +5584,7 @@ paths: #### Related guides - - [Manage organizations](/influxdb/latest/organizations) + - [Manage organizations](/influxdb/v2/organizations) operationId: PostOrgs parameters: - $ref: '#/components/parameters/TraceSpan' @@ -5666,7 +5671,7 @@ paths: 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request, handles the delete synchronously, and then responds with success or failure. @@ -5677,7 +5682,7 @@ paths: #### Related guides - - [Delete organizations](/influxdb/latest/organizations/delete-orgs/) + - [Delete organizations](/influxdb/v2/organizations/delete-orgs/) operationId: DeleteOrgsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -5696,7 +5701,7 @@ paths: #### InfluxDB Cloud - The organization is queued for deletion. - #### InfluxDB OSS + #### InfluxDB OSS v2 - The organization is deleted. '400': $ref: '#/components/responses/BadRequestError' @@ -5736,7 +5741,7 @@ paths: #### Related guides - - [View organizations](/influxdb/latest/organizations/view-orgs/) + - [View organizations](/influxdb/v2/organizations/view-orgs/) operationId: GetOrgsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -5806,7 +5811,7 @@ paths: #### Related Guides - - [Update an organization](/influxdb/latest/organizations/update-org/) + - [Update an organization](/influxdb/v2/organizations/update-org/) operationId: PatchOrgsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -5853,10 +5858,10 @@ paths: description: | Lists all users that belong to an organization. - InfluxDB [users](/influxdb/latest/reference/glossary/#user) have + InfluxDB [users](/influxdb/v2/reference/glossary/#user) have permission to access InfluxDB. - [Members](/influxdb/latest/reference/glossary/#member) are users + [Members](/influxdb/v2/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud @@ -5878,8 +5883,8 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/users/) - - [Manage members](/influxdb/latest/organizations/members/) + - [Manage users](/influxdb/v2/users/) + - [Manage members](/influxdb/v2/organizations/members/) operationId: GetOrgsIDMembers parameters: - $ref: '#/components/parameters/TraceSpan' @@ -5952,10 +5957,10 @@ paths: description: | Add a user to an organization. - InfluxDB [users](/influxdb/latest/reference/glossary/#user) have + InfluxDB [users](/influxdb/v2/reference/glossary/#user) have permission to access InfluxDB. - [Members](/influxdb/latest/reference/glossary/#member) are users + [Members](/influxdb/v2/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud @@ -5975,8 +5980,8 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/users/) - - [Manage members](/influxdb/latest/organizations/members/) + - [Manage users](/influxdb/v2/users/) + - [Manage members](/influxdb/v2/organizations/members/) operationId: PostOrgsIDMembers parameters: - $ref: '#/components/parameters/TraceSpan' @@ -6075,7 +6080,7 @@ paths: #### Related guides - - [Manage members](/influxdb/latest/organizations/members/) + - [Manage members](/influxdb/v2/organizations/members/) operationId: DeleteOrgsIDMembersID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -6258,7 +6263,7 @@ paths: /api/v2/orgs/{orgID}/owners/{userID}: delete: description: | - Removes an [owner](/influxdb/latest/reference/glossary/#owner) from + Removes an [owner](/influxdb/v2/reference/glossary/#owner) from the organization. Organization owners have permission to delete organizations and remove user and member @@ -6449,7 +6454,7 @@ paths: #### Related guides - - [Influx ping](/influxdb/latest/reference/cli/influx/ping/) + - [Influx ping](/influxdb/v2/reference/cli/influx/ping/) operationId: GetPing responses: '204': @@ -6493,7 +6498,7 @@ paths: #### Related guides - - [Influx ping](/influxdb/latest/reference/cli/influx/ping/) + - [Influx ping](/influxdb/v2/reference/cli/influx/ping/) operationId: HeadPing responses: '204': @@ -6536,7 +6541,7 @@ paths: #### Related guides - - [Query with the InfluxDB API](/influxdb/latest/query-data/execute-queries/influx-api/) + - [Query with the InfluxDB API](/influxdb/v2/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) operationId: PostQuery parameters: @@ -6566,7 +6571,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. @@ -6582,7 +6587,7 @@ paths: - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. @@ -6646,7 +6651,7 @@ paths: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': @@ -6657,12 +6662,12 @@ paths: description: | #### InfluxDB Cloud: - returns this error if a **read** or **write** request exceeds your - plan's [adjustable service quotas](/influxdb/latest/account-management/limits/#adjustable-service-quotas) + plan's [adjustable service quotas](/influxdb/v2/account-management/limits/#adjustable-service-quotas) or if a **delete** request exceeds the maximum - [global limit](/influxdb/latest/account-management/limits/#global-limits) + [global limit](/influxdb/v2/account-management/limits/#global-limits) - returns `Retry-After` header that describes when to try the write again. - #### InfluxDB OSS: + #### InfluxDB OSS v2: - doesn't return this error. headers: Retry-After: @@ -6843,7 +6848,7 @@ paths: post: description: | Analyzes a Flux query and returns a complete package source [Abstract Syntax - Tree (AST)](/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) + Tree (AST)](/influxdb/v2/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query @@ -9026,7 +9031,7 @@ paths: post: description: | Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication) - for a [user](/influxdb/latest/reference/glossary/#user), + for a [user](/influxdb/v2/reference/glossary/#user), and then, if successful, generates a user session. To authenticate a user, pass the HTTP `Authorization` header with the @@ -9435,12 +9440,12 @@ paths: #### Related guides - - [View InfluxDB stacks](/influxdb/latest/influxdb-templates/stacks/). + - [View InfluxDB stacks](/influxdb/v2/influxdb-templates/stacks/). operationId: ListStacks parameters: - description: | An organization ID. - Only returns stacks owned by the specified [organization](/influxdb/latest/reference/glossary/#organization). + Only returns stacks owned by the specified [organization](/influxdb/v2/reference/glossary/#organization). #### InfluxDB Cloud @@ -9517,7 +9522,7 @@ paths: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if an incorrect value is passed in the `org` parameter or `orgID` parameter. '401': @@ -9553,8 +9558,8 @@ paths: #### Related guides - - [Initialize an InfluxDB stack](/influxdb/latest/influxdb-templates/stacks/init/). - - [Use InfluxDB templates](/influxdb/latest/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). + - [Initialize an InfluxDB stack](/influxdb/v2/influxdb-templates/stacks/init/). + - [Use InfluxDB templates](/influxdb/v2/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). operationId: CreateStack requestBody: content: @@ -9748,19 +9753,19 @@ paths: /api/v2/tasks: get: description: | - Retrieves a list of [tasks](/influxdb/latest/reference/glossary/#task). + Retrieves a list of [tasks](/influxdb/v2/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - - [Process data with InfluxDB tasks](/influxdb/latest/process-data/) + - [Process data with InfluxDB tasks](/influxdb/v2/process-data/) operationId: GetTasks parameters: - $ref: '#/components/parameters/TraceSpan' - description: | - A [task](/influxdb/latest/reference/glossary/#task) name. + A [task](/influxdb/v2/reference/glossary/#task) name. Only returns tasks with the specified name. Different tasks may have the same name. in: query @@ -9768,35 +9773,35 @@ paths: schema: type: string - description: | - A [task](/influxdb/latest/reference/glossary/#task) ID. + A [task](/influxdb/v2/reference/glossary/#task) ID. Only returns tasks created after the specified task. in: query name: after schema: type: string - description: | - A [user](/influxdb/latest/reference/glossary/#user) ID. + A [user](/influxdb/v2/reference/glossary/#user) ID. Only returns tasks owned by the specified user. in: query name: user schema: type: string - description: | - An [organization](/influxdb/latest/reference/glossary/#organization) name. + An [organization](/influxdb/v2/reference/glossary/#organization) name. Only returns tasks owned by the specified organization. in: query name: org schema: type: string - description: | - An [organization](/influxdb/latest/reference/glossary/#organization) ID. + An [organization](/influxdb/v2/reference/glossary/#organization) ID. Only returns tasks owned by the specified organization. in: query name: orgID schema: type: string - description: | - A [task](/influxdb/latest/reference/glossary/#task) status. + A [task](/influxdb/v2/reference/glossary/#task) status. Only returns tasks that have the specified status (`active` or `inactive`). in: query name: status @@ -9806,7 +9811,7 @@ paths: - inactive type: string - description: | - The maximum number of [tasks](/influxdb/latest/reference/glossary/#task) to return. + The maximum number of [tasks](/influxdb/v2/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. @@ -9820,7 +9825,7 @@ paths: minimum: 1 type: integer - description: | - A [task](/influxdb/latest/reference/glossary/#task) type (`basic` or `system`). + A [task](/influxdb/v2/reference/glossary/#task) type (`basic` or `system`). Default is `system`. Specifies the level of detail for tasks in the response. The default (`system`) response contains all the metadata properties for tasks. @@ -9927,14 +9932,14 @@ paths: --header 'Authorization: Token INFLUX_API_TOKEN' post: description: | - Creates a [task](/influxdb/latest/reference/glossary/#task) and returns the task. + Creates a [task](/influxdb/v2/reference/glossary/#task) and returns the task. #### Related guides - - [Get started with tasks](/influxdb/latest/process-data/get-started/) - - [Create a task](/influxdb/latest/process-data/manage-tasks/create-task/) - - [Common tasks](/influxdb/latest/process-data/common-tasks/) - - [Task configuration options](/influxdb/latest/process-data/task-options/) + - [Get started with tasks](/influxdb/v2/process-data/get-started/) + - [Create a task](/influxdb/v2/process-data/manage-tasks/create-task/) + - [Common tasks](/influxdb/v2/process-data/common-tasks/) + - [Task configuration options](/influxdb/v2/process-data/task-options/) operationId: PostTasks parameters: - $ref: '#/components/parameters/TraceSpan' @@ -9972,7 +9977,7 @@ paths: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if an incorrect value is passed for `org` or `orgID`. '401': @@ -10043,7 +10048,7 @@ paths: - Tasks get: description: | - Retrieves a [task](/influxdb/latest/reference/glossary/#task). + Retrieves a [task](/influxdb/v2/reference/glossary/#task). operationId: GetTasksID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -10234,7 +10239,7 @@ paths: /api/v2/tasks/{taskID}/logs: get: description: | - Retrieves a list of all logs for a [task](/influxdb/latest/reference/glossary/#task). + Retrieves a list of all logs for a [task](/influxdb/v2/reference/glossary/#task). When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt. @@ -10304,7 +10309,7 @@ paths: **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. - Lists all users that have the `member` role for the specified [task](/influxdb/latest/reference/glossary/#task). + Lists all users that have the `member` role for the specified [task](/influxdb/v2/reference/glossary/#task). operationId: GetTasksIDMembers parameters: - $ref: '#/components/parameters/TraceSpan' @@ -10378,7 +10383,7 @@ paths: **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. - Removes a member from a [task](/influxdb/latest/reference/glossary/#task). + Removes a member from a [task](/influxdb/v2/reference/glossary/#task). operationId: DeleteTasksIDMembersID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -10567,7 +10572,7 @@ paths: /api/v2/tasks/{taskID}/runs: get: description: | - Retrieves a list of runs for a [task](/influxdb/latest/process-data/). + Retrieves a list of runs for a [task](/influxdb/v2/process-data/). To limit which task runs are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`. @@ -10597,7 +10602,7 @@ paths: minimum: 1 type: integer - description: | - A timestamp ([RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp)). + A timestamp ([RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. in: query name: afterTime @@ -10605,7 +10610,7 @@ paths: format: date-time type: string - description: | - A timestamp ([RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp)). + A timestamp ([RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. in: query name: beforeTime @@ -10671,7 +10676,7 @@ paths: /api/v2/tasks/{taskID}/runs/{runID}: delete: description: | - Cancels a running [task](/influxdb/latest/reference/glossary/#task). + Cancels a running [task](/influxdb/v2/reference/glossary/#task). Use this endpoint with InfluxDB OSS to cancel a running task. @@ -10720,7 +10725,7 @@ paths: - Always returns this error; doesn't support cancelling tasks. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't return this error. '500': @@ -10732,7 +10737,7 @@ paths: - Tasks get: description: | - Retrieves a specific run for a [task](/influxdb/latest/reference/glossary/#task). + Retrieves a specific run for a [task](/influxdb/v2/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run. operationId: GetTasksIDRunsID @@ -10865,7 +10870,7 @@ paths: /api/v2/tasks/{taskID}/runs/{runID}/retry: post: description: | - Queues a [task](/influxdb/latest/reference/glossary/#task) run to + Queues a [task](/influxdb/v2/reference/glossary/#task) run to retry and returns the scheduled run. To manually start a _new_ task run, use the @@ -10878,7 +10883,7 @@ paths: parameters: - $ref: '#/components/parameters/TraceSpan' - description: | - A [task](/influxdb/latest/reference/glossary/#task) ID. + A [task](/influxdb/v2/reference/glossary/#task) ID. Specifies the task to retry. in: path name: taskID @@ -10886,7 +10891,7 @@ paths: schema: type: string - description: | - A [task](/influxdb/latest/reference/glossary/#task) run ID. + A [task](/influxdb/v2/reference/glossary/#task) run ID. Specifies the task run to retry. To find a task run ID, use the @@ -11412,8 +11417,8 @@ paths: post: description: | Applies a template to - create or update a [stack](/influxdb/latest/influxdb-templates/stacks/) of InfluxDB - [resources](/influxdb/latest/reference/cli/influx/export/all/#resources). + create or update a [stack](/influxdb/v2/influxdb-templates/stacks/) of InfluxDB + [resources](/influxdb/v2/reference/cli/influx/export/all/#resources). The response contains the diff of changes and the stack ID. Use this endpoint to install an InfluxDB template to an organization. @@ -11429,18 +11434,18 @@ paths: #### Custom values for templates - - Some templates may contain [environment references](/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. + - Some templates may contain [environment references](/influxdb/v2/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. To provide custom values for environment references, pass the _`envRefs`_ property in the request body. For more information and examples, see how to - [define environment references](/influxdb/latest/influxdb-templates/use/#define-environment-references). + [define environment references](/influxdb/v2/influxdb-templates/use/#define-environment-references). - Some templates may contain queries that use - [secrets](/influxdb/latest/security/secrets/). + [secrets](/influxdb/v2/security/secrets/). To provide custom secret values, pass the _`secrets`_ property in the request body. Don't expose secret values in templates. - For more information, see [how to pass secrets when installing a template](/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template). + For more information, see [how to pass secrets when installing a template](/influxdb/v2/influxdb-templates/use/#pass-secrets-when-installing-a-template). #### Required permissions @@ -11453,8 +11458,8 @@ paths: #### Related guides - - [Use templates](/influxdb/latest/influxdb-templates/use/) - - [Stacks](/influxdb/latest/influxdb-templates/stacks/) + - [Use templates](/influxdb/v2/influxdb-templates/use/) + - [Stacks](/influxdb/v2/influxdb-templates/stacks/) operationId: ApplyTemplate requestBody: content: @@ -11740,7 +11745,7 @@ paths: /api/v2/users: get: description: | - Lists [users](/influxdb/latest/reference/glossary/#user). + Lists [users](/influxdb/v2/reference/glossary/#user). Default limit is `20`. To limit which users are returned, pass query parameters in your request. @@ -11749,14 +11754,14 @@ paths: | Action | Permission required | Restriction | |:-------|:--------------------|:------------| - | List all users | _[Operator token](/influxdb/latest/security/tokens/#operator-token)_ | | + | List all users | _[Operator token](/influxdb/v2/security/tokens/#operator-token)_ | | | List a specific user | `read-users` or `read-user USER_ID` | | *`USER_ID`* is the ID of the user that you want to retrieve. #### Related guides - - [View users](/influxdb/latest/users/view-users/). + - [View users](/influxdb/v2/users/view-users/). operationId: GetUsers parameters: - $ref: '#/components/parameters/TraceSpan' @@ -11765,14 +11770,14 @@ paths: - $ref: '#/components/parameters/After' - description: | A user name. - Only lists the specified [user](/influxdb/latest/reference/glossary/#user). + Only lists the specified [user](/influxdb/v2/reference/glossary/#user). in: query name: name schema: type: string - description: | A user ID. - Only lists the specified [user](/influxdb/latest/reference/glossary/#user). + Only lists the specified [user](/influxdb/v2/reference/glossary/#user). in: query name: id schema: @@ -11821,7 +11826,7 @@ paths: - Users post: description: | - Creates a [user](/influxdb/latest/reference/glossary/#user) that can access InfluxDB. + Creates a [user](/influxdb/v2/reference/glossary/#user) that can access InfluxDB. Returns the user. Use this endpoint to create a user that can sign in to start a user session @@ -11843,12 +11848,12 @@ paths: | Action | Permission required | Restriction | |:-------|:--------------------|:------------| - | Create a user | _[Operator token](/influxdb/latest/security/tokens/#operator-token)_ | | + | Create a user | _[Operator token](/influxdb/v2/security/tokens/#operator-token)_ | | #### Related guides - - [Create a user](/influxdb/latest/users/create-user/) - - [Create an API token scoped to a user](/influxdb/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) + - [Create a user](/influxdb/v2/users/create-user/) + - [Create an API token scoped to a user](/influxdb/v2/security/tokens/create-token/#create-a-token-scoped-to-a-user) operationId: PostUsers parameters: - $ref: '#/components/parameters/TraceSpan' @@ -11936,7 +11941,7 @@ paths: /api/v2/users/{userID}: delete: description: | - Deletes a [user](/influxdb/latest/reference/glossary/#user). + Deletes a [user](/influxdb/v2/reference/glossary/#user). #### Required permissions @@ -11948,13 +11953,13 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/organizations/users/) + - [Manage users](/influxdb/v2/organizations/users/) operationId: DeleteUsersID parameters: - $ref: '#/components/parameters/TraceSpan' - description: | A user ID. - Specifies the [user](/influxdb/latest/reference/glossary/#user) to delete. + Specifies the [user](/influxdb/v2/reference/glossary/#user) to delete. in: path name: userID required: true @@ -11983,17 +11988,17 @@ paths: - Users get: description: | - Retrieves a [user](/influxdb/latest/reference/glossary/#user). + Retrieves a [user](/influxdb/v2/reference/glossary/#user). #### Related guides - - [Manage users](/influxdb/latest/organizations/users/) + - [Manage users](/influxdb/v2/organizations/users/) operationId: GetUsersID parameters: - $ref: '#/components/parameters/TraceSpan' - description: | A user ID. - Retrieves the specified [user](/influxdb/latest/reference/glossary/#user). + Retrieves the specified [user](/influxdb/v2/reference/glossary/#user). in: path name: userID required: true @@ -12015,7 +12020,7 @@ paths: - Users patch: description: | - Updates a [user](/influxdb/latest/reference/glossary/#user) and returns the user. + Updates a [user](/influxdb/v2/reference/glossary/#user) and returns the user. #### Required permissions @@ -12027,13 +12032,13 @@ paths: #### Related guides - - [Manage users](/influxdb/latest/organizations/users/) + - [Manage users](/influxdb/v2/organizations/users/) operationId: PatchUsersID parameters: - $ref: '#/components/parameters/TraceSpan' - description: | A user ID. - Specifies the [user](/influxdb/latest/reference/glossary/#user) to update. + Specifies the [user](/influxdb/v2/reference/glossary/#user) to update. in: path name: userID required: true @@ -12081,7 +12086,7 @@ paths: #### Related guides - [InfluxDB Cloud - Change your password](/influxdb/cloud/account-management/change-password/) - - [InfluxDB OSS - Change your password](/influxdb/latest/users/change-password/) + - [InfluxDB OSS - Change your password](/influxdb/v2/users/change-password/) operationId: PostUsersIDPassword parameters: - $ref: '#/components/parameters/TraceSpan' @@ -12119,7 +12124,7 @@ paths: - Doesn't allow you to manage passwords through the API; always responds with this status. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't understand a value passed in the request. default: @@ -12156,7 +12161,7 @@ paths: #### Related guides - [InfluxDB Cloud - Change your password](/influxdb/cloud/account-management/change-password/) - - [InfluxDB OSS - Change your password](/influxdb/latest/users/change-password/) + - [InfluxDB OSS - Change your password](/influxdb/v2/users/change-password/) operationId: PutUsersIDPassword parameters: - $ref: '#/components/parameters/TraceSpan' @@ -12194,7 +12199,7 @@ paths: - Doesn't allow you to manage passwords through the API; always responds with this status. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't understand a value passed in the request. default: @@ -12481,7 +12486,7 @@ paths: description: | Writes data to a bucket. - Use this endpoint to send data in [line protocol](/influxdb/latest/reference/syntax/line-protocol/) format to InfluxDB. + Use this endpoint to send data in [line protocol](/influxdb/v2/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud @@ -12497,7 +12502,7 @@ paths: Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; @@ -12516,9 +12521,9 @@ paths: #### Related guides - - [Write data with the InfluxDB API](/influxdb/latest/write-data/developer-tools/api) - - [Optimize writes to InfluxDB](/influxdb/latest/write-data/best-practices/optimize-writes/) - - [Troubleshoot issues writing data](/influxdb/latest/write-data/troubleshoot/) + - [Write data with the InfluxDB API](/influxdb/v2/write-data/developer-tools/api) + - [Optimize writes to InfluxDB](/influxdb/v2/write-data/best-practices/optimize-writes/) + - [Troubleshoot issues writing data](/influxdb/v2/write-data/troubleshoot/) operationId: PostWrite parameters: - $ref: '#/components/parameters/TraceSpan' @@ -12568,13 +12573,13 @@ paths: - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns only `application/json` for format and limit errors. #### Related guides - - [Troubleshoot issues writing data](/influxdb/latest/write-data/troubleshoot/) + - [Troubleshoot issues writing data](/influxdb/v2/write-data/troubleshoot/) in: header name: Accept schema: @@ -12592,7 +12597,7 @@ paths: - Writes data to the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. @@ -12612,7 +12617,7 @@ paths: - Writes data to the bucket in the organization associated with the authorization (API token). - #### InfluxDB OSS + #### InfluxDB OSS v2 - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. @@ -12647,7 +12652,7 @@ paths: format: byte type: string description: | - In the request body, provide data in [line protocol format](/influxdb/latest/reference/syntax/line-protocol/). + In the request body, provide data in [line protocol format](/influxdb/v2/reference/syntax/line-protocol/). To send compressed data, do the following: @@ -12657,7 +12662,7 @@ paths: #### Related guides - - [Best practices for optimizing writes](/influxdb/latest/write-data/best-practices/optimize-writes/) + - [Best practices for optimizing writes](/influxdb/v2/write-data/best-practices/optimize-writes/) required: true responses: '204': @@ -12669,13 +12674,13 @@ paths: - Validated and queued the request. - Handles the write asynchronously - the write might not have completed yet. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Successfully wrote all points in the batch. #### Related guides - - [How to check for write errors](/influxdb/latest/write-data/troubleshoot/) + - [How to check for write errors](/influxdb/v2/write-data/troubleshoot/) '400': content: application/json: @@ -12702,7 +12707,7 @@ paths: - Returns this error for bucket schema conflicts. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': @@ -12743,7 +12748,7 @@ paths: - Returns this error if the payload exceeds the 50MB size limit. - Returns `Content-Type: text/html` for this error. - #### InfluxDB OSS: + #### InfluxDB OSS v2: - Returns this error only if the [Go (golang) `ioutil.ReadAll()`](https://pkg.go.dev/io/ioutil#ReadAll) function raises an error. - Returns `Content-Type: application/json` for this error. @@ -12761,7 +12766,7 @@ paths: Rates (data-in (writes), queries (reads), and deletes) accrue within a fixed five-minute window. Once a rate limit is exceeded, InfluxDB returns an error response until the current five-minute window resets. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't return this error. headers: @@ -12798,28 +12803,28 @@ paths: - $ref: '#/components/parameters/TraceSpan' - description: | A user ID. - Only returns legacy authorizations scoped to the specified [user](/influxdb/v2.7/reference/glossary/#user). + Only returns legacy authorizations scoped to the specified [user](/influxdb/v2/reference/glossary/#user). in: query name: userID schema: type: string - description: | A user name. - Only returns legacy authorizations scoped to the specified [user](/influxdb/v2.7/reference/glossary/#user). + Only returns legacy authorizations scoped to the specified [user](/influxdb/v2/reference/glossary/#user). in: query name: user schema: type: string - description: | An organization ID. - Only returns legacy authorizations that belong to the specified [organization](/influxdb/v2.7/reference/glossary/#organization). + Only returns legacy authorizations that belong to the specified [organization](/influxdb/v2/reference/glossary/#organization). in: query name: orgID schema: type: string - description: | An organization name. - Only returns legacy authorizations that belong to the specified [organization](/influxdb/v2.7/reference/glossary/#organization). + Only returns legacy authorizations that belong to the specified [organization](/influxdb/v2/reference/glossary/#organization). in: query name: org schema: @@ -13045,7 +13050,7 @@ paths: description: | Media type that the client can understand. - **Note**: With `application/csv`, query results include [**unix timestamps**](/influxdb/v2.7/reference/glossary/#unix-timestamp) instead of [RFC3339 timestamps](/influxdb/v2.7/reference/glossary/#rfc3339-timestamp). + **Note**: With `application/csv`, query results include [**unix timestamps**](/influxdb/v2/reference/glossary/#unix-timestamp) instead of [RFC3339 timestamps](/influxdb/v2/reference/glossary/#rfc3339-timestamp). enum: - application/json - application/csv @@ -13080,8 +13085,8 @@ paths: type: string - description: | The database to query data from. - This is mapped to an InfluxDB [bucket](/influxdb/v2.7/reference/glossary/#bucket). - For more information, see [Database and retention policy mapping](/influxdb/v2.7/api/influxdb-1x/dbrp/). + This is mapped to an InfluxDB [bucket](/influxdb/v2/reference/glossary/#bucket). + For more information, see [Database and retention policy mapping](/influxdb/v2/api/influxdb-1x/dbrp/). in: query name: db required: true @@ -13089,8 +13094,8 @@ paths: type: string - description: | The retention policy to query data from. - This is mapped to an InfluxDB [bucket](/influxdb/v2.7/reference/glossary/#bucket). - For more information, see [Database and retention policy mapping](/influxdb/v2.7/api/influxdb-1x/dbrp/). + This is mapped to an InfluxDB [bucket](/influxdb/v2/reference/glossary/#bucket). + For more information, see [Database and retention policy mapping](/influxdb/v2/api/influxdb-1x/dbrp/). in: query name: rp schema: @@ -13103,8 +13108,8 @@ paths: type: string - description: | A unix timestamp precision. - Formats timestamps as [unix (epoch) timestamps](/influxdb/v2.7/reference/glossary/#unix-timestamp) the specified precision - instead of [RFC3339 timestamps](/influxdb/v2.7/reference/glossary/#rfc3339-timestamp) with nanosecond precision. + Formats timestamps as [unix (epoch) timestamps](/influxdb/v2/reference/glossary/#unix-timestamp) with the specified precision + instead of [RFC3339 timestamps](/influxdb/v2/reference/glossary/#rfc3339-timestamp) with nanosecond precision. in: query name: epoch schema: @@ -13161,12 +13166,12 @@ paths: description: | #### InfluxDB Cloud: - returns this error if a **read** or **write** request exceeds your - plan's [adjustable service quotas](/influxdb/v2.7/account-management/limits/#adjustable-service-quotas) + plan's [adjustable service quotas](/influxdb/v2/account-management/limits/#adjustable-service-quotas) or if a **delete** request exceeds the maximum - [global limit](/influxdb/v2.7/account-management/limits/#global-limits) + [global limit](/influxdb/v2/account-management/limits/#global-limits) - returns `Retry-After` header that describes when to try the write again. - #### InfluxDB OSS: + #### InfluxDB OSS v2: - doesn't return this error. headers: Retry-After: @@ -13333,7 +13338,7 @@ components: results don't include the specified record. Use `after` instead of the `offset` parameter. - For more information about pagination parameters, see [Pagination](/influxdb/latest/api/#tag/Pagination). + For more information about pagination parameters, see [Pagination](/influxdb/v2/api/#tag/Pagination). in: query name: after required: false @@ -13362,7 +13367,7 @@ components: The offset for pagination. The number of records to skip. - For more information about pagination parameters, see [Pagination](/influxdb/latest/api/#tag/Pagination). + For more information about pagination parameters, see [Pagination](/influxdb/v2/api/#tag/Pagination). in: query name: offset required: false @@ -13431,7 +13436,7 @@ components: Bad request. The response body contains detail about the error. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Returns this error if an incorrect value is passed in the `org` parameter or `orgID` parameter. GeneralServerError: @@ -13559,14 +13564,14 @@ components: org: description: | The organization name. - Specifies the [organization](/influxdb/v2.7/reference/glossary/#organization) + Specifies the [organization](/influxdb/v2/reference/glossary/#organization) that the token is scoped to. readOnly: true type: string orgID: description: | The organization ID. - Specifies the [organization](/influxdb/v2.7/reference/glossary/#organization) that the authorization is scoped to. + Specifies the [organization](/influxdb/v2/reference/glossary/#organization) that the authorization is scoped to. type: string permissions: description: | @@ -13580,7 +13585,7 @@ components: description: | The API token. The token value is unique to the authorization. - [API tokens](/influxdb/v2.7/reference/glossary/#token) are + [API tokens](/influxdb/v2/reference/glossary/#token) are used to authenticate and authorize InfluxDB API requests and `influx` CLI commands--after receiving the request, InfluxDB checks that the token is valid and that the `permissions` allow the requested action(s). @@ -13593,13 +13598,13 @@ components: user: description: | The user name. - Specifies the [user](/influxdb/v2.7/reference/glossary/#user) that owns the authorization. + Specifies the [user](/influxdb/v2/reference/glossary/#user) that owns the authorization. If the authorization is _scoped_ to a user, the user; otherwise, the creator of the authorization. readOnly: true type: string userID: - description: The user ID. Specifies the [user](/influxdb/v2.7/reference/glossary/#user) that owns the authorization. If _scoped_, the user that the authorization is scoped to; otherwise, the creator of the authorization. + description: The user ID. Specifies the [user](/influxdb/v2/reference/glossary/#user) that owns the authorization. If _scoped_, the user that the authorization is scoped to; otherwise, the creator of the authorization. readOnly: true type: string type: object @@ -14116,7 +14121,7 @@ components: readOnly: true type: string latestCompleted: - description: A timestamp ([RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. + description: A timestamp ([RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. format: date-time readOnly: true type: string @@ -14359,11 +14364,11 @@ components: orgID: description: | An organization ID. - Identifies the [organization](/influxdb/latest/reference/glossary/#organization) that owns the mapping. + Identifies the [organization](/influxdb/v2/reference/glossary/#organization) that owns the mapping. type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb/v2/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string virtual: @@ -14397,16 +14402,16 @@ components: org: description: | An organization name. - Identifies the [organization](/influxdb/latest/reference/glossary/#organization) that owns the mapping. + Identifies the [organization](/influxdb/v2/reference/glossary/#organization) that owns the mapping. type: string orgID: description: | An organization ID. - Identifies the [organization](/influxdb/latest/reference/glossary/#organization) that owns the mapping. + Identifies the [organization](/influxdb/v2/reference/glossary/#organization) that owns the mapping. type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb/v2/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string required: @@ -14430,7 +14435,7 @@ components: type: boolean retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb/v2/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string DBRPs: @@ -14584,7 +14589,7 @@ components: $ref: '#/components/schemas/Links' type: object DateTimeLiteral: - description: Represents an instant in time with nanosecond precision in [RFC3339Nano date/time format](/influxdb/latest/reference/glossary/#rfc3339nano-timestamp). + description: Represents an instant in time with nanosecond precision in [RFC3339Nano date/time format](/influxdb/v2/reference/glossary/#rfc3339nano-timestamp). properties: type: $ref: '#/components/schemas/NodeType' @@ -14649,18 +14654,18 @@ components: properties: predicate: description: | - An expression in [delete predicate syntax](/influxdb/latest/reference/syntax/delete-predicate/). + An expression in [delete predicate syntax](/influxdb/v2/reference/syntax/delete-predicate/). example: tag1="value1" and (tag2="value2" and tag3!="value3") type: string start: description: | - A timestamp ([RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp)). + A timestamp ([RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp)). The earliest time to delete from. format: date-time type: string stop: description: | - A timestamp ([RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp)). + A timestamp ([RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp)). The latest time to delete from. format: date-time type: string @@ -14671,7 +14676,7 @@ components: Dialect: description: | Options for tabular data output. - Default output is [annotated CSV](/influxdb/latest/reference/syntax/annotated-csv/#csv-response-format) with headers. + Default output is [annotated CSV](/influxdb/v2/reference/syntax/annotated-csv/#csv-response-format) with headers. For more information about tabular data **dialect**, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions). @@ -14683,7 +14688,7 @@ components: #### Related guides - - See [Annotated CSV annotations](/influxdb/latest/reference/syntax/annotated-csv/#annotations) for examples and more information. + - See [Annotated CSV annotations](/influxdb/v2/reference/syntax/annotated-csv/#annotations) for examples and more information. For more information about **annotations** in tabular data, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns). @@ -14705,7 +14710,7 @@ components: default: RFC3339 description: | The format for timestamps in results. - Default is [`RFC3339` date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp). + Default is [`RFC3339` date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp). To include nanoseconds in timestamps, use `RFC3339Nano`. #### Example formatted date/time values @@ -15515,9 +15520,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -15566,12 +15571,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: @@ -15930,7 +15935,7 @@ components: readOnly: true type: string time: - description: The time ([RFC3339Nano date/time format](/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) that the event occurred. + description: The time ([RFC3339Nano date/time format](/influxdb/v2/reference/glossary/#rfc3339nano-timestamp)) that the event occurred. example: 2006-01-02T15:04:05.999999999Z07:00 format: date-time readOnly: true @@ -16269,7 +16274,7 @@ components: readOnly: true type: string latestCompleted: - description: A timestamp ([RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. + description: A timestamp ([RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. format: date-time readOnly: true type: string @@ -16621,20 +16626,20 @@ components: type: integer shardGroupDurationSeconds: description: | - The [shard group duration](/influxdb/latest/reference/glossary/#shard). + The [shard group duration](/influxdb/v2/reference/glossary/#shard). The number of seconds that each shard group covers. #### InfluxDB Cloud - Doesn't use `shardGroupDurationsSeconds`. - #### InfluxDB OSS + #### InfluxDB OSS v2 - - Default value depends on the [bucket retention period](/influxdb/latest/reference/internals/shards/#shard-group-duration). + - Default value depends on the [bucket retention period](/influxdb/v2/reference/internals/shards/#shard-group-duration). #### Related guides - - InfluxDB [shards and shard groups](/influxdb/latest/reference/internals/shards/) + - InfluxDB [shards and shard groups](/influxdb/v2/reference/internals/shards/) format: int64 type: integer type: @@ -16761,10 +16766,10 @@ components: If you need compatibility with InfluxDB 1.x, specify a value for the `rp` property; otherwise, see the `retentionRules` property. - [Retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) + [Retention policy](/influxdb/v2/reference/glossary/#retention-policy-rp) is an InfluxDB 1.x concept. The InfluxDB 2.x and Cloud equivalent is - [retention period](/influxdb/latest/reference/glossary/#retention-period). + [retention period](/influxdb/v2/reference/glossary/#retention-period). The InfluxDB `/api/v2` API uses `RetentionRules` to configure the retention period. type: string schemaType: @@ -16778,7 +16783,7 @@ components: - Use `explicit` to enforce column names, tags, fields, and data types for your data. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Doesn't support `explicit` bucket schemas. required: @@ -17268,10 +17273,10 @@ components: - Does not use `shardGroupDurationsSeconds`. - #### InfluxDB OSS + #### InfluxDB OSS v2 - Default value depends on the - [bucket retention period](/influxdb/latest/reference/internals/shards/#shard-group-duration). + [bucket retention period](/influxdb/v2/reference/internals/shards/#shard-group-duration). format: int64 type: integer type: @@ -17285,13 +17290,13 @@ components: RetentionRules: description: | Retention rules to expire or retain data. - The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](/influxdb/latest/reference/glossary/#retention-period). + The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](/influxdb/v2/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. - #### InfluxDB OSS + #### InfluxDB OSS v2 - `retentionRules` isn't required. items: @@ -17434,13 +17439,13 @@ components: readOnly: true type: array requestedAt: - description: The time ([RFC3339Nano date/time format](/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested. + description: The time ([RFC3339Nano date/time format](/influxdb/v2/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested. example: 2006-01-02T15:04:05.999999999Z07:00 format: date-time readOnly: true type: string scheduledFor: - description: The time [RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. + description: The time [RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. format: date-time type: string startedAt: @@ -17465,7 +17470,7 @@ components: properties: scheduledFor: description: | - The time [RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp) + The time [RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. Default is the server _now_ time. format: date-time @@ -18177,7 +18182,7 @@ components: description: A description of the task. type: string every: - description: The interval ([duration literal](/influxdb/latest/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. + description: The interval ([duration literal](/influxdb/v2/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. format: duration type: string flux: @@ -18200,7 +18205,7 @@ components: readOnly: true type: string latestCompleted: - description: A timestamp ([RFC3339 date/time format](/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. + description: A timestamp ([RFC3339 date/time format](/influxdb/v2/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. format: date-time readOnly: true type: string @@ -18236,17 +18241,17 @@ components: type: string org: description: | - An [organization](/influxdb/latest/reference/glossary/#organization) name. + An [organization](/influxdb/v2/reference/glossary/#organization) name. Specifies the organization that owns the task. type: string orgID: description: | - An [organization](/influxdb/latest/reference/glossary/#organization) ID. + An [organization](/influxdb/v2/reference/glossary/#organization) ID. Specifies the organization that owns the task. type: string ownerID: description: | - A [user](/influxdb/latest/reference/glossary/#user) ID. + A [user](/influxdb/v2/reference/glossary/#user) ID. Specifies the owner of the task. To find a user ID, you can use the @@ -18598,7 +18603,7 @@ components: When you apply a template, InfluxDB replaces `envRef` objects in the template with the values that you provide in the `envRefs` parameter. - For more examples, see how to [define environment references](/influxdb/latest/influxdb-templates/use/#define-environment-references). + For more examples, see how to [define environment references](/influxdb/v2/influxdb-templates/use/#define-environment-references). The following template fields may use environment references: @@ -18607,7 +18612,7 @@ components: - `spec.associations.name` For more information about including environment references in template fields, see how to - [include user-definable resource names](/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names). + [include user-definable resource names](/influxdb/v2/influxdb-templates/create/#include-user-definable-resource-names). type: object orgID: description: | @@ -18616,7 +18621,7 @@ components: The organization owns all resources created by the template. To find your organization, see how to - [view organizations](/influxdb/latest/organizations/view-orgs/). + [view organizations](/influxdb/v2/organizations/view-orgs/). type: string remotes: description: | @@ -18677,7 +18682,7 @@ components: #### Related guides - - [How to pass secrets when installing a template](/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template) + - [How to pass secrets when installing a template](/influxdb/v2/influxdb-templates/use/#pass-secrets-when-installing-a-template) type: object stackID: description: | @@ -18691,8 +18696,8 @@ components: #### Related guides - - [Stacks](/influxdb/latest/influxdb-templates/stacks/) - - [View stacks](/influxdb/latest/influxdb-templates/stacks/view/) + - [Stacks](/influxdb/v2/influxdb-templates/stacks/) + - [View stacks](/influxdb/v2/influxdb-templates/stacks/view/) type: string template: description: | @@ -19938,7 +19943,7 @@ components: In the examples, replace the following: - **`USERNAME`**: InfluxDB username - - **`PASSWORD`**: InfluxDB [API token](/influxdb/latest/reference/glossary/#token) + - **`PASSWORD`**: InfluxDB [API token](/influxdb/v2/reference/glossary/#token) - **`INFLUX_URL`**: your InfluxDB URL #### Encode credentials with cURL @@ -20011,7 +20016,7 @@ components: Replace the following: - *`INFLUX_URL`*: your InfluxDB URL - - *`INFLUX_API_TOKEN`*: your [InfluxDB API token](/influxdb/latest/reference/glossary/#token) + - *`INFLUX_API_TOKEN`*: your [InfluxDB API token](/influxdb/v2/reference/glossary/#token) ### Related endpoints @@ -20019,8 +20024,8 @@ components: ### Related guides - - [Authorize API requests](/influxdb/latest/api-guide/api_intro/#authentication) - - [Manage API tokens](/influxdb/latest/security/tokens/) + - [Authorize API requests](/influxdb/v2/api-guide/api_intro/#authentication) + - [Manage API tokens](/influxdb/v2/security/tokens/) in: header name: Authorization type: apiKey @@ -20033,9 +20038,6 @@ x-tagGroups: - Headers - Pagination - Response codes - - Data I/O endpoints - - Security and access endpoints - - System information endpoints - name: All endpoints tags: - Authorizations (API tokens) diff --git a/api-docs/influxdb3/cloud-dedicated/.config.yml b/api-docs/influxdb3/cloud-dedicated/.config.yml index 2febde2ac..9f8eebb6e 100644 --- a/api-docs/influxdb3/cloud-dedicated/.config.yml +++ b/api-docs/influxdb3/cloud-dedicated/.config.yml @@ -10,6 +10,9 @@ apis: root: management/openapi.yml v2@2: root: v2/ref.yml - x-influxdata-default: true + x-influxdata-docs-aliases: + - /influxdb3/cloud-dedicated/api/ v1-compatibility@2: root: v1-compatibility/swaggerV1Compat.yml + x-influxdata-docs-aliases: + - /influxdb3/cloud-dedicated/api/v1/ diff --git a/api-docs/influxdb3/cloud-dedicated/management/content/info.yml b/api-docs/influxdb3/cloud-dedicated/management/content/info.yml index 5b533dd20..b18e6956f 100644 --- a/api-docs/influxdb3/cloud-dedicated/management/content/info.yml +++ b/api-docs/influxdb3/cloud-dedicated/management/content/info.yml @@ -1,12 +1,15 @@ title: InfluxDB 3 Cloud Dedicated Management API x-influxdata-short-title: Management API -summary: | - The Management API for InfluxDB 3 Cloud Dedicated provides a programmatic interface for managing a Cloud Dedicated instance. description: | - The Management API lets you manage an InfluxDB 3 Cloud Dedicated instance and integrate functions such as creating and managing databases, permissions, and tokens into your workflow or application. + 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. license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/cloud-dedicated/management/openapi.yml b/api-docs/influxdb3/cloud-dedicated/management/openapi.yml index edadccd7f..74868b46b 100644 --- a/api-docs/influxdb3/cloud-dedicated/management/openapi.yml +++ b/api-docs/influxdb3/cloud-dedicated/management/openapi.yml @@ -2,16 +2,19 @@ openapi: 3.1.0 info: title: InfluxDB 3 Cloud Dedicated Management API description: | - The Management API lets you manage an InfluxDB 3 Cloud Dedicated instance and integrate functions such as creating and managing databases, permissions, and tokens into your workflow or application. + 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. - summary: | - The Management API for InfluxDB 3 Cloud Dedicated provides a programmatic interface for managing a Cloud Dedicated instance. license: name: MIT url: https://opensource.org/licenses/MIT version: '' + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: https://{baseurl}/api/v0 description: InfluxDB 3 Cloud Dedicated Management API URL @@ -37,8 +40,6 @@ tags: 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. - - - name: Database tokens description: Manage database read/write tokens for a cluster - name: Databases @@ -1020,7 +1021,6 @@ paths: For example, see how to [authenticate Telegraf using tokens in your OS secret store](https://github.com/influxdata/telegraf/tree/master/plugins/secretstores/os). If you lose a token, [delete the token from InfluxDB](/influxdb3/cloud-dedicated/admin/tokens/database/delete/) and create a new one. - parameters: - name: accountId in: path diff --git a/api-docs/influxdb3/cloud-dedicated/v1-compatibility/content/info.yml b/api-docs/influxdb3/cloud-dedicated/v1-compatibility/content/info.yml index 5a162fa57..01296adc6 100644 --- a/api-docs/influxdb3/cloud-dedicated/v1-compatibility/content/info.yml +++ b/api-docs/influxdb3/cloud-dedicated/v1-compatibility/content/info.yml @@ -1,7 +1,9 @@ title: InfluxDB v1 HTTP API for InfluxDB 3 Cloud Dedicated x-influxdata-short-title: v1 Compatibility API -summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database. +x-influxdata-short-description: The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database using InfluxDB v1 endpoints. description: | + The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database using InfluxDB v1 endpoints. + The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the @@ -13,3 +15,7 @@ description: | license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com diff --git a/api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml b/api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml index 46de3a497..55f91d971 100644 --- a/api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml @@ -3,6 +3,8 @@ info: title: InfluxDB v1 HTTP API for InfluxDB 3 Cloud Dedicated version: '' description: | + The v1-compatibility HTTP API provides compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database using InfluxDB v1 endpoints. + The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the @@ -14,7 +16,10 @@ info: license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: / security: @@ -35,6 +40,7 @@ tags: x-traitTag: true + - name: Ping - name: Query - name: Write paths: @@ -244,7 +250,7 @@ paths: get: description: | Reports the InfluxQL bridge querier health and the InfluxDB version of the instance. - + The response is a HTTP `204` status code to inform you the querier is available. For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters. @@ -282,7 +288,7 @@ paths: head: description: | Reports the InfluxQL bridge querier health and the InfluxDB version of the instance. - + The response is a HTTP `204` status code to inform you the querier is available. For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters. @@ -290,7 +296,6 @@ paths: To check the health of ingesters before writing data, send a request to one of the [write endpoints](/influxdb3/cloud-dedicated/api/v2/#tag/Write). This endpoint doesn't require authentication. - operationId: HeadPing responses: '204': @@ -357,9 +362,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -408,12 +413,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object InfluxQLCSVResponse: diff --git a/api-docs/influxdb3/cloud-dedicated/v2/content/info.yml b/api-docs/influxdb3/cloud-dedicated/v2/content/info.yml index e8b72ba41..ec3537315 100644 --- a/api-docs/influxdb3/cloud-dedicated/v2/content/info.yml +++ b/api-docs/influxdb3/cloud-dedicated/v2/content/info.yml @@ -1,12 +1,17 @@ title: InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated x-influxdata-short-title: v2 API -summary: The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Cloud Dedicated database. - +x-influxdata-short-description: The InfluxDB v2 HTTP API provides a v2-compatible programmatic interface for writing and managing data stored in an InfluxDB 3 Cloud Dedicated database. description: | - The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance. + The InfluxDB v2 HTTP API provides a v2-compatible programmatic interface for writing and managing data stored in an InfluxDB 3 Cloud Dedicated database. + + Use the InfluxDB v2 HTTP API `/api/v2` endpoints to manage retention policy mappings and write data to an InfluxDB 3 instance. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml). license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/cloud-dedicated/v2/content/tag-groups.yml b/api-docs/influxdb3/cloud-dedicated/v2/content/tag-groups.yml index 9d95bccab..ace9fe77d 100644 --- a/api-docs/influxdb3/cloud-dedicated/v2/content/tag-groups.yml +++ b/api-docs/influxdb3/cloud-dedicated/v2/content/tag-groups.yml @@ -6,7 +6,6 @@ - Headers - Pagination - Response codes - - System information endpoints - name: All endpoints tags: - Ping diff --git a/api-docs/influxdb3/cloud-dedicated/v2/ref.yml b/api-docs/influxdb3/cloud-dedicated/v2/ref.yml index eec0b7d3a..c4b645464 100644 --- a/api-docs/influxdb3/cloud-dedicated/v2/ref.yml +++ b/api-docs/influxdb3/cloud-dedicated/v2/ref.yml @@ -2,15 +2,20 @@ openapi: 3.0.0 info: title: InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated description: | - The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance. + The InfluxDB v2 HTTP API provides a v2-compatible programmatic interface for writing and managing data stored in an InfluxDB 3 Cloud Dedicated database. + + Use the InfluxDB v2 HTTP API `/api/v2` endpoints to manage retention policy mappings and write data to an InfluxDB 3 instance. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml). license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Cloud Dedicated database. version: '' + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: https://{baseurl} description: InfluxDB 3 Cloud Dedicated API URL @@ -150,7 +155,7 @@ paths: get: description: | Reports the InfluxQL bridge querier health and the InfluxDB version of the instance. - + The response is a HTTP `204` status code to inform you the querier is available. For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters. @@ -188,7 +193,7 @@ paths: head: description: | Reports the InfluxQL bridge querier health and the InfluxDB version of the instance. - + The response is a HTTP `204` status code to inform you the querier is available. For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters. @@ -499,7 +504,7 @@ paths: type: string - description: | A unix timestamp precision. - Formats timestamps as [unix (epoch) timestamps](/influxdb3/cloud-dedicated/reference/glossary/#unix-timestamp) the specified precision + Formats timestamps as [unix (epoch) timestamps](/influxdb3/cloud-dedicated/reference/glossary/#unix-timestamp) with the specified precision instead of [RFC3339 timestamps](/influxdb3/cloud-dedicated/reference/glossary/#rfc3339-timestamp) with nanosecond precision. in: query name: epoch @@ -932,7 +937,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/cloud-dedicated/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string virtual: @@ -975,7 +980,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/cloud-dedicated/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string required: @@ -999,7 +1004,7 @@ components: type: boolean retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/cloud-dedicated/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string DBRPs: @@ -1243,9 +1248,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -1294,12 +1299,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: @@ -2138,7 +2143,6 @@ x-tagGroups: - Headers - Pagination - Response codes - - System information endpoints - name: All endpoints tags: - Ping diff --git a/api-docs/influxdb3/cloud-serverless/.config.yml b/api-docs/influxdb3/cloud-serverless/.config.yml index 1e02231fc..684da1b8c 100644 --- a/api-docs/influxdb3/cloud-serverless/.config.yml +++ b/api-docs/influxdb3/cloud-serverless/.config.yml @@ -8,6 +8,9 @@ x-influxdata-product-name: InfluxDB 3 Serverless apis: v2@2: root: v2/ref.yml - x-influxdata-default: true + x-influxdata-docs-aliases: + - /influxdb3/cloud-serverless/api/ v1-compatibility@2: root: v1-compatibility/swaggerV1Compat.yml + x-influxdata-docs-aliases: + - /influxdb3/cloud-serverless/api/v1/ diff --git a/api-docs/influxdb3/cloud-serverless/v1-compatibility/content/info.yml b/api-docs/influxdb3/cloud-serverless/v1-compatibility/content/info.yml index 1e2d82d4c..ceb3cd409 100644 --- a/api-docs/influxdb3/cloud-serverless/v1-compatibility/content/info.yml +++ b/api-docs/influxdb3/cloud-serverless/v1-compatibility/content/info.yml @@ -1,7 +1,9 @@ title: InfluxDB v1 HTTP API for InfluxDB 3 Cloud Serverless x-influxdata-short-title: v1 Compatibility API -summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Serverless bucket. +x-influxdata-short-description: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Serverless bucket. description: | + The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Serverless bucket. + The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the @@ -13,3 +15,7 @@ description: | license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/cloud-serverless/v1-compatibility/swaggerV1Compat.yml b/api-docs/influxdb3/cloud-serverless/v1-compatibility/swaggerV1Compat.yml index 12332cb35..744692e6d 100644 --- a/api-docs/influxdb3/cloud-serverless/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/influxdb3/cloud-serverless/v1-compatibility/swaggerV1Compat.yml @@ -3,6 +3,8 @@ info: title: InfluxDB v1 HTTP API for InfluxDB 3 Cloud Serverless version: '' description: | + The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Serverless bucket. + The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the @@ -14,7 +16,10 @@ info: license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Serverless bucket. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: / security: @@ -280,9 +285,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -331,12 +336,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object InfluxQLCSVResponse: diff --git a/api-docs/influxdb3/cloud-serverless/v2/content/info.yml b/api-docs/influxdb3/cloud-serverless/v2/content/info.yml index f175cf3c7..4a23ed31d 100644 --- a/api-docs/influxdb3/cloud-serverless/v2/content/info.yml +++ b/api-docs/influxdb3/cloud-serverless/v2/content/info.yml @@ -1,8 +1,9 @@ title: InfluxDB 3 Cloud Serverless API Service x-influxdata-short-title: v2 API -summary: | - The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB 3 Cloud Serverless bucket. +x-influxdata-short-description: The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB 3 Cloud Serverless bucket. description: | + The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB 3 Cloud Serverless bucket. + The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance. This documentation is generated from the @@ -10,3 +11,7 @@ description: | license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/cloud-serverless/v2/content/tag-groups.yml b/api-docs/influxdb3/cloud-serverless/v2/content/tag-groups.yml index f4cfceced..e5f232313 100644 --- a/api-docs/influxdb3/cloud-serverless/v2/content/tag-groups.yml +++ b/api-docs/influxdb3/cloud-serverless/v2/content/tag-groups.yml @@ -6,9 +6,6 @@ - Headers - Pagination - Response codes - - Data I/O endpoints - - Security and access endpoints - - System information endpoints - name: All endpoints tags: - Authorizations (API tokens) diff --git a/api-docs/influxdb3/cloud-serverless/v2/ref.yml b/api-docs/influxdb3/cloud-serverless/v2/ref.yml index 78e7ff814..6b57c22c8 100644 --- a/api-docs/influxdb3/cloud-serverless/v2/ref.yml +++ b/api-docs/influxdb3/cloud-serverless/v2/ref.yml @@ -2,6 +2,8 @@ openapi: 3.0.0 info: title: InfluxDB 3 Cloud Serverless API Service description: | + The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB 3 Cloud Serverless bucket. + The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance. This documentation is generated from the @@ -9,9 +11,11 @@ info: license: name: MIT url: https://opensource.org/licenses/MIT - summary: | - The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB 3 Cloud Serverless bucket. version: '' + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: https://{baseurl} description: InfluxDB 3 Cloud Serverless API URL @@ -122,16 +126,16 @@ tags: |:------------------------ |:--------------------- |:-------------------------------------------| | `bucket` | string | The bucket name or ID ([find your bucket](/influxdb3/cloud-serverless/admin/buckets/view-buckets/). | | `bucketID` | string | The bucket ID ([find your bucket](/influxdb3/cloud-serverless/admin/buckets/view-buckets/). | - | `org` | string | The organization name or ID ([find your organization](/influxdb3/cloud-serverless/organizations/view-orgs/). | - | `orgID` | 16-byte string | The organization ID ([find your organization](/influxdb3/cloud-serverless/organizations/view-orgs/). | + | `org` | string | The organization name or ID ([find your organization](/influxdb3/cloud-serverless/admin/organizations/view-orgs/). | + | `orgID` | 16-byte string | The organization ID ([find your organization](/influxdb3/cloud-serverless/admin/organizations/view-orgs/). | name: Common parameters x-traitTag: true - name: Config - name: Dashboards - name: Data I/O endpoints - description: | - The InfluxDB 1.x data model includes [databases](/influxdb/v1.8/concepts/glossary/#database) - and [retention policies](/influxdb/v1.8/concepts/glossary/#retention-policy-rp). + The InfluxDB 1.x data model includes [databases](/influxdb3/cloud-serverless/reference/glossary/#database) + and [retention policies](/influxdb3/cloud-serverless/reference/glossary/#retention-policy-rp). InfluxDB 2.x replaces databases and retention policies with buckets. To support InfluxDB 1.x query and write patterns in InfluxDB 2.x, databases and retention policies are mapped to buckets using the @@ -439,11 +443,6 @@ paths: Specifies an authorization by its `token` property value and returns the authorization. - #### InfluxDB OSS - - - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, - applies other parameters, and then returns the result. - #### Limitations - The parameter is non-repeatable. If you specify more than one, @@ -465,13 +464,6 @@ paths: If the response body is missing authorizations that you expect, check that the API token used in the request has `read-user` permission for the users (`userID` property value) in those authorizations. - - #### InfluxDB OSS - - - **Warning**: The response body contains authorizations with their - [API token](/influxdb3/cloud-serverless/reference/glossary/#token) values in clear text. - - If the request uses an _[operator token](/influxdb/latest/security/tokens/#operator-token)_, - InfluxDB OSS returns authorizations for all organizations in the instance. '400': $ref: '#/components/responses/GeneralServerError' description: Invalid request @@ -621,14 +613,6 @@ paths: Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. - - #### InfluxDB OSS - - - InfluxDB OSS returns - [API token](/influxdb3/cloud-serverless/reference/glossary/#token) values in authorizations. - - If the request uses an _[operator token](/influxdb/latest/security/tokens/#operator-token)_, - InfluxDB OSS returns authorizations for all organizations in the instance. - #### Related guides - [View tokens](/influxdb3/cloud-serverless/security/tokens/view-tokens/) @@ -736,14 +720,6 @@ paths: If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. - #### InfluxDB OSS - - - If you use an _[operator token](/influxdb3/cloud-serverless/security/tokens/#operator-token)_ - to authenticate your request, InfluxDB retrieves resources for _all - organizations_ in the instance. - To retrieve resources for only a specific organization, use the - `org` parameter or the `orgID` parameter to specify the organization. - #### Required permissions | Action | Permission required | @@ -859,13 +835,6 @@ paths: [retention period](/influxdb3/cloud-serverless/reference/glossary/#retention-period) is 30 days. - #### InfluxDB OSS - - - A single InfluxDB OSS instance supports active writes or queries for - approximately 20 buckets across all organizations at a given time. - Reading or writing to more than 20 buckets at a time can adversely affect - performance. - #### Limitations - InfluxDB Cloud Free Plan allows users to create up to two buckets. @@ -2381,7 +2350,7 @@ paths: schema: type: string - description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp). + A [retention policy](/influxdb3/cloud-serverless/reference/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. in: query name: rp @@ -2851,10 +2820,6 @@ paths: description: | Bad request. The response body contains detail about the error. - - #### InfluxDB OSS - - - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': $ref: '#/components/responses/AuthorizationError' '404': @@ -2906,7 +2871,7 @@ paths: #### Related guides - - [View organizations](/influxdb3/cloud-serverless/organizations/view-orgs/) + - [View organizations](/influxdb3/cloud-serverless/admin/organizations/view-orgs/) operationId: GetOrgs parameters: - $ref: '#/components/parameters/TraceSpan' @@ -3071,11 +3036,6 @@ paths: 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. - #### InfluxDB OSS - - - Validates the request, handles the delete synchronously, - and then responds with success or failure. - #### Limitations - Only one organization can be deleted per request. @@ -3100,9 +3060,6 @@ paths: #### InfluxDB Cloud - The organization is queued for deletion. - - #### InfluxDB OSS - - The organization is deleted. '400': $ref: '#/components/responses/BadRequestError' '401': @@ -3141,7 +3098,7 @@ paths: #### Related guides - - [View organizations](/influxdb3/cloud-serverless/organizations/view-orgs/) + - [View organizations](/influxdb3/cloud-serverless/admin/organizations/view-orgs/) operationId: GetOrgsID parameters: - $ref: '#/components/parameters/TraceSpan' @@ -3905,10 +3862,6 @@ paths: description: | Bad request. The response body contains detail about the error. - - #### InfluxDB OSS - - - Returns this error if the `org` parameter or `orgID` parameter doesn't match an organization. '401': $ref: '#/components/responses/AuthorizationError' '404': @@ -4890,10 +4843,6 @@ paths: description: | Bad request. The response body contains detail about the error. - - #### InfluxDB OSS - - - Returns this error if an incorrect value is passed in the `org` parameter or `orgID` parameter. '401': $ref: '#/components/responses/AuthorizationError' '500': @@ -6230,10 +6179,6 @@ paths: #### InfluxDB Cloud - Always returns this error; doesn't support cancelling tasks. - - #### InfluxDB OSS - - - Doesn't return this error. '500': $ref: '#/components/responses/InternalServerError' default: @@ -7823,7 +7768,7 @@ paths: type: string - description: | A unix timestamp precision. - Formats timestamps as [unix (epoch) timestamps](/influxdb3/cloud-serverless/reference/glossary/#unix-timestamp) the specified precision + Formats timestamps as [unix (epoch) timestamps](/influxdb3/cloud-serverless/reference/glossary/#unix-timestamp) with the specified precision instead of [RFC3339 timestamps](/influxdb3/cloud-serverless/reference/glossary/#rfc3339-timestamp) with nanosecond precision. in: query name: epoch @@ -8229,10 +8174,6 @@ components: description: | Bad request. The response body contains detail about the error. - - #### InfluxDB OSS - - - Returns this error if an incorrect value is passed in the `org` parameter or `orgID` parameter. GeneralServerError: content: application/json: @@ -9128,7 +9069,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/cloud-serverless/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string virtual: @@ -9171,7 +9112,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/cloud-serverless/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string required: @@ -9195,7 +9136,7 @@ components: type: boolean retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/cloud-serverless/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string DBRPs: @@ -11677,10 +11618,6 @@ components: - Doesn't use `shardGroupDurationsSeconds`. - #### InfluxDB OSS - - - Default value depends on the [bucket retention period](/influxdb3/cloud-serverless/reference/internals/shards/#shard-group-duration). - #### Related guides - InfluxDB [shards and shard groups](/influxdb3/cloud-serverless/reference/internals/shards/) @@ -11810,7 +11747,7 @@ components: If you need compatibility with InfluxDB 1.x, specify a value for the `rp` property; otherwise, see the `retentionRules` property. - [Retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) + [Retention policy](/influxdb3/cloud-serverless/reference/glossary/#retention-policy-rp) is an InfluxDB 1.x concept. The InfluxDB 2.x and Cloud equivalent is [retention period](/influxdb3/cloud-serverless/reference/glossary/#retention-period). @@ -12128,10 +12065,6 @@ components: #### InfluxDB 3 Cloud Serverless - `retentionRules` is required. - - #### InfluxDB OSS - - - `retentionRules` isn't required. items: $ref: '#/components/schemas/RetentionRule' type: array @@ -13396,7 +13329,7 @@ components: The organization owns all resources created by the template. To find your organization, see how to - [view organizations](/influxdb3/cloud-serverless/organizations/view-orgs/). + [view organizations](/influxdb3/cloud-serverless/admin/organizations/view-orgs/). type: string remotes: description: | @@ -14813,9 +14746,6 @@ x-tagGroups: - Headers - Pagination - Response codes - - Data I/O endpoints - - Security and access endpoints - - System information endpoints - name: All endpoints tags: - Authorizations (API tokens) diff --git a/api-docs/influxdb3/clustered/.config.yml b/api-docs/influxdb3/clustered/.config.yml index 53febaaa1..ca9356a9e 100644 --- a/api-docs/influxdb3/clustered/.config.yml +++ b/api-docs/influxdb3/clustered/.config.yml @@ -8,6 +8,9 @@ x-influxdata-product-name: InfluxDB 3 Clustered apis: v2@2: root: v2/ref.yml - x-influxdata-default: true + x-influxdata-docs-aliases: + - /influxdb3/clustered/api/ v1-compatibility@2: root: v1-compatibility/swaggerV1Compat.yml + x-influxdata-docs-aliases: + - /influxdb3/clustered/api/v1/ diff --git a/api-docs/influxdb3/clustered/v1-compatibility/content/info.yml b/api-docs/influxdb3/clustered/v1-compatibility/content/info.yml index 80ab8c17f..8c7102361 100644 --- a/api-docs/influxdb3/clustered/v1-compatibility/content/info.yml +++ b/api-docs/influxdb3/clustered/v1-compatibility/content/info.yml @@ -1,7 +1,9 @@ title: InfluxDB v1 HTTP API for InfluxDB 3 Clustered x-influxdata-short-title: v1 Compatibility API -summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Clustered database. +x-influxdata-short-description: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Clustered database. description: | + The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Clustered database. + The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the @@ -13,3 +15,7 @@ description: | license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/clustered/v1-compatibility/swaggerV1Compat.yml b/api-docs/influxdb3/clustered/v1-compatibility/swaggerV1Compat.yml index 7bfc57eda..36c3e08b0 100644 --- a/api-docs/influxdb3/clustered/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/influxdb3/clustered/v1-compatibility/swaggerV1Compat.yml @@ -3,6 +3,8 @@ info: title: InfluxDB v1 HTTP API for InfluxDB 3 Clustered version: '' description: | + The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Clustered database. + The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. This documentation is generated from the @@ -14,7 +16,10 @@ info: license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Clustered database. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: / security: @@ -280,9 +285,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -331,12 +336,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object InfluxQLCSVResponse: diff --git a/api-docs/influxdb3/clustered/v2/content/info.yml b/api-docs/influxdb3/clustered/v2/content/info.yml index bc01b768f..cbd9281e2 100644 --- a/api-docs/influxdb3/clustered/v2/content/info.yml +++ b/api-docs/influxdb3/clustered/v2/content/info.yml @@ -1,7 +1,9 @@ title: InfluxDB 3 Clustered API Service x-influxdata-short-title: v2 API -summary: The InfluxDB v2 HTTP API for InfluxDB 3 Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Clustered database. +x-influxdata-short-description: The InfluxDB v2 HTTP API for InfluxDB 3 Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Clustered database. description: | + The InfluxDB v2 HTTP API for InfluxDB 3 Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Clustered database. + The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance. This documentation is generated from the @@ -9,3 +11,7 @@ description: | license: name: MIT url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/clustered/v2/content/tag-groups.yml b/api-docs/influxdb3/clustered/v2/content/tag-groups.yml index 6b870e7ca..47deee8ef 100644 --- a/api-docs/influxdb3/clustered/v2/content/tag-groups.yml +++ b/api-docs/influxdb3/clustered/v2/content/tag-groups.yml @@ -5,7 +5,6 @@ - Headers - Pagination - Response codes - - System information endpoints - name: All endpoints tags: - Ping diff --git a/api-docs/influxdb3/clustered/v2/ref.yml b/api-docs/influxdb3/clustered/v2/ref.yml index 71245c9c2..09afff6d0 100644 --- a/api-docs/influxdb3/clustered/v2/ref.yml +++ b/api-docs/influxdb3/clustered/v2/ref.yml @@ -3,6 +3,8 @@ info: title: InfluxDB 3 Clustered API Service version: '' description: | + The InfluxDB v2 HTTP API for InfluxDB 3 Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Clustered database. + The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance. This documentation is generated from the @@ -10,7 +12,10 @@ info: license: name: MIT url: https://opensource.org/licenses/MIT - summary: The InfluxDB v2 HTTP API for InfluxDB 3 Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Clustered database. + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com servers: - url: https://{baseurl} description: InfluxDB 3 Clustered API URL @@ -412,16 +417,6 @@ paths: '429': description: | Too many requests. - - #### InfluxDB Cloud - - - Returns this error if a **read** or **write** request exceeds your plan's [adjustable service quotas](/influxdb3/clustered/account-management/limits/#adjustable-service-quotas) - or if a **delete** request exceeds the maximum [global limit](/influxdb3/clustered/account-management/limits/#global-limits). - - For rate limits that reset automatically, returns a `Retry-After` header that describes when to try the write again. - - For limits that can't reset (for example, **cardinality limit**), doesn't return a `Retry-After` header. - - Rates (data-in (writes), queries (reads), and deletes) accrue within a fixed five-minute window. - Once a rate limit is exceeded, InfluxDB returns an error response until the current five-minute window resets. headers: Retry-After: description: Non-negative decimal integer indicating seconds to wait before retrying the request. @@ -517,7 +512,7 @@ paths: type: string - description: | A unix timestamp precision. - Formats timestamps as [unix (epoch) timestamps](/influxdb3/clustered/reference/glossary/#unix-timestamp) the specified precision + Formats timestamps as [unix (epoch) timestamps](/influxdb3/clustered/reference/glossary/#unix-timestamp) with the specified precision instead of [RFC3339 timestamps](/influxdb3/clustered/reference/glossary/#rfc3339-timestamp) with nanosecond precision. in: query name: epoch @@ -573,12 +568,7 @@ paths: type: string '429': description: | - #### InfluxDB Cloud: - - returns this error if a **read** or **write** request exceeds your - plan's [adjustable service quotas](/influxdb3/clustered/account-management/limits/#adjustable-service-quotas) - or if a **delete** request exceeds the maximum - [global limit](/influxdb3/clustered/account-management/limits/#global-limits) - - returns `Retry-After` header that describes when to try the write again. + Token is temporarily over quota. The Retry-After header describes when to try the write again. headers: Retry-After: description: A non-negative decimal integer indicating the seconds to delay after the response is received. @@ -924,7 +914,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/clustered/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string virtual: @@ -967,7 +957,7 @@ components: type: string retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/clustered/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string required: @@ -991,7 +981,7 @@ components: type: boolean retention_policy: description: | - A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + A [retention policy](/influxdb3/clustered/reference/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. type: string DBRPs: @@ -1235,9 +1225,9 @@ components: properties: results: description: | - A resultset object that contains the `statement_id` and the `series` array. + A resultset object that contains the `statement_id` and the `series` array. - Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: @@ -1286,12 +1276,12 @@ components: type: integer type: object oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: @@ -2129,7 +2119,6 @@ x-tagGroups: - Headers - Pagination - Response codes - - System information endpoints - name: All endpoints tags: - Ping diff --git a/api-docs/influxdb3/core/v3/content/info.yml b/api-docs/influxdb3/core/v3/content/info.yml new file mode 100644 index 000000000..87d7ffafb --- /dev/null +++ b/api-docs/influxdb3/core/v3/content/info.yml @@ -0,0 +1,34 @@ +title: InfluxDB 3 Core API Service +x-influxdata-short-title: InfluxDB 3 API +x-influxdata-version-matrix: + v1: Compatibility layer for InfluxDB 1.x clients (supported) + v2: Compatibility layer for InfluxDB 2.x clients (supported) + v3: Native API for InfluxDB 3.x (current) +x-influxdata-short-description: The InfluxDB 3 HTTP API provides a programmatic interface for interactions with InfluxDB, including writing, querying, and processing data, and managing an InfluxDB 3 instance. +description: | + The InfluxDB HTTP API for InfluxDB 3 Core provides a programmatic interface for + interacting with InfluxDB 3 Core databases and resources. + Use this API to: + + - Write data to InfluxDB 3 Core databases + - Query data using SQL or InfluxQL + - Process data using Processing engine plugins + - Manage databases, tables, and Processing engine triggers + - Perform administrative tasks and access system information + + The API includes endpoints under the following paths: + - `/api/v3`: InfluxDB 3 Core native endpoints + - `/`: Compatibility endpoints for InfluxDB v1 workloads and clients + - `/api/v2/write`: Compatibility endpoint for InfluxDB v2 workloads and clients + + +license: + name: MIT + url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/core/v3/content/servers.yml b/api-docs/influxdb3/core/v3/content/servers.yml new file mode 100644 index 000000000..213371401 --- /dev/null +++ b/api-docs/influxdb3/core/v3/content/servers.yml @@ -0,0 +1,8 @@ +- url: https://{baseurl} + description: InfluxDB 3 Core API URL + variables: + baseurl: + enum: + - 'localhost:8181' + default: 'localhost:8181' + description: InfluxDB 3 Core URL diff --git a/api-docs/influxdb3/core/v3/content/tag-groups.yml b/api-docs/influxdb3/core/v3/content/tag-groups.yml new file mode 100644 index 000000000..5289ddb33 --- /dev/null +++ b/api-docs/influxdb3/core/v3/content/tag-groups.yml @@ -0,0 +1,12 @@ +- name: Using the InfluxDB HTTP API + tags: + - Quick start + - Authentication + - Common parameters + - Response codes + - Compatibility endpoints + - Data I/O + - Databases + - Processing engine + - Server information + - Tables diff --git a/api-docs/influxdb3/core/v3/ref.yml b/api-docs/influxdb3/core/v3/ref.yml new file mode 100644 index 000000000..1ca927730 --- /dev/null +++ b/api-docs/influxdb3/core/v3/ref.yml @@ -0,0 +1,1792 @@ +openapi: 3.0.3 +info: + title: InfluxDB 3 Core API Service + description: | + The InfluxDB HTTP API for InfluxDB 3 Core provides a programmatic interface for + interacting with InfluxDB 3 Core databases and resources. + Use this API to: + + - Write data to InfluxDB 3 Core databases + - Query data using SQL or InfluxQL + - Process data using Processing engine plugins + - Manage databases, tables, and Processing engine triggers + - Perform administrative tasks and access system information + + The API includes endpoints under the following paths: + - `/api/v3`: InfluxDB 3 Core native endpoints + - `/`: Compatibility endpoints for InfluxDB v1 workloads and clients + - `/api/v2/write`: Compatibility endpoint for InfluxDB v2 workloads and clients + + + version: '' + license: + name: MIT + url: https://opensource.org/licenses/MIT + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com +servers: + - url: https://{baseurl} + description: InfluxDB 3 Core API URL + variables: + baseurl: + enum: + - localhost:8181 + default: localhost:8181 + description: InfluxDB 3 Core URL +security: + - BearerAuth: [] +tags: + - name: Authentication + description: | + During the initial Alpha phase, InfluxDB 3 Core does not require authentication. + x-traitTag: true + - name: Compatibility endpoints + description: | + InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients. + + ### Write data using v1- or v2-compatible endpoints + + - [`/api/v2/write` endpoint](#operation/PostV2Write) + for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3. + - [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3. + + For new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP). + + All endpoints accept the same line protocol format. + + ### Query data + + Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL. + + For new workloads, use one of the following: + + - HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL. + - HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL. + - Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity). + + ### Server information + + Server information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients. + - name: Data I/O + description: | + Write and query data + + #### Data flow in InfluxDB 3 Core + + 1. **Incoming writes**: The system validates incoming data and stores it in the write buffer (in memory). If the `no_sync` write option is enabled (`no_sync=true`), the server sends a response to acknowledge the write. + 2. **WAL flush**: Every second (default), the system flushes the write buffer to the Write-Ahead Log (WAL) for persistence in the Object store. If `no_sync=false` (default), the server sends a response to acknowledge the write. + 3. **Query availability**: After WAL persistence completes, data moves to the queryable buffer where it becomes available for queries. By default, the server keeps up to 900 WAL files (15 minutes of data) buffered. + 4. **Long-term storage in Parquet**: Every ten minutes (default), the system persists the oldest data from the queryable buffer to the Object store in Parquet format. InfluxDB keeps the remaining data (the most recent 5 minutes) in memory. + 5. **In-memory cache**: InfluxDB puts Parquet files into an in-memory cache so that queries against the most recently persisted data don't have to go to object storage. + - name: Databases + description: Create, read, update, and delete database and cache resources + - description: | + Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use. + + ### Common parameters + + The following table shows common parameters used by many InfluxDB API endpoints. + Many endpoints may require other parameters in the query string or in the + request body that perform functions specific to those endpoints. + + | Query parameter | Value type | Description | + |:------------------------ |:--------------------- |:-------------------------------------------| + | `db` | string | The database name | + + InfluxDB HTTP API endpoints use standard HTTP request and response headers. + The following table shows common headers used by many InfluxDB API endpoints. + Some endpoints may use other headers that perform functions more specific to those endpoints--for example, + the write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body. + + | Header | Value type | Description | + |:------------------------ |:--------------------- |:-------------------------------------------| + | `Accept` | string | The content type that the client can understand. | + | `Authorization` | string | The authorization scheme and credential. | + | `Content-Length` | integer | The size of the entity-body, in bytes. | + | `Content-Type` | string | The format of the data in the request body. | + name: Headers and parameters + x-traitTag: true + - name: Processing engine + description: | + Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins. + + InfluxDB 3 Core provides the InfluxDB 3 Processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database. + Use Processing engine plugins and triggers to run code and perform tasks for different database events. + + To get started with the Processing engine, see the [Processing engine and Python plugins](/influxdb3/core/processing-engine/) guide. + - name: Quick start + description: | + 1. [Check the status](#section/Server-information) of the InfluxDB server. + + ```bash + curl "http://localhost:8181/health" + ``` + + 2. [Write data](#section/Compatibility-endpoints/Write-data) to InfluxDB. + + ```bash + curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto" \ + --data-raw "home,room=Kitchen temp=72.0 + home,room=Living\ room temp=71.5" + ``` + + If all data is written, the response is `204 No Content`. + + 3. [Query data](#section/Compatibility-endpoints/Query-data) from InfluxDB. + + ```bash + curl -G "http://localhost:8181/api/v3/query_sql" \ + --data-urlencode "db=sensors" \ + --data-urlencode "q=SELECT * FROM home WHERE room='Living room'" \ + --data-urlencode "format=jsonl" + ``` + + Output: + + ```jsonl + {"room":"Living room","temp":71.5,"time":"2025-02-25T20:19:34.984098"} + ``` + + For more information about using InfluxDB 3 Core, see the [Get started](/influxdb3/core/get-started/) guide. + x-traitTag: true + - name: Server information + description: Retrieve server metrics, status, and version information + - name: Tables + description: Manage table schemas and data +paths: + /write: + post: + operationId: PostV1Write + summary: Write line protocol (v1-compatible) + description: | + Writes line protocol to the specified database. + + This endpoint provides backward compatibility for InfluxDB 1.x write workloads using tools such as InfluxDB 1.x client libraries, the Telegraf `outputs.influxdb` output plugin, or third-party tools. + + Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb3/core/reference/syntax/line-protocol/) format to InfluxDB. + Use query parameters to specify options for writing data. + parameters: + - $ref: '#/components/parameters/dbWriteParam' + - $ref: '#/components/parameters/compatibilityPrecisionParam' + - name: Content-Type + in: header + description: | + The content type of the request payload. + schema: + $ref: '#/components/schemas/LineProtocol' + required: false + - name: Accept + in: header + description: | + The content type that the client can understand. + Writes only return a response body if they fail (partially or completely)--for example, + due to a syntax problem or type mismatch. + schema: + type: string + default: application/json + enum: + - application/json + required: false + - $ref: '#/components/parameters/ContentEncoding' + - $ref: '#/components/parameters/ContentLength' + requestBody: + $ref: '#/components/requestBodies/lineProtocolRequestBody' + responses: + '204': + description: Success ("No Content"). All data in the batch is written and queryable. + '400': + description: | + Bad request. Some (a _partial write_) or all of the data from the batch was rejected and not written. + If a partial write occurred, then some points from the batch are written and queryable. + + The response body: + - indicates if a partial write occurred or all data was rejected. + - contains details about the [rejected points](/influxdb3/core/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points. + content: + application/json: + examples: + rejectedAllPoints: + summary: Rejected all points in the batch + value: | + { + "error": "write of line protocol failed", + "data": [ + { + "original_line": "dquote> home,room=Kitchen temp=hi", + "line_number": 2, + "error_message": "No fields were provided" + } + ] + } + partialWriteErrorWithRejectedPoints: + summary: Partial write rejected some points in the batch + value: | + { + "error": "partial write of line protocol occurred", + "data": [ + { + "original_line": "dquote> home,room=Kitchen temp=hi", + "line_number": 2, + "error_message": "No fields were provided" + } + ] + } + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '413': + description: Request entity too large. + tags: + - Compatibility endpoints + - Data I/O + /api/v2/write: + post: + operationId: PostV2Write + summary: Write line protocol (v2-compatible) + description: | + Writes line protocol to the specified database. + + This endpoint provides backward compatibility for InfluxDB 2.x write workloads using tools such as InfluxDB 2.x client libraries, the Telegraf `outputs.influxdb_v2` output plugin, or third-party tools. + + Use this endpoint to send data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) format to InfluxDB. + Use query parameters to specify options for writing data. + parameters: + - name: Content-Type + in: header + description: | + The content type of the request payload. + schema: + $ref: '#/components/schemas/LineProtocol' + required: false + - description: | + The compression applied to the line protocol in the request payload. + To send a gzip payload, pass `Content-Encoding: gzip` header. + in: header + name: Content-Encoding + schema: + default: identity + description: | + Content coding. + Use `gzip` for compressed data or `identity` for unmodified, uncompressed data. + enum: + - gzip + - identity + type: string + - description: | + The size of the entity-body, in bytes, sent to InfluxDB. + in: header + name: Content-Length + schema: + description: The length in decimal number of octets. + type: integer + - description: | + The content type that the client can understand. + Writes only return a response body if they fail (partially or completely)--for example, + due to a syntax problem or type mismatch. + in: header + name: Accept + schema: + default: application/json + description: Error content type. + enum: + - application/json + type: string + - name: db + in: query + required: true + schema: + type: string + description: | + A database name. + InfluxDB creates the database if it doesn't already exist, and then + writes all points in the batch to the database. + - name: accept_partial + in: query + required: false + schema: + $ref: '#/components/schemas/AcceptPartial' + - $ref: '#/components/parameters/compatibilityPrecisionParam' + requestBody: + $ref: '#/components/requestBodies/lineProtocolRequestBody' + responses: + '204': + description: Success ("No Content"). All data in the batch is written and queryable. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '413': + description: Request entity too large. + tags: + - Compatibility endpoints + - Data I/O + /api/v3/write_lp: + post: + operationId: PostWriteLP + summary: Write line protocol + description: | + Writes line protocol to the specified database. + + Use this endpoint to send data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) format to InfluxDB. + Use query parameters to specify options for writing data. + parameters: + - $ref: '#/components/parameters/dbWriteParam' + - $ref: '#/components/parameters/accept_partial' + - name: precision + in: query + required: true + schema: + $ref: '#/components/schemas/PrecisionWrite' + description: Precision of timestamps. + - name: no_sync + in: query + schema: + $ref: '#/components/schemas/NoSync' + - name: Content-Type + in: header + description: | + The content type of the request payload. + schema: + $ref: '#/components/schemas/LineProtocol' + required: false + - name: Accept + in: header + description: | + The content type that the client can understand. + Writes only return a response body if they fail (partially or completely)--for example, + due to a syntax problem or type mismatch. + schema: + type: string + default: application/json + enum: + - application/json + required: false + - $ref: '#/components/parameters/ContentEncoding' + - $ref: '#/components/parameters/ContentLength' + requestBody: + $ref: '#/components/requestBodies/lineProtocolRequestBody' + responses: + '204': + description: Success ("No Content"). All data in the batch is written and queryable. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '413': + description: Request entity too large. + '422': + description: Unprocessable entity. + tags: + - Data I/O + /api/v3/query_sql: + get: + operationId: GetExecuteQuerySQL + summary: Execute SQL query + description: Executes an SQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/db' + - name: q + in: query + required: true + schema: + type: string + - name: format + in: query + required: false + schema: + type: string + - $ref: '#/components/parameters/AcceptQueryHeader' + - $ref: '#/components/parameters/ContentType' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + example: + results: + - series: + - name: mytable + columns: + - time + - value + values: + - - '2024-02-02T12:00:00Z' + - 42 + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + post: + operationId: PostExecuteQuerySQL + summary: Execute SQL query + description: Executes an SQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/AcceptQueryHeader' + - $ref: '#/components/parameters/ContentType' + requestBody: + $ref: '#/components/requestBodies/queryRequestBody' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + /api/v3/query_influxql: + get: + operationId: GetExecuteInfluxQLQuery + summary: Execute InfluxQL query + description: Executes an InfluxQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/dbQueryParam' + - name: q + in: query + required: true + schema: + type: string + - name: format + in: query + required: false + schema: + type: string + - $ref: '#/components/parameters/AcceptQueryHeader' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + post: + operationId: PostExecuteQueryInfluxQL + summary: Execute InfluxQL query + description: Executes an InfluxQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/AcceptQueryHeader' + - $ref: '#/components/parameters/ContentType' + requestBody: + $ref: '#/components/requestBodies/queryRequestBody' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + /query: + get: + operationId: GetV1ExecuteQuery + summary: Execute InfluxQL query (v1-compatible) + description: | + Executes an InfluxQL query to retrieve data from the specified database. + + This endpoint is compatible with InfluxDB 1.x client libraries and third-party integrations such as Grafana. + Use query parameters to specify the database and the InfluxQL query. + parameters: + - name: Accept + in: header + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + - text/csv + required: false + description: | + The content type that the client can understand. + + If `text/csv` is specified, the `Content-type` response header is `application/csv` and the response is formatted as CSV. + + Returns an error if the format is invalid or non-UTF8. + - in: query + name: chunked + description: | + If true, the response is divided into chunks of size `chunk_size`. + schema: + type: boolean + default: false + - in: query + name: chunk_size + description: | + The number of records that will go into a chunk. + This parameter is only used if `chunked=true`. + schema: + type: integer + default: 10000 + - in: query + name: db + description: The database to query. If not provided, the InfluxQL query string must specify the database. + schema: + type: string + format: InfluxQL + - in: query + name: pretty + description: | + If true, the JSON response is formatted in a human-readable format. + schema: + type: boolean + default: false + - in: query + name: q + description: The InfluxQL query string. + required: true + schema: + type: string + - name: epoch + description: | + Formats timestamps as [unix (epoch) timestamps](/influxdb3/core/reference/glossary/#unix-timestamp) with the specified precision + instead of [RFC3339 timestamps](/influxdb3/core/reference/glossary/#rfc3339-timestamp) with nanosecond precision. + in: query + schema: + $ref: '#/components/schemas/EpochCompatibility' + responses: + '200': + description: | + Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + application/csv: + schema: + type: string + headers: + Content-Type: + description: | + The content type of the response. + Default is `application/json`. + + If the `Accept` request header is `application/csv` or `text/csv`, the `Content-type` response header is `application/csv` + and the response is formatted as CSV. + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + - Compatibility endpoints + post: + operationId: PostExecuteV1Query + summary: Execute InfluxQL query (v1-compatible) + description: Executes an InfluxQL query to retrieve data from the specified database. + requestBody: + content: + application/json: + schema: + type: object + properties: + db: + type: string + description: The database to query. If not provided, the InfluxQL query string must specify the database. + q: + description: The InfluxQL query string. + type: string + chunked: + description: | + If true, the response is divided into chunks of size `chunk_size`. + type: boolean + chunk_size: + description: | + The number of records that will go into a chunk. + This parameter is only used if `chunked=true`. + type: integer + default: 10000 + epoch: + description: | + A unix timestamp precision. + + - `h` for hours + - `m` for minutes + - `s` for seconds + - `ms` for milliseconds + - `u` or `µ` for microseconds + - `ns` for nanoseconds + + Formats timestamps as [unix (epoch) timestamps](/influxdb3/core/reference/glossary/#unix-timestamp) with the specified precision + instead of [RFC3339 timestamps](/influxdb3/core/reference/glossary/#rfc3339-timestamp) with nanosecond precision. + enum: + - ns + - u + - µ + - ms + - s + - m + - h + type: string + pretty: + description: | + If true, the JSON response is formatted in a human-readable format. + type: boolean + required: + - q + parameters: + - name: Accept + in: header + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + - text/csv + required: false + description: | + The content type that the client can understand. + + If `text/csv` is specified, the `Content-type` response header is `application/csv` and the response is formatted as CSV. + + Returns an error if the format is invalid or non-UTF8. + responses: + '200': + description: | + Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + application/csv: + schema: + type: string + headers: + Content-Type: + description: | + The content type of the response. + Default is `application/json`. + + If the `Accept` request header is `application/csv` or `text/csv`, the `Content-type` response header is `application/csv` + and the response is formatted as CSV. + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + - Compatibility endpoints + /health: + get: + operationId: GetHealth + summary: Health check + description: Checks the status of the service. + responses: + '200': + description: Service is running. + '500': + description: Service is unavailable. + tags: + - Server information + /api/v1/health: + get: + operationId: GetHealthV1 + summary: Health check (v1) + description: Checks the status of the service. + responses: + '200': + description: Service is running. + '500': + description: Service is unavailable. + tags: + - Server information + - Compatibility endpoints + /ping: + get: + operationId: GetPing + tags: + - Server information + summary: Ping the server + description: Returns version information for the server. + responses: + '200': + description: Success. The response body contains server information. + content: + application/json: + schema: + example: + version: 0.1.0 + revision: f3d3d3d + /metrics: + get: + operationId: GetMetrics + summary: Metrics + description: Retrieves Prometheus-compatible server metrics. + responses: + '200': + description: Success. The response body contains Prometheus-compatible server metrics. + tags: + - Server information + /api/v3/configure/database: + get: + operationId: GetConfigureDatabase + summary: List databases + description: Retrieves a list of databases. + parameters: + - $ref: '#/components/parameters/formatRequired' + responses: + '200': + description: Success. The response body contains the list of databases. + content: + application/json: + schema: + $ref: '#/components/schemas/ShowDatabasesResponse' + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Database not found. + tags: + - Databases + post: + operationId: PostConfigureDatabase + summary: Create a database + description: Creates a new database in the system. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatabaseRequest' + responses: + '201': + description: Success. Database created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '409': + description: Database already exists. + tags: + - Databases + delete: + operationId: DeleteConfigureDatabase + summary: Delete a database + description: | + Soft deletes a database. + The database is scheduled for deletion and unavailable for querying. + parameters: + - $ref: '#/components/parameters/db' + responses: + '200': + description: Success. Database deleted. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Database not found. + tags: + - Databases + /api/v3/configure/table: + post: + operationId: PostConfigureTable + summary: Create a table + description: Creates a new table within a database. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTableRequest' + responses: + '201': + description: Success. The table has been created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Database not found. + tags: + - Tables + delete: + operationId: DeleteConfigureTable + summary: Delete a table + description: | + Soft deletes a table. + The table is scheduled for deletion and unavailable for querying. + parameters: + - $ref: '#/components/parameters/db' + - name: table + in: query + required: true + schema: + type: string + responses: + '200': + description: Success (no content). The table has been deleted. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Table not found. + tags: + - Tables + /api/v3/configure/distinct_cache: + post: + operationId: PostConfigureDistinctCache + summary: Create distinct cache + description: Creates a distinct cache for a table. + tags: + - Tables + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DistinctCacheCreateRequest' + responses: + '201': + description: Success. The distinct cache has been created. + '204': + description: Not created. A distinct cache with this configuration already exists. + '400': + description: | + Bad request. + + The server responds with status `400` if the request would overwrite an existing cache with a different configuration. + /api/v3/configure/last_cache: + post: + operationId: PostConfigureLastCache + summary: Create last cache + description: Creates a last cache for a table. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LastCacheCreateRequest' + responses: + '201': + description: Success. Last cache created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Cache not found. + '409': + description: Cache already exists. + tags: + - Tables + delete: + operationId: DeleteConfigureLastCache + summary: Delete last cache + description: Deletes a last cache. + parameters: + - $ref: '#/components/parameters/db' + - name: table + in: query + required: true + schema: + type: string + - name: name + in: query + required: true + schema: + type: string + responses: + '200': + description: Success. The last cache has been deleted. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Cache not found. + tags: + - Tables + /api/v3/configure/processing_engine_trigger: + post: + operationId: PostConfigureProcessingEngineTrigger + summary: Create processing engine trigger + description: Creates a new processing engine trigger. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessingEngineTriggerRequest' + responses: + '201': + description: Success. Processing engine trigger created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + delete: + operationId: DeleteConfigureProcessingEngineTrigger + summary: Delete processing engine trigger + description: Deletes a processing engine trigger. + parameters: + - $ref: '#/components/parameters/db' + - name: trigger_name + in: query + required: true + schema: + type: string + - name: force + in: query + required: false + schema: + type: boolean + default: false + responses: + '200': + description: Success. The processing engine trigger has been deleted. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + /api/v3/configure/processing_engine_trigger/disable: + post: + operationId: PostDisableProcessingEngineTrigger + summary: Disable processing engine trigger + description: Disables a processing engine trigger. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessingEngineTriggerRequest' + responses: + '200': + description: Success. The processing engine trigger has been disabled. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + /api/v3/configure/processing_engine_trigger/enable: + post: + operationId: PostEnableProcessingEngineTrigger + summary: Enable processing engine trigger + description: Enables a processing engine trigger. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessingEngineTriggerRequest' + responses: + '200': + description: Success. The processing engine trigger has been enabled. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + /api/v3/configure/plugin_environment/install_packages: + post: + operationId: PostInstallPluginPackages + summary: Install plugin packages + description: Installs packages for the plugin environment. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Success. The packages have been installed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + tags: + - Processing engine + /api/v3/configure/plugin_environment/install_requirements: + post: + operationId: PostInstallPluginRequirements + summary: Install plugin requirements + description: Installs requirements for the plugin environment. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Success. The requirements have been installed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + tags: + - Processing engine + /api/v3/plugin_test/wal: + post: + operationId: PostTestWALPlugin + summary: Test WAL plugin + description: Executes a test of a write-ahead logging (WAL) plugin. + responses: + '200': + description: Success. The plugin test has been executed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not enabled. + tags: + - Processing engine + /api/v3/plugin_test/schedule: + post: + operationId: PostTestSchedulingPlugin + summary: Test scheduling plugin + description: Executes a test of a scheduling plugin. + responses: + '200': + description: Success. The plugin test has been executed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not enabled. + tags: + - Processing engine + /api/v3/engine/{plugin_path}: + parameters: + - name: plugin_path + description: | + The path configured in the `trigger-spec` for the plugin. + + For example, if you define a trigger with the following: + + ``` + trigger-spec: "request:hello-world" + ``` + + then, the HTTP API exposes the following plugin endpoint: + + ``` + /api/v3/engine/hello-world + ``` + in: path + required: true + schema: + type: string + get: + operationId: GetProcessingEnginePluginRequest + summary: On Request processing engine plugin request + description: | + Sends a request to invoke an _On Request_ processing engine plugin. + The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin. + + An On Request plugin implements the following signature: + + ```python + def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None) + ``` + + The response depends on the plugin implementation. + responses: + '200': + description: Success. The plugin request has been executed. + '400': + description: Malformed request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not found. + '500': + description: Processing failure. + tags: + - Processing engine + post: + operationId: PostProcessingEnginePluginRequest + summary: On Request processing engine plugin request + description: | + Sends a request to invoke an _On Request_ processing engine plugin. + The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin. + + An On Request plugin implements the following signature: + + ```python + def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None) + ``` + + The response depends on the plugin implementation. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: false + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Success. The plugin request has been executed. + '400': + description: Malformed request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not found. + '500': + description: Processing failure. + tags: + - Processing engine +components: + parameters: + AcceptQueryHeader: + name: Accept + in: header + schema: + type: string + default: application/json + enum: + - application/json + - application/jsonl + - application/vnd.apache.parquet + - text/csv + required: false + description: | + The content type that the client can understand. + ContentEncoding: + name: Content-Encoding + in: header + description: | + The compression applied to the line protocol in the request payload. + To send a gzip payload, pass `Content-Encoding: gzip` header. + schema: + $ref: '#/components/schemas/ContentEncoding' + required: false + ContentLength: + name: Content-Length + in: header + description: | + The size of the entity-body, in bytes, sent to InfluxDB. + schema: + $ref: '#/components/schemas/ContentLength' + ContentType: + name: Content-Type + description: | + The format of the data in the request body. + in: header + schema: + type: string + enum: + - application/json + required: false + db: + name: db + in: query + required: true + schema: + type: string + description: | + The name of the database. + dbWriteParam: + name: db + in: query + required: true + schema: + type: string + description: | + The name of the database. + The name of the database. + InfluxDB creates the database if it doesn't already exist, and then + writes all points in the batch to the database. + dbQueryParam: + name: db + in: query + required: false + schema: + type: string + description: | + The name of the database. + + If you provide a query that specifies the database, you can omit the 'db' parameter from your request. + accept_partial: + name: accept_partial + in: query + required: false + schema: + $ref: '#/components/schemas/AcceptPartial' + compatibilityPrecisionParam: + name: precision + in: query + required: true + schema: + $ref: '#/components/schemas/PrecisionWriteCompatibility' + description: The precision for unix timestamps in the line protocol batch. + precisionParam: + name: precision + in: query + required: true + schema: + $ref: '#/components/schemas/PrecisionWrite' + description: The precision for unix timestamps in the line protocol batch. + querySqlParam: + name: q + in: query + required: true + schema: + type: string + format: SQL + description: | + The query to execute. + format: + name: format + in: query + required: false + schema: + $ref: '#/components/schemas/Format' + formatRequired: + name: format + in: query + required: true + schema: + $ref: '#/components/schemas/Format' + requestBodies: + lineProtocolRequestBody: + required: true + content: + text/plain: + schema: + type: string + examples: + line: + summary: Example line protocol + value: measurement,tag=value field=1 1234567890 + multiline: + summary: Example line protocol with UTF-8 characters + value: | + measurement,tag=value field=1 1234567890 + measurement,tag=value field=2 1234567900 + measurement,tag=value field=3 1234568000 + queryRequestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/QueryRequestObject' + schemas: + ContentEncoding: + type: string + enum: + - gzip + - identity + description: | + Content coding. + Use `gzip` for compressed data or `identity` for unmodified, uncompressed data. + default: identity + LineProtocol: + type: string + enum: + - text/plain + - text/plain; charset=utf-8 + description: | + `text/plain` is the content type for line protocol. `UTF-8` is the default character set. + default: text/plain; charset=utf-8 + ContentLength: + type: integer + description: The length in decimal number of octets. + Database: + type: string + AcceptPartial: + type: boolean + default: true + description: Accept partial writes. + Format: + type: string + enum: + - json + - csv + - parquet + - jsonl + description: | + The format of data in the response body. + NoSync: + type: boolean + default: false + description: | + Acknowledges a successful write without waiting for WAL persistence. + + #### Data flow in InfluxDB 3 Core + + 1. **Incoming writes**: The system validates incoming data and stores it in the write buffer (in memory). If the `no_sync` write option is enabled (`no_sync=true`), the server sends a response to acknowledge the write. + 2. **WAL flush**: Every second (default), the system flushes the write buffer to the Write-Ahead Log (WAL) for persistence in the Object store. If `no_sync=false` (default), the server sends a response to acknowledge the write. + 3. **Query availability**: After WAL persistence completes, data moves to the queryable buffer where it becomes available for queries. By default, the server keeps up to 900 WAL files (15 minutes of data) buffered. + 4. **Long-term storage in Parquet**: Every ten minutes (default), the system persists the oldest data from the queryable buffer to the Object store in Parquet format. InfluxDB keeps the remaining data (the most recent 5 minutes) in memory. + 5. **In-memory cache**: InfluxDB puts Parquet files into an in-memory cache so that queries against the most recently persisted data don't have to go to object storage. + PrecisionWriteCompatibility: + enum: + - ms + - s + - us + - ns + type: string + description: | + The precision for unix timestamps in the line protocol batch. + Use `ms` for milliseconds, `s` for seconds, `us` for microseconds, or `ns` for nanoseconds. + PrecisionWrite: + enum: + - auto + - millisecond + - second + - microsecond + - nanosecond + type: string + description: | + The precision for unix timestamps in the line protocol batch. + QueryRequestObject: + type: object + properties: + database: + description: | + The name of the database to query. + Required if the query (`query_str`) doesn't specify the database. + type: string + query_str: + description: The query to execute. + type: string + format: + description: The format of the query results. + type: string + enum: + - json + - csv + - parquet + - jsonl + - pretty + params: + description: | + Additional parameters for the query. + Use this field to pass query parameters. + type: object + additionalProperties: true + required: + - database + - query_str + example: + database: mydb + query_str: SELECT * FROM mytable + format: json + params: {} + CreateDatabaseRequest: + type: object + properties: + db: + type: string + required: + - db + CreateTableRequest: + type: object + properties: + db: + type: string + table: + type: string + tags: + type: array + items: + type: string + fields: + type: array + items: + type: object + properties: + name: + type: string + type: + type: string + enum: + - utf8 + - int64 + - uint64 + - float64 + - bool + required: + - name + - type + required: + - db + - table + - tags + DistinctCacheCreateRequest: + type: object + properties: + db: + type: string + table: + type: string + name: + type: string + description: Optional cache name. + columns: + type: array + items: + type: string + max_cardinality: + type: integer + description: Optional maximum cardinality. + max_age: + type: integer + description: Optional maximum age in seconds. + required: + - db + - table + - columns + example: + db: mydb + table: mytable + columns: + - tag1 + - tag2 + max_cardinality: 1000 + max_age: 3600 + LastCacheCreateRequest: + type: object + properties: + db: + type: string + table: + type: string + name: + type: string + description: Optional cache name. + key_columns: + type: array + items: + type: string + description: Optional list of key columns. + value_columns: + type: array + items: + type: string + description: Optional list of value columns. + count: + type: integer + description: Optional count. + ttl: + type: integer + description: Optional time-to-live in seconds. + required: + - db + - table + example: + db: mydb + table: mytable + key_columns: + - tag1 + value_columns: + - field1 + count: 100 + ttl: 3600 + ProcessingEngineTriggerRequest: + type: object + properties: + db: + type: string + plugin_filename: + type: string + trigger_name: + type: string + trigger_specification: + type: string + trigger_arguments: + type: object + additionalProperties: true + disabled: + type: boolean + required: + - db + - plugin_filename + - trigger_name + - trigger_specification + ShowDatabasesResponse: + type: object + properties: + databases: + type: array + items: + type: string + QueryResponse: + type: object + properties: + results: + type: array + items: + type: object + example: + results: + - series: + - name: mytable + columns: + - time + - value + values: + - - '2024-02-02T12:00:00Z' + - 42 + ErrorMessage: + type: object + properties: + error: + type: string + data: + type: object + nullable: true + LineProtocolError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - internal error + - not found + - conflict + - invalid + - empty value + - unavailable + readOnly: true + type: string + err: + description: Stack of errors that occurred during processing of the request. Useful for debugging. + readOnly: true + type: string + line: + description: First line in the request body that contains malformed data. + format: int32 + readOnly: true + type: integer + message: + description: Human-readable message. + readOnly: true + type: string + op: + description: Describes the logical code operation when the error occurred. Useful for debugging. + readOnly: true + type: string + required: + - code + EpochCompatibility: + description: | + A unix timestamp precision. + - `h` for hours + - `m` for minutes + - `s` for seconds + - `ms` for milliseconds + - `u` or `µ` for microseconds + - `ns` for nanoseconds + enum: + - ns + - u + - µ + - ms + - s + - m + - h + type: string + responses: + Unauthorized: + description: Unauthorized access. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + BadRequest: + description: | + Request failed. Possible reasons: + + - Invalid database name + - Malformed request body + - Invalid timestamp precision + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + Forbidden: + description: Access denied. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + NotFound: + description: Resource not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + securitySchemes: + BearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: | + _During Alpha release, an API token is not required._ + + A Bearer token for authentication. + + Provide the scheme and the API token in the `Authorization` header--for example: + + ```bash + curl http://localhost:8181/api/v3/query_influxql \ + --header "Authorization: Bearer API_TOKEN" + ``` +x-tagGroups: + - name: Using the InfluxDB HTTP API + tags: + - Quick start + - Authentication + - Common parameters + - Response codes + - Compatibility endpoints + - Data I/O + - Databases + - Processing engine + - Server information + - Tables diff --git a/api-docs/influxdb3/enterprise/v3/content/info.yml b/api-docs/influxdb3/enterprise/v3/content/info.yml new file mode 100644 index 000000000..75b1d1cc9 --- /dev/null +++ b/api-docs/influxdb3/enterprise/v3/content/info.yml @@ -0,0 +1,34 @@ +title: InfluxDB 3 Enterprise API Service +x-influxdata-short-title: InfluxDB 3 API +x-influxdata-version-matrix: + v1: Compatibility layer for InfluxDB 1.x clients (supported) + v2: Compatibility layer for InfluxDB 2.x clients (supported) + v3: Native API for InfluxDB 3.x (current) +x-influxdata-short-description: The InfluxDB 3 HTTP API provides a programmatic interface for interactions with InfluxDB, including writing, querying, and processing data, and managing an InfluxDB 3 instance. +description: | + The InfluxDB HTTP API for InfluxDB 3 Enterprise provides a programmatic interface for + interacting with InfluxDB 3 Enterprise databases and resources. + Use this API to: + + - Write data to InfluxDB 3 Enterprise databases + - Query data using SQL or InfluxQL + - Process data using Processing engine plugins + - Manage databases, tables, and Processing engine triggers + - Perform administrative tasks and access system information + + The API includes endpoints under the following paths: + - `/api/v3`: InfluxDB 3 Enterprise native endpoints + - `/`: Compatibility endpoints for InfluxDB v1 workloads and clients + - `/api/v2/write`: Compatibility endpoint for InfluxDB v2 workloads and clients + + +license: + name: MIT + url: 'https://opensource.org/licenses/MIT' +contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com \ No newline at end of file diff --git a/api-docs/influxdb3/enterprise/v3/content/servers.yml b/api-docs/influxdb3/enterprise/v3/content/servers.yml new file mode 100644 index 000000000..29f1a6e69 --- /dev/null +++ b/api-docs/influxdb3/enterprise/v3/content/servers.yml @@ -0,0 +1,8 @@ +- url: https://{baseurl} + description: InfluxDB 3 Enterprise API URL + variables: + baseurl: + enum: + - 'localhost:8181' + default: 'localhost:8181' + description: InfluxDB 3 Enterprise URL diff --git a/api-docs/influxdb3/enterprise/v3/content/tag-groups.yml b/api-docs/influxdb3/enterprise/v3/content/tag-groups.yml new file mode 100644 index 000000000..5289ddb33 --- /dev/null +++ b/api-docs/influxdb3/enterprise/v3/content/tag-groups.yml @@ -0,0 +1,12 @@ +- name: Using the InfluxDB HTTP API + tags: + - Quick start + - Authentication + - Common parameters + - Response codes + - Compatibility endpoints + - Data I/O + - Databases + - Processing engine + - Server information + - Tables diff --git a/api-docs/influxdb3/enterprise/v3/ref.yml b/api-docs/influxdb3/enterprise/v3/ref.yml new file mode 100644 index 000000000..e124d6775 --- /dev/null +++ b/api-docs/influxdb3/enterprise/v3/ref.yml @@ -0,0 +1,1792 @@ +openapi: 3.0.3 +info: + title: InfluxDB 3 Enterprise API Service + description: | + The InfluxDB HTTP API for InfluxDB 3 Enterprise provides a programmatic interface for + interacting with InfluxDB 3 Enterprise databases and resources. + Use this API to: + + - Write data to InfluxDB 3 Enterprise databases + - Query data using SQL or InfluxQL + - Process data using Processing engine plugins + - Manage databases, tables, and Processing engine triggers + - Perform administrative tasks and access system information + + The API includes endpoints under the following paths: + - `/api/v3`: InfluxDB 3 Enterprise native endpoints + - `/`: Compatibility endpoints for InfluxDB v1 workloads and clients + - `/api/v2/write`: Compatibility endpoint for InfluxDB v2 workloads and clients + + + version: '' + license: + name: MIT + url: https://opensource.org/licenses/MIT + contact: + name: InfluxData + url: https://www.influxdata.com + email: support@influxdata.com +servers: + - url: https://{baseurl} + description: InfluxDB 3 Enterprise API URL + variables: + baseurl: + enum: + - localhost:8181 + default: localhost:8181 + description: InfluxDB 3 Enterprise URL +security: + - BearerAuth: [] +tags: + - name: Authentication + description: | + During the initial Alpha phase, InfluxDB 3 Enterprise does not require authentication. + x-traitTag: true + - name: Compatibility endpoints + description: | + InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients. + + ### Write data using v1- or v2-compatible endpoints + + - [`/api/v2/write` endpoint](#operation/PostV2Write) + for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3. + - [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3. + + For new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP). + + All endpoints accept the same line protocol format. + + ### Query data + + Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL. + + For new workloads, use one of the following: + + - HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL. + - HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL. + - Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity). + + ### Server information + + Server information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients. + - name: Data I/O + description: | + Write and query data + + #### Data flow in InfluxDB 3 Enterprise + + 1. **Incoming writes**: The system validates incoming data and stores it in the write buffer (in memory). If the `no_sync` write option is enabled (`no_sync=true`), the server sends a response to acknowledge the write. + 2. **WAL flush**: Every second (default), the system flushes the write buffer to the Write-Ahead Log (WAL) for persistence in the Object store. If `no_sync=false` (default), the server sends a response to acknowledge the write. + 3. **Query availability**: After WAL persistence completes, data moves to the queryable buffer where it becomes available for queries. By default, the server keeps up to 900 WAL files (15 minutes of data) buffered. + 4. **Long-term storage in Parquet**: Every ten minutes (default), the system persists the oldest data from the queryable buffer to the Object store in Parquet format. InfluxDB keeps the remaining data (the most recent 5 minutes) in memory. + 5. **In-memory cache**: InfluxDB puts Parquet files into an in-memory cache so that queries against the most recently persisted data don't have to go to object storage. + - name: Databases + description: Create, read, update, and delete database and cache resources + - description: | + Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use. + + ### Common parameters + + The following table shows common parameters used by many InfluxDB API endpoints. + Many endpoints may require other parameters in the query string or in the + request body that perform functions specific to those endpoints. + + | Query parameter | Value type | Description | + |:------------------------ |:--------------------- |:-------------------------------------------| + | `db` | string | The database name | + + InfluxDB HTTP API endpoints use standard HTTP request and response headers. + The following table shows common headers used by many InfluxDB API endpoints. + Some endpoints may use other headers that perform functions more specific to those endpoints--for example, + the write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body. + + | Header | Value type | Description | + |:------------------------ |:--------------------- |:-------------------------------------------| + | `Accept` | string | The content type that the client can understand. | + | `Authorization` | string | The authorization scheme and credential. | + | `Content-Length` | integer | The size of the entity-body, in bytes. | + | `Content-Type` | string | The format of the data in the request body. | + name: Headers and parameters + x-traitTag: true + - name: Processing engine + description: | + Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins. + + InfluxDB 3 Enterprise provides the InfluxDB 3 Processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database. + Use Processing engine plugins and triggers to run code and perform tasks for different database events. + + To get started with the Processing engine, see the [Processing engine and Python plugins](/influxdb3/enterprise/processing-engine/) guide. + - name: Quick start + description: | + 1. [Check the status](#section/Server-information) of the InfluxDB server. + + ```bash + curl "http://localhost:8181/health" + ``` + + 2. [Write data](#section/Compatibility-endpoints/Write-data) to InfluxDB. + + ```bash + curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto" \ + --data-raw "home,room=Kitchen temp=72.0 + home,room=Living\ room temp=71.5" + ``` + + If all data is written, the response is `204 No Content`. + + 3. [Query data](#section/Compatibility-endpoints/Query-data) from InfluxDB. + + ```bash + curl -G "http://localhost:8181/api/v3/query_sql" \ + --data-urlencode "db=sensors" \ + --data-urlencode "q=SELECT * FROM home WHERE room='Living room'" \ + --data-urlencode "format=jsonl" + ``` + + Output: + + ```jsonl + {"room":"Living room","temp":71.5,"time":"2025-02-25T20:19:34.984098"} + ``` + + For more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide. + x-traitTag: true + - name: Server information + description: Retrieve server metrics, status, and version information + - name: Tables + description: Manage table schemas and data +paths: + /write: + post: + operationId: PostV1Write + summary: Write line protocol (v1-compatible) + description: | + Writes line protocol to the specified database. + + This endpoint provides backward compatibility for InfluxDB 1.x write workloads using tools such as InfluxDB 1.x client libraries, the Telegraf `outputs.influxdb` output plugin, or third-party tools. + + Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb3/enterprise/reference/syntax/line-protocol/) format to InfluxDB. + Use query parameters to specify options for writing data. + parameters: + - $ref: '#/components/parameters/dbWriteParam' + - $ref: '#/components/parameters/compatibilityPrecisionParam' + - name: Content-Type + in: header + description: | + The content type of the request payload. + schema: + $ref: '#/components/schemas/LineProtocol' + required: false + - name: Accept + in: header + description: | + The content type that the client can understand. + Writes only return a response body if they fail (partially or completely)--for example, + due to a syntax problem or type mismatch. + schema: + type: string + default: application/json + enum: + - application/json + required: false + - $ref: '#/components/parameters/ContentEncoding' + - $ref: '#/components/parameters/ContentLength' + requestBody: + $ref: '#/components/requestBodies/lineProtocolRequestBody' + responses: + '204': + description: Success ("No Content"). All data in the batch is written and queryable. + '400': + description: | + Bad request. Some (a _partial write_) or all of the data from the batch was rejected and not written. + If a partial write occurred, then some points from the batch are written and queryable. + + The response body: + - indicates if a partial write occurred or all data was rejected. + - contains details about the [rejected points](/influxdb3/enterprise/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points. + content: + application/json: + examples: + rejectedAllPoints: + summary: Rejected all points in the batch + value: | + { + "error": "write of line protocol failed", + "data": [ + { + "original_line": "dquote> home,room=Kitchen temp=hi", + "line_number": 2, + "error_message": "No fields were provided" + } + ] + } + partialWriteErrorWithRejectedPoints: + summary: Partial write rejected some points in the batch + value: | + { + "error": "partial write of line protocol occurred", + "data": [ + { + "original_line": "dquote> home,room=Kitchen temp=hi", + "line_number": 2, + "error_message": "No fields were provided" + } + ] + } + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '413': + description: Request entity too large. + tags: + - Compatibility endpoints + - Data I/O + /api/v2/write: + post: + operationId: PostV2Write + summary: Write line protocol (v2-compatible) + description: | + Writes line protocol to the specified database. + + This endpoint provides backward compatibility for InfluxDB 2.x write workloads using tools such as InfluxDB 2.x client libraries, the Telegraf `outputs.influxdb_v2` output plugin, or third-party tools. + + Use this endpoint to send data in [line protocol](/influxdb3/enterprise/reference/syntax/line-protocol/) format to InfluxDB. + Use query parameters to specify options for writing data. + parameters: + - name: Content-Type + in: header + description: | + The content type of the request payload. + schema: + $ref: '#/components/schemas/LineProtocol' + required: false + - description: | + The compression applied to the line protocol in the request payload. + To send a gzip payload, pass `Content-Encoding: gzip` header. + in: header + name: Content-Encoding + schema: + default: identity + description: | + Content coding. + Use `gzip` for compressed data or `identity` for unmodified, uncompressed data. + enum: + - gzip + - identity + type: string + - description: | + The size of the entity-body, in bytes, sent to InfluxDB. + in: header + name: Content-Length + schema: + description: The length in decimal number of octets. + type: integer + - description: | + The content type that the client can understand. + Writes only return a response body if they fail (partially or completely)--for example, + due to a syntax problem or type mismatch. + in: header + name: Accept + schema: + default: application/json + description: Error content type. + enum: + - application/json + type: string + - name: db + in: query + required: true + schema: + type: string + description: | + A database name. + InfluxDB creates the database if it doesn't already exist, and then + writes all points in the batch to the database. + - name: accept_partial + in: query + required: false + schema: + $ref: '#/components/schemas/AcceptPartial' + - $ref: '#/components/parameters/compatibilityPrecisionParam' + requestBody: + $ref: '#/components/requestBodies/lineProtocolRequestBody' + responses: + '204': + description: Success ("No Content"). All data in the batch is written and queryable. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '413': + description: Request entity too large. + tags: + - Compatibility endpoints + - Data I/O + /api/v3/write_lp: + post: + operationId: PostWriteLP + summary: Write line protocol + description: | + Writes line protocol to the specified database. + + Use this endpoint to send data in [line protocol](/influxdb3/enterprise/reference/syntax/line-protocol/) format to InfluxDB. + Use query parameters to specify options for writing data. + parameters: + - $ref: '#/components/parameters/dbWriteParam' + - $ref: '#/components/parameters/accept_partial' + - name: precision + in: query + required: true + schema: + $ref: '#/components/schemas/PrecisionWrite' + description: Precision of timestamps. + - name: no_sync + in: query + schema: + $ref: '#/components/schemas/NoSync' + - name: Content-Type + in: header + description: | + The content type of the request payload. + schema: + $ref: '#/components/schemas/LineProtocol' + required: false + - name: Accept + in: header + description: | + The content type that the client can understand. + Writes only return a response body if they fail (partially or completely)--for example, + due to a syntax problem or type mismatch. + schema: + type: string + default: application/json + enum: + - application/json + required: false + - $ref: '#/components/parameters/ContentEncoding' + - $ref: '#/components/parameters/ContentLength' + requestBody: + $ref: '#/components/requestBodies/lineProtocolRequestBody' + responses: + '204': + description: Success ("No Content"). All data in the batch is written and queryable. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '413': + description: Request entity too large. + '422': + description: Unprocessable entity. + tags: + - Data I/O + /api/v3/query_sql: + get: + operationId: GetExecuteQuerySQL + summary: Execute SQL query + description: Executes an SQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/db' + - name: q + in: query + required: true + schema: + type: string + - name: format + in: query + required: false + schema: + type: string + - $ref: '#/components/parameters/AcceptQueryHeader' + - $ref: '#/components/parameters/ContentType' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + example: + results: + - series: + - name: mytable + columns: + - time + - value + values: + - - '2024-02-02T12:00:00Z' + - 42 + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + post: + operationId: PostExecuteQuerySQL + summary: Execute SQL query + description: Executes an SQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/AcceptQueryHeader' + - $ref: '#/components/parameters/ContentType' + requestBody: + $ref: '#/components/requestBodies/queryRequestBody' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + /api/v3/query_influxql: + get: + operationId: GetExecuteInfluxQLQuery + summary: Execute InfluxQL query + description: Executes an InfluxQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/dbQueryParam' + - name: q + in: query + required: true + schema: + type: string + - name: format + in: query + required: false + schema: + type: string + - $ref: '#/components/parameters/AcceptQueryHeader' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + post: + operationId: PostExecuteQueryInfluxQL + summary: Execute InfluxQL query + description: Executes an InfluxQL query to retrieve data from the specified database. + parameters: + - $ref: '#/components/parameters/AcceptQueryHeader' + - $ref: '#/components/parameters/ContentType' + requestBody: + $ref: '#/components/requestBodies/queryRequestBody' + responses: + '200': + description: Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + text/csv: + schema: + type: string + application/vnd.apache.parquet: + schema: + type: string + application/jsonl: + schema: + type: string + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + /query: + get: + operationId: GetV1ExecuteQuery + summary: Execute InfluxQL query (v1-compatible) + description: | + Executes an InfluxQL query to retrieve data from the specified database. + + This endpoint is compatible with InfluxDB 1.x client libraries and third-party integrations such as Grafana. + Use query parameters to specify the database and the InfluxQL query. + parameters: + - name: Accept + in: header + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + - text/csv + required: false + description: | + The content type that the client can understand. + + If `text/csv` is specified, the `Content-type` response header is `application/csv` and the response is formatted as CSV. + + Returns an error if the format is invalid or non-UTF8. + - in: query + name: chunked + description: | + If true, the response is divided into chunks of size `chunk_size`. + schema: + type: boolean + default: false + - in: query + name: chunk_size + description: | + The number of records that will go into a chunk. + This parameter is only used if `chunked=true`. + schema: + type: integer + default: 10000 + - in: query + name: db + description: The database to query. If not provided, the InfluxQL query string must specify the database. + schema: + type: string + format: InfluxQL + - in: query + name: pretty + description: | + If true, the JSON response is formatted in a human-readable format. + schema: + type: boolean + default: false + - in: query + name: q + description: The InfluxQL query string. + required: true + schema: + type: string + - name: epoch + description: | + Formats timestamps as [unix (epoch) timestamps](/influxdb3/enterprise/reference/glossary/#unix-timestamp) with the specified precision + instead of [RFC3339 timestamps](/influxdb3/enterprise/reference/glossary/#rfc3339-timestamp) with nanosecond precision. + in: query + schema: + $ref: '#/components/schemas/EpochCompatibility' + responses: + '200': + description: | + Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + application/csv: + schema: + type: string + headers: + Content-Type: + description: | + The content type of the response. + Default is `application/json`. + + If the `Accept` request header is `application/csv` or `text/csv`, the `Content-type` response header is `application/csv` + and the response is formatted as CSV. + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + - Compatibility endpoints + post: + operationId: PostExecuteV1Query + summary: Execute InfluxQL query (v1-compatible) + description: Executes an InfluxQL query to retrieve data from the specified database. + requestBody: + content: + application/json: + schema: + type: object + properties: + db: + type: string + description: The database to query. If not provided, the InfluxQL query string must specify the database. + q: + description: The InfluxQL query string. + type: string + chunked: + description: | + If true, the response is divided into chunks of size `chunk_size`. + type: boolean + chunk_size: + description: | + The number of records that will go into a chunk. + This parameter is only used if `chunked=true`. + type: integer + default: 10000 + epoch: + description: | + A unix timestamp precision. + + - `h` for hours + - `m` for minutes + - `s` for seconds + - `ms` for milliseconds + - `u` or `µ` for microseconds + - `ns` for nanoseconds + + Formats timestamps as [unix (epoch) timestamps](/influxdb3/enterprise/reference/glossary/#unix-timestamp) with the specified precision + instead of [RFC3339 timestamps](/influxdb3/enterprise/reference/glossary/#rfc3339-timestamp) with nanosecond precision. + enum: + - ns + - u + - µ + - ms + - s + - m + - h + type: string + pretty: + description: | + If true, the JSON response is formatted in a human-readable format. + type: boolean + required: + - q + parameters: + - name: Accept + in: header + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + - text/csv + required: false + description: | + The content type that the client can understand. + + If `text/csv` is specified, the `Content-type` response header is `application/csv` and the response is formatted as CSV. + + Returns an error if the format is invalid or non-UTF8. + responses: + '200': + description: | + Success. The response body contains query results. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + application/csv: + schema: + type: string + headers: + Content-Type: + description: | + The content type of the response. + Default is `application/json`. + + If the `Accept` request header is `application/csv` or `text/csv`, the `Content-type` response header is `application/csv` + and the response is formatted as CSV. + schema: + type: string + default: application/json + enum: + - application/json + - application/csv + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '403': + description: Access denied. + '404': + description: Database not found. + '405': + description: Method not allowed. + '422': + description: Unprocessable entity. + tags: + - Data I/O + - Compatibility endpoints + /health: + get: + operationId: GetHealth + summary: Health check + description: Checks the status of the service. + responses: + '200': + description: Service is running. + '500': + description: Service is unavailable. + tags: + - Server information + /api/v1/health: + get: + operationId: GetHealthV1 + summary: Health check (v1) + description: Checks the status of the service. + responses: + '200': + description: Service is running. + '500': + description: Service is unavailable. + tags: + - Server information + - Compatibility endpoints + /ping: + get: + operationId: GetPing + tags: + - Server information + summary: Ping the server + description: Returns version information for the server. + responses: + '200': + description: Success. The response body contains server information. + content: + application/json: + schema: + example: + version: 0.1.0 + revision: f3d3d3d + /metrics: + get: + operationId: GetMetrics + summary: Metrics + description: Retrieves Prometheus-compatible server metrics. + responses: + '200': + description: Success. The response body contains Prometheus-compatible server metrics. + tags: + - Server information + /api/v3/configure/database: + get: + operationId: GetConfigureDatabase + summary: List databases + description: Retrieves a list of databases. + parameters: + - $ref: '#/components/parameters/formatRequired' + responses: + '200': + description: Success. The response body contains the list of databases. + content: + application/json: + schema: + $ref: '#/components/schemas/ShowDatabasesResponse' + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Database not found. + tags: + - Databases + post: + operationId: PostConfigureDatabase + summary: Create a database + description: Creates a new database in the system. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatabaseRequest' + responses: + '201': + description: Success. Database created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '409': + description: Database already exists. + tags: + - Databases + delete: + operationId: DeleteConfigureDatabase + summary: Delete a database + description: | + Soft deletes a database. + The database is scheduled for deletion and unavailable for querying. + parameters: + - $ref: '#/components/parameters/db' + responses: + '200': + description: Success. Database deleted. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Database not found. + tags: + - Databases + /api/v3/configure/table: + post: + operationId: PostConfigureTable + summary: Create a table + description: Creates a new table within a database. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTableRequest' + responses: + '201': + description: Success. The table has been created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Database not found. + tags: + - Tables + delete: + operationId: DeleteConfigureTable + summary: Delete a table + description: | + Soft deletes a table. + The table is scheduled for deletion and unavailable for querying. + parameters: + - $ref: '#/components/parameters/db' + - name: table + in: query + required: true + schema: + type: string + responses: + '200': + description: Success (no content). The table has been deleted. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Table not found. + tags: + - Tables + /api/v3/configure/distinct_cache: + post: + operationId: PostConfigureDistinctCache + summary: Create distinct cache + description: Creates a distinct cache for a table. + tags: + - Tables + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DistinctCacheCreateRequest' + responses: + '201': + description: Success. The distinct cache has been created. + '204': + description: Not created. A distinct cache with this configuration already exists. + '400': + description: | + Bad request. + + The server responds with status `400` if the request would overwrite an existing cache with a different configuration. + /api/v3/configure/last_cache: + post: + operationId: PostConfigureLastCache + summary: Create last cache + description: Creates a last cache for a table. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LastCacheCreateRequest' + responses: + '201': + description: Success. Last cache created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Cache not found. + '409': + description: Cache already exists. + tags: + - Tables + delete: + operationId: DeleteConfigureLastCache + summary: Delete last cache + description: Deletes a last cache. + parameters: + - $ref: '#/components/parameters/db' + - name: table + in: query + required: true + schema: + type: string + - name: name + in: query + required: true + schema: + type: string + responses: + '200': + description: Success. The last cache has been deleted. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Cache not found. + tags: + - Tables + /api/v3/configure/processing_engine_trigger: + post: + operationId: PostConfigureProcessingEngineTrigger + summary: Create processing engine trigger + description: Creates a new processing engine trigger. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessingEngineTriggerRequest' + responses: + '201': + description: Success. Processing engine trigger created. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + delete: + operationId: DeleteConfigureProcessingEngineTrigger + summary: Delete processing engine trigger + description: Deletes a processing engine trigger. + parameters: + - $ref: '#/components/parameters/db' + - name: trigger_name + in: query + required: true + schema: + type: string + - name: force + in: query + required: false + schema: + type: boolean + default: false + responses: + '200': + description: Success. The processing engine trigger has been deleted. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + /api/v3/configure/processing_engine_trigger/disable: + post: + operationId: PostDisableProcessingEngineTrigger + summary: Disable processing engine trigger + description: Disables a processing engine trigger. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessingEngineTriggerRequest' + responses: + '200': + description: Success. The processing engine trigger has been disabled. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + /api/v3/configure/processing_engine_trigger/enable: + post: + operationId: PostEnableProcessingEngineTrigger + summary: Enable processing engine trigger + description: Enables a processing engine trigger. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessingEngineTriggerRequest' + responses: + '200': + description: Success. The processing engine trigger has been enabled. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Trigger not found. + tags: + - Processing engine + /api/v3/configure/plugin_environment/install_packages: + post: + operationId: PostInstallPluginPackages + summary: Install plugin packages + description: Installs packages for the plugin environment. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Success. The packages have been installed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + tags: + - Processing engine + /api/v3/configure/plugin_environment/install_requirements: + post: + operationId: PostInstallPluginRequirements + summary: Install plugin requirements + description: Installs requirements for the plugin environment. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Success. The requirements have been installed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + tags: + - Processing engine + /api/v3/plugin_test/wal: + post: + operationId: PostTestWALPlugin + summary: Test WAL plugin + description: Executes a test of a write-ahead logging (WAL) plugin. + responses: + '200': + description: Success. The plugin test has been executed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not enabled. + tags: + - Processing engine + /api/v3/plugin_test/schedule: + post: + operationId: PostTestSchedulingPlugin + summary: Test scheduling plugin + description: Executes a test of a scheduling plugin. + responses: + '200': + description: Success. The plugin test has been executed. + '400': + description: Bad request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not enabled. + tags: + - Processing engine + /api/v3/engine/{plugin_path}: + parameters: + - name: plugin_path + description: | + The path configured in the `trigger-spec` for the plugin. + + For example, if you define a trigger with the following: + + ``` + trigger-spec: "request:hello-world" + ``` + + then, the HTTP API exposes the following plugin endpoint: + + ``` + /api/v3/engine/hello-world + ``` + in: path + required: true + schema: + type: string + get: + operationId: GetProcessingEnginePluginRequest + summary: On Request processing engine plugin request + description: | + Sends a request to invoke an _On Request_ processing engine plugin. + The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin. + + An On Request plugin implements the following signature: + + ```python + def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None) + ``` + + The response depends on the plugin implementation. + responses: + '200': + description: Success. The plugin request has been executed. + '400': + description: Malformed request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not found. + '500': + description: Processing failure. + tags: + - Processing engine + post: + operationId: PostProcessingEnginePluginRequest + summary: On Request processing engine plugin request + description: | + Sends a request to invoke an _On Request_ processing engine plugin. + The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin. + + An On Request plugin implements the following signature: + + ```python + def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None) + ``` + + The response depends on the plugin implementation. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + required: false + content: + application/json: + schema: + type: object + additionalProperties: true + responses: + '200': + description: Success. The plugin request has been executed. + '400': + description: Malformed request. + '401': + $ref: '#/components/responses/Unauthorized' + '404': + description: Plugin not found. + '500': + description: Processing failure. + tags: + - Processing engine +components: + parameters: + AcceptQueryHeader: + name: Accept + in: header + schema: + type: string + default: application/json + enum: + - application/json + - application/jsonl + - application/vnd.apache.parquet + - text/csv + required: false + description: | + The content type that the client can understand. + ContentEncoding: + name: Content-Encoding + in: header + description: | + The compression applied to the line protocol in the request payload. + To send a gzip payload, pass `Content-Encoding: gzip` header. + schema: + $ref: '#/components/schemas/ContentEncoding' + required: false + ContentLength: + name: Content-Length + in: header + description: | + The size of the entity-body, in bytes, sent to InfluxDB. + schema: + $ref: '#/components/schemas/ContentLength' + ContentType: + name: Content-Type + description: | + The format of the data in the request body. + in: header + schema: + type: string + enum: + - application/json + required: false + db: + name: db + in: query + required: true + schema: + type: string + description: | + The name of the database. + dbWriteParam: + name: db + in: query + required: true + schema: + type: string + description: | + The name of the database. + The name of the database. + InfluxDB creates the database if it doesn't already exist, and then + writes all points in the batch to the database. + dbQueryParam: + name: db + in: query + required: false + schema: + type: string + description: | + The name of the database. + + If you provide a query that specifies the database, you can omit the 'db' parameter from your request. + accept_partial: + name: accept_partial + in: query + required: false + schema: + $ref: '#/components/schemas/AcceptPartial' + compatibilityPrecisionParam: + name: precision + in: query + required: true + schema: + $ref: '#/components/schemas/PrecisionWriteCompatibility' + description: The precision for unix timestamps in the line protocol batch. + precisionParam: + name: precision + in: query + required: true + schema: + $ref: '#/components/schemas/PrecisionWrite' + description: The precision for unix timestamps in the line protocol batch. + querySqlParam: + name: q + in: query + required: true + schema: + type: string + format: SQL + description: | + The query to execute. + format: + name: format + in: query + required: false + schema: + $ref: '#/components/schemas/Format' + formatRequired: + name: format + in: query + required: true + schema: + $ref: '#/components/schemas/Format' + requestBodies: + lineProtocolRequestBody: + required: true + content: + text/plain: + schema: + type: string + examples: + line: + summary: Example line protocol + value: measurement,tag=value field=1 1234567890 + multiline: + summary: Example line protocol with UTF-8 characters + value: | + measurement,tag=value field=1 1234567890 + measurement,tag=value field=2 1234567900 + measurement,tag=value field=3 1234568000 + queryRequestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/QueryRequestObject' + schemas: + ContentEncoding: + type: string + enum: + - gzip + - identity + description: | + Content coding. + Use `gzip` for compressed data or `identity` for unmodified, uncompressed data. + default: identity + LineProtocol: + type: string + enum: + - text/plain + - text/plain; charset=utf-8 + description: | + `text/plain` is the content type for line protocol. `UTF-8` is the default character set. + default: text/plain; charset=utf-8 + ContentLength: + type: integer + description: The length in decimal number of octets. + Database: + type: string + AcceptPartial: + type: boolean + default: true + description: Accept partial writes. + Format: + type: string + enum: + - json + - csv + - parquet + - jsonl + description: | + The format of data in the response body. + NoSync: + type: boolean + default: false + description: | + Acknowledges a successful write without waiting for WAL persistence. + + #### Data flow in InfluxDB 3 Enterprise + + 1. **Incoming writes**: The system validates incoming data and stores it in the write buffer (in memory). If the `no_sync` write option is enabled (`no_sync=true`), the server sends a response to acknowledge the write. + 2. **WAL flush**: Every second (default), the system flushes the write buffer to the Write-Ahead Log (WAL) for persistence in the Object store. If `no_sync=false` (default), the server sends a response to acknowledge the write. + 3. **Query availability**: After WAL persistence completes, data moves to the queryable buffer where it becomes available for queries. By default, the server keeps up to 900 WAL files (15 minutes of data) buffered. + 4. **Long-term storage in Parquet**: Every ten minutes (default), the system persists the oldest data from the queryable buffer to the Object store in Parquet format. InfluxDB keeps the remaining data (the most recent 5 minutes) in memory. + 5. **In-memory cache**: InfluxDB puts Parquet files into an in-memory cache so that queries against the most recently persisted data don't have to go to object storage. + PrecisionWriteCompatibility: + enum: + - ms + - s + - us + - ns + type: string + description: | + The precision for unix timestamps in the line protocol batch. + Use `ms` for milliseconds, `s` for seconds, `us` for microseconds, or `ns` for nanoseconds. + PrecisionWrite: + enum: + - auto + - millisecond + - second + - microsecond + - nanosecond + type: string + description: | + The precision for unix timestamps in the line protocol batch. + QueryRequestObject: + type: object + properties: + database: + description: | + The name of the database to query. + Required if the query (`query_str`) doesn't specify the database. + type: string + query_str: + description: The query to execute. + type: string + format: + description: The format of the query results. + type: string + enum: + - json + - csv + - parquet + - jsonl + - pretty + params: + description: | + Additional parameters for the query. + Use this field to pass query parameters. + type: object + additionalProperties: true + required: + - database + - query_str + example: + database: mydb + query_str: SELECT * FROM mytable + format: json + params: {} + CreateDatabaseRequest: + type: object + properties: + db: + type: string + required: + - db + CreateTableRequest: + type: object + properties: + db: + type: string + table: + type: string + tags: + type: array + items: + type: string + fields: + type: array + items: + type: object + properties: + name: + type: string + type: + type: string + enum: + - utf8 + - int64 + - uint64 + - float64 + - bool + required: + - name + - type + required: + - db + - table + - tags + DistinctCacheCreateRequest: + type: object + properties: + db: + type: string + table: + type: string + name: + type: string + description: Optional cache name. + columns: + type: array + items: + type: string + max_cardinality: + type: integer + description: Optional maximum cardinality. + max_age: + type: integer + description: Optional maximum age in seconds. + required: + - db + - table + - columns + example: + db: mydb + table: mytable + columns: + - tag1 + - tag2 + max_cardinality: 1000 + max_age: 3600 + LastCacheCreateRequest: + type: object + properties: + db: + type: string + table: + type: string + name: + type: string + description: Optional cache name. + key_columns: + type: array + items: + type: string + description: Optional list of key columns. + value_columns: + type: array + items: + type: string + description: Optional list of value columns. + count: + type: integer + description: Optional count. + ttl: + type: integer + description: Optional time-to-live in seconds. + required: + - db + - table + example: + db: mydb + table: mytable + key_columns: + - tag1 + value_columns: + - field1 + count: 100 + ttl: 3600 + ProcessingEngineTriggerRequest: + type: object + properties: + db: + type: string + plugin_filename: + type: string + trigger_name: + type: string + trigger_specification: + type: string + trigger_arguments: + type: object + additionalProperties: true + disabled: + type: boolean + required: + - db + - plugin_filename + - trigger_name + - trigger_specification + ShowDatabasesResponse: + type: object + properties: + databases: + type: array + items: + type: string + QueryResponse: + type: object + properties: + results: + type: array + items: + type: object + example: + results: + - series: + - name: mytable + columns: + - time + - value + values: + - - '2024-02-02T12:00:00Z' + - 42 + ErrorMessage: + type: object + properties: + error: + type: string + data: + type: object + nullable: true + LineProtocolError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - internal error + - not found + - conflict + - invalid + - empty value + - unavailable + readOnly: true + type: string + err: + description: Stack of errors that occurred during processing of the request. Useful for debugging. + readOnly: true + type: string + line: + description: First line in the request body that contains malformed data. + format: int32 + readOnly: true + type: integer + message: + description: Human-readable message. + readOnly: true + type: string + op: + description: Describes the logical code operation when the error occurred. Useful for debugging. + readOnly: true + type: string + required: + - code + EpochCompatibility: + description: | + A unix timestamp precision. + - `h` for hours + - `m` for minutes + - `s` for seconds + - `ms` for milliseconds + - `u` or `µ` for microseconds + - `ns` for nanoseconds + enum: + - ns + - u + - µ + - ms + - s + - m + - h + type: string + responses: + Unauthorized: + description: Unauthorized access. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + BadRequest: + description: | + Request failed. Possible reasons: + + - Invalid database name + - Malformed request body + - Invalid timestamp precision + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + Forbidden: + description: Access denied. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + NotFound: + description: Resource not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + securitySchemes: + BearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: | + _During Alpha release, an API token is not required._ + + A Bearer token for authentication. + + Provide the scheme and the API token in the `Authorization` header--for example: + + ```bash + curl http://localhost:8181/api/v3/query_influxql \ + --header "Authorization: Bearer API_TOKEN" + ``` +x-tagGroups: + - name: Using the InfluxDB HTTP API + tags: + - Quick start + - Authentication + - Common parameters + - Response codes + - Compatibility endpoints + - Data I/O + - Databases + - Processing engine + - Server information + - Tables diff --git a/api-docs/openapi/plugins/decorators/set-info.js b/api-docs/openapi/plugins/decorators/set-info.js index db899f33b..b61131a0c 100644 --- a/api-docs/openapi/plugins/decorators/set-info.js +++ b/api-docs/openapi/plugins/decorators/set-info.js @@ -16,6 +16,10 @@ function SetInfo(data) { } if(data.hasOwnProperty('summary')) { info.summary = data.summary; + } else { + // Remove summary if not provided. + // info.summary isn't a valid OpenAPI 3.0 property, but it's used by Redocly. + info['summary'] = undefined; } if(data.hasOwnProperty('description')) { info.description = data.description; @@ -23,6 +27,9 @@ function SetInfo(data) { if(data.hasOwnProperty('license')) { info.license = data.license; } + if(data.hasOwnProperty('contact')) { + info.contact = data.contact; + } } } } diff --git a/api-docs/package.json b/api-docs/package.json index 1e81d828d..038861462 100755 --- a/api-docs/package.json +++ b/api-docs/package.json @@ -6,5 +6,8 @@ "license": "MIT", "dependencies": { "js-yaml": "^4.1.0" + }, + "devDependencies": { + "spectral": "^0.0.0" } } diff --git a/api-docs/template.hbs b/api-docs/template.hbs index 5dde01912..bc363affe 100755 --- a/api-docs/template.hbs +++ b/api-docs/template.hbs @@ -1,59 +1,118 @@ - - - - - + + + + - - {{title}} - - - + + {{title}} + + + - + - - {{#unless disableGoogleFont}}{{/unless}} - {{{redocHead}}} - - + + {{#unless disableGoogleFont}}{{/unless}} + {{{redocHead}}} + + + - - - - -
-
-
- - {{{redocHTML}}} - - + + {{! }} + + + +
+
+
+ + {{{redocHTML}}} + + - + \ No newline at end of file diff --git a/api-docs/yarn.lock b/api-docs/yarn.lock index 0c46add62..5862cbfa6 100644 --- a/api-docs/yarn.lock +++ b/api-docs/yarn.lock @@ -2,14 +2,90 @@ # yarn lockfile v1 +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== + argparse@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +chalk@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +commander@^2.8.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +extend@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-2.0.2.tgz#1b74985400171b85554894459c978de6ef453ab7" + integrity sha512-AgFD4VU+lVLP6vjnlNfF7OeInLTyeyckCNPEsuxz1vi786UuK/nk6ynPuhn/h+Ju9++TQyr5EpLRI14fc1QtTQ== + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== + dependencies: + ansi-regex "^2.0.0" + js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" + +moment@^2.10.3: + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== + +spectral@^0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/spectral/-/spectral-0.0.0.tgz#a244b28c0726a7907374ad39c58024f934b9e8a1" + integrity sha512-tJamrVCLdpHt3geQn9ypWLlcS7K02+TZV5hj1bnPjGcjQs5N0dtxzJVitcmHbR9tZQgjwj2hAO1f8v1fzzwF1Q== + dependencies: + chalk "^1.0.0" + commander "^2.8.1" + extend "^2.0.1" + moment "^2.10.3" + string-etc "^0.2.0" + +string-etc@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/string-etc/-/string-etc-0.2.0.tgz#a0f84a2d8816082266384a3c7229acbb8064eda5" + integrity sha512-J9RfI2DvBDlnISBhfOBOAXPFxE4cpEgNC6zJTjULmagQaMuu2sYrE44H8h5Paxf3Bm9Wcer92DJv9n77OAHIRg== + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== + dependencies: + ansi-regex "^2.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== diff --git a/assets/js/ask-ai.js b/assets/js/ask-ai.js index 71c726700..292fb0a4c 100644 --- a/assets/js/ask-ai.js +++ b/assets/js/ask-ai.js @@ -19,6 +19,7 @@ function initializeChat({onChatLoad, chatAttributes}) { * available configuration options. * All values are strings. */ + // If you make changes to data attributes here, you also need to port the changes to the api-docs/template.hbs API reference template. const requiredAttributes = { websiteId: 'a02bca75-1dd3-411e-95c0-79ee1139be4d', projectName: 'InfluxDB', @@ -27,6 +28,7 @@ function initializeChat({onChatLoad, chatAttributes}) { } const optionalAttributes = { + modalDisclaimer: 'This AI can access [documentation for InfluxDB, clients, and related tools](https://docs.influxdata.com). Information you submit is used in accordance with our [Privacy Policy](https://www.influxdata.com/legal/privacy-policy/).', modalExampleQuestions: 'Use Python to write data to InfluxDB 3,How do I query using SQL?,How do I use MQTT with Telegraf?', buttonHide: 'true', diff --git a/compose.yaml b/compose.yaml index be18df40b..1b51376e5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -84,6 +84,9 @@ services: - type: volume source: test-content target: /app/content + - type: bind + source: ./test/shared/influxdb-templates + target: /root/influxdb-templates working_dir: /app cloud-dedicated-pytest: container_name: cloud-dedicated-pytest @@ -245,6 +248,68 @@ services: source: test-content target: /app/content working_dir: /app + influxdb3-core-pytest: + container_name: influxdb3-core-pytest + image: influxdata/docs-pytest + build: + context: . + dockerfile: Dockerfile.pytest + entrypoint: + - /bin/bash + - /src/test/scripts/run-tests.sh + - pytest + command: + # In the command, pass file paths to test. + # The container preprocesses the files for testing and runs the tests. + - content/influxdb3/core/**/*.md + - content/shared/**/*.md + environment: + - CONTENT_PATH=content/influxdb3/core + profiles: + - test + - influxdb3 + stdin_open: true + tty: true + volumes: + # Site configuration files. + - type: bind + source: . + target: /src + read_only: true + # Files shared between host and container and writeable by both. + - type: bind + source: ./test/shared + target: /shared + - type: bind + source: ./content/influxdb3/core/.env.test + target: /app/.env.test + read_only: true + # In your code samples, use `/app/data/` or `data/` to access sample data files from the `static/downloads` directory. + - type: bind + source: ./static/downloads + target: /app/data + read_only: true + # In your code samples, use `/app/iot-starter` to store example modules or project files. + - type: volume + source: influxdb3-core-tmp + target: /app/iot-starter + # Target directory for the content under test. + # Files are copied from /src/content/ to /app/content/ before running tests. + - type: volume + source: test-content + target: /app/content + working_dir: /app + influxdb3-core: + container_name: influxdb3-core + image: quay.io/influxdb/influxdb3-core:latest + ports: + - 8181:8181 + command: + - serve + - --node-id=sensors_node0 + - --log-filter=debug + - --object-store=file + - --data-dir=/var/lib/influxdb3 telegraf-pytest: container_name: telegraf-pytest image: influxdata/docs-pytest diff --git a/content/enterprise_influxdb/v1/tools/api.md b/content/enterprise_influxdb/v1/tools/api.md index ce9e4d312..35bfa24b0 100644 --- a/content/enterprise_influxdb/v1/tools/api.md +++ b/content/enterprise_influxdb/v1/tools/api.md @@ -162,7 +162,7 @@ curl -XGET "localhost:8086/health" ### `/api/v2/buckets/` HTTP endpoint -The [/api/v2/buckets](/influxdb/latest/api/#tag/Buckets) endpoint accepts `GET`, `POST` and `DELETE` HTTP requests. Use this endpoint to [create](/influxdb/latest/api/#operation/PostBuckets), [delete](/influxdb/latest/api/#operation/DeleteBucketsID), [list](/influxdb/latest/api/#operation/GetBuckets), [update](/influxdb/latest/api/#operation/PatchBucketsID) and [retrieve](/influxdb/latest/api/#operation/GetBucketsID) buckets in your InfluxDB instance. Note that InfluxDB 2.x uses organizations and buckets instead of databases and retention policies. +The [/api/v2/buckets](/influxdb/v2/api/#tag/Buckets) endpoint accepts `GET`, `POST` and `DELETE` HTTP requests. Use this endpoint to [create](/influxdb/v2/api/#operation/PostBuckets), [delete](/influxdb/v2/api/#operation/DeleteBucketsID), [list](/influxdb/v2/api/#operation/GetBuckets), [update](/influxdb/v2/api/#operation/PatchBucketsID) and [retrieve](/influxdb/v2/api/#operation/GetBucketsID) buckets in your InfluxDB instance. Note that InfluxDB 2.x uses organizations and buckets instead of databases and retention policies. **Include the following URL parameters:** @@ -201,7 +201,7 @@ curl --request DELETE "http://localhost:8086/api/v2/buckets/test/autogen" ### `/api/v2/delete/` HTTP endpoint -The [`/api/v2/delete`](/influxdb/latest/api/#tag/Delete) endpoint accepts `POST` HTTP requests. Use this endpoint to delete points from InfluxDB, including points with specific tag values, timestamps and measurements. +The [`/api/v2/delete`](/influxdb/v2/api/#tag/Delete) endpoint accepts `POST` HTTP requests. Use this endpoint to delete points from InfluxDB, including points with specific tag values, timestamps and measurements. **Include the following URL parameters:** @@ -353,8 +353,12 @@ curl http://localhost:8086/debug/requests ##### Track requests over a ten-second interval ```bash -$ curl http://localhost:8086/debug/requests +curl http://localhost:8086/debug/requests +``` +The response body contains data in JSON format: + +```JSON { "user1:123.45.678.91": {"writes":1,"queries":0}, } @@ -365,8 +369,12 @@ The response shows that, over the past ten seconds, the `user1` user sent one re ##### Track requests over a one-minute interval ```bash -$ curl http://localhost:8086/debug/requests?seconds=60 +curl http://localhost:8086/debug/requests?seconds=60 +``` +The response body contains data in JSON format: + +```JSON { "user1:123.45.678.91": {"writes":3,"queries":0}, "user1:000.0.0.0": {"writes":0,"queries":16}, @@ -468,8 +476,12 @@ Those `SELECT` queries require a `POST` request. ###### Query data with a `SELECT` statement ```bash -$ curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas"' +curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas"' +``` +The response body contains data in JSON format: + +```JSON {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag1","mytag2"],"values":[["2017-03-01T00:16:18Z",33.1,null,null],["2017-03-01T00:17:18Z",12.4,"12","14"]]}]}]} ``` @@ -490,8 +502,12 @@ time myfield mytag1 mytag2 ##### Query data with a `SELECT` statement and an `INTO` clause ```bash -$ curl -XPOST 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * INTO "newmeas" FROM "mymeas"' +curl -XPOST 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * INTO "newmeas" FROM "mymeas"' +``` +The response body contains data in JSON format: + +```JSON {"results":[{"statement_id":0,"series":[{"name":"result","columns":["time","written"],"values":[["1970-01-01T00:00:00Z",2]]}]}]} ``` @@ -503,8 +519,12 @@ Note that the system uses epoch 0 (`1970-01-01T00:00:00Z`) as a [null timestamp ##### Create a database ```bash -$ curl -XPOST 'http://localhost:8086/query' --data-urlencode 'q=CREATE DATABASE "mydb"' +curl -XPOST 'http://localhost:8086/query' --data-urlencode 'q=CREATE DATABASE "mydb"' +``` +The response data is similar to the following: + +```JSON {"results":[{"statement_id":0}]} ``` @@ -536,7 +556,7 @@ See below for an [example](#create-a-database-using-basic-authentication) of bas ##### Query data with a `SELECT` statement and return pretty-printed JSON ```bash -$ curl -G 'http://localhost:8086/query?db=mydb&pretty=true' --data-urlencode 'q=SELECT * FROM "mymeas"' +curl -G 'http://localhost:8086/query?db=mydb&pretty=true' --data-urlencode 'q=SELECT * FROM "mymeas"' { "results": [ @@ -575,8 +595,12 @@ $ curl -G 'http://localhost:8086/query?db=mydb&pretty=true' --data-urlencode 'q= ##### Query data with a `SELECT` statement and return second precision epoch timestamps ```bash -$ curl -G 'http://localhost:8086/query?db=mydb&epoch=s' --data-urlencode 'q=SELECT * FROM "mymeas"' +curl -G 'http://localhost:8086/query?db=mydb&epoch=s' --data-urlencode 'q=SELECT * FROM "mymeas"' +``` +The response body data is similar to the following: + +```bash {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag1","mytag2"],"values":[[1488327378,33.1,null,null],[1488327438,12.4,"12","14"]]}]}]} ``` @@ -586,7 +610,7 @@ The following example shows how to authenticate with v1.x credentials in the que create a database: ```bash -$ curl -XPOST 'http://localhost:8086/query?u=myusername&p=mypassword' --data-urlencode 'q=CREATE DATABASE "mydb"' +curl -XPOST 'http://localhost:8086/query?u=myusername&p=mypassword' --data-urlencode 'q=CREATE DATABASE "mydb"' ``` The response body contains the following: @@ -698,26 +722,37 @@ Delimit multiple placeholder key-value pairs with comma `,`. ##### Send multiple queries ```bash -$ curl -G 'http://localhost:8086/query?db=mydb&epoch=s' --data-urlencode 'q=SELECT * FROM "mymeas";SELECT mean("myfield") FROM "mymeas"' +curl -G 'http://localhost:8086/query?db=mydb&epoch=s' --data-urlencode 'q=SELECT * FROM "mymeas";SELECT mean("myfield") FROM "mymeas"' +``` +The response body contains results for both queries: + +```JSON {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag1","mytag2"],"values":[[1488327378,33.1,null,null],[1488327438,12.4,"12","14"]]}]},{"statement_id":1,"series":[{"name":"mymeas","columns":["time","mean"],"values":[[0,22.75]]}]}]} ``` -The request includes two queries: `SELECT * FROM "mymeas"` and `SELECT mean("myfield") FROM "mymeas"'`. -In the results, the system assigns a statement identifier to each query return. -The first query's result has a `statement_id` of `0` and the second query's result has a `statement_id` of `1`. +- The request includes two queries: `SELECT * FROM "mymeas"` and `SELECT mean("myfield") FROM "mymeas"'`. +- In the results, InfluxDB assigns a statement identifier to each query: + - `"statement_id": 0`: the first query + - `"statement_id": 1`: the second query ##### Request query results in CSV format -```bash -$ curl -H "Accept: application/csv" -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas"' +To format results in CSV, specify `application/csv` in the HTTP `Accept` header--for example: +```bash +curl -H "Accept: application/csv" -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas"' +``` + +The response body contains data in CSV format: + +```csv name,tags,time,myfield,mytag1,mytag2 mymeas,,1488327378000000000,33.1,mytag1,mytag2 mymeas,,1488327438000000000,12.4,12,14 ``` -The first point has no [tag values](/enterprise_influxdb/v1/concepts/glossary/#tag-value) for the `mytag1` and `mytag2` [tag keys](/enterprise_influxdb/v1/concepts/glossary/#tag-key). +- In the sample data, the first point doesn't contain [tag values](/enterprise_influxdb/v1/concepts/glossary/#tag-value) for the `mytag1` and `mytag2` [tag keys](/enterprise_influxdb/v1/concepts/glossary/#tag-key). ##### Submit queries from a file @@ -734,57 +769,77 @@ CREATE RETENTION POLICY four_weeks ON mydb DURATION 4w REPLICATION 1; ##### Bind a parameter in the `WHERE` clause to specific tag value -```bash -$ curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" WHERE "mytag1" = $tag_value' --data-urlencode 'params={"tag_value":"12"}' +Use the `params` option to pass arguments for a parameterized query--for example: +```bash +curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" WHERE "mytag1" = $tag_value' --data-urlencode 'params={"tag_value":"12"}' +``` + +The response data is similar to the following: + +```JSON {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag1","mytag2"],"values":[["2017-03-01T00:17:18Z",12.4,"12","14"]]}]}]} ``` -The request maps `$tag_value` to `12`. -InfluxDB stores [tag values](/enterprise_influxdb/v1/concepts/glossary/#tag-value) as strings they and must be double quoted in the request. +- In the request, `params` maps `$tag_value` to `"12"`. + Because InfluxDB stores [tag values](/enterprise_influxdb/v1/concepts/glossary/#tag-value) as strings, you must double-quote them in parameter values. +- During query execution, InfluxDB substitutes the parameter values for the associated keys in the query. ##### Bind a parameter in the `WHERE` clause to a numerical field value ```bash -$ curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" WHERE "myfield" > $field_value' --data-urlencode 'params={"field_value":30}' +curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" WHERE "myfield" > $field_value' --data-urlencode 'params={"field_value":30}' +``` +The response data is similar to the following: + +```JSON {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag1","mytag2"],"values":[["2017-03-01T00:16:18Z",33.1,null,null]]}]}]} ``` -The request maps `$field_value` to `30`. -The value `30` does not require double quotes because `myfield` stores numerical [field values](/enterprise_influxdb/v1/concepts/glossary/#field-value). +- In the request, `params` maps `$field_value` to `30`. Because `myfield` stores numerical [field values](/enterprise_influxdb/v1/concepts/glossary/#field-value), the parameter value `30` does not require double quotes. +- During query execution, InfluxDB substitutes the parameter values for the associated keys in the query. ##### Bind two parameters in the `WHERE` clause to a specific tag value and numerical field value ```bash -$ curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" WHERE "mytag1" = $tag_value AND "myfield" < $field_value' --data-urlencode 'params={"tag_value":"12","field_value":30}' +curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" WHERE "mytag1" = $tag_value AND "myfield" < $field_value' --data-urlencode 'params={"tag_value":"12","field_value":30}' +``` +The response data is similar to the following: + +```JSON {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag1","mytag2"],"values":[["2017-03-01T00:17:18Z",12.4,"12","14"]]}]}]} ``` -The request maps `$tag_value` to `12` and `$field_value` to `30`. +- In the request, `params` maps `$tag_value` to `12` and `$field_value` to `30`. +- During query execution, InfluxDB substitutes the parameter values for the associated keys in the query. #### Status codes and responses The API response body contains results or error messages in JSON format. To pretty-print JSON for viewing, include the query string parameter `pretty=true` -or pipe the response to a JSON-processor like [**jq**](https://stedolan.github.io/jq/). +or pipe the response to a JSON-processor, such as [**jq**](https://stedolan.github.io/jq/). ##### Summary table | HTTP status code | Description | | :--------------- | :---------- | -| 200 OK | Success. Response body contains data in JSON format. | -| 400 Bad Request | Unacceptable request. Can occur with a syntactically incorrect query. Response body contains an error message with additional information in JSON format. | -| 401 Unauthorized | Unacceptable request. Can occur with invalid authentication credentials. | +| `200 OK` | Success. Response body contains data in JSON format. | +| `400 Bad Request` | Unacceptable request. Can occur with a syntactically incorrect query. Response body contains an error message with additional information in JSON format. | +| `401 Unauthorized` | Unacceptable request. Can occur with invalid authentication credentials. | #### Examples ##### A successful request that returns data ```bash -$ curl -i -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas"' +curl -i -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas"' +``` +The response is HTTP status `200 OK` and the body contains data in JSON format: + +``` HTTP/1.1 200 OK Connection: close Content-Type: application/json @@ -799,8 +854,11 @@ Transfer-Encoding: chunked ##### A query that contains an error ```bash -$ curl -i -G 'http://localhost:8086/query?db=mydb1' --data-urlencode 'q=SELECT * FROM "mymeas"' +curl -i -G 'http://localhost:8086/query?db=mydb1' --data-urlencode 'q=SELECT * FROM "mymeas"' +The response body contains details about the error: + +``` HTTP/1.1 200 OK Connection: close Content-Type: application/json @@ -815,8 +873,13 @@ Transfer-Encoding: chunked ##### An incorrectly formatted query ```bash -$ curl -i -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT *' +curl -i -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT *' +``` +The response is HTTP status `400 Bad Request` and the body contains details +about the error: + +``` HTTP/1.1 400 Bad Request Content-Type: application/json Request-Id: [...] @@ -830,8 +893,12 @@ Content-Length: 76 ##### A request with invalid authentication credentials ```bash -$ curl -i -XPOST 'http://localhost:8086/query?u=myusername&p=notmypassword' --data-urlencode 'q=CREATE DATABASE "mydb"' +curl -i -XPOST 'http://localhost:8086/query?u=myusername&p=notmypassword' --data-urlencode 'q=CREATE DATABASE "mydb"' +``` +The response is HTTP status `401 Unauthorized` and the body contains the error message. + +``` HTTP/1.1 401 Unauthorized Content-Type: application/json Request-Id: [...] @@ -878,8 +945,12 @@ in significant improvements in compression. ##### Write a point to the database `mydb` with a timestamp in seconds ```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb&precision=s" --data-binary 'mymeas,mytag=1 myfield=90 1463683075' +curl -i -XPOST "http://localhost:8086/write?db=mydb&precision=s" --data-binary 'mymeas,mytag=1 myfield=90 1463683075' +``` +A successful write returns HTTP status `204 No Content`--for example: + +``` HTTP/1.1 204 No Content Content-Type: application/json Request-Id: [...] @@ -890,13 +961,7 @@ Date: Wed, 08 Nov 2017 17:33:23 GMT ##### Write a point to the database `mydb` and the retention policy `myrp` ```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb&rp=myrp" --data-binary 'mymeas,mytag=1 myfield=90' - -HTTP/1.1 204 No Content -Content-Type: application/json -Request-Id: [...] -X-Influxdb-Version: {{< latest-patch >}} -Date: Wed, 08 Nov 2017 17:34:31 GMT +curl -i -XPOST "http://localhost:8086/write?db=mydb&rp=myrp" --data-binary 'mymeas,mytag=1 myfield=90' ``` ##### Write a point to the database `mydb` using HTTP authentication @@ -904,20 +969,25 @@ Date: Wed, 08 Nov 2017 17:34:31 GMT Valid credentials: ```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb&u=myusername&p=mypassword" --data-binary 'mymeas,mytag=1 myfield=91' +curl -i -XPOST "http://localhost:8086/write?db=mydb&u=myusername&p=mypassword" --data-binary 'mymeas,mytag=1 myfield=91' +``` +A successful write returns HTTP status `204 No Content`. + +``` HTTP/1.1 204 No Content -Content-Type: application/json -Request-Id: [...] -X-Influxdb-Version: {{< latest-patch >}} -Date: Wed, 08 Nov 2017 17:34:56 GMT ``` Invalid credentials: ```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb&u=myusername&p=notmypassword" --data-binary 'mymeas,mytag=1 myfield=91' +curl -i -XPOST "http://localhost:8086/write?db=mydb&u=myusername&p=notmypassword" --data-binary 'mymeas,mytag=1 myfield=91' +``` +If the username or password is incorrect, the response status is `401 Unauthorized` +and the response body contains the error message--for example: + +``` HTTP/1.1 401 Unauthorized Content-Type: application/json Request-Id: [...] @@ -931,23 +1001,20 @@ Content-Length: 33 ##### Write a point to the database `mydb` using basic authentication -Valid credentials: - ```bash -$ curl -i -XPOST -u myusername:mypassword "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=91' - -HTTP/1.1 204 No Content -Content-Type: application/json -Request-Id: [...] -X-Influxdb-Version: {{< latest-patch >}} -Date: Wed, 08 Nov 2017 17:36:40 GMT +curl -i -XPOST -u myusername:mypassword "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=91' ``` Invalid credentials: ```bash -$ curl -i -XPOST -u myusername:notmypassword "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=91' +curl -i -XPOST -u myusername:notmypassword "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=91' +``` +If the username or password is incorrect, the response status is `401 Unauthorized` +and the response body contains the error message--for example: + +``` HTTP/1.1 401 Unauthorized Content-Type: application/json Request-Id: [...] @@ -965,79 +1032,65 @@ Content-Length: 33 --data-binary '' ``` -All data must be binary encoded and in the +Data to write must be binary encoded and in the [InfluxDB line protocol](/enterprise_influxdb/v1/concepts/glossary/#influxdb-line-protocol) format. -Our example shows the `--data-binary` parameter from curl, which we will use in -all examples on this page. + +Examples in this page use `curl` with the `--data-binary` parameter to encode +line protocol in the request. Using any encoding method other than `--data-binary` will likely lead to issues; `-d`, `--data-urlencode`, and `--data-ascii` may strip out newlines or -introduce new, unintended formatting. +introduce unintended formatting. Options: -* Write several points to the database with one request by separating each point +- Write several points to the database with one request by separating each point by a new line. -* Write points from a file with the `@` flag. -The file should contain a batch of points in the InfluxDB line protocol format. +- Write points from a file with the `@` flag. +The file should contain a batch of points in line protocol format. Individual points must be on their own line and separated by newline characters (`\n`). -Files containing carriage returns will cause parser errors. +Files containing carriage returns cause parser errors. - We recommend writing points in batches of 5,000 to 10,000 points. -Smaller batches, and more HTTP requests, will result in sub-optimal performance. +> [!Important] +> #### Batch writes for optimal performance +> Write points in batches of 5,000 to 10,000 points. +> Smaller batches, and more HTTP requests, will result in sub-optimal performance. #### Examples -##### Write a point to the database `mydb` with a nanosecond timestamp +##### Write a point with a nanosecond timestamp to the `mydb` database ```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=90 1463683075000000000' - -HTTP/1.1 204 No Content -Content-Type: application/json -Request-Id: [...] -X-Influxdb-Version: {{< latest-patch >}} -Date: Wed, 08 Nov 2017 18:02:57 GMT +curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=90 1463683075000000000' ``` -##### Write a point to the database `mydb` with the local server's nanosecond timestamp - -```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=90' +If successful, the response status is HTTP `204 No Content`. +``` HTTP/1.1 204 No Content -Content-Type: application/json -Request-Id: [...] -X-Influxdb-Version: {{< latest-patch >}} -Date: Wed, 08 Nov 2017 18:03:44 GMT ``` -##### Write several points to the database `mydb` by separating points with a new line +##### Write a point with the local server's nanosecond timestamp to the `mydb` database ```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=3 myfield=89 1463689152000000000 +curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=1 myfield=90' +``` + +##### Write several points to the database by separating points with a new line + +```bash +curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary 'mymeas,mytag=3 myfield=89 1463689152000000000 mymeas,mytag=2 myfield=34 1463689152000000000' - -HTTP/1.1 204 No Content -Content-Type: application/json -Request-Id: [...] -X-Influxdb-Version: {{< latest-patch >}} -Date: Wed, 08 Nov 2017 18:04:02 GMT ``` ##### Write several points to the database `mydb` from the file `data.txt` ```bash -$ curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary @data.txt - -HTTP/1.1 204 No Content -Content-Type: application/json -Request-Id: [...] -X-Influxdb-Version: {{< latest-patch >}} -Date: Wed, 08 Nov 2017 18:08:11 GMT +curl -i -XPOST "http://localhost:8086/write?db=mydb" --data-binary @data.txt ``` -A sample of the data in `data.txt`: +`data.txt` contains the following sample data: + ``` mymeas,mytag1=1 value=21 1463689680000000000 mymeas,mytag1=1 value=34 1463689690000000000 @@ -1132,7 +1185,7 @@ Requests to `/shard-status` return the following information in JSON format: - `size`: the size on disk of the shard in bytes - `is_hot`: whether the time range from the shard includes `now` {{% note %}} -An *idle* shard is fully compacted and not receiving new (potentially historical) writes. +An _idle_ shard is fully compacted and not receiving new (potentially historical) writes. A hot shard may or may not be idle. {{% /note %}} - `state`: the anti-entropy status of the shard can be one of the following: diff --git a/content/flux/v0/join-data/time.md b/content/flux/v0/join-data/time.md index c087f61fe..42f57d631 100644 --- a/content/flux/v0/join-data/time.md +++ b/content/flux/v0/join-data/time.md @@ -4,7 +4,7 @@ description: > Use [`join.time()`](/flux/v0/stdlib/join/time/) to join two streams of data based on time values in the `_time` column. This type of join operation is common when joining two streams of - [time series data](/influxdb/latest/reference/glossary/#time-series-data). + [time series data](/influxdb/v2/reference/glossary/#time-series-data). menu: flux_v0: parent: Join data @@ -31,7 +31,7 @@ list_code_example: | Use [`join.time()`](/flux/v0/stdlib/join/time/) to join two streams of data based on time values in the `_time` column. This type of join operation is common when joining two streams of -[time series data](/influxdb/latest/reference/glossary/#time-series-data). +[time series data](/influxdb/v2/reference/glossary/#time-series-data). `join.time()` can use any of the available join methods. Which method you use depends on your desired behavior: diff --git a/content/flux/v0/stdlib/contrib/jsternberg/influxdb/from.md b/content/flux/v0/stdlib/contrib/jsternberg/influxdb/from.md index a1b8c1d5a..ba6548e98 100644 --- a/content/flux/v0/stdlib/contrib/jsternberg/influxdb/from.md +++ b/content/flux/v0/stdlib/contrib/jsternberg/influxdb/from.md @@ -86,7 +86,7 @@ Durations are relative to `now()`. URL of the InfluxDB instance to query. -See [InfluxDB OSS URLs](/influxdb/latest/reference/urls/) +See [InfluxDB OSS URLs](/influxdb/v2/reference/urls/) or [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/). ### org @@ -97,7 +97,7 @@ Organization name. ### token -InfluxDB [API token](/influxdb/latest/security/tokens/). +InfluxDB [API token](/influxdb/v2/security/tokens/). diff --git a/content/flux/v0/stdlib/contrib/jsternberg/influxdb/select.md b/content/flux/v0/stdlib/contrib/jsternberg/influxdb/select.md index a90e72cd5..047386468 100644 --- a/content/flux/v0/stdlib/contrib/jsternberg/influxdb/select.md +++ b/content/flux/v0/stdlib/contrib/jsternberg/influxdb/select.md @@ -119,7 +119,7 @@ Records that evaluate to _null_ or `false` are not included in the output tables URL of the InfluxDB instance to query. -See [InfluxDB OSS URLs](/influxdb/latest/reference/urls/) +See [InfluxDB OSS URLs](/influxdb/v2/reference/urls/) or [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/). ### org @@ -130,7 +130,7 @@ Organization name. ### token -InfluxDB [API token](/influxdb/latest/security/tokens/). +InfluxDB [API token](/influxdb/v2/security/tokens/). diff --git a/content/flux/v0/stdlib/experimental/csv/from.md b/content/flux/v0/stdlib/experimental/csv/from.md index e2cf0fbf5..bbeb5cbbe 100644 --- a/content/flux/v0/stdlib/experimental/csv/from.md +++ b/content/flux/v0/stdlib/experimental/csv/from.md @@ -1,7 +1,7 @@ --- title: csv.from() function description: > - `csv.from()` retrieves [annotated CSV](/influxdb/latest/reference/syntax/annotated-csv/) **from a URL**. + `csv.from()` retrieves [annotated CSV](/influxdb/v2/reference/syntax/annotated-csv/) **from a URL**. menu: flux_v0_ref: name: csv.from @@ -26,7 +26,7 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md -------------------------------------------------------------------------------> -`csv.from()` retrieves [annotated CSV](/influxdb/latest/reference/syntax/annotated-csv/) **from a URL**. +`csv.from()` retrieves [annotated CSV](/influxdb/v2/reference/syntax/annotated-csv/) **from a URL**. {{% warn %}} #### Deprecated diff --git a/content/flux/v0/stdlib/experimental/geo/_index.md b/content/flux/v0/stdlib/experimental/geo/_index.md index a6b711f53..525ebf52f 100644 --- a/content/flux/v0/stdlib/experimental/geo/_index.md +++ b/content/flux/v0/stdlib/experimental/geo/_index.md @@ -63,7 +63,7 @@ Geometry Library to generate `s2_cell_id` tags. Specify your [S2 Cell ID level](https://s2geometry.io/resources/s2cell_statistics.html). **Note:** To filter more quickly, use higher S2 Cell ID levels, but know that -higher levels increase [series cardinality](/influxdb/latest/reference/glossary/#series-cardinality). +higher levels increase [series cardinality](/influxdb/v2/reference/glossary/#series-cardinality). Language-specific implementations of the S2 Geometry Library provide methods for generating S2 Cell ID tokens. For example: diff --git a/content/flux/v0/stdlib/experimental/prometheus/histogramquantile.md b/content/flux/v0/stdlib/experimental/prometheus/histogramquantile.md index 794264e72..b6cc057d4 100644 --- a/content/flux/v0/stdlib/experimental/prometheus/histogramquantile.md +++ b/content/flux/v0/stdlib/experimental/prometheus/histogramquantile.md @@ -29,7 +29,7 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md `prometheus.histogramQuantile()` calculates a quantile on a set of Prometheus histogram values. -This function supports [Prometheus metric parsing formats](/influxdb/latest/reference/prometheus-metrics/) +This function supports [Prometheus metric parsing formats](/influxdb/v2/reference/prometheus-metrics/) used by `prometheus.scrape()`, the Telegraf `promtheus` input plugin, and InfluxDB scrapers available in InfluxDB OSS. @@ -53,7 +53,7 @@ Quantile to compute. Must be a float value between 0.0 and 1.0. ### metricVersion -[Prometheus metric parsing format](/influxdb/latest/reference/prometheus-metrics/) +[Prometheus metric parsing format](/influxdb/v2/reference/prometheus-metrics/) used to parse queried Prometheus data. Available versions are `1` and `2`. Default is `2`. diff --git a/content/flux/v0/stdlib/experimental/to.md b/content/flux/v0/stdlib/experimental/to.md index 581383e1c..9359198fe 100644 --- a/content/flux/v0/stdlib/experimental/to.md +++ b/content/flux/v0/stdlib/experimental/to.md @@ -86,7 +86,7 @@ _`bucket` and `bucketID` are mutually exclusive_. URL of the InfluxDB instance to write to. See [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/) -or [InfluxDB OSS URLs](/influxdb/latest/reference/urls/). +or [InfluxDB OSS URLs](/influxdb/v2/reference/urls/). `host` is required when writing to a remote InfluxDB instance. If specified, `token` is also required. diff --git a/content/flux/v0/stdlib/influxdata/influxdb/buckets.md b/content/flux/v0/stdlib/influxdata/influxdb/buckets.md index d5219c184..437f3a9c2 100644 --- a/content/flux/v0/stdlib/influxdata/influxdb/buckets.md +++ b/content/flux/v0/stdlib/influxdata/influxdb/buckets.md @@ -72,7 +72,7 @@ _`org` and `orgID` are mutually exclusive_. URL of the InfluxDB instance. See [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/) -or [InfluxDB OSS URLs](/influxdb/latest/reference/urls/). +or [InfluxDB OSS URLs](/influxdb/v2/reference/urls/). _`host` is required when `org` or `orgID` are specified._ ### token diff --git a/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md b/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md index c6c845c08..525a58f3d 100644 --- a/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md +++ b/content/flux/v0/stdlib/influxdata/influxdb/cardinality.md @@ -90,7 +90,7 @@ String-encoded organization ID. URL of the InfluxDB instance to query. See [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/) -or [InfluxDB OSS URLs](/influxdb/latest/reference/urls/). +or [InfluxDB OSS URLs](/influxdb/v2/reference/urls/). ### token diff --git a/content/flux/v0/stdlib/influxdata/influxdb/from.md b/content/flux/v0/stdlib/influxdata/influxdb/from.md index 03660cdf4..1cbddba2d 100644 --- a/content/flux/v0/stdlib/influxdata/influxdb/from.md +++ b/content/flux/v0/stdlib/influxdata/influxdb/from.md @@ -81,7 +81,7 @@ _`bucket` and `bucketID` are mutually exclusive_. URL of the InfluxDB instance to query. See [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/) -or [InfluxDB OSS URLs](/influxdb/latest/reference/urls/). +or [InfluxDB OSS URLs](/influxdb/v2/reference/urls/). ### org diff --git a/content/flux/v0/stdlib/influxdata/influxdb/to.md b/content/flux/v0/stdlib/influxdata/influxdb/to.md index 5dc4eda58..e18526e88 100644 --- a/content/flux/v0/stdlib/influxdata/influxdb/to.md +++ b/content/flux/v0/stdlib/influxdata/influxdb/to.md @@ -91,7 +91,7 @@ _`bucket` and `bucketID` are mutually exclusive_. URL of the InfluxDB instance to write to. See [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/) -or [InfluxDB OSS URLs](/influxdb/latest/reference/urls/). +or [InfluxDB OSS URLs](/influxdb/v2/reference/urls/). `host` is required when writing to a remote InfluxDB instance. If specified, `token` is also required. diff --git a/content/flux/v0/stdlib/influxdata/influxdb/wideto.md b/content/flux/v0/stdlib/influxdata/influxdb/wideto.md index f32dbc6bb..006bdb8de 100644 --- a/content/flux/v0/stdlib/influxdata/influxdb/wideto.md +++ b/content/flux/v0/stdlib/influxdata/influxdb/wideto.md @@ -81,7 +81,7 @@ _`bucket` and `bucketID` are mutually exclusive_. URL of the InfluxDB instance to write to. See [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/) -or [InfluxDB OSS URLs](/influxdb/latest/reference/urls/). +or [InfluxDB OSS URLs](/influxdb/v2/reference/urls/). `host` is required when writing to a remote InfluxDB instance. If specified, `token` is also required. diff --git a/content/influxdb/cloud/tools/influxdb-templates/create.md b/content/influxdb/cloud/tools/influxdb-templates/create.md index 91760fe36..16c5f1cc1 100644 --- a/content/influxdb/cloud/tools/influxdb-templates/create.md +++ b/content/influxdb/cloud/tools/influxdb-templates/create.md @@ -24,7 +24,7 @@ UI and export the resources as a template. {{< youtube 714uHkxKM6U >}} {{% note %}} -#### InfluxDB OSS for creating templates +#### InfluxDB OSS v2 for creating templates Templatable resources are scoped to a single organization, so the simplest way to create a template is to create a new organization, build the template within the organization, and then [export all resources](#export-all-resources) as a template. @@ -54,15 +54,21 @@ Provide the following: **JSON** (`.json`) are supported. ###### Export all resources to a template -```sh -# Syntax -influx export all -o -f -t + +```bash +# Syntax +influx export all --org --file --token +``` + + + +```bash # Example influx export all \ - -o my-org \ - -f ~/templates/awesome-template.yml \ - -t $INFLUX_TOKEN + --org $INFLUX_ORG \ + --file /path/to/TEMPLATE_FILE.yml \ + --token $INFLUX_TOKEN ``` #### Export resources filtered by labelName or resourceKind @@ -81,9 +87,9 @@ and ```sh influx export all \ - -o my-org \ - -f ~/templates/awesome-template.yml \ - -t $INFLUX_TOKEN \ + --org $INFLUX_ORG \ + --file /path/to/TEMPLATE_FILE.yml \ + --token $INFLUX_TOKEN \ --filter=resourceKind=Bucket \ --filter=resourceKind=Dashboard \ --filter=labelName=Example1 \ @@ -94,12 +100,14 @@ For information about flags, see the [`influx export all` documentation](/influxdb/cloud/reference/cli/influx/export/all/). ### Export specific resources + To export specific resources within an organization to a template manifest, use the `influx export` with resource flags for each resource to include. +The command uses the API token to filter resources for the organization. + Provide the following: -- **Organization name** or **ID** -- **API token** with read access to the organization +- **API token** with read access to the organization. - **Destination path and filename** for the template manifest. The filename extension determines the template format—both **YAML** (`.yml`) and **JSON** (`.json`) are supported. @@ -108,15 +116,20 @@ Provide the following: [`influx export` documentation](/influxdb/cloud/reference/cli/influx/export/). ###### Export specific resources to a template -```sh -# Syntax -influx export all -o -f -t [resource-flags] + +```bash +# Syntax +influx export --file --token [resource-flags] +``` + + + +```bash # Example -influx export all \ - -o my-org \ - -f ~/templates/awesome-template.yml \ - -t $INFLUX_TOKEN \ +influx export \ + --file /path/to/TEMPLATE_FILE.yml \ + --token $INFLUX_TOKEN \ --buckets=00x000ooo0xx0xx,o0xx0xx00x000oo \ --dashboards=00000xX0x0X00x000 \ --telegraf-configs=00000x0x000X0x0X0 @@ -125,9 +138,10 @@ influx export all \ ### Export a stack To export a stack and all its associated resources as a template, use the `influx export stack` command. +The command uses the API token to filter resources for the organization. + Provide the following: -- **Organization name** or **ID** - **API token** with read access to the organization - **Destination path and filename** for the template manifest. The filename extension determines the template format—both **YAML** (`.yml`) and @@ -135,19 +149,23 @@ Provide the following: - **Stack ID** ###### Export a stack as a template -```sh + + +```bash # Syntax influx export stack \ - -o \ - -t \ - -f \ + --token \ + --file \ +``` + + +```bash # Example influx export stack \ - -o my-org \ - -t mYSuP3RS3CreTt0K3n - -f ~/templates/awesome-template.yml \ + -t $INFLUX_TOKEN \ + -f /path/to/TEMPLATE_FILE.yml \ 05dbb791a4324000 ``` @@ -206,11 +224,47 @@ when [applying the template](/influxdb/cloud/tools/influxdb-templates/use/#apply Users can also include the `--env-ref` flag with the appropriate key-value pair when installing the template. + + + + +For example, to set a custom bucket name when applying a template with an environment reference: + + +```sh +# The template, edited to include an environment reference: +# apiVersion: influxdata.com/v2alpha1 +# kind: Bucket +# metadata: +# name: +# envRef: bucket-name-1 + +# Apply template, set bucket-name-1 to "myBucket", and skip verification influx apply \ - -f /path/to/template.yml \ - --env-ref=bucket-name-1=myBucket + --file /path/to/TEMPLATE_FILE.json \ + --env-ref bucket-name-1=myBucket \ + --force yes + --org $INFLUX_ORG + --token $INFLUX_TOKEN ``` _If sharing your template, we recommend documenting what environment references diff --git a/content/influxdb/v1/concepts/time-series-index.md b/content/influxdb/v1/concepts/time-series-index.md index af421a777..b64a354f5 100644 --- a/content/influxdb/v1/concepts/time-series-index.md +++ b/content/influxdb/v1/concepts/time-series-index.md @@ -8,7 +8,7 @@ menu: weight: 70 parent: Concepts aliases: - - /influxdb/latest/concepts/time-series-index/ + - /influxdb/v2/concepts/time-series-index/ --- Find overview and background information on Time Series Index (TSI) in this topic. For detail, including how to enable and configure TSI, see [Time Series Index (TSI) details](/influxdb/v1/concepts/tsi-details/). diff --git a/content/influxdb/v1/introduction/get-started.md b/content/influxdb/v1/introduction/get-started.md index 8ce8e8763..db6afef24 100644 --- a/content/influxdb/v1/introduction/get-started.md +++ b/content/influxdb/v1/introduction/get-started.md @@ -12,7 +12,7 @@ aliases: - /influxdb/v2/introduction/getting_started/ - /influxdb/v2/introduction/getting_started/ - /influxdb/v2/introduction/getting_started/ - - /influxdb/latest/introduction/getting-started/ + - /influxdb/v2/introduction/getting-started/ menu: influxdb_v1: diff --git a/content/influxdb/v1/query_language/_index.md b/content/influxdb/v1/query_language/_index.md index 199b1e05a..cf978e58f 100644 --- a/content/influxdb/v1/query_language/_index.md +++ b/content/influxdb/v1/query_language/_index.md @@ -7,7 +7,7 @@ menu: weight: 70 identifier: InfluxQL aliases: - - /influxdb/latest/query_language/_index + - /influxdb/v2/query_language/_index --- This section introduces InfluxQL, the InfluxDB SQL-like query language for diff --git a/content/influxdb/v1/query_language/spec.md b/content/influxdb/v1/query_language/spec.md index 3ffab21ed..f8563c516 100644 --- a/content/influxdb/v1/query_language/spec.md +++ b/content/influxdb/v1/query_language/spec.md @@ -12,7 +12,7 @@ aliases: - /influxdb/v2/query_language/spec/ - /influxdb/v2/query_language/spec/ - /influxdb/v2/query_language/spec/ - - /influxdb/latest/query_language/spec/ + - /influxdb/v2/query_language/spec/ --- ## Introduction @@ -234,12 +234,13 @@ regex_lit = "/" { unicode_char } "/" . `=~` matches against `!~` doesn't match against -> **Note:** InfluxQL supports using regular expressions when specifying: +> [!Note] +> InfluxQL supports using regular expressions when specifying: > -* [field keys](/influxdb/v1/concepts/glossary/#field-key) and [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`SELECT` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement) -* [measurements](/influxdb/v1/concepts/glossary/#measurement) in the [`FROM` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement) -* [tag values](/influxdb/v1/concepts/glossary/#tag-value) and string [field values](/influxdb/v1/concepts/glossary/#field-value) in the [`WHERE` clause](/influxdb/v1/query_language/explore-data/#the-where-clause). -* [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`GROUP BY` clause](/influxdb/v1/query_language/explore-data/#group-by-tags) +> * [field keys](/influxdb/v1/concepts/glossary/#field-key) and [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`SELECT` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement) +> * [measurements](/influxdb/v1/concepts/glossary/#measurement) in the [`FROM` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement) +> * [tag values](/influxdb/v1/concepts/glossary/#tag-value) and string [field values](/influxdb/v1/concepts/glossary/#field-value) in the [`WHERE` clause](/influxdb/v1/query_language/explore-data/#the-where-clause). +> * [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`GROUP BY` clause](/influxdb/v1/query_language/explore-data/#group-by-tags) > >Currently, InfluxQL does not support using regular expressions to match >non-string field values in the diff --git a/content/influxdb/v2/reference/cli/influx/_index.md b/content/influxdb/v2/reference/cli/influx/_index.md index 0c0e557be..b59dd9f3a 100644 --- a/content/influxdb/v2/reference/cli/influx/_index.md +++ b/content/influxdb/v2/reference/cli/influx/_index.md @@ -20,7 +20,7 @@ including buckets, organizations, users, tasks, etc. {{% oss-only %}} {{% note %}} -#### InfluxDB OSS and influx CLI versions +#### InfluxDB OSS v2 and influx CLI versions Beginning with **InfluxDB 2.1**, the `influx` CLI is packaged and versioned separately from InfluxDB. InfluxDB and `influx` CLI versions may differ, but compatibility is noted for each command. @@ -69,6 +69,8 @@ Do one of the following: - [Manually download and install](#manually-download-and-install) ### Use Homebrew + + ```sh brew install influxdb-cli ``` @@ -80,6 +82,7 @@ If you used Homebrew to install **InfluxDB {{< current-version >}}**, the `influ formula was downloaded as a dependency and should already be installed. If installed, `influxdb-cli` will appear in the output of the following command: + ```sh brew list | grep influxdb-cli ``` @@ -91,40 +94,49 @@ brew list | grep influxdb-cli 1. **Download the `influx` CLI package.** - influx CLI v{{< latest-patch cli=true >}} (macOS) + influx CLI v{{< latest-patch cli=true >}} (macOS) + + 2. **Unpackage the downloaded package.** - Do one of the following: + Do one of the following: - - Double-click the downloaded package file in **Finder**. - - Run the following command in a macOS command prompt application such - **Terminal** or **[iTerm2](https://www.iterm2.com/)**: - - ```sh - # Unpackage contents to the current working directory - tar zxvf ~/Downloads/influxdb2-client-{{< latest-patch cli=true >}}-darwin-amd64.tar.gz - ``` + - Double-click the downloaded package file in **Finder**. + - Run the following command in a macOS command prompt application such + **Terminal** or **[iTerm2](https://www.iterm2.com/)**: + + + ```sh + # Unpackage contents to the current working directory + tar zxvf ~/Downloads/influxdb2-client-{{< latest-patch cli=true >}}-darwin-amd64.tar.gz + ``` 3. **(Optional) Place the binary in your `$PATH`.** - ```sh - # (Optional) Copy the influx binary to your $PATH - sudo cp ~/Downloads/influxdb2-client-{{< latest-patch cli=true >}}-darwin-amd64/influx /usr/local/bin/ - ``` + + ```sh + # (Optional) Copy the influx binary to your $PATH + sudo cp ~/Downloads/influxdb2-client-{{< latest-patch cli=true >}}-darwin-amd64/influx /usr/local/bin/ + ``` - If you do not move the `influx` binary into your `$PATH`, prefix the executable - `./` to run it in place. + If you do not move the `influx` binary into your `$PATH`, prefix the executable + `./` to run it in place. 4. **(macOS Catalina and newer) Authorize the `influx` binary.** - macOS requires downloaded binaries to be signed by registered Apple developers. - When you first attempt to run `influx`, macOS will prevent it from running. - To authorize the `influx` binary: + macOS requires downloaded binaries to be signed by registered Apple developers. + When you first attempt to run `influx`, macOS will prevent it from running. + To authorize the `influx` binary: - 1. Attempt to run an `influx` command. - 2. Open **System Preferences** and click **Security & Privacy**. - 3. Under the **General** tab, there is a message about `influx` being blocked. + 1. Attempt to run an `influx` command. + 2. Open **System Preferences** and click **Security & Privacy**. + 3. Under the **General** tab, there is a message about `influx` being blocked. Click **Open Anyway**. {{% /tab-content %}} @@ -135,48 +147,54 @@ brew list | grep influxdb-cli 1. **Download the influx CLI package.** - Download the `influx` CLI package [from your browser](#download-from-your-browser) - or [from the command line](#download-from-the-command-line). + Download the `influx` CLI package [from your browser](#download-from-your-browser) + or [from the command line](#download-from-the-command-line). - #### Download from your browser + #### Download from your browser - influx CLI v{{< latest-patch cli=true >}} (amd64) - influx CLI v{{< latest-patch cli=true >}} (arm) + influx CLI v{{< latest-patch cli=true >}} (amd64) + influx CLI v{{< latest-patch cli=true >}} (arm) - #### Download from the command line + #### Download from the command line - ```sh - # amd64 - wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-{{< latest-patch cli=true >}}-linux-amd64.tar.gz + ```bash + # amd64 + curl -O \ + https://dl.influxdata.com/influxdb/releases/influxdb2-client-{{< latest-patch cli=true >}}-linux-amd64.tar.gz + ``` - # arm - wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-{{< latest-patch cli=true >}}-linux-arm64.tar.gz - ``` + + ```bash + # arm + curl -O \ + https://dl.influxdata.com/influxdb/releases/influxdb2-client-{{< latest-patch cli=true >}}-linux-arm64.tar.gz \ + ``` -4. **Unpackage the downloaded package.** +2. **Unpackage the downloaded package.** - _**Note:** The following commands are examples. Adjust the filenames, paths, and utilities if necessary._ + _**Note:** The following commands are examples. Adjust the filenames, paths, and utilities if necessary._ - ```sh - # amd64 - tar xvzf path/to/influxdb2-client-{{< latest-patch cli=true >}}-linux-amd64.tar.gz + + ```bash + # amd64 + tar xvzf influxdb2-client-{{< latest-patch cli=true >}}-linux-amd64.tar.gz + ``` - # arm - tar xvzf path/to/influxdb2-client-{{< latest-patch cli=true >}}-linux-arm64.tar.gz - ``` + + ```bash + # arm + tar xvzf influxdb2-client-{{< latest-patch cli=true >}}-linux-arm64.tar.gz + ``` 3. **(Optional) Place the unpackaged `influx` executable in your system `$PATH`.** - ```sh - # amd64 - sudo cp influxdb2-client-{{< latest-patch cli=true >}}-linux-amd64/influx /usr/local/bin/ + + ```bash + sudo cp ./influx /usr/local/bin/ + ``` - # arm - sudo cp influxdb2-client-{{< latest-patch cli=true >}}-linux-arm64/influx /usr/local/bin/ - ``` - - If you do not move the `influx` binary into your `$PATH`, prefix the executable - `./` to run it in place. + If you do not move the `influx` binary into your `$PATH`, prefix the executable + `./` to run it in place. {{% /tab-content %}} @@ -185,34 +203,36 @@ brew list | grep influxdb-cli {{% tab-content %}} {{% note %}} -We recommend running `influx` CLI commands in Powershell. +#### Use Powershell for Windows + +Use Powershell for running `influx` CLI commands. Command Prompt is not fully compatible. {{% /note %}} 1. **Download the `influx` CLI package.** - influx CLI v{{< latest-patch cli=true >}} (Windows) + influx CLI v{{< latest-patch cli=true >}} (Windows) 2. **Expand the downloaded archive.** - Expand the downloaded archive into `C:\Program Files\InfluxData\` and rename it if desired. + Expand the downloaded archive into `C:\Program Files\InfluxData\` and rename it if desired. - ```powershell - > Expand-Archive .\influxdb2-client-{{< latest-patch cli=true >}}-windows-amd64.zip -DestinationPath 'C:\Program Files\InfluxData\' - > mv 'C:\Program Files\InfluxData\influxdb2-client-{{< latest-patch cli=true >}}-windows-amd64' 'C:\Program Files\InfluxData\influx' - ``` + ```powershell + > Expand-Archive .\influxdb2-client-{{< latest-patch cli=true >}}-windows-amd64.zip -DestinationPath 'C:\Program Files\InfluxData\' + > mv 'C:\Program Files\InfluxData\influxdb2-client-{{< latest-patch cli=true >}}-windows-amd64' 'C:\Program Files\InfluxData\influx' + ``` 3. **Grant network access to the `influx` CLI.** - When using the `influx` CLI for the first time, **Windows Defender** displays - the following message: + When using the `influx` CLI for the first time, **Windows Defender** displays + the following message: - > Windows Defender Firewall has blocked some features of this app. + > Windows Defender Firewall has blocked some features of this app. - To grant the `influx` CLI the required access, do the following: + To grant the `influx` CLI the required access, do the following: - 1. Select **Private networks, such as my home or work network**. - 2. Click **Allow access**. + 1. Select **Private networks, such as my home or work network**. + 2. Click **Allow access**. {{% /tab-content %}} @@ -229,10 +249,10 @@ Use the [`influx config create` command](/influxdb/v2/reference/cli/influx/confi to create an `influx` CLI config and set it as active: ```sh -influx config create --config-name \ +influx config create --config-name CONFIG_NAME \ --host-url http://localhost:8086 \ - --org \ - --token \ + --org ORG_NAME \ + --token API_TOKEN \ --active ``` @@ -241,13 +261,15 @@ For more information about managing CLI configurations, see the ### Credential precedence -There are three ways to provide the necessary credentials to the `influx` CLI, -which uses the following precedence when retrieving credentials: +Provide credentials using any of the following supported methods. +The `influx` CLI uses the following precedence when retrieving credentials: 1. Command line flags (`--host`, `--org -o`, `--token -t`) 2. Environment variables (`INFLUX_HOST`, `INFLUX_ORG`, `INFLUX_TOKEN`) 3. CLI configuration file +Command line flags override environment variables, which override configuration file values. + ## Usage ``` diff --git a/content/influxdb/v2/reference/cli/influx/auth/create.md b/content/influxdb/v2/reference/cli/influx/auth/create.md index 065a65455..28411f63d 100644 --- a/content/influxdb/v2/reference/cli/influx/auth/create.md +++ b/content/influxdb/v2/reference/cli/influx/auth/create.md @@ -12,7 +12,7 @@ updated_in: CLI 2.5.0 The `influx auth create` command creates an API token in InfluxDB. {{% warn %}} -**Issue resolved**: Using influx CLI 2.4 prevented you from creating an **all-access** or **operator** token using the `influx auth create` command. This issue is resolved in the influx 2.5 CLI release. Please [upgrade to the latest version](/influxdb/latest/tools/influx-cli/) of the influx cli. +**Issue resolved**: Using influx CLI 2.4 prevented you from creating an **all-access** or **operator** token using the `influx auth create` command. This issue is resolved in the influx 2.5 CLI release. Please [upgrade to the latest version](/influxdb/v2/tools/influx-cli/) of the influx cli. {{% /warn %}} ## Usage diff --git a/content/influxdb3/cloud-dedicated/api/management/_index.html b/content/influxdb3/cloud-dedicated/api/management/_index.html deleted file mode 100644 index 66324e6c2..000000000 --- a/content/influxdb3/cloud-dedicated/api/management/_index.html +++ /dev/null @@ -1,848 +0,0 @@ ---- -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 instance. -layout: api -weight: 102 -menu: - influxdb3_cloud_dedicated: - parent: InfluxDB HTTP API - name: Management API - identifier: api-reference-management ---- - - - - - - - - - - - InfluxDB - - - - - - - - - - - - - - - - -
-
-
- - -

InfluxDB 3 Cloud Dedicated Management API

License: MIT

The Management API for InfluxDB 3 Cloud Dedicated provides a programmatic interface for managing a Cloud Dedicated instance.

-

The Management API lets you manage an InfluxDB 3 Cloud Dedicated instance and 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.

-

Authentication

The InfluxDB Management API endpoints require the following credentials:

-
    -
  • ACCOUNT_ID: The ID of the account that the cluster belongs to. To view account ID and cluster ID, list cluster details.

    -
  • -
  • CLUSTER_ID: The ID of the cluster that you want to manage. To view account ID and cluster ID, list cluster details.

    -
  • -
  • Authorization MANAGEMENT_TOKEN: the Authorization HTTP header with a management token.

    -

    See how to create a management token.

    -

    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.

    -
  • -
-

Database tokens

Manage database read/write tokens for a cluster

-

Get all database tokens for a cluster

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account to get the database tokens for

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster to get the database tokens for

-

Responses

Request samples

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"
-}
-

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

Create a database token

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.

-
path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account to create the database token for

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster to create the database token for

-
Request Body schema: application/json
description
required
string (schemas)

The description of the database token

-
Array of objects (schemas)

The list of permissions the database token allows

-

Responses

Request samples

Content type
application/json
Example
{
  • "description": "Limited Access Token",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "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",
  • "accessToken": "apiv1_5555555555555555555555555555555555555555555555555555555555555555"
}

Get a database token

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account that the database token belongs to

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster that the database token belongs to

-
tokenId
required
string <uuid> (UuidV4)

The ID of the database token to get

-

Responses

Request samples

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"
-}
-

Response samples

Content type
application/json
Example
{
  • "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"
}

Update a database token

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account that the database token belongs to

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster that the database token belongs to

-
tokenId
required
string <uuid> (UuidV4)

The ID of the database token to update

-
Request Body schema: application/json
description
string (schemas)

The description of the database token

-
Array of objects (schemas)

The list of permissions the database token allows

-

Responses

Request samples

Content type
application/json
Example
{
  • "description": "Updated Limited Access Token",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "accountId": "11111111-1111-4111-8111-111111111111",
  • "clusterId": "33333333-3333-4333-8333-333333333333",
  • "id": "55555555-5555-4555-8555-555555555555",
  • "description": "Updated Limited Access Token",
  • "permissions": [
    ],
  • "createdAt": "2023-12-21T17:32:28.000Z"
}

Delete a database token

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account that the database token belongs to

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster that the database token belongs to

-
tokenId
required
string <uuid> (UuidV4)

The ID of the database token to delete

-

Responses

Request samples

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"
-}
-

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "bad request"
}

Databases

Manage databases for a cluster

-

Get all databases for a cluster

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account to get the databases for

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster to get the databases for

-

Responses

Request samples

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"
-}
-

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create a database

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account to create the database for

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster to create the database for

-
Request Body schema: application/json
maxColumnsPerTable
integer <int32> (schemas) >= 1
Default: 200

The maximum number of columns per table for the cluster database

-
maxTables
integer <int32> (schemas) >= 1
Default: 500

The maximum number of tables for the cluster database

-
name
required
string (schemas) [ 1 .. 64 ] characters

The name of the cluster database

-
Array of ClusterDatabasePartitionTemplatePartTagValue (object) or ClusterDatabasePartitionTemplatePartTimeFormat (object) or ClusterDatabasePartitionTemplatePartBucket (object) (schemas) [ 1 .. 8 ] items unique

A template for partitioning a cluster database.

-

Each template part is evaluated in sequence, concatinating the final -partition key from the output of each part, delimited by the partition -key delimiter |.

-

For example, using the partition template below:

-
[
-  {
-    "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.

-
retentionPeriod
integer <int64> (schemas) >= 0
Default: 0

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

-

Responses

Request samples

Content type
application/json
Example
{
  • "name": "DatabaseOne"
}

Response samples

Content type
application/json
Example
{
  • "accountId": "11111111-1111-4111-8111-111111111111",
  • "clusterId": "33333333-3333-4333-8333-333333333333",
  • "name": "DatabaseOne",
  • "maxTables": 500,
  • "maxColumnsPerTable": 200,
  • "retentionPeriod": 0
}

Update a database

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account that the database belongs to

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster that the database belongs to

-
databaseName
required
string (ClusterDatabaseName) [ 1 .. 64 ] characters

The name of the database to update

-
Request Body schema: application/json
maxColumnsPerTable
integer <int32> (schemas) >= 1
Default: 200

The maximum number of columns per table for the cluster database

-
maxTables
integer <int32> (schemas) >= 1
Default: 500

The maximum number of tables for the cluster database

-
retentionPeriod
integer <int64> (schemas) >= 0
Default: 0

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

-

Responses

Request samples

Content type
application/json
Example
{
  • "maxTables": 300,
  • "maxColumnsPerTable": 150,
  • "retentionPeriod": 600000000000
}

Response samples

Content type
application/json
Example
{
  • "accountId": "11111111-1111-4111-8111-111111111111",
  • "clusterId": "33333333-3333-4333-8333-333333333333",
  • "name": "DatabaseOne",
  • "maxTables": 300,
  • "maxColumnsPerTable": 150,
  • "retentionPeriod": 600000000000
}

Delete a database

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account that the database belongs to

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster that the database belongs to

-
databaseName
required
string (ClusterDatabaseName) [ 1 .. 64 ] characters

The name of the database to delete

-

Responses

Request samples

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"
-}
-

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "bad request"
}

Tables

Manage tables in a database

-

Create a database table

path Parameters
accountId
required
string <uuid> (UuidV4)

The ID of the account to create the database table for

-
clusterId
required
string <uuid> (UuidV4)

The ID of the cluster to create the database table for

-
databaseName
required
string (ClusterDatabaseName) [ 1 .. 64 ] characters

The name of the database to create the database table for

-
Request Body schema: application/json
name
required
string (schemas) non-empty

The name of the cluster database table

-
Array of ClusterDatabasePartitionTemplatePartTagValue (object) or ClusterDatabasePartitionTemplatePartTimeFormat (object) or ClusterDatabasePartitionTemplatePartBucket (object) (schemas) [ 1 .. 8 ] items unique

A template for partitioning a cluster database.

-

Each template part is evaluated in sequence, concatinating the final -partition key from the output of each part, delimited by the partition -key delimiter |.

-

For example, using the partition template below:

-
[
-  {
-    "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.

-

Responses

Request samples

Content type
application/json
Example
{
  • "name": "TableOne"
}

Response samples

Content type
application/json
Example
{
  • "accountId": "11111111-1111-4111-8111-111111111111",
  • "clusterId": "33333333-3333-4333-8333-333333333333",
  • "databaseName": "DatabaseOne",
  • "name": "TableOne"
}
- - - - - diff --git a/content/influxdb3/cloud-dedicated/api/v1-compatibility/_index.html b/content/influxdb3/cloud-dedicated/api/v1-compatibility/_index.html deleted file mode 100644 index cb1826f4e..000000000 --- a/content/influxdb3/cloud-dedicated/api/v1-compatibility/_index.html +++ /dev/null @@ -1,609 +0,0 @@ ---- -title: InfluxDB v1 HTTP API for InfluxDB 3 Cloud Dedicated -description: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database. -layout: api -menu: - influxdb3_cloud_dedicated: - parent: InfluxDB HTTP API - name: v1 Compatibility API - identifier: api-reference-v1-compatibility -weight: 304 -aliases: - - /influxdb/cloud-dedicated/api/v1/ ---- - - - - - - - - - - - InfluxDB - - - - - - - - - - - - - - - - -
-
-
- - -

InfluxDB v1 HTTP API for InfluxDB 3 Cloud Dedicated

License: MIT

The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Dedicated database.

-

The InfluxDB 1.x /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.

-

This documentation is generated from the -InfluxDB OpenAPI specification.

- -

InfluxDB /api/v2 API for InfluxDB 3 Cloud Dedicated

-

Authentication

The InfluxDB 1.x API requires authentication for all requests. -InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.

-

For more information, see the following:

- -

TokenAuthentication

Use the Token authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Token followed by a space and an InfluxDB API token. -The word Token is case-sensitive.

-

Syntax

-

Authorization: Token YOUR_INFLUX_TOKEN

-

For examples and more information, see the following:

- -
Security Scheme Type API Key
Header parameter name: Authorization

BasicAuthentication

Use the HTTP Basic authentication -scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the Authorization: Token scheme):

-

For examples and more information, see how to authenticate with a username and password.

-
Security Scheme Type HTTP
HTTP Authorization Scheme basic

QuerystringAuthentication

Use the Querystring authentication -scheme with InfluxDB 1.x API parameters to provide credentials through the query string.

-

For examples and more information, see how to authenticate with a username and password.

-
Security Scheme Type API Key
Query parameter name: u=&p=

Query

Query using the InfluxDB v1 HTTP API

query Parameters
db
required
string

Bucket to query.

-
p
string

User token.

-
q
string

Defines the influxql query to run.

-
rp
string

Retention policy name.

-
u
string

Username.

-
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack"

Specifies how query results should be encoded in the response. Note: With application/csv, query results include epoch timestamps instead of RFC3339 timestamps.

-
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.

-
Content-Type
string
Value: "application/vnd.influxql"
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

-
Request Body schema: text/plain

InfluxQL query to execute.

-
string

Responses

Response samples

Content type
No sample

Write

Write time series data into InfluxDB in a V1-compatible format

query Parameters
db
required
string

Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.

-
p
string

User token.

-
precision
string

Write precision.

-
rp
string

Retention policy name.

-
u
string

Username.

-
header Parameters
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, its value indicates to the database that compression is applied to the line protocol body.

-
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

-
Request Body schema: text/plain

Line protocol body

-
string

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string",
  • "line": 0
}

Ping

Get the status of the instance

Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.

-

The response is a HTTP 204 status code to inform you the querier is available.

-

For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.

-

To check the health of ingesters before writing data, send a request to one of the write endpoints.

-

This endpoint doesn't require authentication.

-
Authorizations:
None

Responses

Get the status of the instance

Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.

-

The response is a HTTP 204 status code to inform you the querier is available.

-

For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.

-

To check the health of ingesters before writing data, send a request to one of the write endpoints.

-

This endpoint doesn't require authentication.

-
Authorizations:
None

Responses

- - - - - diff --git a/content/influxdb3/cloud-dedicated/api/v2/_index.html b/content/influxdb3/cloud-dedicated/api/v2/_index.html deleted file mode 100644 index af765539b..000000000 --- a/content/influxdb3/cloud-dedicated/api/v2/_index.html +++ /dev/null @@ -1,1002 +0,0 @@ ---- -title: InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated -description: The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Cloud Dedicated database. -layout: api -menu: - influxdb3_cloud_dedicated: - parent: InfluxDB HTTP API - name: v2 API - identifier: api-reference-v2 -weight: 102 -aliases: - - /influxdb/cloud-dedicated/api/ ---- - - - - - - - - - - - InfluxDB - - - - - - - - - - - - - - - - -
-
-
- - -

InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated

License: MIT

The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Dedicated provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Cloud Dedicated database.

-

The InfluxDB v2 HTTP API lets you use /api/v2 endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance.

-

This documentation is generated from the -InfluxDB OpenAPI specification.

-

Quick start

See the Get Started tutorial -to get up and running authenticating with tokens, writing to databases, and querying data.

-

InfluxDB API client libraries and Flight clients -are available to integrate InfluxDB APIs with your application.

-

API compatibility

Write data

-

InfluxDB 3 Cloud Dedicated provides the following HTTP API endpoints for writing data:

-
    -
  • Recommended: /api/v2/write endpoint for new write workloads or for bringing existing InfluxDB v2 write workloads to InfluxDB 3.
  • -
  • /write endpoint for bringing existing InfluxDB v1 write workloads to InfluxDB 3.
  • -
-

Both endpoints accept the same line protocol format and process data in the same way.

-

Query data

-

InfluxDB 3 Cloud Dedicated provides the following protocols for executing a query:

- -

InfluxDB v2 compatibility

-

The HTTP API /api/v2/write endpoint works with the Bearer and Token authentication schemes and existing InfluxDB 2.x tools and code for writing data.

-

See how to use the InfluxDB v2 HTTP API with InfluxDB 3 Cloud Dedicated.

-

InfluxDB v1 compatibility

-

The HTTP API /write endpoint and /query endpoint work with InfluxDB 1.x username/password authentication schemes and existing InfluxDB 1.x tools and code.

-

See how to use the InfluxDB v1 HTTP API with InfluxDB 3 Cloud Dedicated.

-

Authentication

Use one of the following schemes to authenticate to the InfluxDB API:

- -

BasicAuthentication

Basic authentication scheme

-

Use the Authorization header with the Basic scheme to authenticate v1 API /write and /query requests. -When authenticating requests, InfluxDB 3 Cloud Dedicated checks that the password part of the decoded credential is an authorized database token. -InfluxDB 3 Cloud Dedicated ignores the username part of the decoded credential.

-

Syntax

-
Authorization: Basic <base64-encoded [USERNAME]:DATABASE_TOKEN>
-

Replace the following:

-
    -
  • [USERNAME]: an optional string value (ignored by InfluxDB 3 Cloud Dedicated).
  • -
  • DATABASE_TOKEN: a database token.
  • -
  • Encode the [USERNAME]:DATABASE_TOKEN credential using base64 encoding, and then append the encoded string to the Authorization: Basic header.
  • -
-

Example

-

The following example shows how to use cURL with the Basic authentication scheme and a database token:

-
#######################################
-# Use Basic authentication with a database token
-# to query the InfluxDB v1 HTTP API
-#######################################
-# Use the --user option with `--user username:DATABASE_TOKEN` syntax
-#######################################
-
-curl --get "http://cluster-id.a.influxdb.io/query" \
-  --user "":"DATABASE_TOKEN" \
-  --data-urlencode "db=DATABASE_NAME" \
-  --data-urlencode "q=SELECT * FROM MEASUREMENT"
-

Replace the following:

-
    -
  • DATABASE_NAME: your InfluxDB 3 Cloud Dedicated database
  • -
  • DATABASE_TOKEN: a database token with sufficient permissions to the database
  • -
-
Security Scheme Type HTTP
HTTP Authorization Scheme basic

QuerystringAuthentication

Use the Querystring authentication -scheme with InfluxDB 1.x API parameters to provide credentials through the query string.

-

Query string authentication

-

In the URL, pass the p query parameter to authenticate /write and /query requests. -When authenticating requests, InfluxDB 3 Cloud Dedicated checks that p (password) is an authorized database token and ignores the u (username) parameter.

-

Syntax

-
https://cluster-id.a.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN
-https://cluster-id.a.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN
-

Example

-

The following example shows how to use cURL with query string authentication and a database token.

-
#######################################
-# Use an InfluxDB 1.x compatible username and password
-# to query the InfluxDB v1 HTTP API
-#######################################
-# Use authentication query parameters:
-#   ?p=DATABASE_TOKEN
-#######################################
-
-curl --get "https://cluster-id.a.influxdb.io/query" \
-  --data-urlencode "p=DATABASE_TOKEN" \
-  --data-urlencode "db=DATABASE_NAME" \
-  --data-urlencode "q=SELECT * FROM MEASUREMENT"
-

Replace the following:

-
    -
  • DATABASE_NAME: your InfluxDB 3 Cloud Dedicated database
  • -
  • DATABASE_TOKEN: a database token with sufficient permissions to the database
  • -
-
Security Scheme Type API Key
Query parameter name: u=&p=

BearerAuthentication

Use the OAuth Bearer authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Bearer followed by a space and a database token.

-

Syntax

-
Authorization: Bearer INFLUX_TOKEN
-

Example

-
########################################################
-# Use the Bearer token authentication scheme with /api/v2/write
-# to write data.
-########################################################
-
-curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
-  --header "Authorization: Bearer DATABASE_TOKEN" \
-  --data-binary 'home,room=kitchen temp=72 1463683075'
-

For examples and more information, see the following:

- -
Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

TokenAuthentication

Use the Token authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Token followed by a space and a database token. -The word Token is case-sensitive.

-

Syntax

-
Authorization: Token INFLUX_API_TOKEN
-

Example

-
########################################################
-# Use the Token authentication scheme with /api/v2/write
-# to write data.
-########################################################
-
-curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
-  --header "Authorization: Token DATABASE_TOKEN" \
-  --data-binary 'home,room=kitchen temp=72 1463683075'
- - -
Security Scheme Type API Key
Header parameter name: Authorization

Headers

InfluxDB HTTP API endpoints use standard HTTP request and response headers. -The following table shows common headers used by many InfluxDB API endpoints. -Some endpoints may use other headers that perform functions more specific to those endpoints--for example, -the POST /api/v2/write endpoint accepts the Content-Encoding header to indicate the compression applied to line protocol in the request body.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HeaderValue typeDescription
AcceptstringThe content type that the client can understand.
AuthorizationstringThe authorization scheme and credential.
Content-LengthintegerThe size of the entity-body, in bytes, sent to the database.
Content-TypestringThe format of the data in the request body.
-

Response codes

InfluxDB HTTP API endpoints use standard HTTP status codes for success and failure responses. -The response body may include additional details. -For details about a specific operation's response, -see Responses and Response Samples for that operation.

-

API operations may return the following HTTP status codes:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Code StatusDescription
200Success
201CreatedOne or more resources are created. The response body contains details about the resource.
204No contentThe request is successful and no data is returned. For example, The /write and /api/v2/write endpoints return this status code if all data in the batch is written and queryable.
400Bad requestInfluxDB can't parse the request due to an incorrect parameter or bad syntax. For writes, the error may indicate one of the following problems:
  • Rejected points
  • Authorization header is missing or malformed or the API token doesn't have permission for the operation.
401UnauthorizedMay indicate one of the following:
  • Authorization: Token header is missing or malformed
  • API token value is missing from the header
  • API token doesn't have permission. For more information about token types and permissions, see Manage tokens
404Not foundRequested resource was not found. message in the response body provides details about the requested resource.
405Method not allowedThe API path doesn't support the HTTP method used in the request--for example, you send a POST request to an endpoint that only allows GET.
422Unprocessable entityRequest data is invalid. code and message in the response body provide details about the problem.
500Internal server error
503Service unavailableServer is temporarily unavailable to process the request. The Retry-After header describes when to try the request again.
-

System information endpoints

Ping

Get the status of the instance

Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.

-

The response is a HTTP 204 status code to inform you the querier is available.

-

For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.

-

To check the health of ingesters before writing data, send a request to one of the write endpoints.

-

This endpoint doesn't require authentication.

-
Authorizations:
None

Responses

Get the status of the instance

Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.

-

The response is a HTTP 204 status code to inform you the querier is available.

-

For InfluxDB 3 Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.

-

To check the health of ingesters before writing data, send a request to one of the write endpoints.

-

This endpoint doesn't require authentication.

-
Authorizations:
None

Responses

Query

Query data stored in a database.

-
    -
  • HTTP clients can query the v1 /query endpoint -using InfluxQL and retrieve data in CSV or JSON format.
  • -
  • The /api/v2/query endpoint can't query InfluxDB 3 Cloud Dedicated.
  • -
  • Flight + gRPC clients can query using SQL or InfluxQL and retrieve data in Arrow format.
  • -
- - -

Query using the InfluxDB v1 HTTP API

Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats.

-
query Parameters
db
required
string

The database to query data from.

-
epoch
string
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

A unix timestamp precision. -Formats timestamps as unix (epoch) timestamps the specified precision -instead of RFC3339 timestamps with nanosecond precision.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
q
required
string

The InfluxQL query to execute. To execute multiple queries, delimit queries with a semicolon (;).

-
rp
string

The retention policy to query data from. -For more information, see InfluxQL DBRP naming convention.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack"

Media type that the client can understand.

-

Note: With application/csv, query results include unix timestamps instead of RFC3339 timestamps.

-
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The content encoding (usually a compression algorithm) that the client can understand.

-
Content-Type
string
Value: "application/json"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
No sample

Write

Write time series data to databases using InfluxDB v1 or v2 endpoints.

-

Write data

Writes data to a database.

-

Use this endpoint to send data in line protocol format to InfluxDB.

-

InfluxDB 3 Cloud Dedicated does the following when you send a write request:

-
    -
  1. Validates the request.

    -
  2. -
  3. If successful, attempts to ingest data from the request body; otherwise, responds with an error status.

    -
  4. -
  5. Ingests or rejects data in the batch and returns one of the following HTTP status codes:

    -
      -
    • 204 No Content: All data in the batch is ingested.
    • -
    • 400 Bad Request: Some (when partial writes are configured for the cluster) or all of the data has been rejected. Data that has not been rejected is ingested and queryable.
    • -
    -
  6. -
-

The response body contains error details about rejected points, up to 100 points.

-

Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.

-

To ensure that InfluxDB handles writes in the order you request them, -wait for the response before you send the next request.

-

Write endpoints

-

The /write and /api/v2/write endpoints are functionally equivalent for writing data to InfluxDB 3 Cloud Dedicated.

- - - -
query Parameters
bucket
required
string

A database name or ID. -InfluxDB writes all points in the batch to the specified database.

-
org
required
string

Ignored. An organization name or ID.

-

InfluxDB ignores this parameter; authorizes the request using the specified database token -and writes data to the specified cluster database.

-
orgID
string

Ignored. An organization ID.

-

InfluxDB ignores this parameter; authorizes the request using the specified database token -and writes data to the specified cluster database.

-
precision
string (WritePrecision)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

-
header Parameters
Accept
string
Default: application/json
Value: "application/json"

The content type that the client can understand. -Writes only return a response body if they fail--for example, -due to a formatting problem or quota limit.

-

InfluxDB Cloud

-
    -
  • Returns only application/json for format and limit errors.
  • -
  • Returns only text/html for some quota limit errors.
  • -
- - -
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

The compression applied to the line protocol in the request payload. -To send a gzip payload, pass Content-Encoding: gzip header.

-
Content-Length
integer

The size of the entity-body, in bytes, sent to InfluxDB. -If the length is greater than the max body configuration option, -the server responds with status code 413.

-
Content-Type
string
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The format of the data in the request body. -To send a line protocol payload, pass Content-Type: text/plain; charset=utf-8.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

In the request body, provide data in line protocol format.

-

To send compressed data, do the following:

-
    -
  1. Use gzip to compress the line protocol data.
  2. -
  3. In your request, send the compressed data and the -Content-Encoding: gzip header.
  4. -
- - -
string <byte>

Responses

Request samples

Content type
text/plain
airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
-airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
-

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "line": 2,
  • "message": "failed to parse line protocol: errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)"
}

Write data using the InfluxDB v1 HTTP API

Writes data to a database.

-

Use this endpoint for InfluxDB v1 parameter compatibility when sending data in line protocol format to InfluxDB.

-

InfluxDB 3 Cloud Dedicated does the following when you send a write request:

-
    -
  1. Validates the request.

    -
  2. -
  3. If successful, attempts to ingest data from the request body; otherwise, responds with an error status.

    -
  4. -
  5. Ingests or rejects data in the batch and returns one of the following HTTP status codes:

    -
      -
    • 204 No Content: all data in the batch is ingested
    • -
    • 201 Created (If the cluster is configured to allow partial writes): some points in the batch are ingested and queryable, and some points are rejected
    • -
    • 400 Bad Request: all data is rejected
    • -
    -
  6. -
-

The response body contains error details about rejected points, up to 100 points.

-

Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.

-

To ensure that InfluxDB handles writes in the order you request them, -wait for the response before you send the next request.

-

Write endpoints

-

The /write and /api/v2/write endpoints are functionally equivalent for writing data to InfluxDB 3 Cloud Dedicated.

- - - -
query Parameters
db
required
string

database to write to. If none exists, InfluxDB creates a database with a default 3-day retention policy.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
precision
string

Write precision.

-
rp
string

Retention policy name.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, its value indicates to the database that compression is applied to the line protocol body.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

Line protocol body

-
string

Responses

Response samples

Content type
application/json
Example
{
  • "code": "invalid",
  • "line": 2,
  • "message": "no data written, errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)"
}
- - - - - diff --git a/content/influxdb3/cloud-serverless/api/v1-compatibility/_index.html b/content/influxdb3/cloud-serverless/api/v1-compatibility/_index.html deleted file mode 100644 index 7274eb439..000000000 --- a/content/influxdb3/cloud-serverless/api/v1-compatibility/_index.html +++ /dev/null @@ -1,579 +0,0 @@ ---- -title: InfluxDB v1 HTTP API for InfluxDB 3 Cloud Serverless -description: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Serverless bucket. -layout: api -menu: - influxdb3_cloud_serverless: - parent: InfluxDB HTTP API - name: v1 Compatibility API - identifier: api-reference-v1-compatibility -weight: 304 -aliases: - - /influxdb/cloud-serverless/api/v1/ ---- - - - - - - - - - - - InfluxDB - - - - - - - - - - - - - - - - -
-
-
- - -

InfluxDB v1 HTTP API for InfluxDB 3 Cloud Serverless

License: MIT

The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Cloud Serverless bucket.

-

The InfluxDB 1.x /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.

-

This documentation is generated from the -InfluxDB OpenAPI specification.

- -

InfluxDB /api/v2 API for InfluxDB 3 Cloud Serverless

-

Authentication

The InfluxDB 1.x API requires authentication for all requests. -InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.

-

For more information, see the following:

- -

TokenAuthentication

Use the Token authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Token followed by a space and an InfluxDB API token. -The word Token is case-sensitive.

-

Syntax

-

Authorization: Token YOUR_INFLUX_TOKEN

-

For examples and more information, see the following:

- -
Security Scheme Type API Key
Header parameter name: Authorization

BasicAuthentication

Use the HTTP Basic authentication -scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the Authorization: Token scheme):

-

For examples and more information, see how to authenticate with a username and password.

-
Security Scheme Type HTTP
HTTP Authorization Scheme basic

QuerystringAuthentication

Use the Querystring authentication -scheme with InfluxDB 1.x API parameters to provide credentials through the query string.

-

For examples and more information, see how to authenticate with a username and password.

-
Security Scheme Type API Key
Query parameter name: u=&p=

Query

Query using the InfluxDB v1 HTTP API

query Parameters
db
required
string

Bucket to query.

-
p
string

User token.

-
q
string

Defines the influxql query to run.

-
rp
string

Retention policy name.

-
u
string

Username.

-
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack"

Specifies how query results should be encoded in the response. Note: With application/csv, query results include epoch timestamps instead of RFC3339 timestamps.

-
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.

-
Content-Type
string
Value: "application/vnd.influxql"
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

-
Request Body schema: text/plain

InfluxQL query to execute.

-
string

Responses

Response samples

Content type
No sample

Write

Write time series data into InfluxDB in a V1-compatible format

query Parameters
db
required
string

Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.

-
p
string

User token.

-
precision
string

Write precision.

-
rp
string

Retention policy name.

-
u
string

Username.

-
header Parameters
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, its value indicates to the database that compression is applied to the line protocol body.

-
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

-
Request Body schema: text/plain

Line protocol body

-
string

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string",
  • "line": 0
}
- - - - - diff --git a/content/influxdb3/cloud-serverless/api/v2/_index.html b/content/influxdb3/cloud-serverless/api/v2/_index.html deleted file mode 100644 index bafe01ebc..000000000 --- a/content/influxdb3/cloud-serverless/api/v2/_index.html +++ /dev/null @@ -1,4673 +0,0 @@ ---- -title: InfluxDB 3 Cloud Serverless API Service -description: The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB 3 Cloud Serverless bucket. -layout: api -menu: - influxdb3_cloud_serverless: - parent: InfluxDB HTTP API - name: v2 API - identifier: api-reference-v2 -weight: 102 -aliases: - - /influxdb/cloud-serverless/api/ ---- - - - - - - - - - - - InfluxDB - - - - - - - - - - - - - - - - -
-
-
- - -

InfluxDB 3 Cloud Serverless API Service

License: MIT

The InfluxDB v2 HTTP API for InfluxDB 3 Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB 3 Cloud Serverless bucket.

-

The InfluxDB v2 HTTP API lets you use /api/v2 endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance.

-

This documentation is generated from the -InfluxDB OpenAPI specification.

-

Quick start

See the Get started tutorial -to get up and running authenticating with tokens, writing to buckets, and querying data.

-

InfluxDB API client libraries and Flight clients -are available to integrate InfluxDB with your application.

-

Authentication

Use one of the following schemes to authenticate to the InfluxDB API:

- -

BasicAuthentication

Basic authentication scheme

-

Use the HTTP Basic authentication scheme for InfluxDB /api/v2 API operations that support it:

-

Syntax

-

Authorization: Basic BASE64_ENCODED_CREDENTIALS

-

To construct the BASE64_ENCODED_CREDENTIALS, combine the username and -the password with a colon (USERNAME:PASSWORD), and then encode the -resulting string in base64. -Many HTTP clients encode the credentials for you before sending the -request.

-

Warning: Base64-encoding can easily be reversed to obtain the original -username and password. It is used to keep the data intact and does not provide -security. You should always use HTTPS when authenticating or sending a request with -sensitive information.

-

Examples

-

In the examples, replace the following:

-
    -
  • EMAIL_ADDRESS: InfluxDB Cloud username (the email address the user signed up with)
  • -
  • PASSWORD: InfluxDB Cloud API token
  • -
  • INFLUX_URL: your InfluxDB Cloud URL
  • -
-

Encode credentials with cURL

-

The following example shows how to use cURL to send an API request that uses Basic authentication. -With the --user option, cURL encodes the credentials and passes them -in the Authorization: Basic header.

-
curl --get "INFLUX_URL/api/v2/signin"
-    --user "EMAIL_ADDRESS":"PASSWORD"
-

Encode credentials with Flux

-

The Flux http.basicAuth() function returns a Base64-encoded -basic authentication header using a specified username and password combination.

-

Encode credentials with JavaScript

-

The following example shows how to use the JavaScript btoa() function -to create a Base64-encoded string:

-
btoa('EMAIL_ADDRESS:PASSWORD')
-

The output is the following:

-
'VVNFUk5BTUU6UEFTU1dPUkQ='
-

Once you have the Base64-encoded credentials, you can pass them in the -Authorization header--for example:

-
curl --get "INFLUX_URL/api/v2/signin"
-    --header "Authorization: Basic VVNFUk5BTUU6UEFTU1dPUkQ="
-

To learn more about HTTP authentication, see -Mozilla Developer Network (MDN) Web Docs, HTTP authentication._

-
Security Scheme Type HTTP
HTTP Authorization Scheme basic

TokenAuthentication

Use the Token authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Token followed by a space and an InfluxDB API token. -The word Token is case-sensitive.

-

Syntax

-

Authorization: Token INFLUX_API_TOKEN

-

Example

-

Use Token authentication with cURL

-

The following example shows how to use cURL to send an API request that uses Token authentication:

-
curl --request GET "INFLUX_URL/api/v2/buckets" \
-     --header "Authorization: Token INFLUX_API_TOKEN"
-

Replace the following:

- - - - - -
Security Scheme Type API Key
Header parameter name: Authorization

Supported operations

The following table shows the most common operations that the InfluxDB /api/v2 API supports. -Some resources may support other operations that perform functions more specific to those resources. -For example, you can use the PATCH /api/v2/scripts endpoint to update properties of a script -resource.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Operation
WriteWrites (POST) data to a bucket.
RunExecutes (POST) a query or script and returns the result.
ListRetrieves (GET) a list of zero or more resources.
CreateCreates (POST) a new resource and returns the resource.
UpdateModifies (PUT) an existing resource to reflect data in your request.
DeleteRemoves (DELETE) a specific resource.
-

Headers

InfluxDB HTTP API endpoints use standard HTTP request and response headers. -The following table shows common headers used by many InfluxDB API endpoints. -Some endpoints may use other headers that perform functions more specific to those endpoints--for example, -the POST /api/v2/write endpoint accepts the Content-Encoding header to indicate the compression applied to line protocol in the request body.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HeaderValue typeDescription
AcceptstringThe content type that the client can understand.
AuthorizationstringThe authorization scheme and credential.
Content-LengthintegerThe size of the entity-body, in bytes.
Content-TypestringThe format of the data in the request body.
-

Pagination

Some InfluxDB API list operations may support the following query parameters for paginating results:

- - - - - - - - - - - - - - - - - - - - - - - -
Query parameterValue typeDescription
limitintegerThe maximum number of records to return (after other parameters are applied).
offsetintegerThe number of records to skip (before limit, after other parameters are applied).
afterstring (resource ID)Only returns resources created after the specified resource.
-

Limitations

-
    -
  • For specific endpoint parameters and examples, see the endpoint definition.

    -
  • -
  • If you specify an offset parameter value greater than the total number of records, -then InfluxDB returns an empty list in the response -(given offset skips the specified number of records).

    -

    The following example passes offset=50 to skip the first 50 results, -but the user only has 10 buckets:

    -
    curl --request GET "INFLUX_URL/api/v2/buckets?limit=1&offset=50" \
    -    --header "Authorization: Token INFLUX_API_TOKEN"
    -

    The response contains the following:

    -
    {
    -  "links": {
    -      "prev": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=49\u0026orgID=ORG_ID",
    -      "self": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=50\u0026orgID=ORG_ID"
    -  },
    -  "buckets": []
    -}
    -
  • -
-

Response codes

InfluxDB HTTP API endpoints use standard HTTP status codes for success and failure responses. -The response body may include additional details. -For details about a specific operation's response, -see Responses and Response Samples for that operation.

-

API operations may return the following HTTP status codes:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Code StatusDescription
200Success
201CreatedSuccessfully created a resource. The response body may contain details, for example /write and /api/v2/write response bodies contain details of partial write failures.
204No contentThe request succeeded.
400Bad requestInfluxDB can't parse the request due to an incorrect parameter or bad syntax. For writes, the error may indicate one of the following problems:
  • Line protocol is malformed. The response body contains the first malformed line in the data and indicates what was expected.
  • The batch contains a point with the same series as other points, but one of the field values has a different data type.
  • Authorization header is missing or malformed or the API token doesn't have permission for the operation.
401UnauthorizedMay indicate one of the following:
  • Authorization: Token header is missing or malformed
  • API token value is missing from the header
  • API token doesn't have permission. For more information about token types and permissions, see Manage API tokens
404Not foundRequested resource was not found. message in the response body provides details about the requested resource.
405Method not allowedThe API path doesn't support the HTTP method used in the request--for example, you send a POST request to an endpoint that only allows GET.
413Request entity too largeRequest payload exceeds the size limit.
422Unprocessable entityRequest data is invalid. code and message in the response body provide details about the problem.
429Too many requestsAPI token is temporarily over the request quota. The Retry-After header describes when to try the request again.
500Internal server error
503Service unavailableServer is temporarily unavailable to process the request. The Retry-After header describes when to try the request again.
-

Data I/O endpoints

Write data

Writes data to a bucket.

-

Use this endpoint to send data in line protocol format to InfluxDB.

-

InfluxDB 3 Cloud Serverless does the following when you send a write request:

-
    -
  1. Validates the request.

    -
  2. -
  3. If successful, attempts to ingest data from the request body; otherwise, responds with an error status.

    -
  4. -
  5. Ingests or rejects data in the batch and returns one of the following HTTP status codes:

    -
      -
    • 204 No Content: All data in the batch is ingested.
    • -
    • 400 Bad Request: Data from the batch was rejected and not written. The response body indicates if a partial write occurred.
    • -
    -
  6. -
-

The response body contains error details about rejected points, up to 100 points.

-

Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.

-

To ensure that InfluxDB handles writes in the order you request them, -wait for the response before you send the next request.

-

Write endpoints

-

The /write and /api/v2/write endpoints are functionally equivalent for writing data to InfluxDB 3 Cloud Serverless.

- -

Rate limits

-

Write rate limits apply. -For more information, see limits and adjustable quotas.

- - -
Authorizations:
query Parameters
bucket
required
string

A bucket name or ID. -InfluxDB writes all points in the batch to the specified bucket.

-
org
required
string

An organization name or ID.

-

InfluxDB 3 Cloud Serverless writes data to the bucket in the organization associated with the authorization (API token); -doesn't use the org parameter or orgID parameter.

-
orgID
string

An organization ID.

-

InfluxDB 3 Cloud Serverless writes data to the bucket in the organization associated with the authorization (API token); -doesn't use the org parameter or orgID parameter.

-
precision
string (WritePrecision)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

-
header Parameters
Accept
string
Default: application/json
Value: "application/json"

The content type that the client can understand. -Writes only return a response body if they fail--for example, -due to a formatting problem or quota limit.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Returns only application/json for format and limit errors.
  • -
  • Returns only text/html for some quota limit errors.
  • -
- - -
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

The compression applied to the line protocol in the request payload. -To send a gzip payload, pass Content-Encoding: gzip header.

-
Content-Length
integer

The size of the entity-body, in bytes, sent to InfluxDB. -If the length is greater than the max body configuration option, -the server responds with status code 413.

-
Content-Type
string
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The format of the data in the request body. -To send a line protocol payload, pass Content-Type: text/plain; charset=utf-8.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

In the request body, provide data in line protocol format.

-

To send compressed data, do the following:

-
    -
  1. Use gzip to compress the line protocol data.
  2. -
  3. In your request, send the compressed data and the -Content-Encoding: gzip header.
  4. -
- - -
string <byte>

Responses

Request samples

Content type
text/plain
airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
-airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
-

Response samples

Content type
application/json
Example
{
  • "code": "invalid",
  • "line": 2,
  • "message": "no data written, errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)"
}

Query using the InfluxDB v1 HTTP API

Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats.

- - -
Authorizations:
query Parameters
db
required
string

The database to query data from. -This is mapped to an InfluxDB bucket. -For more information, see Database and retention policy mapping.

-
epoch
string
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

A unix timestamp precision. -Formats timestamps as unix (epoch) timestamps the specified precision -instead of RFC3339 timestamps with nanosecond precision.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
q
required
string

The InfluxQL query to execute. To execute multiple queries, delimit queries with a semicolon (;).

-
rp
string

The retention policy to query data from. -This is mapped to an InfluxDB bucket. -For more information, see Database and retention policy mapping.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack"

Media type that the client can understand.

-

Note: With application/csv, query results include unix timestamps instead of RFC3339 timestamps.

-
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The content encoding (usually a compression algorithm) that the client can understand.

-
Content-Type
string
Value: "application/json"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
No sample

Write data using the InfluxDB v1 HTTP API

Writes data to a bucket.

-

Use this endpoint for InfluxDB v1 parameter compatibility when sending data in line protocol format to InfluxDB.

-

InfluxDB 3 Cloud Serverless does the following when you send a write request:

-
    -
  1. Validates the request.

    -
  2. -
  3. If successful, attempts to ingest data from the request body; otherwise, responds with an error status.

    -
  4. -
  5. Ingests or rejects data in the batch and returns one of the following HTTP status codes:

    -
      -
    • 204 No Content: all data in the batch is ingested
    • -
    • 201 Created: some points in the batch are ingested and queryable, and some points are rejected
    • -
    • 400 Bad Request: all data is rejected
    • -
    -
  6. -
-

The response body contains error details about rejected points, up to 100 points.

-

Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.

-

To ensure that InfluxDB handles writes in the order you request them, -wait for the response before you send the next request.

-

Write endpoints

-

The /write and /api/v2/write endpoints are functionally equivalent for writing data to InfluxDB 3 Cloud Serverless.

- -

Rate limits

-

Write rate limits apply. -For more information, see limits and adjustable quotas.

- - -
Authorizations:
query Parameters
db
required
string

Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
precision
string

Write precision.

-
rp
string

Retention policy name.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, indicates that compression is applied to the line protocol body.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

Line protocol body

-
string

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "line": 2,
  • "message": "failed to parse line protocol: errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)"
}

Security and access endpoints

List authorizations

Lists authorizations.

-

To limit which authorizations are returned, pass query parameters in your request. -If no query parameters are passed, InfluxDB returns all authorizations.

-

InfluxDB 3 Cloud Serverless doesn't expose API token - values in GET /api/v2/authorizations responses; - returns token: redacted for all authorizations.

-

Required permissions

-

To retrieve an authorization, the request must use an API token that has the -following permissions:

-
    -
  • read-authorizations
  • -
  • read-user for the user that the authorization is scoped to
  • -
- - -
Authorizations:
query Parameters
org
string

An organization name. -Only returns authorizations that belong to the specified organization.

-
orgID
string

An organization ID. Only returns authorizations that belong to the specified organization.

-
token
string

An API token value. -Specifies an authorization by its token property value -and returns the authorization.

-

InfluxDB OSS

-
    -
  • Doesn't support this parameter. InfluxDB OSS ignores the token= parameter, -applies other parameters, and then returns the result.
  • -
-

Limitations

-
    -
  • The parameter is non-repeatable. If you specify more than one, -only the first one is used. If a resource with the specified -property value doesn't exist, then the response body contains an empty list.
  • -
-
user
string

A user name. -Only returns authorizations scoped to the specified user.

-
userID
string

A user ID. -Only returns authorizations scoped to the specified user.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "authorizations": [
    ],
  • "links": {}
}

Create an authorization

Creates an authorization and returns the authorization with the -generated API token.

-

Use this endpoint to create an authorization, which generates an API token -with permissions to read or write to a specific resource or type of resource. -The API token is the authorization's token property value.

-

To follow best practices for secure API token generation and retrieval, -InfluxDB enforces access restrictions on API tokens.

-
    -
  • InfluxDB allows access to the API token value immediately after the authorization is created.
  • -
  • You can’t change access (read/write) permissions for an API token after it’s created.
  • -
  • Tokens stop working when the user who created the token is deleted.
  • -
-

We recommend the following for managing your tokens:

-
    -
  • Create a generic user to create and manage tokens for writing data.
  • -
  • Store your tokens in a secure password vault for future access.
  • -
-

Required permissions

-
    -
  • write-authorizations
  • -
  • write-user for the user that the authorization is scoped to
  • -
- - -
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The authorization to create.

-
description
string

A description of the token.

-
orgID
required
string

An organization ID. -Specifies the organization that owns the authorization.

-
required
Array of objects (Permission) non-empty

A list of permissions for an authorization. -In the list, provide at least one permission object.

-

In a permission, the resource.type property grants access to all -resources of the specified type. -To grant access to only a specific resource, specify the -resource.id property.

-
status
string
Default: "active"
Enum: "active" "inactive"

Status of the token. If inactive, InfluxDB rejects requests that use the token.

-
userID
string

A user ID. -Specifies the user that the authorization is scoped to.

-

When a user authenticates with username and password, -InfluxDB generates a user session with all the permissions -specified by all the user's authorizations.

-

Responses

Request samples

Content type
application/json
Example

Creates an authorization.

-
{
  • "description": "iot_users read buckets",
  • "orgID": "INFLUX_ORG_ID",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "status": "active",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "links": {
    },
  • "org": "string",
  • "orgID": "string",
  • "permissions": [
    ],
  • "token": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "user": "string",
  • "userID": "string"
}

Delete an authorization

Deletes an authorization.

-

Use the endpoint to delete an API token.

-

If you want to disable an API token instead of delete it, -update the authorization's status to inactive.

-
Authorizations:
path Parameters
authID
required
string

An authorization ID. Specifies the authorization to delete.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "id must have a length of 16 bytes"
}

Retrieve an authorization

Retrieves an authorization.

-

Use this endpoint to retrieve information about an API token, including -the token's permissions and the user that the token is scoped to.

-

InfluxDB OSS

-
    -
  • InfluxDB OSS returns -API token values in authorizations.
  • -
  • If the request uses an operator token, -InfluxDB OSS returns authorizations for all organizations in the instance.
  • -
- - -
Authorizations:
path Parameters
authID
required
string

An authorization ID. Specifies the authorization to retrieve.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "status": "active",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "links": {
    },
  • "org": "string",
  • "orgID": "string",
  • "permissions": [
    ],
  • "token": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "user": "string",
  • "userID": "string"
}

Update an API token to be active or inactive

Updates an authorization.

-

Use this endpoint to set an API token's status to be active or inactive. -InfluxDB rejects requests that use inactive API tokens.

-
Authorizations:
path Parameters
authID
required
string

An authorization ID. Specifies the authorization to update.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

In the request body, provide the authorization properties to update.

-
description
string

A description of the token.

-
status
string
Default: "active"
Enum: "active" "inactive"

Status of the token. If inactive, InfluxDB rejects requests that use the token.

-

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "status": "active",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "links": {
    },
  • "org": "string",
  • "orgID": "string",
  • "permissions": [
    ],
  • "token": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "user": "string",
  • "userID": "string"
}

System information endpoints

List all top level routes

Retrieves all the top level routes for the InfluxDB API.

-

Limitations

-
    -
  • Only returns top level routes--for example, the response contains -"tasks":"/api/v2/tasks", and doesn't contain resource-specific routes -for tasks (/api/v2/tasks/TASK_ID/...).
  • -
-
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{}

List all known resources

Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
[
  • "string"
]

Authorizations (API tokens)

Create and manage authorizations (API tokens).

-

An authorization contains a list of read and write -permissions for organization resources and provides an API token for authentication. -An authorization belongs to an organization and only contains permissions for that organization.

-

We recommend the following for managing your tokens:

-
    -
  • Create a generic user to create and manage tokens for writing data.
  • -
  • Store your tokens in a secure password vault for future access.
  • -
-

User sessions with authorizations

-

Optionally, when creating an authorization, you can scope it to a specific user. -If the user signs in with username and password, creating a user session, -the session carries the permissions granted by all the user's authorizations. -For more information, see how to assign a token to a specific user. -To create a user session, use the POST /api/v2/signin endpoint.

- - - - -

List authorizations

Lists authorizations.

-

To limit which authorizations are returned, pass query parameters in your request. -If no query parameters are passed, InfluxDB returns all authorizations.

-

InfluxDB 3 Cloud Serverless doesn't expose API token - values in GET /api/v2/authorizations responses; - returns token: redacted for all authorizations.

-

Required permissions

-

To retrieve an authorization, the request must use an API token that has the -following permissions:

-
    -
  • read-authorizations
  • -
  • read-user for the user that the authorization is scoped to
  • -
- - -
Authorizations:
query Parameters
org
string

An organization name. -Only returns authorizations that belong to the specified organization.

-
orgID
string

An organization ID. Only returns authorizations that belong to the specified organization.

-
token
string

An API token value. -Specifies an authorization by its token property value -and returns the authorization.

-

InfluxDB OSS

-
    -
  • Doesn't support this parameter. InfluxDB OSS ignores the token= parameter, -applies other parameters, and then returns the result.
  • -
-

Limitations

-
    -
  • The parameter is non-repeatable. If you specify more than one, -only the first one is used. If a resource with the specified -property value doesn't exist, then the response body contains an empty list.
  • -
-
user
string

A user name. -Only returns authorizations scoped to the specified user.

-
userID
string

A user ID. -Only returns authorizations scoped to the specified user.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "authorizations": [
    ],
  • "links": {}
}

Create an authorization

Creates an authorization and returns the authorization with the -generated API token.

-

Use this endpoint to create an authorization, which generates an API token -with permissions to read or write to a specific resource or type of resource. -The API token is the authorization's token property value.

-

To follow best practices for secure API token generation and retrieval, -InfluxDB enforces access restrictions on API tokens.

-
    -
  • InfluxDB allows access to the API token value immediately after the authorization is created.
  • -
  • You can’t change access (read/write) permissions for an API token after it’s created.
  • -
  • Tokens stop working when the user who created the token is deleted.
  • -
-

We recommend the following for managing your tokens:

-
    -
  • Create a generic user to create and manage tokens for writing data.
  • -
  • Store your tokens in a secure password vault for future access.
  • -
-

Required permissions

-
    -
  • write-authorizations
  • -
  • write-user for the user that the authorization is scoped to
  • -
- - -
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The authorization to create.

-
description
string

A description of the token.

-
orgID
required
string

An organization ID. -Specifies the organization that owns the authorization.

-
required
Array of objects (Permission) non-empty

A list of permissions for an authorization. -In the list, provide at least one permission object.

-

In a permission, the resource.type property grants access to all -resources of the specified type. -To grant access to only a specific resource, specify the -resource.id property.

-
status
string
Default: "active"
Enum: "active" "inactive"

Status of the token. If inactive, InfluxDB rejects requests that use the token.

-
userID
string

A user ID. -Specifies the user that the authorization is scoped to.

-

When a user authenticates with username and password, -InfluxDB generates a user session with all the permissions -specified by all the user's authorizations.

-

Responses

Request samples

Content type
application/json
Example

Creates an authorization.

-
{
  • "description": "iot_users read buckets",
  • "orgID": "INFLUX_ORG_ID",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "status": "active",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "links": {
    },
  • "org": "string",
  • "orgID": "string",
  • "permissions": [
    ],
  • "token": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "user": "string",
  • "userID": "string"
}

Delete an authorization

Deletes an authorization.

-

Use the endpoint to delete an API token.

-

If you want to disable an API token instead of delete it, -update the authorization's status to inactive.

-
Authorizations:
path Parameters
authID
required
string

An authorization ID. Specifies the authorization to delete.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "id must have a length of 16 bytes"
}

Retrieve an authorization

Retrieves an authorization.

-

Use this endpoint to retrieve information about an API token, including -the token's permissions and the user that the token is scoped to.

-

InfluxDB OSS

-
    -
  • InfluxDB OSS returns -API token values in authorizations.
  • -
  • If the request uses an operator token, -InfluxDB OSS returns authorizations for all organizations in the instance.
  • -
- - -
Authorizations:
path Parameters
authID
required
string

An authorization ID. Specifies the authorization to retrieve.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "status": "active",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "links": {
    },
  • "org": "string",
  • "orgID": "string",
  • "permissions": [
    ],
  • "token": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "user": "string",
  • "userID": "string"
}

Update an API token to be active or inactive

Updates an authorization.

-

Use this endpoint to set an API token's status to be active or inactive. -InfluxDB rejects requests that use inactive API tokens.

-
Authorizations:
path Parameters
authID
required
string

An authorization ID. Specifies the authorization to update.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

In the request body, provide the authorization properties to update.

-
description
string

A description of the token.

-
status
string
Default: "active"
Enum: "active" "inactive"

Status of the token. If inactive, InfluxDB rejects requests that use the token.

-

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "status": "active",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "links": {
    },
  • "org": "string",
  • "orgID": "string",
  • "permissions": [
    ],
  • "token": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "user": "string",
  • "userID": "string"
}

Bucket Schemas

List measurement schemas of a bucket

Lists explicit -schemas -("schemaType": "explicit") for a bucket.

-

Explicit schemas are used to enforce column names, tags, fields, and data -types for your data.

-

By default, buckets have an implicit schema-type ("schemaType": "implicit") -that conforms to your data.

- - -
Authorizations:
path Parameters
bucketID
required
string

A bucket ID. -Lists measurement schemas for the specified bucket.

-
query Parameters
name
string

A measurement name. -Only returns measurement schemas with the specified name.

-
org
string

An organization name. -Specifies the organization that owns the schema.

-
orgID
string

An organization ID. -Specifies the organization that owns the schema.

-

Responses

Response samples

Content type
application/json
{
  • "measurementSchemas": [
    ]
}

Create a measurement schema for a bucket

Creates an explicit measurement schema -for a bucket.

-

Explicit schemas are used to enforce column names, tags, fields, and data -types for your data.

-

By default, buckets have an implicit schema-type ("schemaType": "implicit") -that conforms to your data.

-

Use this endpoint to create schemas that prevent non-conforming write requests.

-

Limitations

-
    -
  • Buckets must be created with the "explicit" schemaType in order to use -schemas.
  • -
- -
Authorizations:
path Parameters
bucketID
required
string

A bucket ID. -Adds a schema for the specified bucket.

-
query Parameters
org
string

An organization name. -Specifies the organization that owns the schema.

-
orgID
string

An organization ID. -Specifies the organization that owns the schema.

-
Request Body schema: application/json
required
Array of objects (MeasurementSchemaColumn)

Ordered collection of column definitions.

-
name
required
string

The measurement -name.

-

Responses

Request samples

Content type
application/json
{
  • "columns": [
    ],
  • "name": "cpu"
}

Response samples

Content type
application/json
{
  • "bucketID": "ba3c5e7f9b0a0010",
  • "columns": [
    ],
  • "createdAt": "2021-01-21T00:48:40.993Z",
  • "id": "1a3c5e7f9b0a8642",
  • "name": "cpu",
  • "orgID": "0a3c5e7f9b0a0001",
  • "updatedAt": "2021-01-21T00:48:40.993Z"
}

Retrieve a measurement schema

Retrieves an explicit measurement schema.

-
Authorizations:
path Parameters
bucketID
required
string

A bucket ID. -Retrieves schemas for the specified bucket.

-
measurementID
required
string

The measurement schema ID. -Specifies the measurement schema to retrieve.

-
query Parameters
org
string

Organization name. -Specifies the organization that owns the schema.

-
orgID
string

Organization ID. -Specifies the organization that owns the schema.

-

Responses

Response samples

Content type
application/json
{
  • "bucketID": "ba3c5e7f9b0a0010",
  • "columns": [
    ],
  • "createdAt": "2021-01-21T00:48:40.993Z",
  • "id": "1a3c5e7f9b0a8642",
  • "name": "cpu",
  • "orgID": "0a3c5e7f9b0a0001",
  • "updatedAt": "2021-01-21T00:48:40.993Z"
}

Update a measurement schema

Updates a measurement schema.

-

Use this endpoint to update the fields (name, type, and dataType) of a -measurement schema.

-

Limitations

-
    -
  • You can't update the name of a measurement.
  • -
- - -
Authorizations:
path Parameters
bucketID
required
string

A bucket ID. -Specifies the bucket to retrieve schemas for.

-
measurementID
required
string

A measurement schema ID. -Retrieves the specified measurement schema.

-
query Parameters
org
string

An organization name. -Specifies the organization that owns the schema.

-
orgID
string

An organization ID. -Specifies the organization that owns the schema.

-
Request Body schema: application/json
required
Array of objects (MeasurementSchemaColumn)

An ordered collection of column definitions

-

Responses

Request samples

Content type
application/json
{
  • "columns": [
    ]
}

Response samples

Content type
application/json
{
  • "bucketID": "ba3c5e7f9b0a0010",
  • "columns": [
    ],
  • "createdAt": "2021-01-21T00:48:40.993Z",
  • "id": "1a3c5e7f9b0a8642",
  • "name": "cpu",
  • "orgID": "0a3c5e7f9b0a0001",
  • "updatedAt": "2021-01-21T00:48:40.993Z"
}

Buckets

Store your data in InfluxDB buckets. -A bucket is a named location where time series data is stored. All buckets -have a retention period, -a duration of time that each data point persists. InfluxDB drops all -points with timestamps older than the bucket’s retention period. -A bucket belongs to an organization.

- - -

List buckets

Lists buckets.

-

InfluxDB retrieves buckets owned by the -organization -associated with the authorization -(API token). -To limit which buckets are returned, pass query parameters in your request. -If no query parameters are passed, InfluxDB returns all buckets up to the -default limit.

-

InfluxDB OSS

-
    -
  • If you use an operator token -to authenticate your request, InfluxDB retrieves resources for all -organizations in the instance. -To retrieve resources for only a specific organization, use the -org parameter or the orgID parameter to specify the organization.
  • -
-

Required permissions

- - - - - - - - - - - - - - - -
ActionPermission required
Retrieve user bucketsread-buckets
Retrieve system bucketsread-orgs
- - -
Authorizations:
query Parameters
after
string

A resource ID to seek from. -Returns records created after the specified record; -results don't include the specified record.

-

Use after instead of the offset parameter. -For more information about pagination parameters, see Pagination.

-
id
string

A bucket ID. -Only returns the bucket with the specified ID.

-
limit
integer [ 1 .. 100 ]
Default: 20

Limits the number of records returned. Default is 20.

-
name
string

A bucket name. -Only returns buckets with the specified name.

-
offset
integer >= 0

The offset for pagination. -The number of records to skip.

-

For more information about pagination parameters, see Pagination.

-
org
string

An organization name.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Doesn't use the org parameter or orgID parameter.
  • -
  • Lists buckets for the organization associated with the authorization (API token).
  • -
-
orgID
string

An organization ID.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Doesn't use the org parameter or orgID parameter.
  • -
  • Lists buckets for the organization associated with the authorization (API token).
  • -
-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Request samples

curl --request GET "http://localhost:8086/api/v2/buckets?name=_monitoring" \
-  --header "Authorization: Token INFLUX_TOKEN" \
-  --header "Accept: application/json" \
-  --header "Content-Type: application/json"
-

Response samples

Content type
application/json
{
  • "buckets": [
    ],
  • "links": {
    }
}

Create a bucket

Creates a bucket -and returns the bucket resource. -The default data -retention period -is 30 days.

-

InfluxDB OSS

-
    -
  • A single InfluxDB OSS instance supports active writes or queries for -approximately 20 buckets across all organizations at a given time. -Reading or writing to more than 20 buckets at a time can adversely affect -performance.
  • -
-

Limitations

-
    -
  • InfluxDB Cloud Free Plan allows users to create up to two buckets. -Exceeding the bucket quota will result in an HTTP 403 status code. -For additional information regarding InfluxDB Cloud offerings, see -InfluxDB Cloud Pricing.
  • -
- - -
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The bucket to create.

-
description
string

A description of the bucket.

-
name
required
string

The bucket name.

-
orgID
required
string

The organization ID. -Specifies the organization that owns the bucket.

-
Array of objects (RetentionRules)

Retention rules to expire or retain data. -The InfluxDB /api/v2 API uses RetentionRules to configure the retention period.

-

InfluxDB 3 Cloud Serverless

-
    -
  • retentionRules is required.
  • -
-

InfluxDB OSS

-
    -
  • retentionRules isn't required.
  • -
-
rp
string
Default: "0"

The retention policy for the bucket. -For InfluxDB 1.x, specifies the duration of time that each data point -in the retention policy persists.

-

If you need compatibility with InfluxDB 1.x, specify a value for the rp property; -otherwise, see the retentionRules property.

-

Retention policy -is an InfluxDB 1.x concept. -The InfluxDB 2.x and Cloud equivalent is -retention period. -The InfluxDB /api/v2 API uses RetentionRules to configure the retention period.

-
schemaType
string (SchemaType)
Enum: "implicit" "explicit"

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string",
  • "orgID": "string",
  • "retentionRules": [
    ],
  • "rp": "0",
  • "schemaType": "implicit"
}

Response samples

Content type
application/json
{
  • "createdAt": "2022-08-03T23:04:41.073704121Z",
  • "description": "A bucket holding air sensor data",
  • "id": "37407e232b3911d8",
  • "labels": [ ],
  • "links": {
    },
  • "name": "air_sensor",
  • "orgID": "INFLUX_ORG_ID",
  • "retentionRules": [
    ],
  • "schemaType": "implicit",
  • "type": "user",
  • "updatedAt": "2022-08-03T23:04:41.073704228Z"
}

Delete a bucket

Deletes a bucket and all associated records.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Does the following when you send a delete request:

    -
      -
    1. Validates the request and queues the delete.
    2. -
    3. Returns an HTTP 204 status code if queued; error otherwise.
    4. -
    5. Handles the delete asynchronously.
    6. -
    -
  • -
-

Limitations

-
    -
  • Only one bucket can be deleted per request.
  • -
- - -
Authorizations:
path Parameters
bucketID
required
string

Bucket ID. -The ID of the bucket to delete.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Request samples

curl --request DELETE "http://localhost:8086/api/v2/buckets/BUCKET_ID" \
-  --header "Authorization: Token INFLUX_TOKEN" \
-  --header 'Accept: application/json'
-

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "id must have a length of 16 bytes"
}

Retrieve a bucket

Retrieves a bucket.

-

Use this endpoint to retrieve information for a specific bucket.

-
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to retrieve.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2022-08-03T23:04:41.073704121Z",
  • "description": "bucket for air sensor data",
  • "id": "37407e232b3911d8",
  • "labels": [ ],
  • "links": {
    },
  • "name": "air-sensor",
  • "orgID": "bea7ea952287f70d",
  • "retentionRules": [
    ],
  • "schemaType": "implicit",
  • "type": "user",
  • "updatedAt": "2022-08-03T23:04:41.073704228Z"
}

Update a bucket

Updates a bucket.

-

Use this endpoint to update properties -(name, description, and retentionRules) of a bucket.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Requires the retentionRules property in the request body. If you don't -provide retentionRules, InfluxDB responds with an HTTP 403 status code.
  • -
- - -
Authorizations:
path Parameters
bucketID
required
string

The bucket ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The bucket update to apply.

-
description
string

A description of the bucket.

-
name
string

The name of the bucket.

-
Array of objects (PatchRetentionRules)

Updates to rules to expire or retain data. No rules means no updates.

-

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string",
  • "retentionRules": [
    ]
}

Response samples

Content type
application/json
{
  • "createdAt": "2022-08-03T23:04:41.073704121Z",
  • "description": "bucket holding air sensor data",
  • "id": "37407e232b3911d8",
  • "labels": [ ],
  • "links": {
    },
  • "name": "air_sensor",
  • "orgID": "INFLUX_ORG_ID",
  • "retentionRules": [
    ],
  • "schemaType": "implicit",
  • "type": "user",
  • "updatedAt": "2022-08-07T22:49:49.422962913Z"
}

List all labels for a bucket

Lists all labels for a bucket.

-

Labels are objects that contain labelID, name, description, and color -key-value pairs. They may be used for grouping and filtering InfluxDB -resources. -Labels are also capable of grouping across different resources--for example, -you can apply a label named air_sensor to a bucket and a task to quickly -organize resources.

- - -
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to retrieve labels for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "labels": [
    ],
  • "links": {
    }
}

Add a label to a bucket

Adds a label to a bucket and returns the new label information.

-

Labels are objects that contain labelID, name, description, and color -key-value pairs. They may be used for grouping and filtering across one or -more kinds of resources--for example, you can apply a label named -air_sensor to a bucket and a task to quickly organize resources.

-

Limitations

-
    -
  • Before adding a label to a bucket, you must create the label if you -haven't already. To create a label with the InfluxDB API, send a POST -request to the /api/v2/labels endpoint).
  • -
- - -
Authorizations:
path Parameters
bucketID
required
string

Bucket ID. -The ID of the bucket to label.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

An object that contains a labelID to add to the bucket.

-
labelID
required
string

A label ID. -Specifies the label to attach.

-

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{
  • "label": {
    },
  • "links": {
    }
}

Delete a label from a bucket

Authorizations:
path Parameters
bucketID
required
string

The bucket ID.

-
labelID
required
string

The ID of the label to delete.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

List all users with member privileges for a bucket

Lists all users for a bucket.

-

InfluxDB users have -permission to access InfluxDB.

-

Members are users in -an organization with access to the specified resource.

-

Use this endpoint to retrieve all users with access to a bucket.

- -
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to retrieve users for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "users": [
    ]
}

Add a member to a bucket

Add a user to a bucket and return the new user information.

-

InfluxDB users have -permission to access InfluxDB.

-

Members are users in -an organization.

-

Use this endpoint to give a user member privileges to a bucket.

- - -
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to retrieve users for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

A user to add as a member to the bucket.

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "09cfb87051cbe000",
  • "links": {
    },
  • "name": "example_user_1",
  • "role": "member",
  • "status": "active"
}

Remove a member from a bucket

Removes a member from a bucket.

-

Use this endpoint to remove a user's member privileges from a bucket. This -removes the user's read and write permissions for the bucket.

- - -
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to remove a user from.

-
userID
required
string

The ID of the user to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "unauthorized",
  • "message": "unauthorized access"
}

List all owners of a bucket

Lists all owners -of a bucket.

-

Bucket owners have permission to delete buckets and remove user and member -permissions from the bucket.

-

InfluxDB 3 Cloud Serverless uses /api/v2/authorizations to assign resource permissions; doesn't use owner and member roles.

-

Limitations

-
    -
  • Owner permissions are separate from API token permissions.
  • -
  • Owner permissions are used in the context of the InfluxDB UI.
  • -
-

Required permissions

-
    -
  • read-orgs INFLUX_ORG_ID
  • -
-

INFLUX_ORG_ID is the ID of the organization that you want to retrieve a -list of owners for.

- - -
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to retrieve owners for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "users": [
    ]
}

Add an owner to a bucket

Adds an owner to a bucket and returns the owners -with role and user detail.

-

Use this endpoint to create a resource owner for the bucket. -Bucket owners have permission to delete buckets and remove user and member -permissions from the bucket.

-

InfluxDB 3 Cloud Serverless uses /api/v2/authorizations to assign resource permissions; doesn't use owner and member roles.

-

Limitations

-
    -
  • Owner permissions are separate from API token permissions.
  • -
  • Owner permissions are used in the context of the InfluxDB UI.
  • -
-

Required permissions

-
    -
  • write-orgs INFLUX_ORG_ID
  • -
  • INFLUX_ORG_ID* is the ID of the organization that you want to add - an owner for.
  • -
- - - - -
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to add an owner for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

A user to add as an owner for the bucket.

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "d88d182d91b0950f",
  • "links": {
    },
  • "name": "example-user",
  • "role": "owner",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "name": "string",
  • "status": "active",
  • "role": "owner"
}

Remove an owner from a bucket

Removes an owner from a bucket.

-

Use this endpoint to remove a user's owner role for a bucket.

-

InfluxDB 3 Cloud Serverless uses /api/v2/authorizations to assign resource permissions; doesn't use owner and member roles.

-

Limitations

-
    -
  • Owner permissions are separate from API token permissions.
  • -
  • Owner permissions are used in the context of the InfluxDB UI.
  • -
-

Required permissions

-
    -
  • write-orgs INFLUX_ORG_ID
  • -
-

INFLUX_ORG_ID is the ID of the organization that you want to remove an owner -from.

- - - - -
Authorizations:
path Parameters
bucketID
required
string

The ID of the bucket to remove an owner from.

-
userID
required
string

The ID of the owner to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "unauthorized",
  • "message": "unauthorized access"
}

Delete

Delete data from an InfluxDB bucket.

-

Delete data

Deletes data from a bucket.

-

NOTE: This endpoint has been disabled for InfluxDB 3 Cloud Serverless organizations. -See how to delete data.

- - -
Authorizations:
query Parameters
bucket
string

A bucket name or ID. -Specifies the bucket to delete data from. -If you pass both bucket and bucketID, bucketID takes precedence.

-
bucketID
string

A bucket ID. -Specifies the bucket to delete data from. -If you pass both bucket and bucketID, bucketID takes precedence.

-
org
string

An organization name or ID.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Doesn't use the org parameter or orgID parameter.
  • -
-
orgID
string

An organization ID.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Doesn't use the org parameter or orgID parameter.
  • -
-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Time range parameters and an optional delete predicate expression.

-

To select points to delete within the specified time range, pass a -delete predicate expression in the predicate property of the request body. -If you don't pass a predicate, InfluxDB deletes all data with timestamps -in the specified time range.

-
predicate
string

An expression in delete predicate syntax.

-
start
required
string <date-time>

A timestamp (RFC3339 date/time format). -The earliest time to delete from.

-
stop
required
string <date-time>

A timestamp (RFC3339 date/time format). -The latest time to delete from.

-

Responses

Request samples

Content type
application/json
{
  • "predicate": "tag1=\"value1\" and (tag2=\"value2\" and tag3!=\"value3\")",
  • "start": "2019-08-24T14:15:22Z",
  • "stop": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "failed to decode request body: organization not found"
}

DBRPs

The InfluxDB 1.x data model includes databases -and retention policies. -InfluxDB 2.x replaces databases and retention policies with buckets. -To support InfluxDB 1.x query and write patterns in InfluxDB 2.x, -databases and retention policies are mapped to buckets using the -database and retention policy (DBRP) mapping service. -The DBRP mapping service uses the database and retention policy -specified in 1.x compatibility API requests to route operations to a bucket.

- - -

List database retention policy mappings

Lists database retention policy (DBRP) mappings.

- - -
Authorizations:
query Parameters
bucketID
string

A bucket ID. -Only returns DBRP mappings that belong to the specified bucket.

-
db
string

A database. -Only returns DBRP mappings that belong to the 1.x database.

-
default
boolean

Specifies filtering on default

-
id
string

A DBPR mapping ID. -Only returns the specified DBRP mapping.

-
org
string

An organization name. -Only returns DBRP mappings for the specified organization.

-
orgID
string

An organization ID. -Only returns DBRP mappings for the specified organization.

-
rp
string

A retention policy. -Specifies the 1.x retention policy to filter on.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "content": [
    ]
}

Add a database retention policy mapping

Creates a database retention policy (DBRP) mapping and returns the mapping.

-

Use this endpoint to add InfluxDB 1.x API compatibility to your -InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a -DBRP mapping in order to query and write using the InfluxDB 1.x API. -object.

- - -
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The database retention policy mapping to add.

-

Note that retention_policy is a required parameter in the request body. -The value of retention_policy can be any arbitrary string name or -value, with the default value commonly set as autogen. -The value of retention_policy isn't a retention_policy

-
bucketID
required
string

A bucket ID. -Identifies the bucket used as the target for the translation.

-
database
required
string

A database name. -Identifies the InfluxDB v1 database.

-
default
boolean

Set to true to use this DBRP mapping as the default retention policy -for the database (specified by the database property's value).

-
org
string

An organization name. -Identifies the organization that owns the mapping.

-
orgID
string

An organization ID. -Identifies the organization that owns the mapping.

-
retention_policy
required
string

A retention policy name. -Identifies the InfluxDB v1 retention policy mapping.

-

Responses

Request samples

Content type
application/json
{
  • "bucketID": "string",
  • "database": "string",
  • "default": true,
  • "org": "string",
  • "orgID": "string",
  • "retention_policy": "string"
}

Response samples

Content type
application/json
{
  • "bucketID": "4d4d9d5b61dee751",
  • "database": "example_database",
  • "default": true,
  • "id": "0a3cbb5dd526a000",
  • "orgID": "bea7ea952287f70d",
  • "retention_policy": "autogen"
}

Delete a database retention policy

Deletes the specified database retention policy (DBRP) mapping.

- - -
Authorizations:
path Parameters
dbrpID
required
string

A DBRP mapping ID. -Only returns the specified DBRP mapping.

-
query Parameters
org
string

An organization name. -Specifies the organization that owns the DBRP mapping.

-
orgID
string

An organization ID. -Specifies the organization that owns the DBRP mapping.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json

The query parameters contain invalid values.

-
{
  • "code": "invalid",
  • "message": "invalid ID"
}

Retrieve a database retention policy mapping

Retrieves the specified retention policy (DBRP) mapping.

- - -
Authorizations:
path Parameters
dbrpID
required
string

A DBRP mapping ID. -Specifies the DBRP mapping.

-
query Parameters
org
string

An organization name. -Specifies the organization that owns the DBRP mapping.

-
orgID
string

An organization ID. -Specifies the organization that owns the DBRP mapping.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "content": {
    }
}

Update a database retention policy mapping

Authorizations:
path Parameters
dbrpID
required
string

A DBRP mapping ID. -Specifies the DBRP mapping.

-
query Parameters
org
string

An organization name. -Specifies the organization that owns the DBRP mapping.

-
orgID
string

An organization ID. -Specifies the organization that owns the DBRP mapping.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Updates the database retention policy (DBRP) mapping and returns the mapping.

-

Use this endpoint to modify the retention policy (retention_policy property) of a DBRP mapping.

- - -
default
boolean

Set to true to use this DBRP mapping as the default retention policy -for the database (specified by the database property's value). -To remove the default mapping, set to false.

-
retention_policy
string

A retention policy name. -Identifies the InfluxDB v1 retention policy mapping.

-

Responses

Request samples

Content type
application/json
{
  • "default": true,
  • "retention_policy": "string"
}

Response samples

Content type
application/json
{
  • "content": {
    }
}

Invokable Scripts

Store, manage, and execute scripts in InfluxDB. -A script stores your custom Flux script and provides an invokable -endpoint that accepts runtime parameters. -In a script, you can specify custom runtime parameters -(params)--for example, params.myparameter. -Once you create a script, InfluxDB generates an -/api/v2/scripts/SCRIPT_ID/invoke endpoint -for your organization. -You can run the script from API requests and tasks, defining parameter -values for each run. -When the script runs, InfluxDB replaces params references in the -script with the runtime parameter values you define.

-

Use the /api/v2/scripts endpoints to create and manage scripts. -See related guides to learn how to define parameters and execute scripts.

- -

List scripts

Lists scripts.

- -
Authorizations:
query Parameters
limit
integer [ 0 .. 500 ]
Default: 100

The maximum number of scripts to return. Default is 100.

-
name
string

The script name. Lists scripts with the specified name.

-
offset
integer >= 0

The offset for pagination. -The number of records to skip.

-

For more information about pagination parameters, see Pagination.

-

Responses

Request samples

curl --request GET "INFLUX_URL/api/v2/scripts?limit=100&offset=0" \
-  --header "Authorization: Token INFLUX_API_TOKEN" \
-  --header "Accept: application/json" \
-  --header "Content-Type: application/json"
-

Response samples

Content type
application/json
{
  • "scripts": [
    ]
}

Create a script

Creates an invokable script -and returns the script.

- -
Authorizations:
Request Body schema: application/json

The script to create.

-
description
required
string

Script description. A description of the script.

-
language
required
string (ScriptLanguage)
Enum: "flux" "sql"
name
required
string

Script name. The name must be unique within the organization.

-
script
required
string

The script to execute.

-

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "language": "flux",
  • "name": "string",
  • "script": "string"
}

Response samples

Content type
application/json
{
  • "createdAt": "2022-07-17T23:43:26.660308Z",
  • "description": "getLastPoint finds the last point in a bucket",
  • "id": "09afa23ff13e4000",
  • "language": "flux",
  • "name": "getLastPoint",
  • "orgID": "bea7ea952287f70d",
  • "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)",
  • "updatedAt": "2022-07-17T23:43:26.660308Z"
}

Delete a script

Deletes a script and all associated records.

-

Limitations

-
    -
  • You can delete only one script per request.
  • -
  • If the script ID you provide doesn't exist for the organization, InfluxDB -responds with an HTTP 204 status code.
  • -
- -
Authorizations:
path Parameters
scriptID
required
string

A script ID. -Deletes the specified script.

-

Responses

Request samples

curl -X 'DELETE' \
-  "https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" \
-  --header "Authorization: Token INFLUX_TOKEN" \
-  --header 'Accept: application/json'
-

Response samples

Content type
application/json
{
  • "code": "unauthorized",
  • "message": "unauthorized access"
}

Retrieve a script

Retrieves a script.

- -
Authorizations:
path Parameters
scriptID
required
string

A script ID. -Retrieves the specified script.

-

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2022-07-17T23:49:45.731237Z",
  • "description": "getLastPoint finds the last point in a bucket",
  • "id": "09afa3b220fe4000",
  • "language": "flux",
  • "name": "getLastPoint",
  • "orgID": "bea7ea952287f70d",
  • "script": "from(bucket: my-bucket) |> range(start: -7d) |> limit(n:1)",
  • "updatedAt": "2022-07-17T23:49:45.731237Z"
}

Update a script

Updates an invokable script.

-

Use this endpoint to modify values for script properties (description and script).

-

To update a script, pass an object that contains the updated key-value pairs.

-

Limitations

-
    -
  • If you send an empty request body, the script will neither update nor -store an empty script, but InfluxDB will respond with an HTTP 200 status -code.
  • -
- -
Authorizations:
path Parameters
scriptID
required
string

A script ID. -Updates the specified script.

-
Request Body schema: application/json

An object that contains the updated script properties to apply.

-
description
string

A description of the script.

-
script
string

The script to execute.

-

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "script": "string"
}

Response samples

Content type
application/json
{
  • "createdAt": "2022-07-17T23:49:45.731237Z",
  • "description": "get last point from new bucket",
  • "id": "09afa3b220fe4000",
  • "language": "flux",
  • "name": "getLastPoint",
  • "orgID": "bea7ea952287f70d",
  • "script": "from(bucket: newBucket) |> range(start: -7d) |> limit(n:1)",
  • "updatedAt": "2022-07-19T22:27:23.185436Z"
}

Invoke a script

Runs a script and returns the result. -When the script runs, InfluxDB replaces params keys referenced in the script with -params key-values passed in the request body--for example:

-

The following sample script contains a mybucket parameter :

-
"script": "from(bucket: params.mybucket)
-            |> range(start: -7d)
-            |> limit(n:1)"
-

The following example POST /api/v2/scripts/SCRIPT_ID/invoke request body -passes a value for the mybucket parameter:

-
{
-  "params": {
-    "mybucket": "air_sensor"
-  }
-}
- -
Authorizations:
path Parameters
scriptID
required
string

A script ID. -Runs the specified script.

-
Request Body schema: application/json
object

The script parameters. -params contains key-value pairs that map values to the params.keys -in a script. -When you invoke a script with params, InfluxDB passes the values as -invocation parameters to the script.

-

Responses

Request samples

Content type
application/json
{
  • "params": { }
}

Response samples

Content type
text/csv
,result,table,_start,_stop,_time,_value,_field,_measurement,host
-,_result,0,2019-10-30T01:28:02.52716421Z,2022-07-26T01:28:02.52716421Z,2020-01-01T00:00:00Z,72.01,used_percent,mem,host2
-

Find script parameters.

Analyzes a script and determines required parameters. -Find all params keys referenced in a script and return a list -of keys. If it is possible to determine the type of the value -from the context then the type is also returned -- for example:

-

The following sample script contains a mybucket parameter :

-
"script": "from(bucket: params.mybucket)
-            |> range(start: -7d)
-            |> limit(n:1)"
-

Requesting the parameters using GET /api/v2/scripts/SCRIPT_ID/params -returns the following:

-
{
-  "params": {
-    "mybucket": "string"
-  }
-}
-

The type name returned for a parameter will be one of:

-
    -
  • any
  • -
  • bool
  • -
  • duration
  • -
  • float
  • -
  • int
  • -
  • string
  • -
  • time
  • -
  • uint
  • -
-

The type name any is used when the type of a parameter cannot -be determined from the context, or the type is determined to -be a structured type such as an array or record.

- -
Authorizations:
path Parameters
scriptID
required
string

A script ID. -The script to analyze for params.

-

Responses

Request samples

curl --request GET "https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID/params" \
-          --header "Authorization: Token INFLUX_TOKEN"
-

Response samples

Content type
application/json
{
  • "params": {
    }
}

Limits

Retrieve limits for an organization

Authorizations:
path Parameters
orgID
required
string

The ID of the organization.

-

Responses

Response samples

Content type
application/json
{
  • "limits": {
    },
  • "links": {}
}

Organizations

Manage your organization. -An organization is a workspace for a group of users. Organizations can be -used to separate different environments, projects, teams or users within -InfluxDB.

-

Use the /api/v2/orgs endpoints to view and manage organizations.

-

List organizations

Lists organizations.

-

InfluxDB 3 Cloud Serverless only returns the organization that owns the token passed in the request.

- - -
Authorizations:
query Parameters
descending
boolean
Default: false
limit
integer [ 1 .. 100 ]
Default: 20

Limits the number of records returned. Default is 20.

-
offset
integer >= 0

The offset for pagination. -The number of records to skip.

-

For more information about pagination parameters, see Pagination.

-
org
string

An organization name. -Only returns the specified organization.

-
orgID
string

An organization ID. -Only returns the specified organization.

-
userID
string

A user ID. -Only returns organizations where the specified user is a member or owner.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "orgs": [
    ]
}

Create an organization

Creates an organization -and returns the newly created organization.

-

InfluxDB 3 Cloud Serverless doesn't allow you to use this endpoint to create organizations.

- - -
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The organization to create.

-
description
string

The description of the organization.

-
name
required
string

The name of the organization.

-

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "createdAt": "2022-08-24T23:05:52.881317Z",
  • "description": "",
  • "id": "INFLUX_ORG_ID",
  • "links": {
    },
  • "name": "INFLUX_ORG",
  • "updatedAt": "2022-08-24T23:05:52.881318Z"
}

Delete an organization

Deletes an organization.

-

Deleting an organization from InfluxDB Cloud can't be undone. -Once deleted, all data associated with the organization is removed.

-

InfluxDB Cloud

-
    -
  • Does the following when you send a delete request:

    -
      -
    1. Validates the request and queues the delete.
    2. -
    3. Returns an HTTP 204 status code if queued; error otherwise.
    4. -
    5. Handles the delete asynchronously.
    6. -
    -
  • -
-

InfluxDB OSS

-
    -
  • Validates the request, handles the delete synchronously, -and then responds with success or failure.
  • -
-

Limitations

-
    -
  • Only one organization can be deleted per request.
  • -
- - -
Authorizations:
path Parameters
orgID
required
string

The ID of the organization to delete.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "failed to decode request body: organization not found"
}

Retrieve an organization

Retrieves an organization.

-

Use this endpoint to retrieve information for a specific organization.

- - -
Authorizations:
path Parameters
orgID
required
string

The ID of the organization to retrieve.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "defaultStorageType": "tsm",
  • "description": "string",
  • "id": "string",
  • "links": {
    },
  • "name": "string",
  • "status": "active",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update an organization

Updates an organization.

-

Use this endpoint to update properties -(name, description) of an organization.

-

Updating an organization’s name affects all resources that reference the -organization by name, including the following:

-
    -
  • Queries
  • -
  • Dashboards
  • -
  • Tasks
  • -
  • Telegraf configurations
  • -
  • Templates
  • -
-

If you change an organization name, be sure to update the organization name -in these resources as well.

- - -
Authorizations:
path Parameters
orgID
required
string

The ID of the organization to update.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The organization update to apply.

-
description
string

The description of the organization.

-
name
string

The name of the organization.

-

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "defaultStorageType": "tsm",
  • "description": "string",
  • "id": "string",
  • "links": {
    },
  • "name": "string",
  • "status": "active",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List all members of an organization

Lists all users that belong to an organization.

-

InfluxDB 3 Cloud Serverless doesn't use owner and member roles. -Use /api/v2/authorizations to manage resource permissions.

-
Authorizations:
path Parameters
orgID
required
string

The ID of the organization to retrieve users for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "users": [
    ]
}

Add a member to an organization

Add a user to an organization.

-

InfluxDB 3 Cloud Serverless doesn't use owner and member roles. -Use /api/v2/authorizations to manage resource permissions.

-
Authorizations:
path Parameters
orgID
required
string

The ID of the organization.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The user to add to the organization.

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "09cfb87051cbe000",
  • "links": {
    },
  • "name": "example_user_1",
  • "role": "member",
  • "status": "active"
}

Remove a member from an organization

Removes a member from an organization.

-

InfluxDB 3 Cloud Serverless doesn't use owner and member roles. -Use /api/v2/authorizations to manage resource permissions.

-
Authorizations:
path Parameters
orgID
required
string

The ID of the organization to remove a user from.

-
userID
required
string

The ID of the user to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "unauthorized",
  • "message": "unauthorized access"
}

List all owners of an organization

Lists all owners of an organization.

-

InfluxDB 3 Cloud Serverless doesn't use owner and member roles. -Use /api/v2/authorizations to manage resource permissions.

-
Authorizations:
path Parameters
orgID
required
string

The ID of the organization to list owners for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {
    },
  • "users": [
    ]
}

Add an owner to an organization

Adds an owner to an organization.

-

InfluxDB 3 Cloud Serverless doesn't use owner and member roles. -Use /api/v2/authorizations to manage resource permissions.

-
Authorizations:
path Parameters
orgID
required
string

The ID of the organization that you want to add an owner for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The user to add as an owner of the organization.

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "09cfb87051cbe000",
  • "links": {
    },
  • "name": "example_user_1",
  • "role": "owner",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "name": "string",
  • "status": "active",
  • "role": "owner"
}

Remove an owner from an organization

Removes an owner from -the organization.

-

InfluxDB 3 Cloud Serverless doesn't use owner and member roles. -Use /api/v2/authorizations to manage resource permissions.

-
Authorizations:
path Parameters
orgID
required
string

The ID of the organization to remove an owner from.

-
userID
required
string

The ID of the user to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "unauthorized",
  • "message": "unauthorized access"
}

Query

Query data stored in a bucket.

-
    -
  • HTTP clients can query the v1 /query endpoint -using InfluxQL and retrieve data in CSV or JSON format.
  • -
  • Flight + gRPC clients can query using SQL or InfluxQL and retrieve data in Arrow format.
  • -
- - -

Query data Deprecated

Retrieves data from buckets.

-

This endpoint isn't supported in InfluxDB 3 Cloud Serverless.

-

See how to query data.

-
Authorizations:
query Parameters
org
string

An organization name or ID.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Doesn't use the org parameter or orgID parameter.
  • -
-
orgID
string

An organization ID.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Doesn't use the org parameter or orgID parameter.
  • -
-
header Parameters
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The content encoding (usually a compression algorithm) that the client can understand.

-
Content-Type
string
Enum: "application/json" "application/vnd.flux"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema:

Flux query or specification to execute

-
object (Dialect)

Options for tabular data output. -Default output is annotated CSV with headers.

-

For more information about tabular data dialect, -see W3 metadata vocabulary for tabular data.

-
object (File)

Represents a source from a single file

-
now
string <date-time>

Specifies the time that should be reported as now in the query. -Default is the server now time.

-
object

Key-value pairs passed as parameters during query execution.

-

To use parameters in your query, pass a query with params references (in dot notation)--for example:

-
  query: "from(bucket: params.mybucket)\
-              |> range(start: params.rangeStart) |> limit(n:1)"
-

and pass params with the key-value pairs--for example:

-
  params: {
-    "mybucket": "environment",
-    "rangeStart": "-30d"
-  }
-

During query execution, InfluxDB passes params to your script and substitutes the values.

-

Limitations

-
    -
  • If you use params, you can't use extern.
  • -
-
query
required
string

The query script to execute.

-
type
string
Value: "flux"

The type of query. Must be "flux".

-

Responses

Request samples

Content type
{
  • "dialect": {
    },
  • "extern": {
    },
  • "now": "2019-08-24T14:15:22Z",
  • "params": { },
  • "query": "string",
  • "type": "flux"
}

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "failed to decode request body: organization not found"
}

Analyze a Flux query Deprecated

This endpoint isn't supported in InfluxDB 3 Cloud Serverless. -See how to query data.

-
Authorizations:
header Parameters
Content-Type
string
Value: "application/json"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Flux query to analyze

-
object (Dialect)

Options for tabular data output. -Default output is annotated CSV with headers.

-

For more information about tabular data dialect, -see W3 metadata vocabulary for tabular data.

-
object (File)

Represents a source from a single file

-
now
string <date-time>

Specifies the time that should be reported as now in the query. -Default is the server now time.

-
object

Key-value pairs passed as parameters during query execution.

-

To use parameters in your query, pass a query with params references (in dot notation)--for example:

-
  query: "from(bucket: params.mybucket)\
-              |> range(start: params.rangeStart) |> limit(n:1)"
-

and pass params with the key-value pairs--for example:

-
  params: {
-    "mybucket": "environment",
-    "rangeStart": "-30d"
-  }
-

During query execution, InfluxDB passes params to your script and substitutes the values.

-

Limitations

-
    -
  • If you use params, you can't use extern.
  • -
-
query
required
string

The query script to execute.

-
type
string
Value: "flux"

The type of query. Must be "flux".

-

Responses

Request samples

Content type
application/json
{
  • "dialect": {
    },
  • "extern": {
    },
  • "now": "2019-08-24T14:15:22Z",
  • "params": { },
  • "query": "string",
  • "type": "flux"
}

Response samples

Content type
application/json

Returns an error object if the Flux query is missing a property key.

-

The following sample query is missing the bucket property key:

-
{
-  "query": "from(: \"iot_center\")\
-  ...
-}
-
{
  • "errors": [
    ]
}

Generate a query Abstract Syntax Tree (AST) Deprecated

This endpoint isn't supported in InfluxDB 3 Cloud Serverless. -See how to query data.

-
Authorizations:
header Parameters
Content-Type
string
Value: "application/json"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The Flux query to analyze.

-
query
required
string

The Flux query script to be analyzed.

-

Responses

Request samples

Content type
application/json
{
  • "query": "string"
}

Response samples

Content type
application/json

If the request body contains a missing property key in from(), -returns invalid and problem detail.

-
{
  • "code": "invalid",
  • "message": "invalid AST: loc 1:6-1:19: missing property key"
}

List Flux query suggestions Deprecated

This endpoint isn't supported in InfluxDB 3 Cloud Serverless. -See how to query data.

-
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Request samples

curl --request GET "INFLUX_URL/api/v2/query/suggestions" \
-  --header "Accept: application/json" \
-  --header "Authorization: Token INFLUX_API_TOKEN"
-

Response samples

Content type
text/html

The URL has been permanently moved. Use /api/v2/query/suggestions.

-
<a href="/api/v2/query/suggestions?orgID=INFLUX_ORG_ID">Moved Permanently</a>
-

Retrieve a query suggestion for a branching suggestion Deprecated

This endpoint isn't supported in InfluxDB 3 Cloud Serverless. -See how to query data.

-
Authorizations:
path Parameters
name
required
string

A Flux function name.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json

The requested function doesn't exist.

-
{
  • "code": "internal error",
  • "message": "An internal error has occurred"
}

Query using the InfluxDB v1 HTTP API

Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats.

- - -
Authorizations:
query Parameters
db
required
string

The database to query data from. -This is mapped to an InfluxDB bucket. -For more information, see Database and retention policy mapping.

-
epoch
string
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

A unix timestamp precision. -Formats timestamps as unix (epoch) timestamps the specified precision -instead of RFC3339 timestamps with nanosecond precision.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
q
required
string

The InfluxQL query to execute. To execute multiple queries, delimit queries with a semicolon (;).

-
rp
string

The retention policy to query data from. -This is mapped to an InfluxDB bucket. -For more information, see Database and retention policy mapping.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack"

Media type that the client can understand.

-

Note: With application/csv, query results include unix timestamps instead of RFC3339 timestamps.

-
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The content encoding (usually a compression algorithm) that the client can understand.

-
Content-Type
string
Value: "application/json"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
No sample

Resources

List all known resources

Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
[
  • "string"
]

Routes

List all top level routes

Retrieves all the top level routes for the InfluxDB API.

-

Limitations

-
    -
  • Only returns top level routes--for example, the response contains -"tasks":"/api/v2/tasks", and doesn't contain resource-specific routes -for tasks (/api/v2/tasks/TASK_ID/...).
  • -
-
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{}

Secrets

List all secret keys for an organization

Authorizations:
path Parameters
orgID
required
string

The organization ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "secrets": [
    ],
  • "links": {
    }
}

Update secrets in an organization

Authorizations:
path Parameters
orgID
required
string

The organization ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Secret key value pairs to update/add

-
property name*
string

Responses

Request samples

Content type
application/json
{
  • "apikey": "abc123xyz"
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Delete a secret from an organization

Authorizations:
path Parameters
orgID
required
string

The organization ID.

-
secretID
required
string

The secret ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Delete secrets from an organization Deprecated

Authorizations:
path Parameters
orgID
required
string

The organization ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Secret key to delete

-
secrets
Array of strings

Responses

Request samples

Content type
application/json
{
  • "secrets": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Tasks

Process and analyze your data with tasks -in the InfluxDB task engine. -Use the /api/v2/tasks endpoints to schedule and manage tasks, retry task runs, and retrieve run logs.

-

To configure a task, provide the script and the schedule to run the task. -For examples, see how to create a task with the POST /api/v2/tasks endpoint.

- - -

Properties

-

A task object contains information about an InfluxDB task resource.

-

The following table defines the properties that appear in this object:

-
authorizationID
string

An authorization ID. -Specifies the authorization used when the task communicates with the query engine.

-

To find an authorization ID, use the -GET /api/v2/authorizations endpoint to -list authorizations.

-
createdAt
string <date-time>
cron
string

A Cron expression that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions.

-
description
string

A description of the task.

-
every
string <duration>

The interval (duration literal) at which the task runs. every also determines when the task first runs, depending on the specified time.

-
flux
string <flux>

The Flux script that the task executes.

-

Limitations

-
    -
  • If you use the flux property, you can't use the scriptID and scriptParameters properties.
  • -
-
id
required
string
Array of objects (Labels)
lastRunError
string
lastRunStatus
string
Enum: "failed" "success" "canceled"
latestCompleted
string <date-time>

A timestamp (RFC3339 date/time format) of the latest scheduled and completed run.

-
object
name
required
string

The name of the task.

-
offset
string <duration>

A duration to delay execution of the task after the scheduled time has elapsed. 0 removes the offset.

-
org
string

An organization name. -Specifies the organization that owns the task.

-
orgID
required
string

An organization ID. -Specifies the organization that owns the task.

-
ownerID
string

A user ID. -Specifies the owner of the task.

-

To find a user ID, you can use the -GET /api/v2/users endpoint to -list users.

-
scriptID
string

A script ID. -Specifies the invokable script that the task executes.

-

Limitations

-
    -
  • If you use the scriptID property, you can't use the flux property.
  • -
- -
scriptParameters
object

Key-value pairs for params in the script. -Defines the invocation parameter values passed to the script specified by scriptID. -When running the task, InfluxDB executes the script with the parameters -you provide.

-

Limitations

-
    -
  • To use scriptParameters, you must provide a scriptID.
  • -
  • If you use the scriptID and scriptParameters properties, you can't use the flux property.
  • -
-
status
string (TaskStatusType)
Enum: "active" "inactive"

inactive cancels scheduled runs and prevents manual runs of the task.

-
updatedAt
string <date-time>
{
  • "authorizationID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "cron": "string",
  • "description": "string",
  • "every": "string",
  • "flux": "string",
  • "id": "string",
  • "labels": [
    ],
  • "lastRunError": "string",
  • "lastRunStatus": "failed",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "links": {
    },
  • "name": "string",
  • "offset": "string",
  • "org": "string",
  • "orgID": "string",
  • "ownerID": "string",
  • "scriptID": "string",
  • "scriptParameters": { },
  • "status": "active",
  • "updatedAt": "2019-08-24T14:15:22Z"
}
-

List all tasks

Retrieves a list of tasks.

-

To limit which tasks are returned, pass query parameters in your request. -If no query parameters are passed, InfluxDB returns all tasks up to the default limit.

-
Authorizations:
query Parameters
after
string

A task ID. -Only returns tasks created after the specified task.

-
limit
integer [ -1 .. 500 ]
Default: 100
Examples:
  • limit=-1 - Return all tasks, without pagination.
  • limit=50 - Return a maximum of 50 tasks.

The maximum number of tasks to return. -Default is 100. -The minimum is 1 and the maximum is 500.

-

To reduce the payload size, combine type=basic and limit (see Request samples). -For more information about the basic response, see the type parameter.

-
name
string

A task name. -Only returns tasks with the specified name. -Different tasks may have the same name.

-
offset
integer >= 0
Default: 0

The number of records to skip.

-
org
string

An organization name. -Only returns tasks owned by the specified organization.

-
orgID
string

An organization ID. -Only returns tasks owned by the specified organization.

-
scriptID
string

A script ID. -Only returns tasks that use the specified invokable script.

-
sortBy
string
Value: "name"

The sort field. Only name is supported. -Specifies the field used to sort records in the list.

-
status
string
Enum: "active" "inactive"

A task status. -Only returns tasks that have the specified status (active or inactive).

-
type
string
Default: ""
Enum: "basic" "system"

A task type (basic or system). -Default is system. -Specifies the level of detail for tasks in the response. -The default (system) response contains all the metadata properties for tasks. -To reduce the response size, pass basic to omit some task properties (flux, createdAt, updatedAt).

-
user
string

A user ID. -Only returns tasks owned by the specified user.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Request samples

curl INFLUX_URL/api/v2/tasks/?limit=-1&type=basic \
-  --header 'Content-Type: application/json' \
-  --header 'Authorization: Token INFLUX_API_TOKEN'
-

Response samples

Content type
application/json
Example

A sample response body for the ?type=basic parameter. -type=basic omits some task fields (createdAt and updatedAt) -and field values (org, flux) in the response.

-
{
  • "links": {
    },
  • "tasks": [
    ]
}

Create a task

Creates a task and returns the task.

-

Use this endpoint to create a scheduled task that runs a Flux script.

-

InfluxDB Cloud

-
    -
  • You can use either flux or scriptID to provide the task script.

    -
      -
    • flux: a string of "raw" Flux that contains task options and the script--for example:

      -
      {
      -  "flux": "option task = {name: \"CPU Total 1 Hour New\", every: 1h}\
      -  from(bucket: \"telegraf\")
      -    |> range(start: -1h)
      -    |> filter(fn: (r) => (r._measurement == \"cpu\"))
      -    |> filter(fn: (r) =>\n\t\t(r._field == \"usage_system\"))
      -    |> filter(fn: (r) => (r.cpu == \"cpu-total\"))
      -    |> aggregateWindow(every: 1h, fn: max)
      -    |> to(bucket: \"cpu_usage_user_total_1h\", org: \"INFLUX_ORG\")",
      -  "status": "active",
      -  "description": "This task downsamples CPU data every hour"
      -}
      -
    • -
    • scriptID: the ID of an invokable script -for the task to run. -To pass task options when using scriptID, pass the options as -properties in the request body--for example:

      -
      {
      -  "name": "CPU Total 1 Hour New",
      -  "description": "This task downsamples CPU data every hour",
      -  "every": "1h",
      -  "scriptID": "SCRIPT_ID",
      -  "scriptParameters":
      -    {
      -      "rangeStart": "-1h",
      -      "bucket": "telegraf",
      -      "filterField": "cpu-total"
      -    }
      -  }
      -
    • -
    -
  • -
-

Limitations:

-
    -
  • You can't use flux and scriptID for the same task.
  • -
- -
Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

The task to create

-
cron
string

A Cron expression that defines the schedule on which the task runs. InfluxDB bases cron runs on the system time.

-
description
string

The description of the task.

-
every
string

The interval (duration literal)) at which the task runs. -every also determines when the task first runs, depending on the specified time.

-
flux
string

The Flux script that the task runs.

-

Limitations

-
    -
  • If you use the flux property, you can't use the scriptID and scriptParameters properties.
  • -
-
name
string

The name of the task

-
offset
string <duration>

A duration to delay execution of the task after the scheduled time has elapsed. 0 removes the offset.

-
org
string

The name of the organization that owns the task.

-
orgID
string

The ID of the organization that owns the task.

-
scriptID
string

The ID of the script that the task runs.

-

Limitations

-
    -
  • If you use the scriptID property, you can't use the flux property.
  • -
-
scriptParameters
object

The parameter key-value pairs passed to the script (referenced by scriptID) during the task run.

-

Limitations

-
    -
  • scriptParameters requires scriptID.
  • -
  • If you use the scriptID and scriptParameters properties, you can't use the flux property.
  • -
-
status
string (TaskStatusType)
Enum: "active" "inactive"

inactive cancels scheduled runs and prevents manual runs of the task.

-

Responses

Request samples

Content type
application/json
{
  • "cron": "string",
  • "description": "string",
  • "every": "string",
  • "flux": "string",
  • "name": "string",
  • "offset": "string",
  • "org": "string",
  • "orgID": "string",
  • "scriptID": "string",
  • "scriptParameters": { },
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "authorizationID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "cron": "string",
  • "description": "string",
  • "every": "string",
  • "flux": "string",
  • "id": "string",
  • "labels": [
    ],
  • "lastRunError": "string",
  • "lastRunStatus": "failed",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "links": {
    },
  • "name": "string",
  • "offset": "string",
  • "org": "string",
  • "orgID": "string",
  • "ownerID": "string",
  • "scriptID": "string",
  • "scriptParameters": { },
  • "status": "active",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a task

Deletes a task and associated records.

-

Use this endpoint to delete a task and all associated records (task runs, logs, and labels). -Once the task is deleted, InfluxDB cancels all scheduled runs of the task.

-

If you want to disable a task instead of delete it, update the task status to inactive.

-
Authorizations:
path Parameters
taskID
required
string

A task ID. Specifies the task to delete.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "failed to decode request body: organization not found"
}

Retrieve a task

Retrieves a task.

-
Authorizations:
path Parameters
taskID
required
string

A task ID. -Specifies the task to retrieve.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "authorizationID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "cron": "string",
  • "description": "string",
  • "every": "string",
  • "flux": "string",
  • "id": "string",
  • "labels": [
    ],
  • "lastRunError": "string",
  • "lastRunStatus": "failed",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "links": {
    },
  • "name": "string",
  • "offset": "string",
  • "org": "string",
  • "orgID": "string",
  • "ownerID": "string",
  • "scriptID": "string",
  • "scriptParameters": { },
  • "status": "active",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a task

Updates a task, -and then cancels all scheduled runs of the task.

-

Use this endpoint to set, modify, or clear task properties--for example: cron, name, flux, status. -Once InfluxDB applies the update, it cancels all previously scheduled runs of the task.

-

To update a task, pass an object that contains the updated key-value pairs. -To activate or inactivate a task, set the status property. -"status": "inactive" cancels scheduled runs and prevents manual runs of the task.

-

InfluxDB Cloud

-
    -
  • Use either flux or scriptID to provide the task script.

    -
      -
    • flux: a string of "raw" Flux that contains task options and the script--for example:

      -
      {
      -  "flux": "option task = {name: \"CPU Total 1 Hour New\", every: 1h}\
      -  from(bucket: \"telegraf\")
      -    |> range(start: -1h)
      -    |> filter(fn: (r) => (r._measurement == \"cpu\"))
      -    |> filter(fn: (r) =>\n\t\t(r._field == \"usage_system\"))
      -    |> filter(fn: (r) => (r.cpu == \"cpu-total\"))
      -    |> aggregateWindow(every: 1h, fn: max)
      -    |> to(bucket: \"cpu_usage_user_total_1h\", org: \"INFLUX_ORG\")",
      -  "status": "active",
      -  "description": "This task downsamples CPU data every hour"
      -}
      -
    • -
    • scriptID: the ID of an invokable script -for the task to run. -To pass task options when using scriptID, pass the options as -properties in the request body--for example:

      -
      {
      -  "name": "CPU Total 1 Hour New",
      -  "description": "This task downsamples CPU data every hour",
      -  "every": "1h",
      -  "scriptID": "SCRIPT_ID",
      -  "scriptParameters":
      -    {
      -      "rangeStart": "-1h",
      -      "bucket": "telegraf",
      -      "filterField": "cpu-total"
      -    }
      -  }
      -
    • -
    -
  • -
-

Limitations:

-
    -
  • You can't use flux and scriptID for the same task.
  • -
-
Authorizations:
path Parameters
taskID
required
string

A task ID. -Specifies the task to update.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

An task update to apply.

-
cron
string

Update the 'cron' option in the flux script.

-
description
string

Update the description of the task.

-
every
string

Update the 'every' option in the flux script.

-
flux
string

Update the Flux script that the task runs.

-
name
string

Update the 'name' option in the flux script.

-
offset
string

Update the 'offset' option in the flux script.

-
scriptID
string

Update the 'scriptID' of the task.

-
scriptParameters
object

Update the 'scriptParameters' of the task.

-
status
string (TaskStatusType)
Enum: "active" "inactive"

inactive cancels scheduled runs and prevents manual runs of the task.

-

Responses

Request samples

Content type
application/json
{
  • "cron": "string",
  • "description": "string",
  • "every": "string",
  • "flux": "string",
  • "name": "string",
  • "offset": "string",
  • "scriptID": "string",
  • "scriptParameters": { },
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "authorizationID": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "cron": "string",
  • "description": "string",
  • "every": "string",
  • "flux": "string",
  • "id": "string",
  • "labels": [
    ],
  • "lastRunError": "string",
  • "lastRunStatus": "failed",
  • "latestCompleted": "2019-08-24T14:15:22Z",
  • "links": {
    },
  • "name": "string",
  • "offset": "string",
  • "org": "string",
  • "orgID": "string",
  • "ownerID": "string",
  • "scriptID": "string",
  • "scriptParameters": { },
  • "status": "active",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List labels for a task

Retrieves a list of all labels for a task.

-

Labels may be used for grouping and filtering tasks.

-
Authorizations:
path Parameters
taskID
required
string

The ID of the task to retrieve labels for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{}

Add a label to a task

Adds a label to a task.

-

Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI.

-
Authorizations:
path Parameters
taskID
required
string

The ID of the task to label.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

An object that contains a labelID to add to the task.

-
labelID
required
string

A label ID. -Specifies the label to attach.

-

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a task

Deletes a label from a task.

-
Authorizations:
path Parameters
labelID
required
string

The ID of the label to delete.

-
taskID
required
string

The ID of the task to delete the label from.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "failed to decode request body: organization not found"
}

Retrieve all logs for a task

Retrieves a list of all logs for a task.

-

When an InfluxDB task runs, a “run” record is created in the task’s history. -Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt.

-

Use this endpoint to retrieve only the log events for a task, -without additional task metadata.

-
Authorizations:
path Parameters
taskID
required
string

The task ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
Example
{
  • "events": [
    ]
}

List all task members Deprecated

Deprecated: Tasks don't use owner and member roles. -Use /api/v2/authorizations to assign user permissions.

-

Lists all users that have the member role for the specified task.

-
Authorizations:
path Parameters
taskID
required
string

The task ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a task Deprecated

Deprecated: Tasks don't use owner and member roles. -Use /api/v2/authorizations to assign user permissions.

-

Adds a user to members of a task and returns the member.

-
Authorizations:
path Parameters
taskID
required
string

The task ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

A user to add as a member of the task.

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "name": "string",
  • "status": "active",
  • "role": "member"
}

Remove a member from a task Deprecated

Deprecated: Tasks don't use owner and member roles. -Use /api/v2/authorizations to assign user permissions.

-

Removes a member from a task.

-
Authorizations:
path Parameters
taskID
required
string

The task ID.

-
userID
required
string

The ID of the member to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

List all owners of a task Deprecated

Deprecated: Tasks don't use owner and member roles. -Use /api/v2/authorizations to assign user permissions.

-

Retrieves all users that have owner permission for a task.

-
Authorizations:
path Parameters
taskID
required
string

The ID of the task to retrieve owners for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner for a task Deprecated

Deprecated: Tasks don't use owner and member roles. -Use /api/v2/authorizations to assign user permissions.

-

Assigns a task owner role to a user.

-

Use this endpoint to create a resource owner for the task. -A resource owner is a user with role: owner for a specific resource.

-
Authorizations:
path Parameters
taskID
required
string

The task ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

A user to add as an owner of the task.

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "0772396d1f411000",
  • "links": {
    },
  • "name": "USER_NAME",
  • "role": "owner",
  • "status": "active"
}

Remove an owner from a task Deprecated

Deprecated: Tasks don't use owner and member roles. -Use /api/v2/authorizations to assign user permissions.

-
Authorizations:
path Parameters
taskID
required
string

The task ID.

-
userID
required
string

The ID of the owner to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

List runs for a task

Retrieves a list of runs for a task.

-

To limit which task runs are returned, pass query parameters in your request. -If no query parameters are passed, InfluxDB returns all task runs up to the default limit.

- -
Authorizations:
path Parameters
taskID
required
string

The ID of the task to get runs for. -Only returns runs for this task.

-
query Parameters
after
string

A task run ID. Only returns runs created after this run.

-
afterTime
string <date-time>

A timestamp (RFC3339 date/time format). -Only returns runs scheduled after this time.

-
beforeTime
string <date-time>

A timestamp (RFC3339 date/time format). -Only returns runs scheduled before this time.

-
limit
integer [ 1 .. 500 ]
Default: 100

Limits the number of task runs returned. Default is 100.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "runs": [
    ]
}

Start a task run, overriding the schedule

Schedules a task run to start immediately, ignoring scheduled runs.

-

Use this endpoint to manually start a task run. -Scheduled runs will continue to run as scheduled. -This may result in concurrently running tasks.

-

To retry a previous run (and avoid creating a new run), -use the POST /api/v2/tasks/{taskID}/runs/{runID}/retry endpoint.

- -
Authorizations:
path Parameters
taskID
required
string
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json
scheduledFor
string or null <date-time>

The time RFC3339 date/time format -used for the run's now option. -Default is the server now time.

-

Responses

Request samples

Content type
application/json
{
  • "scheduledFor": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "finishedAt": "2006-01-02T15:04:05.999999999Z07:00",
  • "flux": "string",
  • "id": "string",
  • "links": {
    },
  • "log": [
    ],
  • "requestedAt": "2006-01-02T15:04:05.999999999Z07:00",
  • "scheduledFor": "2019-08-24T14:15:22Z",
  • "startedAt": "2006-01-02T15:04:05.999999999Z07:00",
  • "status": "scheduled",
  • "taskID": "string"
}

Cancel a running task

Cancels a running task.

-

Use this endpoint with InfluxDB OSS to cancel a running task.

-

InfluxDB Cloud

-
    -
  • Doesn't support this operation. -
  • -
-
Authorizations:
path Parameters
runID
required
string

The ID of the task run to cancel.

-
taskID
required
string

The ID of the task to cancel.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "failed to decode request body: organization not found"
}

Retrieve a run for a task.

Retrieves a specific run for a task.

-

Use this endpoint to retrieve detail and logs for a specific task run.

- -
Authorizations:
path Parameters
runID
required
string

The ID of the run to retrieve.

-
taskID
required
string

The ID of the task to retrieve runs for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "finishedAt": "2022-07-18T14:46:07.308254Z",
  • "id": "09b070dadaa7d000",
  • "links": {
    },
  • "log": [
    ],
  • "requestedAt": "2022-07-18T14:46:06Z",
  • "scheduledFor": "2022-07-18T14:46:06Z",
  • "startedAt": "2022-07-18T14:46:07.16222Z",
  • "status": "success",
  • "taskID": "0996e56b2f378000"
}

Retrieve all logs for a run

Retrieves all logs for a task run. -A log is a list of run events with runID, time, and message properties.

-

Use this endpoint to help analyze task performance and troubleshoot failed task runs.

- -
Authorizations:
path Parameters
runID
required
string

The ID of the run to get logs for.

-
taskID
required
string

The ID of the task to get logs for.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
Example
{
  • "events": [
    ]
}

Retry a task run

Queues a task run to -retry and returns the scheduled run.

-

To manually start a new task run, use the -POST /api/v2/tasks/{taskID}/runs endpoint.

-

Limitations

-
    -
  • The task must be active (status: "active").
  • -
-
Authorizations:
path Parameters
runID
required
string

A task run ID. -Specifies the task run to retry.

-

To find a task run ID, use the -GET /api/v2/tasks/{taskID}/runs endpoint -to list task runs.

-
taskID
required
string

A task ID. -Specifies the task to retry.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json; charset=utf-8
object

Responses

Request samples

Content type
application/json; charset=utf-8
{ }

Response samples

Content type
application/json
{
  • "id": "09d60ffe08738000",
  • "links": {
    },
  • "requestedAt": "2022-08-16T20:05:11.84145Z",
  • "scheduledFor": "2022-08-15T00:00:00Z",
  • "status": "scheduled",
  • "taskID": "09a776832f381000"
}

Telegrafs

List all Telegraf configurations

Authorizations:
query Parameters
orgID
string

The organization ID the Telegraf config belongs to.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "configurations": [
    ]
}

Create a Telegraf configuration

Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Telegraf configuration to create

-
config
string
description
string
object
name
string
orgID
string
Array of objects

Responses

Request samples

Content type
application/json
{
  • "config": "string",
  • "description": "string",
  • "metadata": {
    },
  • "name": "string",
  • "orgID": "string",
  • "plugins": [
    ]
}

Response samples

Content type
application/json
{
  • "config": "string",
  • "description": "string",
  • "metadata": {
    },
  • "name": "string",
  • "orgID": "string",
  • "id": "string",
  • "labels": [
    ],
  • "links": {
    }
}

Delete a Telegraf configuration

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf configuration ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Retrieve a Telegraf configuration

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf configuration ID.

-
header Parameters
Accept
string
Default: application/toml
Enum: "application/toml" "application/json" "application/octet-stream"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
{
  • "config": "string",
  • "description": "string",
  • "metadata": {
    },
  • "name": "string",
  • "orgID": "string",
  • "id": "string",
  • "labels": [
    ],
  • "links": {
    }
}

Update a Telegraf configuration

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf config ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Telegraf configuration update to apply

-
config
string
description
string
object
name
string
orgID
string
Array of objects

Responses

Request samples

Content type
application/json
{
  • "config": "string",
  • "description": "string",
  • "metadata": {
    },
  • "name": "string",
  • "orgID": "string",
  • "plugins": [
    ]
}

Response samples

Content type
application/json
{
  • "config": "string",
  • "description": "string",
  • "metadata": {
    },
  • "name": "string",
  • "orgID": "string",
  • "id": "string",
  • "labels": [
    ],
  • "links": {
    }
}

List all labels for a Telegraf config

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf config ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{}

Add a label to a Telegraf config

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf config ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Label to add

-
labelID
required
string

A label ID. -Specifies the label to attach.

-

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a Telegraf config

Authorizations:
path Parameters
labelID
required
string

The label ID.

-
telegrafID
required
string

The Telegraf config ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

List all users with member privileges for a Telegraf config

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf config ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add a member to a Telegraf config

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf config ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

User to add as member

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "name": "string",
  • "status": "active",
  • "role": "member"
}

Remove a member from a Telegraf config

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf config ID.

-
userID
required
string

The ID of the member to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

List all owners of a Telegraf configuration

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf configuration ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "links": {},
  • "users": [
    ]
}

Add an owner to a Telegraf configuration

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf configuration ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

User to add as owner

-
id
required
string

The ID of the user to add to the resource.

-
name
string

The name of the user to add to the resource.

-

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "links": {
    },
  • "name": "string",
  • "status": "active",
  • "role": "owner"
}

Remove an owner from a Telegraf config

Authorizations:
path Parameters
telegrafID
required
string

The Telegraf config ID.

-
userID
required
string

The ID of the owner to remove.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Templates

Export and apply InfluxDB templates. -Manage stacks of templated InfluxDB resources.

-

InfluxDB templates are prepackaged configurations for resources. -Use InfluxDB templates to configure a fresh instance of InfluxDB, -back up your dashboard configuration, or share your configuration.

-

Use the /api/v2/templates endpoints to export templates and apply templates.

-

InfluxDB stacks are stateful InfluxDB templates that let you -add, update, and remove installed template resources over time, avoid duplicating -resources when applying the same or similar templates more than once, and -apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.

-

Use the /api/v2/stacks endpoints to manage installed template resources.

- -

List installed stacks

Lists installed InfluxDB stacks.

-

To limit stacks in the response, pass query parameters in your request. -If no query parameters are passed, InfluxDB returns all installed stacks -for the organization.

- -
Authorizations:
query Parameters
name
string
Examples:
  • name=project-stack-0 - Find stacks with the event name

A stack name. -Finds stack events with this name and returns the stacks.

-

Repeatable. -To filter for more than one stack name, -repeat this parameter with each name--for example:

-
    -
  • INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1
  • -
-
orgID
required
string

An organization ID. -Only returns stacks owned by the specified organization.

-

InfluxDB Cloud

-
    -
  • Doesn't require this parameter; -InfluxDB only returns resources allowed by the API token.
  • -
-
stackID
string
Examples:
  • stackID=09bd87cd33be3000 - Find a stack with the ID

A stack ID. -Only returns the specified stack.

-

Repeatable. -To filter for more than one stack ID, -repeat this parameter with each ID--for example:

-
    -
  • INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000
  • -
-

Responses

Response samples

Content type
application/json
{
  • "stacks": [
    ]
}

Create a stack

Creates or initializes a stack.

-

Use this endpoint to manually initialize a new stack with the following -optional information:

-
    -
  • Stack name
  • -
  • Stack description
  • -
  • URLs for template manifest files
  • -
-

To automatically create a stack when applying templates, -use the /api/v2/templates/apply endpoint.

-

Required permissions

-
    -
  • write permission for the organization
  • -
- -
Authorizations:
Request Body schema: application/json

The stack to create.

-
description
string
name
string
orgID
string
urls
Array of strings

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string",
  • "orgID": "string",
  • "urls": [
    ]
}

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": "string",
  • "orgID": "string"
}

Delete a stack and associated resources

Authorizations:
path Parameters
stack_id
required
string

The identifier of the stack.

-
query Parameters
orgID
required
string

The identifier of the organization.

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Retrieve a stack

Authorizations:
path Parameters
stack_id
required
string

The identifier of the stack.

-

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": "string",
  • "orgID": "string"
}

Update a stack

Authorizations:
path Parameters
stack_id
required
string

The identifier of the stack.

-
Request Body schema: application/json

The stack to update.

-
Array of objects
description
string or null
name
string or null
templateURLs
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "additionalResources": [
    ],
  • "description": "string",
  • "name": "string",
  • "templateURLs": [
    ]
}

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": "string",
  • "orgID": "string"
}

Uninstall a stack

Authorizations:
path Parameters
stack_id
required
string

The identifier of the stack.

-

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": "string",
  • "orgID": "string"
}

Apply or dry-run a template

Applies a template to -create or update a stack of InfluxDB -resources. -The response contains the diff of changes and the stack ID.

-

Use this endpoint to install an InfluxDB template to an organization. -Provide template URLs or template objects in your request. -To customize which template resources are installed, use the actions -parameter.

-

By default, when you apply a template, InfluxDB installs the template to -create and update stack resources and then generates a diff of the changes. -If you pass dryRun: true in the request body, InfluxDB validates the -template and generates the resource diff, but doesn’t make any -changes to your instance.

-

Custom values for templates

-
    -
  • Some templates may contain environment references for custom metadata. -To provide custom values for environment references, pass the envRefs -property in the request body.

    -
  • -
  • Some templates may contain queries that use -secrets. -To provide custom secret values, pass the secrets property -in the request body. -Don't expose secret values in templates.

    -
  • -
-

Required permissions

-
    -
  • write permissions for resource types in the template.
  • -
-

Rate limits (with InfluxDB Cloud)

- - -
Authorizations:
Request Body schema:

Parameters for applying templates.

-
Array of objects or objects

A list of action objects. -Actions let you customize how InfluxDB applies templates in the request.

-

You can use the following actions to prevent creating or updating resources:

-
    -
  • A skipKind action skips template resources of a specified kind.
  • -
  • A skipResource action skips template resources with a specified metadata.name -and kind.
  • -
-
dryRun
boolean

Only applies a dry run of the templates passed in the request.

-
    -
  • Validates the template and generates a resource diff and summary.
  • -
  • Doesn't install templates or make changes to the InfluxDB instance.
  • -
-
object

An object with key-value pairs that map to environment references in templates.

-

Environment references in templates are envRef objects with an envRef.key -property. -To substitute a custom environment reference value when applying templates, -pass envRefs with the envRef.key and the value.

-

When you apply a template, InfluxDB replaces envRef objects in the template -with the values that you provide in the envRefs parameter.

-

The following template fields may use environment references:

-
    -
  • metadata.name
  • -
  • spec.endpointName
  • -
  • spec.associations.name
  • -
- -
orgID
string

Organization ID. -InfluxDB applies templates to this organization. -The organization owns all resources created by the template.

-

To find your organization, see how to -view organizations.

-
Array of objects

A list of URLs for template files.

-

To apply a template manifest file located at a URL, pass remotes -with an array that contains the URL.

-
object

An object with key-value pairs that map to secrets in queries.

-

Queries may reference secrets stored in InfluxDB--for example, -the following Flux script retrieves POSTGRES_USERNAME and POSTGRES_PASSWORD -secrets and then uses them to connect to a PostgreSQL database:

-
import "sql"
-import "influxdata/influxdb/secrets"
-
-username = secrets.get(key: "POSTGRES_USERNAME")
-password = secrets.get(key: "POSTGRES_PASSWORD")
-
-sql.from(
-  driverName: "postgres",
-  dataSourceName: "postgresql://${username}:${password}@localhost:5432",
-  query: "SELECT * FROM example_table",
-)
-

To define secret values in your /api/v2/templates/apply request, -pass the secrets parameter with key-value pairs--for example:

-
{
-  ...
-  "secrets": {
-    "POSTGRES_USERNAME": "pguser",
-    "POSTGRES_PASSWORD": "foo"
-  }
-  ...
-}
-

InfluxDB stores the key-value pairs as secrets that you can access with secrets.get(). -Once stored, you can't view secret values in InfluxDB.

- -
stackID
string

ID of the stack to update.

-

To apply templates to an existing stack in the organization, use the stackID parameter. -If you apply templates without providing a stack ID, -InfluxDB initializes a new stack with all new resources.

-

To find a stack ID, use the InfluxDB /api/v2/stacks API endpoint to list stacks.

- -
object

A template object to apply. -A template object has a contents property -with an array of InfluxDB resource configurations.

-

Pass template to apply only one template object. -If you use template, you can't use the templates parameter. -If you want to apply multiple template objects, use templates instead.

-
Array of objects

A list of template objects to apply. -A template object has a contents property -with an array of InfluxDB resource configurations.

-

Use the templates parameter to apply multiple template objects. -If you use templates, you can't use the template parameter.

-

Responses

Request samples

Content type
Example
{
  • "actions": [
    ],
  • "orgID": "INFLUX_ORG_ID",
  • "templates": [
    ]
}

Response samples

Content type
application/json
{
  • "diff": {
    },
  • "errors": [
    ],
  • "sources": [
    ],
  • "stackID": "string",
  • "summary": {
    }
}

Export a new template

Authorizations:
Request Body schema: application/json

Export resources as an InfluxDB template.

-
One of
Array of objects
Array of objects
stackID
string

Responses

Request samples

Content type
application/json
Example
{
  • "orgIDs": [
    ],
  • "resources": [
    ],
  • "stackID": "string"
}

Response samples

Content type
[
  • {
    }
]

Usage

Retrieve usage for an organization

Authorizations:
path Parameters
orgID
required
string

The ID of the organization.

-
query Parameters
raw
boolean
Default: false

return raw usage data

-
start
required
integer <unix timestamp>

Earliest time (unix timestamp format) to include in results.

-
stop
integer <unix timestamp>

Latest time (unix timestamp format) to include in results.

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Variables

List all variables

Authorizations:
query Parameters
org
string

The name of the organization.

-
orgID
string

The organization ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "variables": [
    ]
}

Create a variable

Authorizations:
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Variable to create

-
required
QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties)
createdAt
string <date-time>
description
string
Array of objects (Labels)
name
required
string
orgID
required
string
selected
Array of strings
sort_order
integer
updatedAt
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "labels": [
    ],
  • "name": "string",
  • "orgID": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "labels": [
    ],
  • "links": {},
  • "name": "string",
  • "orgID": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a variable

Authorizations:
path Parameters
variableID
required
string

The variable ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Retrieve a variable

Authorizations:
path Parameters
variableID
required
string

The variable ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "labels": [
    ],
  • "links": {},
  • "name": "string",
  • "orgID": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a variable

Authorizations:
path Parameters
variableID
required
string

The variable ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Variable update to apply

-
required
QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties)
createdAt
string <date-time>
description
string
Array of objects (Labels)
name
required
string
orgID
required
string
selected
Array of strings
sort_order
integer
updatedAt
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "labels": [
    ],
  • "name": "string",
  • "orgID": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "labels": [
    ],
  • "links": {},
  • "name": "string",
  • "orgID": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Replace a variable

Authorizations:
path Parameters
variableID
required
string

The variable ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Variable to replace

-
required
QueryVariableProperties (object) or ConstantVariableProperties (object) or MapVariableProperties (object) (VariableProperties)
createdAt
string <date-time>
description
string
Array of objects (Labels)
name
required
string
orgID
required
string
selected
Array of strings
sort_order
integer
updatedAt
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "labels": [
    ],
  • "name": "string",
  • "orgID": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "arguments": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "labels": [
    ],
  • "links": {},
  • "name": "string",
  • "orgID": "string",
  • "selected": [
    ],
  • "sort_order": 0,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List all labels for a variable

Authorizations:
path Parameters
variableID
required
string

The variable ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{}

Add a label to a variable

Authorizations:
path Parameters
variableID
required
string

The variable ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: application/json

Label to add

-
labelID
required
string

A label ID. -Specifies the label to attach.

-

Responses

Request samples

Content type
application/json
{
  • "labelID": "string"
}

Response samples

Content type
application/json
{}

Delete a label from a variable

Authorizations:
path Parameters
labelID
required
string

The label ID to delete.

-
variableID
required
string

The variable ID.

-
header Parameters
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "err": "string",
  • "message": "string",
  • "op": "string"
}

Write

Write time series data to buckets using InfluxDB v1 or v2 endpoints.

-

Write data

Writes data to a bucket.

-

Use this endpoint to send data in line protocol format to InfluxDB.

-

InfluxDB 3 Cloud Serverless does the following when you send a write request:

-
    -
  1. Validates the request.

    -
  2. -
  3. If successful, attempts to ingest data from the request body; otherwise, responds with an error status.

    -
  4. -
  5. Ingests or rejects data in the batch and returns one of the following HTTP status codes:

    -
      -
    • 204 No Content: All data in the batch is ingested.
    • -
    • 400 Bad Request: Data from the batch was rejected and not written. The response body indicates if a partial write occurred.
    • -
    -
  6. -
-

The response body contains error details about rejected points, up to 100 points.

-

Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.

-

To ensure that InfluxDB handles writes in the order you request them, -wait for the response before you send the next request.

-

Write endpoints

-

The /write and /api/v2/write endpoints are functionally equivalent for writing data to InfluxDB 3 Cloud Serverless.

- -

Rate limits

-

Write rate limits apply. -For more information, see limits and adjustable quotas.

- - -
Authorizations:
query Parameters
bucket
required
string

A bucket name or ID. -InfluxDB writes all points in the batch to the specified bucket.

-
org
required
string

An organization name or ID.

-

InfluxDB 3 Cloud Serverless writes data to the bucket in the organization associated with the authorization (API token); -doesn't use the org parameter or orgID parameter.

-
orgID
string

An organization ID.

-

InfluxDB 3 Cloud Serverless writes data to the bucket in the organization associated with the authorization (API token); -doesn't use the org parameter or orgID parameter.

-
precision
string (WritePrecision)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

-
header Parameters
Accept
string
Default: application/json
Value: "application/json"

The content type that the client can understand. -Writes only return a response body if they fail--for example, -due to a formatting problem or quota limit.

-

InfluxDB 3 Cloud Serverless

-
    -
  • Returns only application/json for format and limit errors.
  • -
  • Returns only text/html for some quota limit errors.
  • -
- - -
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

The compression applied to the line protocol in the request payload. -To send a gzip payload, pass Content-Encoding: gzip header.

-
Content-Length
integer

The size of the entity-body, in bytes, sent to InfluxDB. -If the length is greater than the max body configuration option, -the server responds with status code 413.

-
Content-Type
string
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The format of the data in the request body. -To send a line protocol payload, pass Content-Type: text/plain; charset=utf-8.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

In the request body, provide data in line protocol format.

-

To send compressed data, do the following:

-
    -
  1. Use gzip to compress the line protocol data.
  2. -
  3. In your request, send the compressed data and the -Content-Encoding: gzip header.
  4. -
- - -
string <byte>

Responses

Request samples

Content type
text/plain
airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
-airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
-

Response samples

Content type
application/json
Example
{
  • "code": "invalid",
  • "line": 2,
  • "message": "no data written, errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)"
}

Write data using the InfluxDB v1 HTTP API

Writes data to a bucket.

-

Use this endpoint for InfluxDB v1 parameter compatibility when sending data in line protocol format to InfluxDB.

-

InfluxDB 3 Cloud Serverless does the following when you send a write request:

-
    -
  1. Validates the request.

    -
  2. -
  3. If successful, attempts to ingest data from the request body; otherwise, responds with an error status.

    -
  4. -
  5. Ingests or rejects data in the batch and returns one of the following HTTP status codes:

    -
      -
    • 204 No Content: all data in the batch is ingested
    • -
    • 201 Created: some points in the batch are ingested and queryable, and some points are rejected
    • -
    • 400 Bad Request: all data is rejected
    • -
    -
  6. -
-

The response body contains error details about rejected points, up to 100 points.

-

Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.

-

To ensure that InfluxDB handles writes in the order you request them, -wait for the response before you send the next request.

-

Write endpoints

-

The /write and /api/v2/write endpoints are functionally equivalent for writing data to InfluxDB 3 Cloud Serverless.

- -

Rate limits

-

Write rate limits apply. -For more information, see limits and adjustable quotas.

- - -
Authorizations:
query Parameters
db
required
string

Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
precision
string

Write precision.

-
rp
string

Retention policy name.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, indicates that compression is applied to the line protocol body.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

Line protocol body

-
string

Responses

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "line": 2,
  • "message": "failed to parse line protocol: errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)"
}
- - - - - diff --git a/content/influxdb3/clustered/api/v1-compatibility/_index.html b/content/influxdb3/clustered/api/v1-compatibility/_index.html deleted file mode 100644 index 54fc87790..000000000 --- a/content/influxdb3/clustered/api/v1-compatibility/_index.html +++ /dev/null @@ -1,579 +0,0 @@ ---- -title: InfluxDB v1 HTTP API for InfluxDB 3 Clustered -description: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Clustered database. -layout: api -menu: - influxdb3_clustered: - parent: InfluxDB HTTP API - name: v1 Compatibility API - identifier: api-reference-v1-compatibility -weight: 304 -aliases: - - /influxdb/clustered/api/v1/ ---- - - - - - - - - - - - InfluxDB - - - - - - - - - - - - - - - - -
-
-
- - -

InfluxDB v1 HTTP API for InfluxDB 3 Clustered

License: MIT

The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB 3 Clustered database.

-

The InfluxDB 1.x /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.

-

This documentation is generated from the -InfluxDB OpenAPI specification.

- -

InfluxDB /api/v2 API for InfluxDB 3 Clustered

-

Authentication

The InfluxDB 1.x API requires authentication for all requests. -InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.

-

For more information, see the following:

- -

TokenAuthentication

Use the Token authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Token followed by a space and an InfluxDB API token. -The word Token is case-sensitive.

-

Syntax

-

Authorization: Token YOUR_INFLUX_TOKEN

-

For examples and more information, see the following:

- -
Security Scheme Type API Key
Header parameter name: Authorization

BasicAuthentication

Use the HTTP Basic authentication -scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the Authorization: Token scheme):

-

For examples and more information, see how to authenticate with a username and password.

-
Security Scheme Type HTTP
HTTP Authorization Scheme basic

QuerystringAuthentication

Use the Querystring authentication -scheme with InfluxDB 1.x API parameters to provide credentials through the query string.

-

For examples and more information, see how to authenticate with a username and password.

-
Security Scheme Type API Key
Query parameter name: u=&p=

Query

Query using the InfluxDB v1 HTTP API

query Parameters
db
required
string

Bucket to query.

-
p
string

User token.

-
q
string

Defines the influxql query to run.

-
rp
string

Retention policy name.

-
u
string

Username.

-
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack"

Specifies how query results should be encoded in the response. Note: With application/csv, query results include epoch timestamps instead of RFC3339 timestamps.

-
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.

-
Content-Type
string
Value: "application/vnd.influxql"
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

-
Request Body schema: text/plain

InfluxQL query to execute.

-
string

Responses

Response samples

Content type
No sample

Write

Write time series data into InfluxDB in a V1-compatible format

query Parameters
db
required
string

Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.

-
p
string

User token.

-
precision
string

Write precision.

-
rp
string

Retention policy name.

-
u
string

Username.

-
header Parameters
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, its value indicates to the database that compression is applied to the line protocol body.

-
Zap-Trace-Span
string
Example: trace_id,1,span_id,1,baggage,[object Object]

OpenTracing span context

-
Request Body schema: text/plain

Line protocol body

-
string

Responses

Response samples

Content type
application/json
{
  • "code": "internal error",
  • "message": "string",
  • "op": "string",
  • "err": "string",
  • "line": 0
}
- - - - - diff --git a/content/influxdb3/clustered/api/v2/_index.html b/content/influxdb3/clustered/api/v2/_index.html deleted file mode 100644 index cd9eca651..000000000 --- a/content/influxdb3/clustered/api/v2/_index.html +++ /dev/null @@ -1,966 +0,0 @@ ---- -title: InfluxDB 3 Clustered API Service -description: The InfluxDB v2 HTTP API for InfluxDB 3 Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Clustered database. -layout: api -menu: - influxdb3_clustered: - parent: InfluxDB HTTP API - name: v2 API - identifier: api-reference-v2 -weight: 102 -aliases: - - /influxdb/clustered/api/ ---- - - - - - - - - - - - InfluxDB - - - - - - - - - - - - - - - - -
-
-
- - -

InfluxDB 3 Clustered API Service

License: MIT

The InfluxDB v2 HTTP API for InfluxDB 3 Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB 3 Clustered database.

-

The InfluxDB v2 HTTP API lets you use /api/v2 endpoints for managing retention policy mappings and writing data stored in an InfluxDB 3 instance.

-

This documentation is generated from the -InfluxDB OpenAPI specification.

-

Quick start

See the Get Started tutorial -to get up and running authenticating with tokens, writing to databases, and querying data.

-

InfluxDB API client libraries and Flight clients -are available to integrate InfluxDB APIs with your application.

-

Authentication

Use one of the following schemes to authenticate to the InfluxDB API:

- -

BasicAuthentication

Basic authentication scheme

-

Use the Authorization header with the Basic scheme to authenticate v1 API /write and /query requests. -When authenticating requests, InfluxDB 3 Clustered checks that the password part of the decoded credential is an authorized database token. -InfluxDB 3 Clustered ignores the username part of the decoded credential.

-

Syntax

-
Authorization: Basic <base64-encoded [USERNAME]:DATABASE_TOKEN>
-

Replace the following:

-
    -
  • [USERNAME]: an optional string value (ignored by InfluxDB 3 Clustered).
  • -
  • DATABASE_TOKEN: a database token.
  • -
  • Encode the [USERNAME]:DATABASE_TOKEN credential using base64 encoding, and then append the encoded string to the Authorization: Basic header.
  • -
-

Example

-

The following example shows how to use cURL with the Basic authentication scheme and a database token:

-
#######################################
-# Use Basic authentication with a database token
-# to query the InfluxDB v1 HTTP API
-#######################################
-# Use the --user option with `--user username:DATABASE_TOKEN` syntax
-#######################################
-
-curl --get "http://cluster-id.a.influxdb.io/query" \
-  --user "":"DATABASE_TOKEN" \
-  --data-urlencode "db=DATABASE_NAME" \
-  --data-urlencode "q=SELECT * FROM MEASUREMENT"
-

Replace the following:

-
    -
  • DATABASE_NAME: your InfluxDB 3 Clustered database
  • -
  • DATABASE_TOKEN: a database token with sufficient permissions to the database
  • -
-
Security Scheme Type HTTP
HTTP Authorization Scheme basic

QuerystringAuthentication

Use the Querystring authentication -scheme with InfluxDB 1.x API parameters to provide credentials through the query string.

-

Query string authentication

-

In the URL, pass the p query parameter to authenticate /write and /query requests. -When authenticating requests, InfluxDB 3 Clustered checks that p (password) is an authorized database token and ignores the u (username) parameter.

-

Syntax

-
https://cluster-id.a.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN
-https://cluster-id.a.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN
-

Example

-

The following example shows how to use cURL with query string authentication and a database token.

-
#######################################
-# Use an InfluxDB 1.x compatible username and password
-# to query the InfluxDB v1 HTTP API
-#######################################
-# Use authentication query parameters:
-#   ?p=DATABASE_TOKEN
-#######################################
-
-curl --get "https://cluster-id.a.influxdb.io/query" \
-  --data-urlencode "p=DATABASE_TOKEN" \
-  --data-urlencode "db=DATABASE_NAME" \
-  --data-urlencode "q=SELECT * FROM MEASUREMENT"
-

Replace the following:

-
    -
  • DATABASE_NAME: your InfluxDB 3 Clustered database
  • -
  • DATABASE_TOKEN: a database token with sufficient permissions to the database
  • -
-
Security Scheme Type API Key
Query parameter name: u=&p=

BearerAuthentication

Use the OAuth Bearer authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Bearer followed by a space and a database token.

-

Syntax

-
Authorization: Bearer INFLUX_TOKEN
-

Example

-
########################################################
-# Use the Bearer token authentication scheme with /api/v2/write
-# to write data.
-########################################################
-
-curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
-  --header "Authorization: Bearer DATABASE_TOKEN" \
-  --data-binary 'home,room=kitchen temp=72 1463683075'
-

For examples and more information, see the following:

- -
Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

TokenAuthentication

Use the Token authentication -scheme to authenticate to the InfluxDB API.

-

In your API requests, send an Authorization header. -For the header value, provide the word Token followed by a space and a database token. -The word Token is case-sensitive.

-

Syntax

-
Authorization: Token INFLUX_API_TOKEN
-

Example

-
########################################################
-# Use the Token authentication scheme with /api/v2/write
-# to write data.
-########################################################
-
-curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
-  --header "Authorization: Token DATABASE_TOKEN" \
-  --data-binary 'home,room=kitchen temp=72 1463683075'
- - -
Security Scheme Type API Key
Header parameter name: Authorization

Headers

InfluxDB HTTP API endpoints use standard HTTP request and response headers. -The following table shows common headers used by many InfluxDB API endpoints. -Some endpoints may use other headers that perform functions more specific to those endpoints--for example, -the POST /api/v2/write endpoint accepts the Content-Encoding header to indicate the compression applied to line protocol in the request body.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HeaderValue typeDescription
AcceptstringThe content type that the client can understand.
AuthorizationstringThe authorization scheme and credential.
Content-LengthintegerThe size of the entity-body, in bytes, sent to the database.
Content-TypestringThe format of the data in the request body.
-

Response codes

InfluxDB HTTP API endpoints use standard HTTP status codes for success and failure responses. -The response body may include additional details. -For details about a specific operation's response, -see Responses and Response Samples for that operation.

-

API operations may return the following HTTP status codes:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Code StatusDescription
200Success
204Success. No contentInfluxDB doesn't return data for the request. For example, a successful write request returns 204 status code, acknowledging that data is written and queryable.
400Bad requestInfluxDB can't parse the request due to an incorrect parameter or bad syntax. If line protocol in the request body is malformed. The response body contains the first malformed line and indicates what was expected. For partial writes, the number of points written and the number of points rejected are also included.
401UnauthorizedMay indicate one of the following:
  • Authorization: Token header is missing or malformed
  • API token value is missing from the header
  • API token doesn't have permission. For more information about token types and permissions, see Manage tokens
404Not foundRequested resource was not found. message in the response body provides details about the requested resource.
405Method not allowedThe API path doesn't support the HTTP method used in the request--for example, you send a POST request to an endpoint that only allows GET.
413Request entity too largeRequest payload exceeds the size limit.
422Unprocessable entityRequest data is invalid. code and message in the response body provide details about the problem.
429Too many requestsAPI token is temporarily over the request quota. The Retry-After header describes when to try the request again.
500Internal server error
503Service unavailableServer is temporarily unavailable to process the request. The Retry-After header describes when to try the request again.
-

System information endpoints

Ping

Get the status of the instance

Retrieves the status and InfluxDB version of the instance.

-

Use this endpoint to monitor uptime for the InfluxDB instance. The response -returns a HTTP 204 status code to inform you the instance is available.

-

This endpoint doesn't require authentication.

-
Authorizations:
None

Responses

Get the status of the instance

Returns the status and InfluxDB version of the instance.

-

Use this endpoint to monitor uptime for the InfluxDB instance. The response -returns a HTTP 204 status code to inform you the instance is available.

-

This endpoint doesn't require authentication.

-
Authorizations:
None

Responses

Query

Query data stored in a database.

-
    -
  • HTTP clients can query the v1 /query endpoint -using InfluxQL and retrieve data in CSV or JSON format.
  • -
  • The /api/v2/query endpoint can't query InfluxDB 3 Clustered.
  • -
  • Flight + gRPC clients can query using SQL or InfluxQL and retrieve data in Arrow format.
  • -
- - -

Query using the InfluxDB v1 HTTP API

Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats.

-
query Parameters
db
required
string

The database to query data from.

-
epoch
string
Enum: "ns" "u" "µ" "ms" "s" "m" "h"

A unix timestamp precision. -Formats timestamps as unix (epoch) timestamps the specified precision -instead of RFC3339 timestamps with nanosecond precision.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
q
required
string

The InfluxQL query to execute. To execute multiple queries, delimit queries with a semicolon (;).

-
rp
string

The retention policy to query data from. -For more information, see InfluxQL DBRP naming convention.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/csv" "text/csv" "application/x-msgpack"

Media type that the client can understand.

-

Note: With application/csv, query results include unix timestamps instead of RFC3339 timestamps.

-
Accept-Encoding
string
Default: identity
Enum: "gzip" "identity"

The content encoding (usually a compression algorithm) that the client can understand.

-
Content-Type
string
Value: "application/json"
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-

Responses

Response samples

Content type
No sample

Write

Write time series data to databases using InfluxDB v1 or v2 endpoints.

-

Write data

Writes data to a database.

-

Use this endpoint to send data in line protocol format to InfluxDB.

-

InfluxDB does the following when you send a write request:

-
    -
  1. Validates the request
  2. -
  3. If successful, attempts to ingest the data; error otherwise.
  4. -
  5. If successful, responds with success (HTTP 204 status code), acknowledging that the data is written and queryable; error otherwise.
  6. -
-

To ensure that InfluxDB Cloud handles writes in the order you request them, -wait for a success response (HTTP 2xx status code) before you send the next request.

- - -
query Parameters
bucket
required
string

A database name or ID. -InfluxDB writes all points in the batch to the specified database.

-
org
required
string

Ignored. An organization name or ID.

-

InfluxDB ignores this parameter; authorizes the request using the specified database token -and writes data to the specified cluster database.

-
orgID
string

Ignored. An organization ID.

-

InfluxDB ignores this parameter; authorizes the request using the specified database token -and writes data to the specified cluster database.

-
precision
string (WritePrecision)
Enum: "ms" "s" "us" "ns"

The precision for unix timestamps in the line protocol batch.

-
header Parameters
Accept
string
Default: application/json
Value: "application/json"

The content type that the client can understand. -Writes only return a response body if they fail--for example, -due to a formatting problem or quota limit.

-
    -
  • Returns only application/json for format and limit errors.
  • -
  • Returns only text/html for some quota limit errors.
  • -
- - -
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

The compression applied to the line protocol in the request payload. -To send a gzip payload, pass Content-Encoding: gzip header.

-
Content-Length
integer

The size of the entity-body, in bytes, sent to InfluxDB. -If the length is greater than the max body configuration option, -the server responds with status code 413.

-
Content-Type
string
Default: text/plain; charset=utf-8
Enum: "text/plain" "text/plain; charset=utf-8"

The format of the data in the request body. -To send a line protocol payload, pass Content-Type: text/plain; charset=utf-8.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

In the request body, provide data in line protocol format.

-

To send compressed data, do the following:

-
    -
  1. Use gzip to compress the line protocol data.
  2. -
  3. In your request, send the compressed data and the -Content-Encoding: gzip header.
  4. -
- - -
string <byte>

Responses

Request samples

Content type
text/plain
airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
-airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
-

Response samples

Content type
application/json
{
  • "code": "invalid",
  • "message": "failed to parse line protocol: error writing line 2: Unable to insert iox::column_type::field::integer type into column temp with type iox::column_type::field::string"
}

Write data using the InfluxDB v1 HTTP API

Writes data to a database.

-

Use this InfluxDB v1-compatible endpoint to send data in line protocol format to InfluxDB using v1 API parameters and authorization.

-

InfluxDB does the following when you send a write request:

-
    -
  1. Validates the request
  2. -
  3. If successful, attempts to ingest the data; error otherwise.
  4. -
  5. If successful, responds with success (HTTP 204 status code), acknowledging that the data is written and queryable; error otherwise.
  6. -
-

To ensure that InfluxDB handles writes in the order you request them, -wait for a success response (HTTP 2xx status code) before you send the next request.

- - -
query Parameters
db
required
string

database to write to. If none exists, InfluxDB creates a database with a default 3-day retention policy.

-
p
string

The InfluxDB 1.x password to authenticate the request.

-
precision
string

Write precision.

-
rp
string

Retention policy name.

-
u
string

The InfluxDB 1.x username to authenticate the request.

-
header Parameters
Content-Encoding
string
Default: identity
Enum: "gzip" "identity"

When present, its value indicates to the database that compression is applied to the line protocol body.

-
Zap-Trace-Span
string
Example: baggage,[object Object],span_id,1,trace_id,1

OpenTracing span context

-
Request Body schema: text/plain

Line protocol body

-
string

Responses

Response samples

Content type
application/json
Example
{
  • "code": "invalid",
  • "line": 2,
  • "message": "no data written, errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)"
}
- - - - - diff --git a/content/influxdb3/core/.vale.ini b/content/influxdb3/core/.vale.ini new file mode 100644 index 000000000..86731aebf --- /dev/null +++ b/content/influxdb3/core/.vale.ini @@ -0,0 +1,22 @@ +# Custom Vale configuration for InfluxDB 3.x Core documentation. +# Custom styles are defined in .ci/vale/styles/InfluxDB3-Core: +# // SOURCE .ci/vale/styles/InfluxDB3-Core/Branding.yml +# // SOURCE .ci/vale/styles/InfluxDB3-Core/v3Schema.yml + +StylesPath = "../../../.ci/vale/styles" + +Vocab = InfluxDataDocs + +MinAlertLevel = warning + +Packages = Google, write-good, Hugo + +[*.md] +BasedOnStyles = Vale, InfluxDataDocs, InfluxDB3-Core, Google, write-good + +Google.Acronyms = NO +Google.DateFormat = NO +Google.Ellipses = NO +Google.Headings = NO +Google.WordList = NO +Vale.Spelling = NO \ No newline at end of file diff --git a/content/influxdb3/core/install.md b/content/influxdb3/core/install.md index 128a55c9f..449568eb4 100644 --- a/content/influxdb3/core/install.md +++ b/content/influxdb3/core/install.md @@ -42,7 +42,7 @@ Use the InfluxDB 3 quick install script to install {{< product-name >}} on 1. Use the following command to download and install the appropriate {{< product-name >}} package on your local machine: - + ```bash curl -O https://www.influxdata.com/d/install_influxdb3.sh \ && sh install_influxdb3.sh @@ -72,6 +72,7 @@ source ~/.bashrc ``` {{% /code-tab-content %}} {{% code-tab-content %}} + ```bash source ~/.zshrc ``` @@ -134,6 +135,9 @@ Use the `influxdb3-core` Docker image to deploy {{< product-name >}} in a Docker container. The image is available for x86_64 (AMD64) and ARM64 architectures. +### Use Docker CLI + + ```bash docker pull quay.io/influxdb/influxdb3-core:latest ``` @@ -159,4 +163,47 @@ quay.io/influxdb/influxdb3-core:latest > The {{% product-name %}} Docker image exposes port `8181`, the `influxdb3` server default for HTTP connections. > To map the exposed port to a different port when running a container, see the Docker guide for [Publishing and exposing ports](https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/). +### Use Docker Compose + +1. Open `compose.yaml` for editing and add a `services` entry for {{% product-name %}}--for example: + + ```yaml + # compose.yaml + services + influxdb3-core: + container_name: influxdb3-core + image: quay.io/influxdb/influxdb3-{{% product-key %}}:latest + ports: + - 9999:9999 + command: + - serve + - --node-id=node0 + - --log-filter=debug + - --object-store=file + - --data-dir=/var/lib/influxdb3 + ``` + +2. Use the Docker Compose CLI to start the server. + + Optional: to make sure you have the latest version of the image before you + start the server, run `docker compose pull`. + + + ```bash + docker compose pull && docker compose run influxdb3-core + ``` + +> [!Note] +> #### Stopping an InfluxDB 3 container +> +> To stop a running InfluxDB 3 container, find and terminate the process--for example: +> +> +> ```bash +> ps -ef | grep influxdb3 +> kill -9 +> ``` +> +> Currently, a bug prevents using `Ctrl-c` in the terminal to stop an InfluxDB 3 container. + {{< page-nav next="/influxdb3/core/get-started/" nextText="Get started with InfluxDB 3 Core" >}} diff --git a/content/influxdb3/core/query-data/_index.md b/content/influxdb3/core/query-data/_index.md index 6dc888338..c428e4a56 100644 --- a/content/influxdb3/core/query-data/_index.md +++ b/content/influxdb3/core/query-data/_index.md @@ -1,7 +1,7 @@ --- title: Query data in {{< product-name >}} description: > - Learn to query data stored in InfluxDB using SQL and InfluxQL. + Learn to query data in {{% product-name %}} using SQL and InfluxQL. menu: influxdb3_core: name: Query data diff --git a/content/influxdb3/core/query-data/execute-queries/_index.md b/content/influxdb3/core/query-data/execute-queries/_index.md index cfd303dab..8abbf9af1 100644 --- a/content/influxdb3/core/query-data/execute-queries/_index.md +++ b/content/influxdb3/core/query-data/execute-queries/_index.md @@ -1,7 +1,7 @@ --- title: Execute queries description: > - Use tools and libraries to query data stored in {{< product-name >}}. + Use tools and libraries to query data from {{< product-name >}}. weight: 101 menu: influxdb3_core: diff --git a/content/influxdb3/core/query-data/influxql/_index.md b/content/influxdb3/core/query-data/influxql/_index.md index 110f0365d..0f955958e 100644 --- a/content/influxdb3/core/query-data/influxql/_index.md +++ b/content/influxdb3/core/query-data/influxql/_index.md @@ -1,7 +1,7 @@ --- title: Query data with InfluxQL description: > - Learn to use InfluxQL to query data stored in {{< product-name >}}. + Learn to use InfluxQL to query data in {{< product-name >}}. menu: influxdb3_core: name: Query with InfluxQL diff --git a/content/influxdb3/core/query-data/sql/_index.md b/content/influxdb3/core/query-data/sql/_index.md index bb77b902f..ea82c237f 100644 --- a/content/influxdb3/core/query-data/sql/_index.md +++ b/content/influxdb3/core/query-data/sql/_index.md @@ -2,7 +2,7 @@ title: Query data with SQL seotitle: Query data with SQL description: > - Learn to query data stored in {{< product-name >}} using SQL. + Learn to query data in {{< product-name >}} using SQL. menu: influxdb3_core: name: Query with SQL diff --git a/content/influxdb3/core/reference/api/_index.md b/content/influxdb3/core/reference/api/_index.md new file mode 100644 index 000000000..6a2200b1e --- /dev/null +++ b/content/influxdb3/core/reference/api/_index.md @@ -0,0 +1,20 @@ +--- +title: InfluxDB HTTP API +description: > + The InfluxDB HTTP API for {{% product-name %}} provides a programmatic interface + for interactions with InfluxDB, + including writing, querying, and processing data, and managing an InfluxDB 3 + instance. +menu: + influxdb3_core: + parent: Reference + name: InfluxDB HTTP API +weight: 104 +influxdb3/core/tags: [api] +source: /shared/influxdb3-api-reference/_index.md +--- + + To get started quickly, download and run the install script--for example, using [curl](https://curl.se/download.html): + + ```bash curl -O https://www.influxdata.com/d/install_influxdb3.sh \ && sh install_influxdb3.sh @@ -106,6 +108,8 @@ is available for x86_64 (AMD64) and ARM64 architectures. Pull the image: + + ```bash docker pull quay.io/influxdb/influxdb3-core:latest ``` @@ -126,6 +130,8 @@ influxdb3 --version If your system doesn't locate `influxdb3`, then `source` the configuration file (for example, .bashrc, .zshrc) for your shell--for example: + + ```zsh source ~/.zshrc ``` @@ -145,13 +151,13 @@ and provide the following: The following examples show how to start InfluxDB 3 with different object store configurations: ```bash -# MEMORY +# Memory object store # Stores data in RAM; doesn't persist data influxdb3 serve --node-id=local01 --object-store=memory ``` ```bash -# FILESYSTEM +# Filesystem object store # Provide the filesystem directory influxdb3 serve \ --node-id=local01 \ @@ -169,10 +175,12 @@ To run the [Docker image](/influxdb3/core/install/#docker-image) and persist dat > The {{% product-name %}} Docker image exposes port `8181`, the `influxdb3` server default for HTTP connections. > To map the exposed port to a different port when running a container, see the Docker guide for [Publishing and exposing ports](https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/). + ```bash -# FILESYSTEM USING DOCKER +# Filesystem object store with Docker # Create a mount # Provide the mount path + docker run -it \ -v /path/on/host:/path/in/container \ quay.io/influxdb/influxdb3-core:latest serve \ @@ -182,15 +190,29 @@ docker run -it \ ``` ```bash -# S3 (defaults to us-east-1 for region) +# S3 object store (default is the us-east-1 region) # Specify the Object store type and associated options -influxdb3 serve --node-id=local01 --object-store=s3 --bucket=[BUCKET] --aws-access-key=[AWS ACCESS KEY] --aws-secret-access-key=[AWS SECRET ACCESS KEY] + +```bash +influxdb3 serve \ + --node-id=local01 \ + --object-store=s3 \ + --bucket=BUCKET \ + --aws-access-key=AWS_ACCESS_KEY \ + --aws-secret-access-key=AWS_SECRET_ACCESS_KEY ``` ```bash -# Minio/Open Source Object Store (Uses the AWS S3 API, with additional parameters) -# Specify the Object store type and associated options -influxdb3 serve --node-id=local01 --object-store=s3 --bucket=[BUCKET] --aws-access-key=[AWS ACCESS KEY] --aws-secret-access-key=[AWS SECRET ACCESS KEY] --aws-endpoint=[ENDPOINT] --aws-allow-http +# Minio or other open source object store +# (using the AWS S3 API with additional parameters) +# Specify the object store type and associated options + +```bash +influxdb3 serve --node-id=local01 --object-store=s3 --bucket=BUCKET \ + --aws-access-key=AWS_ACCESS_KEY \ + --aws-secret-access-key=AWS_SECRET_ACCESS_KEY \ + --aws-endpoint=ENDPOINT \ + --aws-allow-http ``` _For more information about server options, run `influxdb3 serve --help`._ @@ -202,15 +224,17 @@ _For more information about server options, run `influxdb3 serve --help`._ > Use the `docker kill` command to stop the container: > > 1. Enter the following command to find the container ID: +> > ```bash > docker ps -a > ``` > 2. Enter the command to stop the container: +> > ```bash > docker kill > ``` -### Data Model +### Data model The database server contains logical databases, which have tables, which have columns. Compared to previous versions of InfluxDB you can think of a database as a `bucket` in v2 or as a `db/retention_policy` in v1. A `table` is equivalent to a `measurement`, which has columns that can be of type `tag` (a string dictionary), `int64`, `float64`, `uint64`, `bool`, or `string` and finally every table has a `time` column that is a nanosecond precision timestamp. @@ -219,7 +243,7 @@ This is the sort order used for all Parquet files that get created. When you cre Tags should hold unique identifying information like `sensor_id`, or `building_id` or `trace_id`. All other data should be kept in fields. You will be able to add fast last N value and distinct value lookups later for any column, whether it is a field or a tag. -### Write Data +### Write data InfluxDB is a schema-on-write database. You can start writing data and InfluxDB creates the logical database, tables, and their schemas on the fly. After a schema is created, InfluxDB validates future write requests against it before accepting the data. @@ -227,23 +251,43 @@ Subsequent requests can add new fields on-the-fly, but can't add new tags. {{% product-name %}} is optimized for recent data, but accepts writes from any time period. It persists that data in Parquet files for access by third-party systems for longer term historical analysis and queries. If you require longer historical queries with a compactor that optimizes data organization, consider using [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/). +The database provides three write API endpoints that respond to HTTP `POST` requests: -The database has three write API endpoints that respond to HTTP `POST` requests: +#### /api/v3/write_lp endpoint -* `/write?db=mydb&precision=ns` -* `/api/v2/write?bucket=mydb&precision=ns` -* `/api/v3/write_lp?db=mydb&precision=nanosecond&accept_partial=true` +{{% product-name %}} adds the `/api/v3/write_lp` endpoint. -{{% product-name %}} provides the `/write` and `/api/v2/write` endpoints for backward compatibility with clients that can write data to previous versions of InfluxDB. -However, these APIs differ from the APIs in the previous versions in the following ways: +{{}} + +This endpoint accepts the same line protocol syntax as previous versions, +and supports the `?accept_partial=` parameter, which +lets you accept or reject partial writes (default is `true`). + +#### /api/v2/write InfluxDB v2 compatibility endpoint + +Provides backwards compatibility with clients that can write data to InfluxDB OSS v2.x and Cloud 2 (TSM). +{{}} + +#### /write InfluxDB v1 compatibility endpoint + +Provides backwards compatibility for clients that can write data to InfluxDB v1.x +{{}} + +Keep in mind that these compatibility APIs differ from the v1 and v2 APIs in previous versions in the following ways: - Tags in a table (measurement) are _immutable_ - A tag and a field can't have the same name within a table. -{{% product-name %}} adds the `/api/v3/write_lp` endpoint, which accepts the same line protocol syntax as previous versions, and supports an `?accept_partial=` parameter, which -lets you accept or reject partial writes (default is `true`). +#### Write line protocol -The following code block is an example of [line protocol](/influxdb3/core/reference/syntax/line-protocol/), which shows the table name followed by tags, which are an ordered, comma-separated list of key/value pairs where the values are strings, followed by a comma-separated list of key/value pairs that are the fields, and ending with an optional timestamp. The timestamp by default is a nanosecond epoch, but you can specify a different precision through the `precision` query parameter. +The following code block is an example of time series data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) syntax: + +- `cpu`: the table name. +- `host`, `region`, `applications`: the tags. A tag set is an ordered, comma-separated list of key/value pairs where the values are strings. +- `val`, `usage_percent`, `status`: the fields. A field set is a comma-separated list of key/value pairs. +- timestamp: If you don't specify a timestamp, InfluxData uses the time when data is written. + The default precision is a nanosecond epoch. + To specify a different precision, pass the `precision` query parameter. ``` cpu,host=Alpha,region=us-west,application=webserver val=1i,usage_percent=20.5,status="OK" @@ -254,16 +298,20 @@ cpu,host=Bravo,region=us-central,application=database val=5i,usage_percent=80.5, cpu,host=Alpha,region=us-west,application=webserver val=6i,usage_percent=25.3,status="Warn" ``` +##### Example: write data using the influxdb3 CLI + If you save the preceding line protocol to a file (for example, `server_data`), then you can use the `influxdb3` CLI to write the data--for example: ```bash influxdb3 write --database=mydb --file=server_data ``` +##### Example: write data using the /api/v3 HTTP API + The following examples show how to write data using `curl` and the `/api/3/write_lp` HTTP endpoint. To show the difference between accepting and rejecting partial writes, line `2` in the example contains a `string` value for a `float` field (`temp=hi`). -##### Partial write of line protocol occurred +###### Partial write of line protocol occurred With `accept_partial=true`: @@ -289,7 +337,7 @@ With `accept_partial=true`: Line `1` is written and queryable. The response is an HTTP error (`400`) status, and the response body contains the error message `partial write of line protocol occurred` with details about the problem line. -##### Parsing failed for write_lp endpoint +###### Parsing failed for write_lp endpoint With `accept_partial=false`: @@ -320,7 +368,7 @@ The response is the following: InfluxDB rejects all points in the batch. The response is an HTTP error (`400`) status, and the response body contains `parsing failed for write_lp endpoint` and details about the problem line. -##### Data durability +#### Data durability When you write data to InfluxDB, InfluxDB ingests the data and writes it to WAL files, created once per second, and to an in-memory queryable buffer. Later, InfluxDB snapshots the WAL and persists the data into object storage as Parquet files. @@ -329,10 +377,38 @@ For more information, see [diskless architecture](#diskless-architecture). > [!Note] > ##### Write requests return after WAL flush > -> Because InfluxDB sends a write response after the WAL file has been flushed to the configured object store (default is every second), individual write requests might not complete quickly, but you can make many concurrent requests to achieve higher total throughput. -> Future enhancements will include an API parameter that lets requests return without waiting for the WAL flush. +> By default, InfluxDB acknowledges writes after flushing the WAL file to the Object store (occurring every second). For high throughput, you can send multiple concurrent write requests. +> +> To reduce the latency of writes, use the [`no_sync` write option](#no-sync-write-option), which acknowledges writes _before_ WAL persistence completes. -#### Create a database or table +##### No sync write option + +The `no_sync` write option reduces latency by acknowledging write requests before WAL persistence completes. When set to `true`, InfluxDB validates the data, writes the data to the WAL, and then immediately confirms the write, without waiting for persistence to the Object store. + +Using `no_sync=true` is best when prioritizing high-throughput writes over absolute durability. + +- Default behavior (`no_sync=false`): Waits for data to be written to the Object store before acknowledging the write. Reduces the risk of data loss, but increases the latency of the response. +- With `no_sync=true`: Reduces write latency, but increases the risk of data loss in case of a crash before WAL persistence. + +###### Immediate write using the HTTP API + +The `no_sync` parameter controls when writes are acknowledged--for example: + + +```sh +curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \ + --data-raw "home,room=Sunroom temp=96" +``` + +###### Immediate write using the influxdb3 CLI + +The `no_sync` CLI option controls when writes are acknowledged--for example: + +```sh +influxdb3 write --bucket=mydb --org=my_org --token=my-token --no-sync +``` + +### Create a database or table To create a database without writing data, use the `create` subcommand--for example: @@ -346,7 +422,7 @@ To learn more about a subcommand, use the `-h, --help` flag: influxdb3 create -h ``` -### Query the database +### Query a database InfluxDB 3 now supports native SQL for querying, in addition to InfluxQL, an SQL-like language customized for time series queries. diff --git a/cypress/e2e/content/api-reference.cy.js b/cypress/e2e/content/api-reference.cy.js new file mode 100644 index 000000000..ceeaffeff --- /dev/null +++ b/cypress/e2e/content/api-reference.cy.js @@ -0,0 +1,111 @@ +/// +const fakeGoogleTagManager = { + trackingOptIn: () => {}, + trackingOptOut: () => {} +} + +describe('API reference content', () => { + const subjects = [ + '/influxdb/cloud/api/', + '/influxdb/cloud/api/v1/', + '/influxdb/cloud/api/v1-compatibility/', + '/influxdb/cloud/api/v2/', + + '/influxdb/v2/api/', + '/influxdb/v2/api/v1/', + '/influxdb/v2/api/v1-compatibility/', + '/influxdb/v2/api/v2/', + + '/influxdb3/cloud-dedicated/api/', + '/influxdb3/cloud-dedicated/api/management/', + '/influxdb3/cloud-dedicated/api/v1/', + '/influxdb3/cloud-dedicated/api/v1-compatibility/', + '/influxdb3/cloud-dedicated/api/v2/', + + '/influxdb3/cloud-serverless/api/', + '/influxdb3/cloud-serverless/api/v1/', + '/influxdb3/cloud-serverless/api/v1-compatibility/', + '/influxdb3/cloud-serverless/api/v2/', + + '/influxdb3/clustered/api/', + // TODO '/influxdb3/clustered/api/management/', + '/influxdb3/clustered/api/v1/', + '/influxdb3/clustered/api/v1-compatibility/', + '/influxdb3/clustered/api/v2/', + + '/influxdb3/core/api/', + '/influxdb3/enterprise/api/', + ]; + + + subjects.forEach((subject) => { + describe(subject, () => { + beforeEach(() => { + // Intercept and modify the page HTML before it loads + cy.intercept('GET', '**', (req) => { + req.continue((res) => { + if (res.headers['content-type']?.includes('text/html')) { + // Modify the Kapa widget script attributes + // Avoid socket errors from fpjs in tests by disabling fingerprinting + res.body = res.body.replace( + /data-user-analytics-fingerprint-enabled="true"/, + 'data-user-analytics-fingerprint-enabled="false"' + ); + } + }); + }); + cy.visit(subject); + + + window.fcdsc = fakeGoogleTagManager; + cy.stub(window.fcdsc, 'trackingOptIn').as('trackingOptIn'); + cy.stub(window.fcdsc, 'trackingOptOut').as('trackingOptOut'); + }); + it(`has API info`, function () { + cy.get('script[data-user-analytics-fingerprint-enabled=false]').should('have.length', 1); + cy.get('h1').first().should('have.length', 1); + cy.get('[data-role$=description]').should('have.length', 1); + }); + it('links back to the version home page', function () { + cy.get('a.back').contains('Docs') + .should('have.length', 1) + .click(); + // Path should be the first two segments and trailing slash in $subject + cy.location('pathname') + .should('eq', subject.replace(/^(\/[^/]+\/[^/]+\/).*/, '$1')); + cy.get('h1').should('have.length', 1); + }); + it('contains valid internal links', function () { + // The following conditional test isn't the cypress way, but the doc might not have internal links. + cy.get('body').then(($body) => { + if ($body.find('p a[href^="/"]').length === 0) { + cy.log('No internal links found'); + return; + } + cy.get('p a[href^="/"]').as('internal-links'); + cy.get('@internal-links').each(($a) => { + cy.log(`** Testing link ${$a.attr('href')} **`); + // cy.request doesn't show in your browser's Developer Tools + // because the request comes from Node, not from the browser. + cy.request($a.attr('href')).its('status').should('eq', 200); + }); + + }); + }); + it('contains valid external links', function () { + // The following conditional test isn't the cypress way, but the doc might not have external links. + cy.get('body').then(($body) => { + if ($body.find('p a[href^="http"]').length === 0) { + cy.log('No external links found'); + return; + } + cy.get('p a[href^="http"]').as('external-links'); + cy.get('@external-links').each(($a) => { + cy.log(`** Testing link ${$a.attr('href')} **`); + cy.request($a.attr('href')).its('status').should('eq', 200); + }); + }); + }); + }); + }); +}); diff --git a/cypress/e2e/article-links.cy.js b/cypress/e2e/content/article-links.cy.js similarity index 100% rename from cypress/e2e/article-links.cy.js rename to cypress/e2e/content/article-links.cy.js diff --git a/cypress/e2e/index.cy.js b/cypress/e2e/content/index.cy.js similarity index 100% rename from cypress/e2e/index.cy.js rename to cypress/e2e/content/index.cy.js diff --git a/package.json b/package.json index a4f3f8da0..d129c869d 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,8 @@ "jquery": "^3.7.1", "js-cookie": "^3.0.5", "js-yaml": "^4.1.0", + "lefthook": "^1.10.10", + "markdown-link": "^0.1.1", "mermaid": "^11.4.1", "vanillajs-datepicker": "^1.3.4" }, @@ -35,6 +37,7 @@ "e2e:o": "npx cypress open", "e2e:o:links": "export cypress_test_subjects=\"http://localhost:1313/influxdb3/core/,http://localhost:1313/influxdb3/enterprise/\"; npx cypress open cypress/e2e/article-links.cy.js", "e2e:links": "export cypress_test_subjects=\"http://localhost:1313/influxdb3/core/,http://localhost:1313/influxdb3/enterprise/\"; npx cypress run --spec cypress/e2e/article-links.cy.js", + "e2e:api-docs": "export cypress_test_subjects=\"http://localhost:1313/influxdb3/core/api/,http://localhost:1313/influxdb3/enterprise/api/,http://localhost:1313/influxdb3/cloud-dedicated/api/,http://localhost:1313/influxdb3/cloud-dedicated/api/v1/,http://localhost:1313/influxdb/cloud-dedicated/api/v1/,http://localhost:1313/influxdb/cloud-dedicated/api/management/,http://localhost:1313/influxdb3/cloud-dedicated/api/management/\"; npx cypress run --spec cypress/e2e/article-links.cy.js", "lint": "LEFTHOOK_EXCLUDE=test lefthook run pre-commit && lefthook run pre-push", "pre-commit": "lefthook run pre-commit", "test-content": "docker compose --profile test up" diff --git a/test/scripts/prepare-content.sh b/test/scripts/prepare-content.sh index ae2ead0d8..d58eecc70 100644 --- a/test/scripts/prepare-content.sh +++ b/test/scripts/prepare-content.sh @@ -98,6 +98,8 @@ function substitute_placeholders { s|NUMBER_OF_DAYS|365|g; s|@path/to/line-protocol.txt|data/home-sensor-data.lp|g; s|/path/to/custom/assets-dir|/app/custom-assets|g; + s|/path/to/TEMPLATE_FILE.yml|/root/influxdb-templates/TEMPLATE_FILE.yml|g; + s|/path/to/TEMPLATE_FILE.json|/root/influxdb-templates/TEMPLATE_FILE.json|g; ' $file # v2-specific replacements. diff --git a/test/scripts/run-tests.sh b/test/scripts/run-tests.sh index 7f0588f98..92cef6f49 100644 --- a/test/scripts/run-tests.sh +++ b/test/scripts/run-tests.sh @@ -51,6 +51,7 @@ setup if [[ $runner == "pytest" ]]; then pytest \ + -ra \ -s \ --codeblocks \ --suppress-no-test-exit-code \ diff --git a/yarn.lock b/yarn.lock index ce858e842..c3961da34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,18 +2,18 @@ # yarn lockfile v1 -"@antfu/install-pkg@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-1.0.0.tgz#2912a150fc8b35ec912f583f90074ee98f64d66a" - integrity sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw== +"@antfu/install-pkg@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz#d1d7f3be96ecdb41581629cafe8626d1748c0cf1" + integrity sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw== dependencies: - package-manager-detector "^0.2.8" - tinyexec "^0.3.2" + package-manager-detector "^0.2.0" + tinyexec "^0.3.0" -"@antfu/utils@^8.1.0": - version "8.1.1" - resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-8.1.1.tgz#95b1947d292a9a2efffba2081796dcaa05ecedfb" - integrity sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ== +"@antfu/utils@^0.7.10": + version "0.7.10" + resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.10.tgz#ae829f170158e297a9b6a28f161a8e487d00814d" + integrity sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww== "@babel/code-frame@^7.0.0": version "7.26.2" @@ -217,18 +217,18 @@ integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== "@iconify/utils@^2.1.32": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.3.0.tgz#1bbbf8c477ebe9a7cacaea78b1b7e8937f9cbfba" - integrity sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA== + version "2.2.1" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.2.1.tgz#635b9bd8fd3e5e53742471bc0b5291f1570dda41" + integrity sha512-0/7J7hk4PqXmxo5PDBDxmnecw5PxklZJfNjIVG9FM0mEfVrvfudS22rYWsqVk6gR3UJ/mSYS90X4R3znXnqfNA== dependencies: - "@antfu/install-pkg" "^1.0.0" - "@antfu/utils" "^8.1.0" + "@antfu/install-pkg" "^0.4.1" + "@antfu/utils" "^0.7.10" "@iconify/types" "^2.0.0" debug "^4.4.0" - globals "^15.14.0" + globals "^15.13.0" kolorist "^1.8.0" - local-pkg "^1.0.0" - mlly "^1.7.4" + local-pkg "^0.5.1" + mlly "^1.7.3" "@isaacs/cliui@^8.0.2": version "8.0.2" @@ -2214,7 +2214,7 @@ globals@^14.0.0: resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -globals@^15.14.0: +globals@^15.13.0, globals@^15.14.0: version "15.15.0" resolved "https://registry.yarnpkg.com/globals/-/globals-15.15.0.tgz#7c4761299d41c32b075715a4ce1ede7897ff72a8" integrity sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg== @@ -2233,7 +2233,7 @@ globby@^14.0.0: gopd@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== got@^12.6.0: @@ -2657,6 +2657,72 @@ lazy-ass@^1.6.0: resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" integrity sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw== +lefthook-darwin-arm64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-1.10.10.tgz#48a3eb7935cb171a36a037e61a68c0dc800efc5f" + integrity sha512-hEypKdwWpmNSl4Q8eJxgmlGb2ybJj1+W5/v13Mxc+ApEmjbpNiJzPcdjC9zyaMEpPK4EybiHy8g5ZC0dLOwkpA== + +lefthook-darwin-x64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-darwin-x64/-/lefthook-darwin-x64-1.10.10.tgz#729f5ddd296f876da703496e5071a735e6cf3625" + integrity sha512-9xNbeE78i4Amz+uOheg9dcy7X/6X12h98SUMrYWk7fONvjW/Bp9h6nPGIGxI5krHp9iRB8rhmo33ljVDVtTlyg== + +lefthook-freebsd-arm64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-freebsd-arm64/-/lefthook-freebsd-arm64-1.10.10.tgz#24abbba49d5d6007381883bb122089f4d33f0e48" + integrity sha512-GT9wYxPxkvO1rtIAmctayT9xQIVII5xUIG3Pv6gZo+r6yEyle0EFTLFDbmVje7p7rQNCsvJ8XzCNdnyDrva90g== + +lefthook-freebsd-x64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-freebsd-x64/-/lefthook-freebsd-x64-1.10.10.tgz#e509ab6efe42741a0b8f57e87155f855c701366e" + integrity sha512-2BB/HRhEb9wGpk5K38iNkHtMPnn+TjXDtFG6C/AmUPLXLNhGnNiYp+v2uhUE8quWzxJx7QzfnU7Ga+/gzJcIcw== + +lefthook-linux-arm64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-linux-arm64/-/lefthook-linux-arm64-1.10.10.tgz#1c5c9339f86fa427d311026af92e9f84a89191a1" + integrity sha512-GJ7GALKJ1NcMnNZG9uY+zJR3yS8q7/MgcHFWSJhBl+w4KTiiD/RAdSl5ALwEK2+UX36Eo+7iQA7AXzaRdAii4w== + +lefthook-linux-x64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-linux-x64/-/lefthook-linux-x64-1.10.10.tgz#629f7f91618073ca8d712ff95e4f0e54d839af3c" + integrity sha512-dWUvPM9YTIJ3+X9dB+8iOnzoVHbnNmpscmUqEOKSeizgBrvuuIYKZJGDyjEtw65Qnmn1SJ7ouSaKK93p5c7SkQ== + +lefthook-openbsd-arm64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-openbsd-arm64/-/lefthook-openbsd-arm64-1.10.10.tgz#29859c0357f00ba828f73ada56fe709bd108bb15" + integrity sha512-KnwDyxOvbvGSBTbEF/OxkynZRPLowd3mIXUKHtkg3ABcQ4UREalX+Sh0nWU2dNjQbINx7Eh6B42TxNC7h+qXEg== + +lefthook-openbsd-x64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-openbsd-x64/-/lefthook-openbsd-x64-1.10.10.tgz#2ff9cd0ed72f9d5deabdcc84fba4d8e1b6e14c50" + integrity sha512-49nnG886CI3WkrzVJ71D1M2KWpUYN1BP9LMKNzN11cmZ0j6dUK4hj3nbW+NcrKXxgYzzyLU3FFwrc51OVy2eKA== + +lefthook-windows-arm64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-windows-arm64/-/lefthook-windows-arm64-1.10.10.tgz#6ba521f289909cd1467b4f408f8ef8a1e87d278f" + integrity sha512-9ni0Tsnk+O5oL7EBfKj9C5ZctD1mrTyHCtiu1zQJBbREReJtPjIM9DwWzecfbuVfrIlpbviVQvx5mjZ44bqlWw== + +lefthook-windows-x64@1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook-windows-x64/-/lefthook-windows-x64-1.10.10.tgz#aac9caca3152df8f288713929c2ec31ee0a10b54" + integrity sha512-gkKWYrlay4iecFfY1Ris5VcRYa0BaNJKMk0qE/wZmIpMgu4GvNg+f9BEwTMflkQIanABduT9lrECaL1lX5ClKw== + +lefthook@^1.10.10: + version "1.10.10" + resolved "https://registry.yarnpkg.com/lefthook/-/lefthook-1.10.10.tgz#29d0b221429f55d699785ddeeb6fa3c8f9951e6f" + integrity sha512-YW0fTONgOXsephvXq2gIFbegCW19MHCyKYX7JDWmzVF1ZiVMnDBYUL/SP3i0RtFvlCmqENl4SgKwYYQGUMnvig== + optionalDependencies: + lefthook-darwin-arm64 "1.10.10" + lefthook-darwin-x64 "1.10.10" + lefthook-freebsd-arm64 "1.10.10" + lefthook-freebsd-x64 "1.10.10" + lefthook-linux-arm64 "1.10.10" + lefthook-linux-x64 "1.10.10" + lefthook-openbsd-arm64 "1.10.10" + lefthook-openbsd-x64 "1.10.10" + lefthook-windows-arm64 "1.10.10" + lefthook-windows-x64 "1.10.10" + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -2694,13 +2760,13 @@ listr2@^3.8.3: through "^2.3.8" wrap-ansi "^7.0.0" -local-pkg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-1.0.0.tgz#a8d14dd41e78884f199ecd8b3eedaf0d376e2167" - integrity sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg== +local-pkg@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.1.tgz#69658638d2a95287534d4c2fff757980100dbb6d" + integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== dependencies: mlly "^1.7.3" - pkg-types "^1.3.0" + pkg-types "^1.2.1" locate-path@^6.0.0: version "6.0.0" @@ -2798,6 +2864,11 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +markdown-link@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/markdown-link/-/markdown-link-0.1.1.tgz#32c5c65199a6457316322d1e4229d13407c8c7cf" + integrity sha512-TurLymbyLyo+kAUUAV9ggR9EPcDjP/ctlv9QAFiqUH7c+t6FlsbivPo9OKTU8xdOx9oNd2drW/Fi5RRElQbUqA== + marked@^13.0.2: version "13.0.3" resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.3.tgz#5c5b4a5d0198060c7c9bc6ef9420a7fed30f822d" @@ -3112,7 +3183,7 @@ package-json-from-dist@^1.0.0: resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== -package-manager-detector@^0.2.8: +package-manager-detector@^0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-0.2.9.tgz#20990785afa69d38b4520ccc83b34e9f69cb970f" integrity sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q== @@ -3173,9 +3244,9 @@ path-type@^6.0.0: integrity sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ== pathe@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" - integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== + version "2.0.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.2.tgz#5ed86644376915b3c7ee4d00ac8c348d671da3a5" + integrity sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w== pend@~1.2.0: version "1.2.0" @@ -3219,7 +3290,7 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== -pkg-types@^1.3.0: +pkg-types@^1.2.1, pkg-types@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.3.1.tgz#bd7cc70881192777eef5326c19deb46e890917df" integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== @@ -3382,6 +3453,13 @@ randexp@0.4.6: discontinuous-range "1.0.0" ret "~0.1.10" +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" @@ -3537,7 +3615,7 @@ rxjs@^7.5.1: dependencies: tslib "^2.1.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -3564,11 +3642,23 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" -semver@^7.3.4, semver@^7.5.3: +semver@^7.3.4: version "7.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== +semver@^7.5.3: + version "7.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.0.tgz#9c6fe61d0c6f9fa9e26575162ee5a9180361b09c" + integrity sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ== + +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + setimmediate@~1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -3884,7 +3974,7 @@ through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tinyexec@^0.3.2: +tinyexec@^0.3.0: version "0.3.2" resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2" integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==