> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-1d264819.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 为指定实例插入或更新服务查询端点

> 这是一个 Experimental 功能。请联系支持团队启用此功能。



## OpenAPI

````yaml /zh/products/cloud/api-reference/cloud-openapi.json post /v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint
openapi: 3.0.1
info:
  contact:
    email: support@clickhouse.com
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-299828
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
paths:
  /v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint:
    post:
      tags:
        - Service
      summary: 为指定实例插入或更新服务查询端点
      description: 这是一个 Experimental 功能。请联系支持团队启用此功能。
      parameters:
        - description: 所请求组织的 ID。
          in: path
          name: organizationId
          required: true
          schema:
            format: uuid
            type: string
        - description: 所请求服务的 ID。
          in: path
          name: serviceId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstanceServiceQueryApiEndpointsPostRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  requestId:
                    description: 为每个请求分配的唯一 ID。UUIDv4
                    format: uuid
                    type: string
                  result:
                    $ref: '#/components/schemas/ServiceQueryAPIEndpoint'
                  status:
                    description: HTTP 状态码。
                    example: 200
                    type: number
                type: object
          description: 成功响应
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: 详细错误描述。
                    type: string
                  status:
                    description: HTTP 状态码。
                    example: 400
                    type: number
                type: object
          description: 由于请求存在被视为客户端错误的问题，服务器无法或拒绝处理该请求。
components:
  schemas:
    InstanceServiceQueryApiEndpointsPostRequest:
      properties:
        allowedOrigins:
          description: 允许的来源，以逗号分隔的域名列表表示
          type: string
        openApiKeys:
          description: 服务查询端点的版本
          items:
            type: string
          type: array
        roles:
          description: 角色
          items:
            enum:
              - sql_console_read_only
              - sql_console_admin
            type: string
          type: array
    ServiceQueryAPIEndpoint:
      properties:
        allowedOrigins:
          description: 允许的来源，以逗号分隔的域名列表表示
          type: string
        id:
          description: 服务查询端点的 ID
          type: string
        openApiKeys:
          description: 可访问服务查询端点的 OpenAPI 密钥列表
          items:
            type: string
          type: array
        roles:
          description: 可访问服务查询端点的角色列表
          items:
            enum:
              - sql_console_read_only
              - sql_console_admin
            type: string
          type: array
  securitySchemes:
    basicAuth:
      description: >-
        使用在 ClickHouse Cloud 控制台中获取的 key ID 和 key
        secret：https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````