docs-v2/data/article_data/influxdb/cloud-dedicated/articles.json

186 lines
23 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

{
"articles": [
{
"path": "api/authentication",
"fields": {
"name": "Authentication",
"describes": [],
"title": "Authentication",
"description": "With InfluxDB 3 Cloud Dedicated, the InfluxDB Management API endpoints require the following credentials:\n\n- `ACCOUNT_ID`: The ID of the [account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to. To view account ID and cluster ID, [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).\n- `CLUSTER_ID`: The ID of the [cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage. To view account ID and cluster ID, [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).\n- `Authorization MANAGEMENT_TOKEN`: the `Authorization` HTTP header with a [management token](/influxdb3/cloud-dedicated/admin/tokens/management/).\n\n See how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/).\n\n 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.\n <!-- ReDoc-Inject: <security-definitions> -->\n",
"tag": "Authentication",
"isConceptual": true,
"menuGroup": "Concepts",
"operations": [],
"tagDescription": "With InfluxDB 3 Cloud Dedicated, the InfluxDB Management API endpoints require the following credentials:\n\n- `ACCOUNT_ID`: The ID of the [account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to. To view account ID and cluster ID, [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).\n- `CLUSTER_ID`: The ID of the [cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage. To view account ID and cluster ID, [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json).\n- `Authorization MANAGEMENT_TOKEN`: the `Authorization` HTTP header with a [management token](/influxdb3/cloud-dedicated/admin/tokens/management/).\n\n See how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/).\n\n 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.\n <!-- ReDoc-Inject: <security-definitions> -->\n",
"showSecuritySchemes": true,
"source": "static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-authentication.yaml",
"staticFilePath": "/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-authentication.yaml"
}
},
{
"path": "api/database-tokens",
"fields": {
"name": "Database tokens",
"describes": [
"/accounts/{accountId}/clusters/{clusterId}/tokens",
"/accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}"
],
"title": "Database tokens",
"description": "Manage database read/write tokens for a cluster",
"tag": "Database tokens",
"isConceptual": false,
"menuGroup": "Other",
"operations": [
{
"operationId": "GetDatabaseTokens",
"method": "GET",
"path": "/accounts/{accountId}/clusters/{clusterId}/tokens",
"summary": "Get all database tokens for a cluster",
"tags": [
"Database tokens"
]
},
{
"operationId": "CreateDatabaseToken",
"method": "POST",
"path": "/accounts/{accountId}/clusters/{clusterId}/tokens",
"summary": "Create a database token",
"tags": [
"Database tokens"
]
},
{
"operationId": "GetDatabaseToken",
"method": "GET",
"path": "/accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}",
"summary": "Get a database token",
"tags": [
"Database tokens"
]
},
{
"operationId": "UpdateDatabaseToken",
"method": "PATCH",
"path": "/accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}",
"summary": "Update a database token",
"tags": [
"Database tokens"
]
},
{
"operationId": "DeleteDatabaseToken",
"method": "DELETE",
"path": "/accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}",
"summary": "Delete a database token",
"tags": [
"Database tokens"
]
}
],
"tagDescription": "Manage database read/write tokens for a cluster",
"source": "static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-database-tokens.yaml",
"staticFilePath": "/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-database-tokens.yaml"
}
},
{
"path": "api/databases",
"fields": {
"name": "Databases",
"describes": [
"/accounts/{accountId}/clusters/{clusterId}/databases",
"/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}"
],
"title": "Databases",
"description": "Manage databases for a cluster",
"tag": "Databases",
"isConceptual": false,
"menuGroup": "Other",
"operations": [
{
"operationId": "GetClusterDatabases",
"method": "GET",
"path": "/accounts/{accountId}/clusters/{clusterId}/databases",
"summary": "Get all databases for a cluster",
"tags": [
"Databases"
]
},
{
"operationId": "CreateClusterDatabase",
"method": "POST",
"path": "/accounts/{accountId}/clusters/{clusterId}/databases",
"summary": "Create a database",
"tags": [
"Databases"
]
},
{
"operationId": "UpdateClusterDatabase",
"method": "PATCH",
"path": "/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}",
"summary": "Update a database",
"tags": [
"Databases"
]
},
{
"operationId": "DeleteClusterDatabase",
"method": "DELETE",
"path": "/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}",
"summary": "Delete a database",
"tags": [
"Databases"
]
}
],
"tagDescription": "Manage databases for a cluster",
"source": "static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-databases.yaml",
"staticFilePath": "/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-databases.yaml"
}
},
{
"path": "api/quickstart",
"fields": {
"name": "Quickstart",
"describes": [],
"title": "Quickstart",
"description": "The following example script shows how to use `curl` to make database and token management requests:\n\n```shell\n #!/bin/bash\n\n # Usage:\n # Note the leading space in the command below to keep secrets out of the shell history\n #\n # ```\n # MANAGEMENT_TOKEN=<MANAGEMENT_TOKEN> ACCOUNT_ID=<ACCOUNT_ID> CLUSTER_ID=<CLUSTER_ID> ./scripts/test_http_api_v0_endpoints.sh\n # ```\n\n # Env var validation\n if [ -z \"${MANAGEMENT_TOKEN}\" ]; then\n echo \"\n [Error]: ❌\n \\$MANAGEMENT_TOKEN env var is required.\n \"\n exit 1\n fi\n\n if [ -z \"${ACCOUNT_ID}\" ]; then\n echo \"\n [Error]: ❌\n \\$ACCOUNT_ID env var is required.\n \"\n exit 1\n fi\n\n if [ -z \"${CLUSTER_ID}\" ]; then\n echo \"\n [Error]: ❌\n \\$CLUSTER_ID env var is required.\n \"\n exit 1\n fi\n\nHOST=\"https://console.influxdata.com\"\n\n # Database request functions\n list_databases () {\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases\" \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n create_database () {\n local databaseName=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases\" \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"name\": \"'$databaseName'\",\n \"maxTables\": 75,\n \"maxColumnsPerTable\": 90,\n \"retentionPeriod\": 600000000000,\n \"partitionTemplate\": [\n {\n \"type\": \"tag\",\n \"value\": \"abc\"\n },\n {\n \"type\": \"bucket\",\n \"value\": {\n \"tagName\": \"def\",\n \"numberOfBuckets\": 5\n }\n }\n ]\n }' \\\n )\n echo \"$response\"\n }\n\n update_database () {\n local databaseName=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases/$databaseName\" \\\n --request PATCH \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"maxTables\": 150,\n \"maxColumnsPerTable\": 180,\n \"retentionPeriod\": 1200000000000\n }' \\\n )\n echo \"$response\"\n }\n\n delete_database () {\n local databaseName=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases/$databaseName\" \\\n --request DELETE \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n # Token request functions\n list_tokens () {\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens\" \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n create_token () {\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens\" \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"description\": \"my test token\",\n \"permissions\": [\n {\n \"action\": \"write\",\n \"resource\": \"database_one\"\n },\n {\n \"action\": \"read\",\n \"resource\": \"database_two\"\n }\n ]\n }' \\\n )\n echo \"$response\"\n }\n\n get_token () {\n local token_id=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId\" \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n update_token () {\n local token_id=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId\" \\\n --request PATCH \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"description\": \"my updated test token\",\n \"permissions\": [\n {\n \"action\": \"database_one\",\n \"resource\": \"read\"\n }\n ]\n }' \\\n )\n echo \"$response\"\n }\n\n delete_token () {\n local token_id=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId\" \\\n --request DELETE \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n\n # Test database endpoints\n databaseName=\"test_database_$RANDOM\"\n\n printf \"\\n🏗 Creating database... 🏗️\\n\\n\"\n response=\"$(create_database $databaseName)\"\n echo $response | jq\n printf \"\\n🏗 Creating database successful 🏗️\\n\\n\"\n\n printf \"\\n⬆ Updating database... ⬆️\\n\\n\"\n response=\"$(update_database $databaseName)\"\n echo $response | jq\n printf \"\\n⬆ Updating database successful ⬆️\\n\\n\"\n\n printf \"\\n⬇ Listing databases... ⬇️\\n\\n\"\n response=\"$(list_databases)\"\n echo $response | jq\n printf \"\\n⬇ Listing databases successful ⬇️\\n\\n\"\n\n printf \"\\n🗑 Deleting database... 🗑️\\n\\n\"\n response=\"$(delete_database $databaseName)\"\n echo $response | jq\n printf \"\\n🗑 Deleting database successful 🗑️\\n\\n\"\n\n\n # Test token endpoints\n printf \"\\n🏗 Creating token... 🏗️\\n\\n\"\n response=\"$(create_token)\"\n echo $response | jq\n tokenId=$(echo $response | jq '.id')\n printf \"\\n🏗 Creating token successful 🏗️\\n\\n\"\n\n printf \"\\n⬇ Getting token... ⬇️\\n\\n\"\n response=\"$(get_token $tokenId)\"\n echo $response | jq\n printf \"\\n⬇ Getting token successful ⬇️\\n\\n\"\n\n printf \"\\n⬆ Updating token... ⬆️\\n\\n\"\n response=\"$(update_token $tokenId)\"\n echo $response | jq\n printf \"\\n⬆ Updating token successful ⬆️\\n\\n\"\n\n printf \"\\n📋 Listing tokens... 📋\\n\\n\"\n response=\"$(list_tokens)\"\n echo $response | jq\n printf \"\\n📋 Listing tokens successful 📋\\n\\n\"\n\n printf \"\\n🗑 Deleting token... 🗑️\\n\\n\"\n response=\"$(delete_token $tokenId)\"\n echo $response | jq\n printf \"\\n🗑 Deleting token successful 🗑️\\n\\n\"\n ```\n",
"tag": "Quickstart",
"isConceptual": true,
"menuGroup": "Other",
"operations": [],
"tagDescription": "The following example script shows how to use `curl` to make database and token management requests:\n\n```shell\n #!/bin/bash\n\n # Usage:\n # Note the leading space in the command below to keep secrets out of the shell history\n #\n # ```\n # MANAGEMENT_TOKEN=<MANAGEMENT_TOKEN> ACCOUNT_ID=<ACCOUNT_ID> CLUSTER_ID=<CLUSTER_ID> ./scripts/test_http_api_v0_endpoints.sh\n # ```\n\n # Env var validation\n if [ -z \"${MANAGEMENT_TOKEN}\" ]; then\n echo \"\n [Error]: ❌\n \\$MANAGEMENT_TOKEN env var is required.\n \"\n exit 1\n fi\n\n if [ -z \"${ACCOUNT_ID}\" ]; then\n echo \"\n [Error]: ❌\n \\$ACCOUNT_ID env var is required.\n \"\n exit 1\n fi\n\n if [ -z \"${CLUSTER_ID}\" ]; then\n echo \"\n [Error]: ❌\n \\$CLUSTER_ID env var is required.\n \"\n exit 1\n fi\n\nHOST=\"https://console.influxdata.com\"\n\n # Database request functions\n list_databases () {\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases\" \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n create_database () {\n local databaseName=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases\" \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"name\": \"'$databaseName'\",\n \"maxTables\": 75,\n \"maxColumnsPerTable\": 90,\n \"retentionPeriod\": 600000000000,\n \"partitionTemplate\": [\n {\n \"type\": \"tag\",\n \"value\": \"abc\"\n },\n {\n \"type\": \"bucket\",\n \"value\": {\n \"tagName\": \"def\",\n \"numberOfBuckets\": 5\n }\n }\n ]\n }' \\\n )\n echo \"$response\"\n }\n\n update_database () {\n local databaseName=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases/$databaseName\" \\\n --request PATCH \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"maxTables\": 150,\n \"maxColumnsPerTable\": 180,\n \"retentionPeriod\": 1200000000000\n }' \\\n )\n echo \"$response\"\n }\n\n delete_database () {\n local databaseName=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/databases/$databaseName\" \\\n --request DELETE \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n # Token request functions\n list_tokens () {\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens\" \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n create_token () {\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens\" \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"description\": \"my test token\",\n \"permissions\": [\n {\n \"action\": \"write\",\n \"resource\": \"database_one\"\n },\n {\n \"action\": \"read\",\n \"resource\": \"database_two\"\n }\n ]\n }' \\\n )\n echo \"$response\"\n }\n\n get_token () {\n local token_id=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId\" \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n update_token () {\n local token_id=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId\" \\\n --request PATCH \\\n --header \"Accept: application/json\" \\\n --header 'Content-Type: application/json' \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n --data '{\n \"description\": \"my updated test token\",\n \"permissions\": [\n {\n \"action\": \"database_one\",\n \"resource\": \"read\"\n }\n ]\n }' \\\n )\n echo \"$response\"\n }\n\n delete_token () {\n local token_id=$1\n local response=$( \\\n curl \\\n --location \"$HOST/api/v0/accounts/$ACCOUNT_ID/clusters/$CLUSTER_ID/tokens/$tokenId\" \\\n --request DELETE \\\n --header \"Accept: application/json\" \\\n --header \"Authorization: Bearer $MANAGEMENT_TOKEN\" \\\n )\n echo \"$response\"\n }\n\n\n # Test database endpoints\n databaseName=\"test_database_$RANDOM\"\n\n printf \"\\n🏗 Creating database... 🏗️\\n\\n\"\n response=\"$(create_database $databaseName)\"\n echo $response | jq\n printf \"\\n🏗 Creating database successful 🏗️\\n\\n\"\n\n printf \"\\n⬆ Updating database... ⬆️\\n\\n\"\n response=\"$(update_database $databaseName)\"\n echo $response | jq\n printf \"\\n⬆ Updating database successful ⬆️\\n\\n\"\n\n printf \"\\n⬇ Listing databases... ⬇️\\n\\n\"\n response=\"$(list_databases)\"\n echo $response | jq\n printf \"\\n⬇ Listing databases successful ⬇️\\n\\n\"\n\n printf \"\\n🗑 Deleting database... 🗑️\\n\\n\"\n response=\"$(delete_database $databaseName)\"\n echo $response | jq\n printf \"\\n🗑 Deleting database successful 🗑️\\n\\n\"\n\n\n # Test token endpoints\n printf \"\\n🏗 Creating token... 🏗️\\n\\n\"\n response=\"$(create_token)\"\n echo $response | jq\n tokenId=$(echo $response | jq '.id')\n printf \"\\n🏗 Creating token successful 🏗️\\n\\n\"\n\n printf \"\\n⬇ Getting token... ⬇️\\n\\n\"\n response=\"$(get_token $tokenId)\"\n echo $response | jq\n printf \"\\n⬇ Getting token successful ⬇️\\n\\n\"\n\n printf \"\\n⬆ Updating token... ⬆️\\n\\n\"\n response=\"$(update_token $tokenId)\"\n echo $response | jq\n printf \"\\n⬆ Updating token successful ⬆️\\n\\n\"\n\n printf \"\\n📋 Listing tokens... 📋\\n\\n\"\n response=\"$(list_tokens)\"\n echo $response | jq\n printf \"\\n📋 Listing tokens successful 📋\\n\\n\"\n\n printf \"\\n🗑 Deleting token... 🗑️\\n\\n\"\n response=\"$(delete_token $tokenId)\"\n echo $response | jq\n printf \"\\n🗑 Deleting token successful 🗑️\\n\\n\"\n ```\n",
"source": "static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-quickstart.yaml",
"staticFilePath": "/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-quickstart.yaml"
}
},
{
"path": "api/tables",
"fields": {
"name": "Tables",
"describes": [
"/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables"
],
"title": "Tables",
"description": "Manage tables in a database",
"tag": "Tables",
"isConceptual": false,
"menuGroup": "Other",
"operations": [
{
"operationId": "CreateClusterDatabaseTable",
"method": "POST",
"path": "/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables",
"summary": "Create a database table",
"tags": [
"Tables"
]
}
],
"tagDescription": "Manage tables in a database",
"source": "static/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-tables.yaml",
"staticFilePath": "/openapi/influxdb-cloud-dedicated/tags/tags/influxdb-cloud-dedicated-tables.yaml"
}
}
]
}