Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

POST /backups/:backup_id/convert 

You can convert a backup into a custom template. A label for a template can be set with the backup[label], minimum disk size and minimum memory size parameters.

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*

Request Parameters

label* - template label

min_disk_size* - minimum disk size required in GB 

min_memory_size* - minimum RAM required for the template

Response Parameters

returns created backup

JSON Request

Code Block
languagebash
themeRDark
 curl -i -X DELETE -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url https://mycp.superb.net/api/<api_url>/backups/:id.json

JSON Response

Code Block
 {"image_template":{"allow_resize_without_reboot":true,"allowed_hot_migrate":true,"allowed_swap":true,"backup_server_id":1,"baremetal_server":false,"cdn":false,"checksum":null,"created_at":"2015-08-20T22:34:36+00:00","disk_target_device":null,"ext4":false,"file_name":"jijk18gqcjlh6m_20150820223436","id":145,"initial_password":"Password1","initial_username":"root","label":"my_label","manager_id":null,"min_disk_size":20,"min_memory_size":512,"operating_system":"linux","operating_system_arch":null,"operating_system_distro":"rhel","operating_system_edition":null,"operating_system_tail":null,"parent_template_id":null,"remote_id":null,"resize_without_reboot_policy":{},"smart_server":false,"state":"pending","template_size":969420,"updated_at":"2015-08-20T22:34:36+00:00","user_id":337,"version":"1.0","virtualization":null}}

XML Request example

Code Block
languagebash
themeRDark
 curl -i -X DELETE -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url https://mycp.superb.net/api/<api_url>/backups/:id.xml