You need to enable JavaScript to run this app.
ByteHouse Cloud Data Warehouse Version

ByteHouse Cloud Data Warehouse Version

Copy page
Download PDF
API reference
Invocation method
Copy page
Download PDF
Invocation method

ByteHouse OpenAPI uses Bearer Token authorization. The user needs to create and use an API Key as the secret in the ByteHouse Console.

Obtain the OpenAPI address

In the ByteHouse Cloud Data Warehouse Console Tenant management > Connection information > Connection tools page, you can obtain ByteHouse's OpenAPI connection address. You may select a private or public connection address as needed.
Image

Obtain API Key

In the ByteHouse Cloud Data Warehouse Console Tenant management > Connection information > API Key page, click the New button under the API Key module to create an API Key.
Image

warning

  • After the API Key is created, it cannot be viewed again. It is recommended to download the secret and save it locally.
  • A maximum of 2 API Keys can be created.
  • The secret needs to be refreshed within 90 days to ensure security.

:::

Obtain API interfaces

Please refer to the API List to obtain the corresponding interfaces.

warning

Due to interface optimization, when using the Queries-V2 interface, you need to add port number "8123" in the URL.
Image

:::

Usage examples

The specific API invocation path and method can be found in the interface documentation for each module. Examples are as follows:

| | | \

Use Queries-V2 interfaceUse Queries-V1 interface
\
```Shell\
curl --request POST \\
--url https://{OPENAPI_HOST}:8123/v2/sql/sync \\
--header 'accept: application/json' \\
--header 'authorization: Bearer ${API_KEY}' \\
--header 'content-type: application/json' \\
--data '\
{\
"mode": "ansi_sql",\
"query": "select 1"\
}\
'\
```\
\
```Shell\
curl --request POST \\
--url https://{OPENAPI_HOST}/v1/sql/sync \\
--header 'accept: application/json' \\
--header 'authorization: Bearer ${API_KEY}' \\
--header 'content-type: application/json' \\
--data '\
{\
"mode": "ansi_sql",\
"query": "select 1"\
}\
'\
```\
\
  • POST: Indicates the request method for ByteHouse OpenAPI.
  • URL: Specifies the address for accessing OpenAPI, which contains region and other parameters. If you use the Queries-V2 interface, the URL must include port number 8123.
  • HTTPS: Specifies the communication protocol for the request.
Last updated: 2026.03.31 16:19:34