Editing the created images with REST APIs
After you create images, you can edit the image, or create a new version or a duplicate of the image.
Procedure
- To edit an image that is not provisioned, run the following command.
curl -k -u zdtadmin:password -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"version":3,"zSystem":{"hostname":"myzos.domain.com","port":1022},"name":"zdt-dev1.wholeimage.with.LOAD$1","zsystemInformationUpdateRequest":{"domain":0,"ccp":0},"newInfo":{"name":"zdt-dev1.wholeimage.without.LOAD$1"},"addItems":[{"name":"zdt-dev1.1vol.s25","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":1}],"removeItems":[{"name":"zdt-dev1.1vol.LOAD$1","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":1}],"duplicate":false,"newVersion":false,"sysResComponent":{"name":"zdt-dev1.wholeimage.with.volinit","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":3}}' https://your_tools_server_host_name:9443/ZDTREST/zdtrs/appServices/application
- To create a new version of an image, run the following command.
curl -k -u zdtadmin:password -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"version":3,"zSystem":{"hostname":"myzos.domain.com","port":1022},"name":"zdt-dev1.wholeimage.with.LOAD$1","zsystemInformationUpdateRequest":{"domain":0,"ccp":0},"newInfo":{},"addItems":[{"name":"zdt-dev1.1vol.s25","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":1}],"removeItems":[{"name":"zdt-dev1.1vol.LOAD$1","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":1}],"duplicate":false,"newVersion":true,"sysResComponent":{"name":"zdt-dev1.wholeimage.with.volinit","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":3}}' https://your_tools_server_host_name:9443/ZDTREST/zdtrs/appServices/application
- To duplicate an image to a new image, run the following command.
curl -k -u zdtadmin:password -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"version":3,"zSystem":{"hostname":"myzos.domain.com","port":1022},"name":"zdt-dev1.wholeimage.with.LOAD$1","zsystemInformationUpdateRequest":{"domain":0,"ccp":0},"newInfo":{"name":"zdt-dev1.wholeimage.with.LOAD$1.duplicated"},"addItems":[{"name":"zdt-dev1.1vol.s25","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":1}],"removeItems":[{"name":"zdt-dev1.1vol.LOAD$1","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":1}],"duplicate":true,"newVersion":false,"sysResComponent":{"name":"zdt-dev1.wholeimage.with.volinit","zSystem":{"hostname":"myzos.domain.com","port":1022},"version":3}}' https://your_tools_server_host_name:9443/ZDTREST/zdtrs/appServices/application