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

# 获取服务详细信息

> 返回属于该组织的服务



## OpenAPI

````yaml /zh/products/cloud/api-reference/cloud-openapi.json get /v1/organizations/{organizationId}/services/{serviceId}
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}:
    get:
      tags:
        - Service
      summary: 获取服务详细信息
      description: 返回属于该组织的服务
      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
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  requestId:
                    description: 分配给每个请求的唯一 ID。UUIDv4
                    format: uuid
                    type: string
                  result:
                    $ref: '#/components/schemas/Service'
                  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:
    Service:
      properties:
        availablePrivateEndpointIds:
          description: 可附加到该服务的可用专用终结点 ID 列表
          items:
            type: string
          type: array
        byocId:
          description: >-
            这是为自备 Cloud (BYOC) 设置区域后返回的 ID。指定 byocId 参数时，还必须同时提供
            minReplicaMemoryGb 和 maxReplicaGb 参数，并且其值必须为以下规格之一：48、116、172、232。
          type: string
        clickhouseVersion:
          description: 服务的 ClickHouse 版本。
          type: string
        complianceType:
          description: 服务的监管合规类型。
          enum:
            - hipaa
            - pci
          type: string
        createdAt:
          description: 服务创建时间戳。ISO-8601。
          format: date-time
          type: string
        dataWarehouseId:
          description: 包含此服务的数据仓库
          type: string
        encryptionAssumedRoleIdentifier:
          description: 用于磁盘加密的可选角色
          type: string
        encryptionKey:
          description: 可选的客户提供磁盘加密密钥
          type: string
        encryptionRoleId:
          description: 用于加密的 IAM role ID。仅当 hasTransparentDataEncryption 为 true 时可用。
          type: string
        endpoints:
          description: 所有服务端点的列表。
          items:
            $ref: '#/components/schemas/ServiceEndpoint'
          type: array
        hasTransparentDataEncryption:
          description: >-
            如果服务应启用 Transparent Data Encryption (TDE)，则为 true。TDE 仅适用于
            ENTERPRISE 组织层级，并且只能在创建服务时启用。
          type: boolean
        iamRole:
          description: 用于访问 S3 中对象的 IAM role
          type: string
        id:
          description: 服务的唯一 ID。
          format: uuid
          type: string
        idleScaling:
          description: 设为 true 时，服务在空闲时可缩容至零。默认为 true。
          type: boolean
        idleTimeoutMinutes:
          description: 设置最小空闲超时时间（分钟）。必须 >= 5 分钟。
          type: number
        ipAccessList:
          description: 允许访问该服务的 IP 地址列表
          items:
            $ref: '#/components/schemas/IpAccessListEntry'
          type: array
        isPrimary:
          description: 如果此服务是数据仓库中的主服务，则为 true
          type: boolean
        isReadonly:
          description: 如果此服务为只读，则为 true。仅当提供 dataWarehouseId 时，才可设为只读。
          type: boolean
        maxReplicaMemoryGb:
          description: >-
            自动扩缩容期间每个副本的最大总内存（Gb）。必须是 4 的倍数，且非付费服务不得超过 120*，付费服务不得超过 356*。* -
            副本最大规格取决于所选区域内云提供商硬件的可用性。
          example: 120
          maximum: 356
          minimum: 8
          multipleOf: 4
          type: number
        maxTotalMemoryGb:
          deprecated: true
          description: >-
            已弃用 - 对于副本数量不是默认值的服务，此值不准确。自动扩缩容期间三个工作线程的最大内存（Gb）。仅适用于 'production'
            服务。必须是 12 的倍数，且非付费服务不得超过 360，付费服务不得超过 1068。
          example: 360
          maximum: 1068
          minimum: 24
          multipleOf: 12
          type: number
        minReplicaMemoryGb:
          description: 自动扩缩容期间每个副本的最小总内存（Gb）。必须是 4 的倍数，且大于或等于 8。
          example: 16
          maximum: 356
          minimum: 8
          multipleOf: 4
          type: number
        minTotalMemoryGb:
          deprecated: true
          description: >-
            已弃用 - 对于副本数量不是默认值的服务，此值不准确。自动扩缩容期间三个工作线程的最小内存（Gb）。仅适用于 'production'
            服务。必须是 12 的倍数，且大于或等于 24。
          example: 48
          maximum: 1068
          minimum: 24
          multipleOf: 12
          type: number
        name:
          description: 服务名称。最多 50 个字符的字母数字字符串，可包含空格。
          type: string
        numReplicas:
          description: >-
            服务的副本数。对于仓库中的第一个服务，副本数必须在 2 到 20 之间。在现有仓库中创建的服务，副本数最低可以为
            1。根据您组织的层级，可能还会有其他限制。默认情况下，BASIC 层级为 1，SCALE 和 ENTERPRISE 层级为 3。
          example: 3
          maximum: 20
          minimum: 1
          type: number
        privateEndpointIds:
          description: 专用终结点列表
          items:
            type: string
          type: array
        profile:
          description: 自定义实例 profile。仅适用于 ENTERPRISE 组织层级。
          enum:
            - v1-default
            - v1-highmem-xs
            - v1-highmem-s
            - v1-highmem-m
            - v1-highmem-l
            - v1-highmem-xl
            - v1-highcpu-s
            - v1-highcpu-m
            - v1-highcpu-l
            - v1-highcpu-xl
          type: string
        provider:
          description: 云提供商
          enum:
            - aws
            - gcp
            - azure
          type: string
        region:
          description: 服务所在区域。
          enum:
            - ap-northeast-1
            - ap-south-1
            - ap-southeast-1
            - ap-southeast-2
            - eu-central-1
            - eu-west-1
            - eu-west-2
            - me-central-1
            - us-east-1
            - us-east-2
            - us-west-2
            - us-east1
            - us-central1
            - europe-west4
            - asia-southeast1
            - eastus
            - eastus2
            - westus3
            - germanywestcentral
          type: string
        releaseChannel:
          description: >-
            如果您希望在新的 ClickHouse 发行版一经推出即可获取，请选择
            fast。这样您能更快使用新功能，但出现缺陷的风险也更高。如果您希望延后发布，以便留出更多测试时间，请选择 slow。此功能仅适用于
            production 服务。default 为常规发布渠道。
          enum:
            - slow
            - default
            - fast
          type: string
        state:
          description: 服务的当前状态。
          enum:
            - starting
            - stopping
            - terminating
            - awaking
            - partially_running
            - provisioning
            - running
            - stopped
            - terminated
            - degraded
            - failed
            - idle
          type: string
        tier:
          deprecated: true
          description: >-
            对于 BASIC、SCALE 和 ENTERPRISE
            组织层级，此项已弃用。服务层级：'development'、'production'、'dedicated_high_mem'、'dedicated_high_cpu'、'dedicated_standard'、'dedicated_standard_n2d_standard_4'、'dedicated_standard_n2d_standard_8'、'dedicated_standard_n2d_standard_32'、'dedicated_standard_n2d_standard_128'、'dedicated_standard_n2d_standard_32_16SSD'、'dedicated_standard_n2d_standard_64_24SSD'。Production
            服务支持扩缩容，Development 服务为固定大小。Azure 服务不支持 Development 层级。
          enum:
            - development
            - production
            - dedicated_high_mem
            - dedicated_high_cpu
            - dedicated_standard
            - dedicated_standard_n2d_standard_4
            - dedicated_standard_n2d_standard_8
            - dedicated_standard_n2d_standard_32
            - dedicated_standard_n2d_standard_128
            - dedicated_standard_n2d_standard_32_16SSD
            - dedicated_standard_n2d_standard_64_24SSD
          type: string
        transparentDataEncryptionKeyId:
          description: >-
            该服务所用的 Transparent Data Encryption 密钥 ID。仅当
            hasTransparentDataEncryption 为 true 时可用。
          type: string
    ServiceEndpoint:
      properties:
        host:
          description: 服务主机名
          type: string
        port:
          description: 数字端口号
          type: number
        protocol:
          description: 端点协议：'https'、'nativesecure'、'mysql'。
          enum:
            - https
            - nativesecure
            - mysql
          example: mysql
          type: string
        username:
          description: 端点的可选用户名
          nullable: true
          type: string
    IpAccessListEntry:
      properties:
        description:
          description: 允许访问的 IPv4 地址或 IPv4 CIDR 的可选说明
          type: string
        source:
          description: IP 或 CIDR
          type: string
  securitySchemes:
    basicAuth:
      description: >-
        使用在 ClickHouse Cloud 控制台中获取的 key ID 和 key
        secret：https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````