Versions Compared

Key

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

Introduction

VMware supports most of Windows, Linux, Unix, Macintosh, and other operating systems (full list here), however we have carefully selected the latestmost used in our user community and those we know are stable enough in our environment.

The following table shows a brief description and HTTP methods allowed to interact with the Supported Operating System resource.

ResourceURIDescriptionGETPOSTPUTPATCH
Supported Operating Systems/osList supported operating systems and their attributes(tick)(tick) 




Panel

On this page:

Table of Contents
outlinetrue



Note

TK stores the Cloud API Token generated as a result of the following POST request to the /auth/request-token resource:

Code Block
curl -X POST https://vss-api.eis.utoronto.ca/auth/request-token -u <username>

For example, extracting the token with the jq command:

Code Block
TK=$(curl -X POST https://vss-api.eis.utoronto.ca/auth/request-token -u <username> | jq -r '.token')


List

There are more than 60 operating systems to use in our environment and to list them all, a GET request should be made to /v2/os as show below:

Code Block
languagebash
http GET "https://vss-api.eis.utoronto.ca/v2/os" "Authorization: Bearer $TK"
curl -H "Authorization: Bearer $TK" -X GET "https://vss-api.eis.utoronto.ca/v2/os" 

As a result, there will be a list of JSON objects with two attributes each: id and name described in the following table:

NameTypeDescription
guestIdstringGuest OS identifier. Used as value of attribute os in /v2/vm resource to crate VMs or in /v2/vm/<vm_uuid/guest/os to update given VM Guest OS Support.
guestFullNamestringGuest OS full name.

The following example is a response body with only a few elements. In practice you will get more than 60 elements.

Paging

All requests to the /os URL are paginated. The response body includes a 'meta.pages' key with everything to navigate through the results, for instance:

Code Block
languagepy
titleMeta key
collapsetrue
    "meta": {
        "_link": {
            "self": "https://vss-api.eis.utoronto.ca/v2/os"
        },
        "count": 10,
        "pages": {
            "first_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=10&page=1",
            "last_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=10&page=8",
            "next_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=10&page=2",
            "page": 1,
            "pages": 8,
            "per_page": 10,
            "prev_url": null,
            "total": 71
        },
        "time": "0.00444s",
        "user": "josem"
    }


KeyDescription
first_urlContain the URLs to navigate through results.
last_url
prev_url
next_url
pageCurrent page
pagesTotal number of pages
per_pageResults per page. Maximum 100; Default 10.
totalTotal number of results

Results per page can be set by including the parameter in the URL query, so we can get the desired number of elements per page, for example:

Code Block
http GET "https://vss-api.eis.utoronto.ca/v2/os?per_page=5" "Authorization: Bearer $TK"

curl -X GET -H "Authorization: Bearer $TK" "https://vss-api.eis.utoronto.ca/v2/os?per_page=5"


Code Block
languagepy
titleResponse Body
collapsetrue
{
    "data": [
        "https://vss-api.eis.utoronto.ca/v2/os/1",
        "https://vss-api.eis.utoronto.ca/v2/os/2",
        "https://vss-api.eis.utoronto.ca/v2/os/3",
        "https://vss-api.eis.utoronto.ca/v2/os/4",
        "https://vss-api.eis.utoronto.ca/v2/os/5"
    ],
    "meta": {
        "_link": {
            "self": "https://vss-api.eis.utoronto.ca/v2/os?per_page=5"
        },
        "count": 5,
        "pages": {
            "first_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=5&page=1",
            "last_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=5&page=15",
            "next_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=5&page=2",
            "page": 1,
            "pages": 15,
            "per_page": 5,
            "prev_url": null,
            "total": 71
        },
        "time": "0.00399s",
        "user": "josem"
    }
}

In this example, you can see the number of pages have increased from 8 to 15 and the '_link.self' key has included the parameter 'per_page' in the URL query.

Expansion

OS resource expansion is disabled by default, therefore elements found are listed as URLs. However, if you wish to display its contents add the expand=1 to URL query string and you will get the actual element in full JSON format, as follows:

Code Block
http GET "https://vss-api.eis.utoronto.ca/v2/os?per_page=1&page=22&expand=1" "Authorization: Bearer $TK"

curl -X GET -H "Authorization: Bearer $TK" "https://vss-api.eis.utoronto.ca/v2/os?per_page=1&page=22&expand=1"


Code Block
languagepy
titleResponse Body
collapsetrue
{
    "data": [
        {
            "guestFullName": "Solaris 10 (32 bit) (experimental)",
            "guestId": "solaris10Guest",
            "id": 22
        }
    ],
    "meta": {
        "_link": {
            "self": "https://vss-api.eis.utoronto.ca/v2/os?per_page=1&page=22&expand=1"
        },
        "count": 1,
        "pages": {
            "first_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=1&page=1&expand=1",
            "last_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=1&page=71&expand=1",
            "next_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=1&page=23&expand=1",
            "page": 22,
            "pages": 71,
            "per_page": 1,
            "prev_url": "https://vss-api.eis.utoronto.ca/v2/os?per_page=1&page=21&expand=1",
            "total": 71
        },
        "time": "0.00426s",
        "user": "josem"
    }
}


Filtering

Supported operating systems can be filtered by adding the filter argument to the query string in the following format:

Code Block
filter=<field_name>,<operator>,<value>

Operators can be:

OperatorDescription
eqEquals
neNot equal
ltLower than
leLower equal
gtGreater than
geGreater equal
likeMatching pattern
inMatch value in many items separated by commas

A resource can be filtered by as many attributes the object has, for instance /os can be filtered by guestId and guestFullName. Thus, the following example will filter CentOS operating systems:

Code Block
http GET "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,CentOS%&expand=1" "Authorization: Bearer $TK" 

curl -X GET -H "Authorization: Bearer $TK" "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,CentOS%&expand=1"


Code Block
languagepy
titleResponse Body
collapsetrue
{
    "data": [
        {
            "guestFullName": "CentOS 4/5",
            "guestId": "centosGuest",
            "id": 8
        },
        {
            "guestFullName": "CentOS 4/5 (64-bit)",
            "guestId": "centos64Guest",
            "id": 11
        }
    ],
    "meta": {
        "_link": {
            "self": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,CentOS%&expand=1"
        },
        "count": 2,
        "filter": "guestFullName,like,CentOS%",
        "pages": {
            "first_url": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName%2Clike%2CCentOS%25&per_page=10&page=1&expand=1",
            "last_url": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName%2Clike%2CCentOS%25&per_page=10&page=1&expand=1",
            "next_url": null,
            "page": 1,
            "pages": 1,
            "per_page": 10,
            "prev_url": null,
            "total": 2
        },
        "time": "0.00178s",
        "user": "josem"
    }
}

Sorting

Operating systems can be sorted by adding the sort parameter in the URL query string in the following format:

Code Block
sort=<field_name>,<asc|desc>

The following example shows how to sort by guestId, filter by guestFullName and expand results :

Code Block
http GET "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,Windows%&expand=1&sort=guestId,asc" "Authorization: Bearer $TK"

curl -X GET -H "Authorization: Bearer $TK" "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,Windows%&expand=1&sort=guestId,asc"


Code Block
languagepy
titleResponse Body
collapsetrue
{
    "data": [
        {
            "guestFullName": "Windows 7 (64 bit)",
            "guestId": "windows7_64Guest",
            "id": 1
        },
        {
            "guestFullName": "Windows 7",
            "guestId": "windows7Guest",
            "id": 50
        },
        {
            "guestFullName": "Windows Server 2008 R2 (64 bit)",
            "guestId": "windows7Server64Guest",
            "id": 26
        },
        {
            "guestFullName": "Windows 8 (64 bit)",
            "guestId": "windows8_64Guest",
            "id": 13
        },
        {
            "guestFullName": "Windows 8, Windows Server 2012, Windows Server 2016",
            "guestId": "windows8Guest",
            "id": 66
        },
        {
            "guestFullName": "Windows 8 Server (64 bit) and Windows Server 2012 (64 bit)",
            "guestId": "windows8Server64Guest",
            "id": 27
        },
        {
            "guestFullName": "Windows 9 (64 bit)",
            "guestId": "windows9_64Guest",
            "id": 24
        },
        {
            "guestFullName": "Windows 9 ",
            "guestId": "windows9Guest",
            "id": 6
        },
        {
            "guestFullName": "Windows 9 Server (64 bit)",
            "guestId": "windows9Server64Guest",
            "id": 47
        },
        {
            "guestFullName": "Windows Small Business Server 2003",
            "guestId": "winNetBusinessGuest",
            "id": 53
        }
    ],
    "meta": {
        "_link": {
            "self": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,Windows%&expand=1&sort=guestId,asc"
        },
        "count": 10,
        "filter": "guestFullName,like,Windows%",
        "pages": {
            "first_url": "https://vss-api.eis.utoronto.ca/v2/os?sort=guestId%2Casc&filter=guestFullName%2Clike%2CWindows%25&page=1&expand=1&per_page=10",
            "last_url": "https://vss-api.eis.utoronto.ca/v2/os?sort=guestId%2Casc&filter=guestFullName%2Clike%2CWindows%25&page=2&expand=1&per_page=10",
            "next_url": "https://vss-api.eis.utoronto.ca/v2/os?sort=guestId%2Casc&filter=guestFullName%2Clike%2CWindows%25&page=2&expand=1&per_page=10",
            "page": 1,
            "pages": 2,
            "per_page": 10,
            "prev_url": null,
            "total": 17
        },
        "sort": "guestId,asc",
        "time": "0.00485s",
        "user": "josem"
    }
}