Skip to content

Remove API reference and link to swagger #3571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 0 additions & 192 deletions clickhouseapi.js

This file was deleted.

33 changes: 24 additions & 9 deletions docs/cloud/manage/api/api-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,41 @@ description: 'Learn about ClickHouse Cloud API'

## Overview {#overview}

The ClickHouse Cloud API is a REST API designed for developers to easily manage organizations and services on ClickHouse Cloud. Using our Cloud API, you can create and manage services, provision API keys, add or remove members in your organization, and more.
The ClickHouse Cloud API is a REST API designed for developers to easily manage
organizations and services on ClickHouse Cloud. Using our Cloud API, you can
create and manage services, provision API keys, add or remove members in your
organization, and more.

[Learn how to create your first API key and start using the ClickHouse Cloud API.](/cloud/manage/openapi.md)

## Swagger (OpenAPI) Endpoint and UI {#swagger-openapi-endpoint-and-ui}

The ClickHouse Cloud API is built on the open-source [OpenAPI specification](https://www.openapis.org/)
to allow for predictable client-side consumption. If you need to programmatically
consume the ClickHouse Cloud API docs, we offer a JSON-based Swagger endpoint
via https://api.clickhouse.cloud/v1. You can also find the API docs via
the [Swagger UI](https://clickhouse.com/docs/cloud/manage/api/swagger).

## Rate Limits {#rate-limits}

Developers are limited to 100 API keys per organization. Each API key has a limit of 10 requests over a 10-second window. If you'd like to increase the number of API keys or requests per 10-second window for your organization, please contact [email protected]
Developers are limited to 100 API keys per organization. Each API key has a
limit of 10 requests over a 10-second window. If you'd like to increase the
number of API keys or requests per 10-second window for your organization,
please contact [email protected]

## Terraform Provider {#terraform-provider}

The official ClickHouse Terraform Provider lets you use [Infrastructure as Code](https://www.redhat.com/en/topics/automation/what-is-infrastructure-as-code-iac) to create predictable, version-controlled configurations to make deployments much less error-prone.
The official ClickHouse Terraform Provider lets you use [Infrastructure as Code](https://www.redhat.com/en/topics/automation/what-is-infrastructure-as-code-iac)
to create predictable, version-controlled configurations to make deployments much
less error-prone.

You can view the Terraform provider docs in the [Terraform registry](https://registry.terraform.io/providers/ClickHouse/clickhouse/latest/docs).

If you'd like to contribute to the ClickHouse Terraform Provider, you can view the source [in the GitHub repo](https://github.com/ClickHouse/terraform-provider-clickhouse).

## Swagger (OpenAPI) Endpoint and UI {#swagger-openapi-endpoint-and-ui}

The ClickHouse Cloud API is built on the open-source [OpenAPI specification](https://www.openapis.org/) to allow for predictable client-side consumption. If you need to programmatically consume the ClickHouse Cloud API docs, we offer a JSON-based Swagger endpoint via https://api.clickhouse.cloud/v1. Our API Reference docs are automatically generated from that same endpoint. If you prefer to consume the API docs via the Swagger UI, please click [here](https://clickhouse.com/docs/cloud/manage/api/swagger).
If you'd like to contribute to the ClickHouse Terraform Provider, you can view
the source [in the GitHub repo](https://github.com/ClickHouse/terraform-provider-clickhouse).

## Support {#support}

We recommend visiting [our Slack channel](https://clickhouse.com/slack) first to get quick support. If you'd like additional help or more info about our API and its capabilities, please contact ClickHouse Support at https://console.clickhouse.cloud/support
We recommend visiting [our Slack channel](https://clickhouse.com/slack) first to get quick support. If
you'd like additional help or more info about our API and its capabilities,
please contact ClickHouse Support at https://console.clickhouse.cloud/support
14 changes: 0 additions & 14 deletions docs/cloud/manage/api/api-reference-index.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/cloud/manage/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description: 'Landing page for the Cloud API section'

This section contains reference documentation for Cloud API and contains the following pages:

| Page | Description |
|---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| [Overview](/cloud/manage/api/api-overview)| Provides an overview of rate limits, Terraform Provider, Swagger (OpenAPI) Endpoint and UI and available support. |
| [Managing API Keys](/cloud/manage/openapi) | Learn more about Cloud's API utilizing OpenAPI that allows you to programmatically manage your account and aspects of your services. |
| [API Reference](/cloud/manage/api) | API reference documentation. |
| Page | Description |
|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| [Overview](/cloud/manage/api/api-overview) | Provides an overview of rate limits, Terraform Provider, Swagger (OpenAPI) Endpoint and UI and available support. |
| [Managing API Keys](/cloud/manage/openapi) | Learn more about Cloud's API utilizing OpenAPI that allows you to programmatically manage your account and aspects of your services. |
| [API Reference](https://clickhouse.com/docs/cloud/manage/api/swagger) | OpenAPI (swagger) reference page. |
3 changes: 2 additions & 1 deletion docs/cloud/manage/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ Deleting an API key is a permanent action. Any services using the key will immed

## Endpoints {#endpoints}

The [endpoint docs are here](/cloud/manage/api/invitations-api-reference.md). Use your API Key and API Secret with the base URL `https://api.clickhouse.cloud/v1`.
Refer details on endpoints, refer to the [API reference](https://clickhouse.com/docs/cloud/manage/api/swagger).
Use your API Key and API Secret with the base URL `https://api.clickhouse.cloud/v1`.
7 changes: 6 additions & 1 deletion docs/cloud/manage/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ Use automatic idling only if your use case can handle a delay before responding

## Handling bursty workloads {#handling-bursty-workloads}
If you have an upcoming expected spike in your workload, you can use the
[ClickHouse Cloud API](/cloud/manage/api/services-api-reference.md) to preemptively scale up your service to handle the spike and scale it down once the demand subsides. To understand the current CPU cores and memory in use for each of your replicas, you can run the query below:
[ClickHouse Cloud API](/cloud/manage/api/api-overview) to
preemptively scale up your service to handle the spike and scale it down once
the demand subsides.

To understand the current CPU cores and memory in use for
each of your replicas, you can run the query below:

```sql
SELECT *
Expand Down
3 changes: 2 additions & 1 deletion docs/cloud/security/audit-logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ The different types of events captured for the organization are grouped in 3 cat

## API for audit events {#api-for-audit-events}

Users can use the ClickHouse Cloud API `activity` endpoint to obtain an export of audit events. Further details can be found [here](/cloud/manage/api/organizations-api-reference#list-of-organization-activities).
Users can use the ClickHouse Cloud API `activity` endpoint to obtain an export
of audit events. Further details can be found in the [API reference](https://clickhouse.com/docs/cloud/manage/api/swagger).
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
"autogen_needed_files": "src/Core/FormatFactorySettings.h src/Core/Settings.cpp CHANGELOG.md docs/en/operations/server-configuration-parameters/_server_settings_outside_source.md"
},
"scripts": {
"build": "yarn copy-clickhouse-repo-docs && yarn run-markdown-linter && yarn generate-changelog && yarn autogenerate-settings && yarn autogenerate-table-of-contents && yarn build-api-doc && yarn build-swagger && yarn build-docs",
"build": "yarn copy-clickhouse-repo-docs && yarn run-markdown-linter && yarn generate-changelog && yarn autogenerate-settings && yarn autogenerate-table-of-contents && yarn build-swagger && yarn build-docs",
"clear": "docusaurus clear && bash ./placeholderReset.sh",
"deploy": "docusaurus deploy",
"docusaurus": "docusaurus",
"copy-clickhouse-repo-docs": "bash scripts/copy-clickhouse-repo-docs.sh",
"serve": "docusaurus serve",
"build-api-doc": "node clickhouseapi.js",
"build-swagger": "npx @redocly/cli build-docs https://api.clickhouse.cloud/v1 --output build/cloud/manage/api/swagger.html",
"build-swagger": "yarn redocly build-docs https://api.clickhouse.cloud/v1 --output build/cloud/manage/api/swagger.html",
"prep-from-local": "bash ./scripts/copy-clickhouse-repo-docs.sh -l $1",
"autogenerate-settings": "bash ./scripts/settings/autogenerate-settings.sh",
"autogenerate-table-of-contents": "bash ./scripts/autogenerate-table-of-contents.sh",
Expand All @@ -38,6 +37,7 @@
"@docusaurus/theme-search-algolia": "^3.7.0",
"@mdx-js/react": "^3.1.0",
"@radix-ui/react-navigation-menu": "^1.2.5",
"@redocly/cli": "^1.34.0",
"axios": "^1.8.2",
"clsx": "^2.1.0",
"docusaurus-plugin-sass": "^0.2.6",
Expand Down
1 change: 0 additions & 1 deletion scripts/autogenerate-table-of-contents.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ python3 scripts/table-of-contents-generator/toc_gen.py --single-toc --dir="docs/
python3 scripts/table-of-contents-generator/toc_gen.py --single-toc --dir="docs/chdb/guides" --md="docs/chdb/guides/index.md" --ignore images
python3 scripts/table-of-contents-generator/toc_gen.py --single-toc --dir="docs/cloud/manage/jan2025_faq" --md="docs/cloud/manage/jan2025_faq/index.md" --ignore images
python3 scripts/table-of-contents-generator/toc_gen.py --single-toc --dir="docs/cloud/changelogs" --md="docs/cloud/reference/release-notes-index.md"
python3 scripts/table-of-contents-generator/toc_gen.py --single-toc --dir="docs/cloud/manage/api" --md="docs/cloud/manage/api/api-reference-index.md"
python3 scripts/table-of-contents-generator/toc_gen.py --single-toc --dir="docs/development" --md="docs/development/index.md" --ignore images
deactivate
rm -r venv
13 changes: 3 additions & 10 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ const sidebars = {
"cloud/manage/jan2025_faq/billing",
"cloud/manage/jan2025_faq/scaling",
"cloud/manage/jan2025_faq/backup",

],
}
],
Expand All @@ -315,16 +314,10 @@ const sidebars = {
"cloud/manage/api/api-overview",
"cloud/manage/openapi",
{
type: "category",
type: 'link',
label: "API Reference",
link: { type: "doc", id: "cloud/manage/api/api-reference-index" },
items: [
{
type: "autogenerated",
dirName: "cloud/manage/api"
}
],
},
href: "https://clickhouse.com/docs/cloud/manage/api/swagger",
}
],
},
{
Expand Down
Loading