---
title: "Get the service query endpoint for a given instance"
method: GET
path: "/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint"
tags: ["Service"]
---

# Get the service query endpoint for a given instance

`GET /v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint`

## Request

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

Get the configuration for the service query endpoint that allows executing queries via API.

## Path parameters

- `organizationId` string, uuid, required
- `serviceId` string, uuid, required

## Response `200`

Successful response

- object
  - `status` number: HTTP status code.
  - `requestId` string, uuid: Unique id assigned to every request. UUIDv4
  - `result` ServiceQueryAPIEndpoint
    - `id` string: The id of the service query endpoint
    - `openApiKeys` string[]: List of OpenAPI keys that can access the service query endpoint
    - `roles` string[]: List of roles that can access the service query endpoint
    - `allowedOrigins` string: The allowed origins as comma separated list of domains

## Other responses

- `400`: The request cannot be processed due to a client error. Please verify your request parameters and try again.
- `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)
