全栈应用服务器

  • 全栈应用服务器 > API 文档 > 镜像 >列举镜像

    列举镜像

    最近更新时间: 2025-12-10 14:57:51

    描述

    列出用户指定筛选条件的镜像列表。

    请求路径

    GET /v1/images
    

    请求参数

    参数名称 参数类型 是否必填 描述
    limit int 返回结果的最大数量,默认 20,最大 100
    marker string 分页标记,用于获取下一页结果
    type string 指定拉取镜像的类型,支持枚举类型:Official、Custom、CustomPublic、CustomShared 四种

    type 为必填字段,根据它的限定,返回不同的镜像列表。

    • type 为 Official,表示返回官方提供的镜像;
    • type 为 Custom,表示返回自己创建的自定义镜像;
    • type 为 CustomPublic,表示返回公开的镜像(不论是否为自己创建);
    • type 为 CustomShared,表示返回共享给该用户的自定义镜像(不包含用户自己创建的自定义镜像;镜像 public 值也不影响,即不论 public 是否为 true,只有有分享给用户时,才会返回);

    响应字段

    参数 类型 是否为空 说明
    items array 镜像列表
    nextMarker string 下一页的标记,如果为空表示没有更多数据

    ImageInfoItem 字段说明

    参数 类型 是否可能为空 说明
    id string 镜像的唯一标识符
    name string 镜像的名称
    description string 镜像的描述信息
    imageType string 镜像的类型,目前支持:Official、Custom
    createdAt string 镜像创建时间,RFC3339 格式
    updatedAt string 镜像更新时间,RFC3339 格式
    regionID string 区域 ID,为空表示所有区域都存在
    size int 镜像占用磁盘大小(未压缩前),未创建完成大小为空,单位:GiB
    minCPU int 最小 CPU 核心数,默认不限制
    minMemory float64 最小内存大小,单位:GiB,默认不限制
    minDisk int 最小磁盘大小,单位:GiB,默认不限制
    architecture string 架构类型:x86_64 | arm64
    osPlatform string 操作系统平台:Windows | Linux
    osDistribution string 操作系统发行版:Ubuntu | CentOS | CentOS Stream | Debian | Windows
    osVersion string 操作系统版本号,如:18.04 | 20.04 | 22.04
    creatorAccount string 镜像创建者的 Account ID
    public bool 镜像是否公开
    publicTime string 如果镜像公开,字段为镜像公开的时间,RFC3339 格式;如果镜像非公开,则此字段为空

    请求示例

    GET /v1/images?limit=1&marker=Njg1Mjc4MzdiMTcyNjkxZmU5N2E0ZDMz&type=Official HTTP/1.1
    Host: <RegionID>-ecs.qiniuapi.com
    Authorization: Qiniu <AccessToken>
    Content-Type: application/json
    

    响应示例

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "items": [
            {
                "id": "68527837b172691fe97a4d33",
                "name": "Ubuntu 22.04 LTS",
                "description": "",
                "imageType": "Official",
                "createdAt": "0001-01-01T00:00:00Z",
                "updatedAt": "2025-09-01T11:35:20.072566+08:00",
                "regionID": "",
                "size": 20,
                "minCPU": 1,
                "minMemory": 1,
                "minDisk": 20,
                "state": "Available",
                "architecture": "x86_64",
                "osPlatform": "Linux",
                "osDistribution": "Ubuntu",
                "osVersion": "22.04",
                "public": true
            }
        ],
        "nextMarker": "Njg1Mjc4MzhiMTcyNjkxZmU5N2E0ZDM1"
    }
    
    以上内容是否对您有帮助?