> ## Documentation Index
> Fetch the complete documentation index at: https://ppio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询 Endpoint 列表



## OpenAPI

````yaml gpus/v2-spec/list-endpoint.json GET /gpus/v2/endpoints
openapi: 3.0.0
info:
  title: PPIO GPU API v2
  version: 2.0.0
servers:
  - url: https://api.ppio.com
security: []
paths:
  /gpus/v2/endpoints:
    get:
      summary: 查询 Endpoint 列表
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer 身份验证格式,例如:Bearer `{{API 密钥}}`。
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: 返回数量限制。整数,取值 >= 0。
          example: 10
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: 分页游标。字符串,长度限制:0-1024 字符。
          example: endpoint-cursor
        - name: keyword
          in: query
          required: false
          schema:
            type: string
          description: 搜索关键字。
          example: example
        - name: member_ids
          in: query
          required: false
          schema:
            type: string
          description: 成员 ID 过滤,多个用英文逗号分隔。
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Endpoint 列表
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Endpoint ID
                          example: endpoint-id
                        type:
                          type: string
                          enum:
                            - sync
                            - async
                          description: Endpoint 类型。可选值:`sync`、`async`
                        name:
                          type: string
                          description: Endpoint 名称
                          example: example-endpoint
                        app_name:
                          type: string
                          description: 应用名称
                          example: example-app
                        status:
                          type: object
                          description: Endpoint 状态信息
                          properties:
                            status:
                              type: string
                              description: 状态值
                              example: running
                            error:
                              type: string
                              description: 错误码或错误类型
                              example: ''
                            message:
                              type: string
                              description: 状态说明或错误信息
                              example: ''
                        url:
                          type: string
                          description: 访问地址
                          example: https://endpoint.example.com/endpoint-id
                        product_id:
                          type: string
                          description: Serverless 产品 ID
                          example: product-id
                        worker_config:
                          type: object
                          description: Worker 配置
                          properties:
                            max_replicas:
                              type: integer
                              description: 最大 Worker 数量。整数,取值范围:[0, 1000]。
                              example: 2
                            min_replicas:
                              type: integer
                              description: 最小 Worker 数量。整数,取值范围:[0, 1000]。
                              example: 0
                            idle_timeout:
                              type: integer
                              description: 空闲释放时间。整数,取值范围:[1, 1000]。
                              example: 300
                            max_concurrent_per_worker:
                              type: integer
                              description: 单个 Worker 最大并发请求数。整数,取值范围:[1, 1000]。
                              example: 10
                            gpu_num:
                              type: integer
                              description: GPU 数量。整数,取值范围:[1, 8]。
                              example: 1
                            rootfs_size_gb:
                              type: integer
                              description: 系统盘大小。整数,取值范围:[10, 100]。单位为 GB。
                              example: 20
                            min_cuda_version:
                              type: string
                              enum:
                                - '12.4'
                                - '12.6'
                                - '12.8'
                                - '12.9'
                                - '13.0'
                              description: >-
                                最低 CUDA
                                版本。可选值:`12.4`、`12.6`、`12.8`、`12.9`、`13.0`。
                              example: '12.4'
                            request_timeout:
                              type: integer
                              description: 请求超时时间。整数,取值范围:[1, 1800]。
                              example: 60
                        policy:
                          type: object
                          description: 策略配置
                          properties:
                            type:
                              type: string
                              enum:
                                - queue
                                - concurrency
                              description: 策略类型。可选值:`queue`、`concurrency`。
                              example: queue
                            value:
                              type: integer
                              description: >-
                                策略值。整数,取值范围:[1, 1000]。`queue`
                                表示队列等待时间,`concurrency` 表示请求数。
                              example: 100
                        image:
                          type: string
                          description: 镜像地址
                          example: registry.example.com/namespace/image:tag
                        registry_auth_id:
                          type: string
                          description: 镜像仓库认证 ID
                          example: registry-auth-id
                        entrypoint:
                          type: string
                          description: 容器 entrypoint
                          example: ''
                        command:
                          type: string
                          description: 启动命令
                          example: go run main.go
                        volumes:
                          type: array
                          description: 挂载卷列表
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: 存储 ID。
                                example: storage-id
                              type:
                                type: string
                                enum:
                                  - local
                                  - network
                                description: 存储类型。可选值:`local`、`network`。注意:`local` 类型即将废弃。
                                example: network
                              size:
                                type: integer
                                description: 存储大小。仅当 `type=local` 时返回。注意:`local` 类型即将废弃。
                              mount_point:
                                type: string
                                description: 挂载路径。字符串,长度限制:0-4095 字符。
                                example: /data
                        envs:
                          type: array
                          description: 环境变量列表
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                description: 环境变量名。字符串,长度限制:0-511 字符。
                                example: ENV_NAME
                              value:
                                type: string
                                description: 环境变量值。字符串,长度限制:0-4095 字符。
                                example: ENV_VALUE
                        ports:
                          type: array
                          items:
                            type: integer
                          description: 端口号列表
                          example:
                            - 8080
                        workers:
                          type: array
                          description: Worker 列表
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: Worker ID
                                example: worker-id
                              status:
                                type: object
                                description: Worker 状态
                                properties:
                                  status:
                                    type: string
                                    description: 状态值
                                    example: ready
                                  error:
                                    type: string
                                    description: 错误码或错误类型
                                    example: ''
                                  message:
                                    type: string
                                    description: 状态说明或错误信息
                                    example: ''
                              log:
                                type: string
                                description: Worker 日志访问地址
                                example: https://logs.example.com/worker-id
                              health:
                                type: boolean
                                description: Worker 是否健康
                                example: true
                              drain:
                                type: boolean
                                description: Worker 是否停止接收请求
                                example: false
                        health_check:
                          type: object
                          description: 健康检查配置
                          properties:
                            path:
                              type: string
                              description: 健康检查路径。
                              example: /healthz
                            port:
                              type: integer
                              description: 健康检查端口。整数,取值范围:[0, 65535]。
                              example: 8080
                        region_id:
                          type: string
                          description: 区域 ID
                          example: region-id
                        member_id:
                          type: string
                          description: 成员 ID
                          example: member-id
                        owner_id:
                          type: string
                          description: 所有者 ID
                          example: 55555555-e29b-41d4-a716-446655440000
                        created_at:
                          type: integer
                          description: 创建时间。Unix 时间戳
                          example: 1710000000
                  next_cursor:
                    type: string
                    description: 下一页游标。无下一页时为空字符串
                    example: next-endpoint-cursor
                  has_more:
                    type: boolean
                    description: 是否还有下一页
                    example: true

````