Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

Update a Query API endpoint

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

Disclaimer: This beta endpoint is evolving; the API contract may change.

Updates a Query API endpoint.

Authorizations

Path parameters

  • organizationIdstringrequired

    ID of the requested organization.

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
  • serviceIdstringrequired

    ID of the requested service.

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
  • endpointIdstringrequired

    ID of the requested Query API endpoint.

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$

Request bodyJSON

  • namestringrequired

    Name of the Query API endpoint.

    minLength: 1, pattern: \S
  • sqlstringrequired

    SQL executed by the endpoint.

    maxLength: 4194304, pattern: \S
  • databasestringrequired

    Database used by the Query API endpoint.

    pattern: \S
  • apiKeyIdsarray ofstringrequired

    API key IDs allowed to call the endpoint.

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
  • rolesarray ofstringrequired

    Database roles used by the endpoint.

    minLength: 1
  • parametersoptionalmap ofstring

    Default query parameters.

    Default: {}
  • allowedOriginsoptionalarray ofstring

    Origins allowed by the endpoint CORS policy.

    Default: []

Response

JSON

200

The Query API endpoint was updated.

JSON
  • statusintegerrequired

    HTTP status code.

    Example: 200
  • requestIdstringrequired

    Unique id assigned to every request. UUIDv4

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
  • resultobjectrequired
    10 properties
    • idstringrequired

      Unique ID of the Query API endpoint.

      format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
    • namestringrequired

      Name of the Query API endpoint.

    • sqlstringrequired

      SQL executed by the endpoint.

      maxLength: 4194304
    • databasestringrequired

      Database used by the Query API endpoint.

    • parametersmap ofstringrequired

      Query parameters.

    • apiKeyIdsarray ofstringrequired

      API key IDs allowed to call the endpoint.

      format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
    • rolesarray ofstringrequired

      Database roles used by the endpoint.

    • allowedOriginsarray ofstringrequired

      Origins allowed by the endpoint CORS policy.

    • urlstringrequired

      Public URL used to execute the endpoint.

      format: uri
      Example: "https://queries.clickhouse.cloud/run/00000000-0000-0000-0000-000000000000"
    • ownerTypeuserorqueryApiEndpointrequired

      Owner type of the Query API endpoint. Endpoints with a user owned query cannot be updated or deleted through this API.

Navigation