跳转到主要内容
资源中心/硬件设施/镜像服务器相关接口
PUTBackup Storage Operations起始版本 1.7同步需要认证

从镜像服务器导出镜像

从镜像服务器导出镜像

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

路径参数

请求参数

路径参数

  • backupStorageUuidString必填

    镜像存储UUID

请求体字段

  • exportimagefrombackupstorageObject必填

    exportimagefrombackupstorage 请求体结构

    • imageUuidString必填

      镜像UUID

    • exportFormatString

      导出镜像的保存格式

  • systemTagsList

    系统标签

  • userTagsList

    用户标签

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • imageUrlString必填

    被导出镜像的访问地址

  • exportMd5SumString必填

    被导出镜像的md5值

  • successboolean必填

    导出成功失败标志

  • errorErrorCode必填

    错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error

    • codeString必填

      错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

    • descriptionString必填

      错误的概要描述

    • detailsString必填

      错误的详细信息

    • elaborationString必填

      保留字段,默认为null

    • opaqueLinkedHashMap必填

      保留字段,默认为null

    • causeErrorCode必填

      根错误,引发当前错误的源错误,若无原错误,该字段为null

请求地址

PUT/zstack/v1/backup-storage/{backupStorageUuid}/actions

/zstack/v1/backup-storage/{backupStorageUuid}/actions

操作 ID

ExportImageFromBackupStorage

永久链接

请求示例

curl -X PUT 'http://{host}/zstack/v1/backup-storage/{backupStorageUuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"exportimagefrombackupstorage":{"imageUuid":"<imageUuid>","exportFormat":"<exportFormat>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

响应示例

200
{ "imageUrl": "http://bs-host-name/path/to/image.qcow2", "exportMd5Sum": "8a239d17b045dea51c4677fa90a42ed8" }

变更历史

此 API 暂无变更历史记录。

查看全部变更历史