跳转至

镜像列表

1. 接口描述

本接口用于查询多个镜像实例的概要信息。

  • 可以根据镜像ID、镜像名称、创建时间等相关信息来查询镜像的概要信息。过滤信息详细请见 过滤器ListOption。
  • 如果参数为空,返回当前用户一定数量(Limit所指定的数量,默认为20)的镜像实例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。

参数名称 必选 类型 描述
ListOption.limit 否 Number 返回的最大镜像实例数量
ListOption.continue 否 string 返回的镜像分页起点

3. 输出参数

参数名称 必选 类型 描述
items 是 Array Of Image 镜像实例概要信息列表
metadata 是 Object 元数据

4. 示例

示例1 查看镜像列表

查看在 default 空间下所有镜像实例信息,限制返回结果最多为5项

输入示例

GET http://argon.api.mgtv.com/api/v1/namespaces/default/images?listOption.limit=5

输出示例

{
    metadata: {},
    items: [
        {
            command: ["python3 /home/mediacloud/main_transcode.py --task_id={{inputs.task_id}} --date={{inputs.date}} --log_path={{configs.log_path}} --cache_path={{configs.cache_path}} --input_file={{inputs.input_file}} --output={{outputs.output}} --format={{inputs.format}} --vcodec={{inputs.vcodec}} --acodec={{inputs.acodec}}"],
            configs: [{
                controls: "input"
                default: "/data/y/argon/workdir/default/cache_path"
                displayName: "缓存文件路径"
                index: 8
                kind: "config"
                name: "cache_path"
                type: "string"
            }],
            description: "普通整片转码",
            displayName: "普通整片转码",
            inputs: [{
                controls: "input"
                default: "-"
                displayName: "任务ID"
                index: 0
                kind: "input"
                name: "task_id"
                type: "string"
            }],
            metadata: {clusterName: "default", namespace: "default", uid: "e92964d6-f8b5-4579-a587-00008bf81ac6"},
            name: "普通整片转码",
            outputs: [{
                controls: "input"
                default: "/data/y/argon/data_path"
                displayName: "输出文件路径"
                index: 6
                kind: "output"
                name: "output"
                type: "string"
            }],
            price: "0",
            repository: "nvidia/cuda10.1:tensorflow_mgdc-test-v0.1",
            status: {createdAt: "2020-12-21T08:02:13Z", updatedAt: "2020-12-22T01:30:13Z"}
        },
        ...
    ]
}