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

# 指定したインスタンスのサービスのクエリ エンドポイントをupsert

> これは Experimental 機能です。有効にするにはサポートにお問い合わせください。



## OpenAPI

````yaml /ja/_specs/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: 指定したインスタンスのサービスのクエリ エンドポイントをupsert
      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: サービスのクエリendpointのバージョン
          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: service query endpoint の ID
          type: string
        openApiKeys:
          description: service query endpoint にアクセスできる OpenAPI キーの一覧
          items:
            type: string
          type: array
        roles:
          description: service query endpoint にアクセスできるロールの一覧
          items:
            enum:
              - sql_console_read_only
              - sql_console_admin
            type: string
          type: array
  securitySchemes:
    basicAuth:
      description: >-
        ClickHouse Cloud console で取得した key ID と key secret を使用してください:
        https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````