Skip to content

Commit e4bed73

Browse files
committed
feat(clustered): add missing Management API reference (unlike Cloud Dedicated) (Closes #5838)
- Retrieve Graphite API spec for Clustered - Remove ACCOUNT_ID and CLUSTER_ID references and requirements not used for Clustered
1 parent 49355ac commit e4bed73

File tree

8 files changed

+1787
-7
lines changed

8 files changed

+1787
-7
lines changed

api-docs/getswagger.sh

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function showHelp {
6262
subcommand=$1
6363

6464
case "$subcommand" in
65-
cloud-dedicated-v2|cloud-dedicated-management|cloud-serverless-v2|clustered-v2|cloud-v2|v2|v1-compat|core-v3|enterprise-v3|all)
65+
cloud-dedicated-v2|cloud-dedicated-management|cloud-serverless-v2|clustered-management|clustered-v2|cloud-v2|v2|v1-compat|core-v3|enterprise-v3|all)
6666
product=$1
6767
shift
6868

@@ -187,6 +187,22 @@ function updateCloudServerlessV2 {
187187
postProcess $outFile 'influxdb3/cloud-serverless/.config.yml' v2@2
188188
}
189189

190+
function updateClusteredManagement {
191+
outFile="influxdb3/clustered/management/openapi.yml"
192+
if [[ -z "$baseUrl" ]];
193+
then
194+
echo "Using existing $outFile"
195+
else
196+
# Clone influxdata/granite and fetch the latest openapi.yaml file.
197+
echo "Fetching the latest openapi.yaml file from influxdata/granite"
198+
tmp_dir=$(mktemp -d)
199+
git clone --depth 1 --branch main https://github.com/influxdata/granite.git "$tmp_dir"
200+
cp "$tmp_dir/openapi.yaml" "$outFile"
201+
rm -rf "$tmp_dir"
202+
fi
203+
postProcess $outFile 'influxdb3/clustered/.config.yml' management@0
204+
}
205+
190206
function updateClusteredV2 {
191207
outFile="influxdb3/clustered/v2/ref.yml"
192208
if [[ -z "$baseUrl" ]];
@@ -278,6 +294,9 @@ then
278294
elif [ "$product" = "cloud-serverless-v2" ];
279295
then
280296
updateCloudServerlessV2
297+
elif [ "$product" = "clustered-management" ];
298+
then
299+
updateClusteredManagement
281300
elif [ "$product" = "clustered-v2" ];
282301
then
283302
updateClusteredV2
@@ -305,6 +324,6 @@ then
305324
updateOSSV2
306325
updateV1Compat
307326
else
308-
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."
327+
echo "Provide a product argument: cloud-v2, cloud-serverless-v2, cloud-dedicated-v2, cloud-dedicated-management, clustered-management, clustered-v2, core-v3, enterprise-v3, v2, v1-compat, or all."
309328
showHelp
310329
fi
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- name: Using the Management API
22
tags:
33
- Authentication
4-
- Examples
4+
- Quickstart
55
- name: All endpoints
66
tags: []

api-docs/influxdb3/cloud-dedicated/management/openapi.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ tags:
4444
description: Manage database read/write tokens for a cluster
4545
- name: Databases
4646
description: Manage databases for a cluster
47-
- name: Example
47+
- name: Quickstart
4848
x-traitTag: true
4949
description: |
5050
The following example script shows how to use `curl` to make database and token management requests:
@@ -609,7 +609,7 @@ paths:
609609
maxTables: 300
610610
maxColumnsPerTable: 150
611611
retentionPeriod: 600000000000
612-
maxTablsOnly:
612+
maxTablesOnly:
613613
summary: Update Max Tables Only
614614
value:
615615
maxTables: 300
@@ -660,7 +660,7 @@ paths:
660660
maxTables: 300
661661
maxColumnsPerTable: 150
662662
retentionPeriod: 600000000000
663-
maxTablsOnly:
663+
maxTablesOnly:
664664
summary: Update Max Tables Only
665665
value:
666666
accountId: 11111111-1111-4111-8111-111111111111
@@ -1974,7 +1974,7 @@ x-tagGroups:
19741974
- name: Using the Management API
19751975
tags:
19761976
- Authentication
1977-
- Examples
1977+
- Quickstart
19781978
- name: All endpoints
19791979
tags:
19801980
- Database tokens

api-docs/influxdb3/clustered/.config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ extends:
66
x-influxdata-product-name: InfluxDB 3 Clustered
77

88
apis:
9+
management@0:
10+
root: management/openapi.yml
911
v2@2:
1012
root: v2/ref.yml
1113
x-influxdata-docs-aliases:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
title: InfluxDB 3 Clustered Management API
2+
x-influxdata-short-title: Management API
3+
description: |
4+
The Management API for InfluxDB 3 Clustered provides a programmatic interface for managing an InfluxDB 3 cluster.
5+
The Management API lets you integrate functions such as creating and managing databases, permissions, and tokens into your workflow or application.
6+
7+
This documentation is generated from the
8+
InfluxDB 3 Management API OpenAPI specification.
9+
license:
10+
name: MIT
11+
url: 'https://opensource.org/licenses/MIT'
12+
contact:
13+
name: InfluxData
14+
url: https://www.influxdata.com
15+
email: support@influxdata.com
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- url: 'https://{baseurl}/api/v0'
2+
description: InfluxDB 3 Clustered Management API URL
3+
variables:
4+
baseurl:
5+
enum:
6+
- 'console.influxdata.com'
7+
default: 'console.influxdata.com'
8+
description: InfluxDB 3 Clustered Console URL
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: Using the Management API
2+
tags:
3+
- Authentication
4+
- Quickstart
5+
- name: All endpoints
6+
tags: []

0 commit comments

Comments
 (0)