fix(api): Update HTTP API landing page in Dedicated
- Adds a custom short title field in OpenAPI info. - Uses the new field for nav menu item names. - Adds identifiers to avoid duplicate name warnings. - Cleans up variation in frontmatter.pull/5432/head
parent
e8e16641e4
commit
3d08263f38
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB Cloud Dedicated Management API
|
title: InfluxDB Cloud Dedicated Management API
|
||||||
|
x-influxdata-short-title: Management API
|
||||||
summary: |
|
summary: |
|
||||||
The Management API for InfluxDB Cloud Dedicated provides a programmatic interface for managing an InfluxDB Cloud Dedicated instance.
|
The Management API for InfluxDB Cloud Dedicated provides a programmatic interface for managing an InfluxDB Cloud Dedicated instance.
|
||||||
description: |
|
description: |
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB v1 HTTP API for InfluxDB Cloud Dedicated
|
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.
|
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Cloud Dedicated database.
|
||||||
description: |
|
description: |
|
||||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB v2 HTTP API for InfluxDB Cloud Dedicated
|
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.
|
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: |
|
description: |
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB v1 HTTP API for InfluxDB Cloud Serverless
|
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.
|
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Cloud Serverless bucket.
|
||||||
description: |
|
description: |
|
||||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB Cloud Serverless API Service
|
title: InfluxDB Cloud Serverless API Service
|
||||||
|
x-influxdata-short-title: v2 API
|
||||||
summary: |
|
summary: |
|
||||||
The InfluxDB v2 HTTP API for InfluxDB Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB Cloud Serverless bucket.
|
The InfluxDB v2 HTTP API for InfluxDB Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB Cloud Serverless bucket.
|
||||||
description: |
|
description: |
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB v1 HTTP API for InfluxDB Cloud
|
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.
|
summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB Cloud using InfluxDB v1-compatible endpoints.
|
||||||
description: |
|
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.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB Cloud API Service
|
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.
|
summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2.
|
||||||
description: |
|
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.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB v1 HTTP API for InfluxDB Clustered
|
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.
|
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Clustered database.
|
||||||
description: |
|
description: |
|
||||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB Clustered API Service
|
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.
|
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: |
|
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.
|
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.
|
||||||
|
|
|
@ -47,13 +47,11 @@ function generateHtml {
|
||||||
menu="influxdb_$(echo $product | sed 's/\./_/g;s/-/_/g;')"
|
menu="influxdb_$(echo $product | sed 's/\./_/g;s/-/_/g;')"
|
||||||
# Extract the API name--for example, "management" from "management@v2".
|
# Extract the API name--for example, "management" from "management@v2".
|
||||||
apiName=$(echo $api | sed 's/@.*//g;')
|
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".
|
# Extract the API version--for example, "v0" from "management@v0".
|
||||||
version=$(echo $api | sed 's/.*@//g;')
|
version=$(echo $api | sed 's/.*@//g;')
|
||||||
# Use the title and summary defined in the product API's info.yml file.
|
# Use the title and summary defined in the product API's info.yml file.
|
||||||
title=$(yq '.title' $product/$apiName/content/info.yml)
|
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)
|
description=$(yq '.summary' $product/$apiName/content/info.yml)
|
||||||
# Define the file name for the Redoc HTML output.
|
# Define the file name for the Redoc HTML output.
|
||||||
specbundle=redoc-static_index.html
|
specbundle=redoc-static_index.html
|
||||||
|
@ -80,16 +78,19 @@ function generateHtml {
|
||||||
--templateOptions.product="$product" \
|
--templateOptions.product="$product" \
|
||||||
--templateOptions.productName="$productName"
|
--templateOptions.productName="$productName"
|
||||||
|
|
||||||
if [[ $version == "v1" ]]; then
|
if [[ $apiName == "v1-compatibility" ]]; then
|
||||||
frontmatter="---
|
frontmatter="---
|
||||||
title: $title
|
title: $title
|
||||||
description: $description
|
description: $description
|
||||||
layout: api
|
layout: api
|
||||||
menu:
|
menu:
|
||||||
$menu:
|
$menu:
|
||||||
parent: $version compatibility
|
parent: InfluxDB HTTP API
|
||||||
name: View $version compatibility API
|
name: $menuTitle
|
||||||
|
identifier: api-reference-$apiName
|
||||||
weight: 304
|
weight: 304
|
||||||
|
aliases:
|
||||||
|
- /influxdb/$product/api/v1/
|
||||||
---
|
---
|
||||||
"
|
"
|
||||||
elif [[ $version == "0" ]]; then
|
elif [[ $version == "0" ]]; then
|
||||||
|
@ -102,7 +103,8 @@ weight: 102
|
||||||
menu:
|
menu:
|
||||||
$menu:
|
$menu:
|
||||||
parent: InfluxDB HTTP API
|
parent: InfluxDB HTTP API
|
||||||
name: Management API
|
name: $menuTitle
|
||||||
|
identifier: api-reference-$apiName
|
||||||
---
|
---
|
||||||
"
|
"
|
||||||
elif [[ $isDefault == true ]]; then
|
elif [[ $isDefault == true ]]; then
|
||||||
|
@ -113,7 +115,8 @@ layout: api
|
||||||
menu:
|
menu:
|
||||||
$menu:
|
$menu:
|
||||||
parent: InfluxDB HTTP API
|
parent: InfluxDB HTTP API
|
||||||
name: $apiTitle API
|
name: $menuTitle
|
||||||
|
identifier: api-reference-$apiName
|
||||||
weight: 102
|
weight: 102
|
||||||
aliases:
|
aliases:
|
||||||
- /influxdb/$product/api/
|
- /influxdb/$product/api/
|
||||||
|
@ -127,7 +130,8 @@ layout: api
|
||||||
menu:
|
menu:
|
||||||
$menu:
|
$menu:
|
||||||
parent: InfluxDB HTTP API
|
parent: InfluxDB HTTP API
|
||||||
name: $apiTitle API
|
name: $menuTitle
|
||||||
|
identifier: api-reference-$apiName
|
||||||
weight: 102
|
weight: 102
|
||||||
---
|
---
|
||||||
"
|
"
|
||||||
|
@ -156,6 +160,8 @@ weight: 102
|
||||||
fi
|
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 {
|
function build {
|
||||||
# Get the list of products from directory names
|
# Get the list of products from directory names
|
||||||
products="$(ls -d -- */ | grep -v 'node_modules' | grep -v 'openapi')"
|
products="$(ls -d -- */ | grep -v 'node_modules' | grep -v 'openapi')"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
title: InfluxDB OSS API Service
|
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.
|
summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance.
|
||||||
description: |
|
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.
|
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.
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
title: InfluxDB v1 HTTP API for InfluxDB v2 OSS
|
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.
|
summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB v2 using InfluxDB v1-compatible endpoints.
|
||||||
description: |
|
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
|
This documentation is generated from the
|
||||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||||
|
|
Loading…
Reference in New Issue