diff --git a/api-docs/cloud-dedicated/management/content/info.yml b/api-docs/cloud-dedicated/management/content/info.yml index 070217abb..814a15f69 100644 --- a/api-docs/cloud-dedicated/management/content/info.yml +++ b/api-docs/cloud-dedicated/management/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB Cloud Dedicated Management API +x-influxdata-short-title: Management API summary: | The Management API for InfluxDB Cloud Dedicated provides a programmatic interface for managing an InfluxDB Cloud Dedicated instance. description: | diff --git a/api-docs/cloud-dedicated/v1-compatibility/content/info.yml b/api-docs/cloud-dedicated/v1-compatibility/content/info.yml index 19a7f036d..caa9d1643 100644 --- a/api-docs/cloud-dedicated/v1-compatibility/content/info.yml +++ b/api-docs/cloud-dedicated/v1-compatibility/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB v1 HTTP API for InfluxDB 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 v3 Cloud Dedicated database. description: | The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. diff --git a/api-docs/cloud-dedicated/v2/content/info.yml b/api-docs/cloud-dedicated/v2/content/info.yml index a1778e664..3b927a971 100644 --- a/api-docs/cloud-dedicated/v2/content/info.yml +++ b/api-docs/cloud-dedicated/v2/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB v2 HTTP API for InfluxDB Cloud Dedicated +x-influxdata-short-title: v2 API summary: The InfluxDB v2 HTTP API for InfluxDB Cloud Dedicated provides a v2-compatible programmatic interface for writing data stored in an InfluxDB Cloud Dedicated database. description: | diff --git a/api-docs/cloud-serverless/v1-compatibility/content/info.yml b/api-docs/cloud-serverless/v1-compatibility/content/info.yml index 9e0faafbc..1307b7422 100644 --- a/api-docs/cloud-serverless/v1-compatibility/content/info.yml +++ b/api-docs/cloud-serverless/v1-compatibility/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB v1 HTTP API for InfluxDB 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 v3 Cloud Serverless bucket. description: | The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. diff --git a/api-docs/cloud-serverless/v2/content/info.yml b/api-docs/cloud-serverless/v2/content/info.yml index 293543ebf..5aab1cdbb 100644 --- a/api-docs/cloud-serverless/v2/content/info.yml +++ b/api-docs/cloud-serverless/v2/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB Cloud Serverless API Service +x-influxdata-short-title: v2 API summary: | The InfluxDB v2 HTTP API for InfluxDB Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB Cloud Serverless bucket. description: | diff --git a/api-docs/cloud/v1-compatibility/content/info.yml b/api-docs/cloud/v1-compatibility/content/info.yml index a74f1ce5f..07ae7e9e7 100644 --- a/api-docs/cloud/v1-compatibility/content/info.yml +++ b/api-docs/cloud/v1-compatibility/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB v1 HTTP API for InfluxDB Cloud +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. 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. diff --git a/api-docs/cloud/v2/content/info.yml b/api-docs/cloud/v2/content/info.yml index 1e7aa0467..0504afa39 100644 --- a/api-docs/cloud/v2/content/info.yml +++ b/api-docs/cloud/v2/content/info.yml @@ -1,4 +1,5 @@ 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. 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. diff --git a/api-docs/clustered/v1-compatibility/content/info.yml b/api-docs/clustered/v1-compatibility/content/info.yml index 97fcb5fb7..7fbb572ef 100644 --- a/api-docs/clustered/v1-compatibility/content/info.yml +++ b/api-docs/clustered/v1-compatibility/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB v1 HTTP API for InfluxDB 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 v3 Clustered database. description: | The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. diff --git a/api-docs/clustered/v2/content/info.yml b/api-docs/clustered/v2/content/info.yml index 3fc47d703..f1f4be6d3 100644 --- a/api-docs/clustered/v2/content/info.yml +++ b/api-docs/clustered/v2/content/info.yml @@ -1,4 +1,5 @@ title: InfluxDB Clustered API Service +x-influxdata-short-title: v2 API summary: The InfluxDB v2 HTTP API for InfluxDB Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB Clustered 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 v3 instance. diff --git a/api-docs/generate-api-docs.sh b/api-docs/generate-api-docs.sh index 6b3fc41a8..22d87c1e8 100755 --- a/api-docs/generate-api-docs.sh +++ b/api-docs/generate-api-docs.sh @@ -47,13 +47,11 @@ function generateHtml { menu="influxdb_$(echo $product | sed 's/\./_/g;s/-/_/g;')" # Extract the API name--for example, "management" from "management@v2". apiName=$(echo $api | sed 's/@.*//g;') - # Convert it to title case--for example, "Management". - apiTitle=$(echo $apiName \ - | awk '{print toupper(substr($1,1,1)) tolower(substr($1,2))}') # Extract the API version--for example, "v0" from "management@v0". version=$(echo $api | sed 's/.*@//g;') # Use the title and summary defined in the product API's info.yml file. title=$(yq '.title' $product/$apiName/content/info.yml) + menuTitle=$(yq '.x-influxdata-short-title' $product/$apiName/content/info.yml) description=$(yq '.summary' $product/$apiName/content/info.yml) # Define the file name for the Redoc HTML output. specbundle=redoc-static_index.html @@ -80,16 +78,19 @@ function generateHtml { --templateOptions.product="$product" \ --templateOptions.productName="$productName" - if [[ $version == "v1" ]]; then + if [[ $apiName == "v1-compatibility" ]]; then frontmatter="--- title: $title description: $description layout: api menu: $menu: - parent: $version compatibility - name: View $version compatibility API + parent: InfluxDB HTTP API + name: $menuTitle + identifier: api-reference-$apiName weight: 304 +aliases: + - /influxdb/$product/api/v1/ --- " elif [[ $version == "0" ]]; then @@ -102,7 +103,8 @@ weight: 102 menu: $menu: parent: InfluxDB HTTP API - name: Management API + name: $menuTitle + identifier: api-reference-$apiName --- " elif [[ $isDefault == true ]]; then @@ -113,7 +115,8 @@ layout: api menu: $menu: parent: InfluxDB HTTP API - name: $apiTitle API + name: $menuTitle + identifier: api-reference-$apiName weight: 102 aliases: - /influxdb/$product/api/ @@ -127,7 +130,8 @@ layout: api menu: $menu: parent: InfluxDB HTTP API - name: $apiTitle API + name: $menuTitle + identifier: api-reference-$apiName weight: 102 --- " @@ -156,6 +160,8 @@ weight: 102 fi } +# Use a combination of directory names and configuration files to build the API documentation. +# Each directory represents a product, and each product directory contains a configuration file that defines APIs and their spec file locations. function build { # Get the list of products from directory names products="$(ls -d -- */ | grep -v 'node_modules' | grep -v 'openapi')" diff --git a/api-docs/v2/content/info.yml b/api-docs/v2/content/info.yml index f381806c2..4a75f7efa 100644 --- a/api-docs/v2/content/info.yml +++ b/api-docs/v2/content/info.yml @@ -1,4 +1,5 @@ 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. diff --git a/api-docs/v2/v1-compatibility/content/info.yml b/api-docs/v2/v1-compatibility/content/info.yml index 17ab99443..f897815d3 100644 --- a/api-docs/v2/v1-compatibility/content/info.yml +++ b/api-docs/v2/v1-compatibility/content/info.yml @@ -1,7 +1,8 @@ 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 InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. + 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).