Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Introduction

Deploying virtual machine from OVA or OVF images has been one of the core features of the RESTful API. Now, you are able to upload any Open Virtualization Format archives in your personal space at https://vskey-stor.eis.utoronto.ca and use it to deploy one or many virtual machines. 

It is also possible to export an existent virtual machine (OVA/OVF Images) to OVF and then use this OVF to deploy new ones. 

On this page:

The following table shows a brief description and HTTP methods allowed to interact with Open Virtualization Format images:

ResourceURIDescriptionGETPOSTPUTPATCHOPTIONS
Images/imageOVF/OVA Virtual Machine images available from VSKEY-STOR.(tick)    (tick)

OPTIONS HTTP method

Remember, you can also show what methods are allowed and description, parameters, etc. by making an OPTIONS HTTP request to /v2/image.

http OPTIONS "https://vss-api.eis.utoronto.ca/v2/image"
curl -X OPTIONS "https://vss-api.eis.utoronto.ca/v2/image"

List

In order to list available OVA/OVF images you should make a GET request to the endpoint /v2/image passing your access token. As a result, you will get list of images available in your VSKEY-STOR space in form of JSON objects with the following attributes:

NameTypeDescription
namestringOVA/OVF image file name
pathstringOVA/OVF image full path

The following examples implements HTTPie and CURL to list available OVA/OVF images:

http GET "https://vss-api.eis.utoronto.ca/v2/image" "Authorization: Bearer $TK"
curl -H "Authorization: Bearer $TK" -X GET "https://vss-api.eis.utoronto.ca/v2/image"
Response Body
{
    "_links": {
        "api": "https://vss-api.eis.utoronto.ca/v2/",
        "self": "https://vss-api.eis.utoronto.ca/v2/image"
    },
    "data": [
        {
            "name": "1608T-stoic_carson.ovf",
            "path": "5012689b-071a-145b-584a-9a9b49873510/1608T-stoic_carson.ovf"
        },
        {
            "name": "photon-custom-hw10-1.0-13c08b6-GA.ova",
            "path": "images/photon-custom-hw10-1.0-13c08b6-GA.ova"
        },
        {
            "name": "CentOS_64-bit_vmx10.ova",
            "path": "images/CentOS_64-bit_vmx10.ova"
        },
        {
            "name": "wily-server-cloudimg-amd64.ova",
            "path": "images/wily-server-cloudimg-amd64.ova"
        },
        {
            "name": "photon-custom-hw10-1.0-13c08b6.ova",
            "path": "images/photon-custom-hw10-1.0-13c08b6.ova"
        },
        {
            "name": "CentOS_64-bit_vmx11.ova",
            "path": "images/CentOS_64-bit_vmx11.ova"
        },
        {
            "name": "Ubuntu_64-bit-vmx10.ova",
            "path": "images/Ubuntu_64-bit-vmx10.ova"
        },
        {
            "name": "xenial-server-cloudimg-amd64.ova",
            "path": "images/xenial-server-cloudimg-amd64.ova"
        },
        {
            "name": "coreos_production_vmware_ova.ova",
            "path": "images/coreos_production_vmware_ova.ova"
        },
        {
            "name": "1608T-pensive_carson.ovf",
            "path": "5012e183-ad9b-f415-a1a6-e31dd5d14ba4/1608T-pensive_carson.ovf"
        },
        {
            "name": "1608T-chef-master.ovf",
            "path": "5012af5b-799e-8adb-ba90-45a226e42040/1608T-chef-master.ovf"
        },
        {
            "name": "1608T-suspicious_meitner.ovf",
            "path": "50121742-7c36-d590-8244-1eef48362adc/1608T-suspicious_meitner.ovf"
        }
    ],
    "meta": {
        "count": 5,
        "time": "0.25403s",
        "user": "jm"
    }
}

The attribute value you will use to deploy new virtual machines using an image is path.

Sort

Sorting results has been recently introduced on version 3.2.1:

NameDescription
sortsort results by path or name

The following examples show how to structure a GET request, with sorting:

http GET "https://vss-api.eis.utoronto.ca/v2/image?sort=name" "Authorization: Bearer $TK"
http GET "https://vss-api.eis.utoronto.ca/v2/image?sort=path" "Authorization: Bearer $TK"

Filters

This resource has one filter to narrow down the number of OVA/OVF images shown in the result.

NameDescription
nameOVA image file name

The following examples show how to structure a GET request, with filters:

http GET "https://vss-api.eis.utoronto.ca/v2/image?name=ubuntu" "Authorization: Bearer $TK"
http GET "https://vss-api.eis.utoronto.ca/v2/image?name=ubuntu-16" "Authorization: Bearer $TK"
  • No labels