Query API endpoints

Create a Query API endpoint

Creates a Query API endpoint.

post/v1/organizations/{organizationId}/services/{serviceId}/query-api-endpoints

Request

  • Base URL: https://api.clickhouse.cloud
  • URL: https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/query-api-endpoints
  • Auth: HTTP basic

Path parameters

organizationIdstring uuid required

ID of the requested organization.

serviceIdstring uuid required

ID of the requested service.

Request body

namestring required

Name of the Query API endpoint.

sqlstring required

SQL executed by the endpoint.

databasestring required

Database used by the Query API endpoint.

parametersobject

Default query parameters.

apiKeyIdsstring[] required

API key IDs allowed to call the endpoint.

rolesstring[] required

Database roles used by the endpoint.

allowedOriginsstring[]

Origins allowed by the endpoint CORS policy.

Response

The Query API endpoint was created.

statusinteger required

HTTP status code.

requestIdstring uuid required

Unique id assigned to every request. UUIDv4

Example response

{
  "status": 201,
  "result": {
    "url": "https://queries.clickhouse.cloud/run/00000000-0000-0000-0000-000000000000"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.