此命令可上载新的系统更新映像。
使用 curl 的上载命令示例:
curl --user root:letmein -k --data-binary @nas@2013.08.24,1-0.pkg.gz \ --header "Content-Type: application/octet-stream" \ https://zfssa.example.com/api/system/v1/updates
在上载并解压缩映像后,将返回更新映像的属性。成功后,HTTP 状态将设置为 "201 (Created)",并在位置头中返回新映像的相对位置。
结果示例:
HTTP/1.1 201 Created X-Zfssa-Appliance-Api: 1.0 Content-Length: 541 Content-Type: application/json Location: /api/system/v1/updates/nas@2013.08.24,1-0 { "update": { "date": "Sat Aug 24 2013 17:54:23 GMT+0000 (UTC)", "href": "/api/system/v1/updates/nas@2013.08.24,1-0", "status": "current", "version": "2013.08.24,1-0", "update_deferred", "on_request" } }