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:

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 template

JSON Request

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d'{"backup":{"label":"backup_label", "min_disk_size":"20", "min_memory_size":"512"}}' --url <api_url>/backups/:backup_id/convert.json

JSON Response

 {"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

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d'<?xml version="1.0" encoding="UTF-8" ?><backup><label>template.label</label><min_disk_size>50</min_disk_size><min_memory_size>1024</min_memory_size></backup>' --url <api_url>/backups/:backup_id/convert.xml