---
title: "List Query API endpoints"
method: GET
path: "/v1/organizations/{organizationId}/services/{serviceId}/query-api-endpoints"
tags: ["Query API endpoints"]
---

# List Query API endpoints

`GET /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

Returns all active Query API endpoints for the service.

## Path parameters

- `organizationId` string, uuid, required: ID of the requested organization.
- `serviceId` string, uuid, required: ID of the requested service.

## Query parameters

- `cursor` string: Cursor returned as `nextCursor` on the previous page.
- `limit` integer: Maximum number of records to return per page. Defaults to 100. Maximum is 100.

## Response `200`

Successful response.

- object
  - `result` PublicQueryApiEndpointListItem[], required: Active Query API endpoints for the service.
    - `id` string, uuid, required: Unique ID of the Query API endpoint.
    - `name` string, required: Name of the Query API endpoint.
    - `database` string, required: Database used by the Query API endpoint.
    - `apiKeyIds` string[], required: API key IDs allowed to call the endpoint.
    - `roles` string[], required: Database roles used by the endpoint.
    - `allowedOrigins` string[], required: Origins allowed by the endpoint CORS policy.
    - `url` string, uri, required: Public URL used to execute the endpoint.
    - `ownerType` 'user' | 'queryApiEndpoint', required: Owner type of the Query API endpoint. Endpoints with a user owned query cannot be updated or deleted through this API.
  - `limit` integer, required: Maximum number of results returned in this page.
  - `totalCount` integer, nullable, required: Total number of results across all pages. It has only informative value, thus is not guaranteed and it is provided on a best-effort basis. Null if the total count is unknown.
  - `nextCursor` string, nullable, required: Cursor for the next page, to be sent as the `cursor` query parameter. Null on the last page.
  - `status` integer, required: HTTP status code.
  - `requestId` string, uuid, required: Unique id assigned to every request. UUIDv4

## Other responses

- `400`: The request cannot be processed due to a client error.
- `403`: The request is forbidden.
- `404`: Service not found.
- `500`: An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.

---

[API](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud.md) - [All operations](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/revisions/eac345053548?raw)
