Introduction
VMware supports most of Windows, Linux, Unix, Macintosh, and other operating systems (full list here), however we have carefully selected the latest, most 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.
Resource | URI | Description | GET | POST | PUT | PATCH |
---|---|---|---|---|---|---|
Supported Operating Systems | /os | List supported operating systems and their attributes |
Panel | ||||
---|---|---|---|---|
On this page:
|
Note | ||||
---|---|---|---|---|
TK stores the Cloud API Token generated as a result of the following POST request to the /auth/request-token resource:
For example, extracting the token with the jq command:
|
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 | ||
---|---|---|
| ||
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:
Name | Type | Description |
---|---|---|
guestIdguest_id | string | Guest 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. |
guestFullNamefull_name | string | Guest OS full name. |
family | string | Guest Os family |
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 | ||||||
---|---|---|---|---|---|---|
| ||||||
"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" } |
Key | Description |
---|---|
first_url | Contain the URLs to navigate through results. |
last_url | |
prev_url | |
next_url | |
page | Current page |
pages | Total number of pages |
per_page | Results per page. Maximum 100; Default 10. |
total | Total 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 | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "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 | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "data": [ { "guestFullNamefull_name": "Solaris 10 (32 bit) (experimental)", "guestIdguest_id": "solaris10Guest", "family": "solarisGuest" "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:
Operator | Description |
---|---|
eq | Equals |
ne | Not equal |
lt | Lower than |
le | Lower equal |
gt | Greater than |
ge | Greater equal |
like | Matching pattern |
in | Match 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 guestFullNameguest_id, full_name and family. Thus, the following example will filter CentOS operating systems:
Code Block |
---|
http GET "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullNamefull_name,like,CentOS%&expand=1" "Authorization: Bearer $TK" curl -X GET -H "Authorization: Bearer $TK" "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullNamefull_name,like,CentOS%&expand=1" |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "data": [ { "family": "linuxGuest", "guestFullNamefull_name": "CentOS 4/5 (64-bit)", "guestId"guest_id": "centosGuestcentos64Guest", "id": 8 24 }, { "family": "linuxGuest", "guestFullNamefull_name": "CentOS 4/56 (64-bit)", "guest_id": "centos6_64Guest", "guestIdid": "centos64Guest",70 }, { "idfamily": 11"linuxGuest", "full_name": "CentOS 6", } ]"guest_id": "centos6Guest", "metaid": {26 }, { "_linkfamily": { "linuxGuest", "self"full_name": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,CentOS%&expand=1" CentOS 7 (64-bit)", "guest_id": "centos7_64Guest", "id": 15 }, { "countfamily": 2null, "filterfull_name": "guestFullName,like,CentOS%CentOS 7", "guest_id": "centos7Guest", "pagesid": {78 }, { "first_urlfamily": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName%2Clike%2CCentOS%25&per_page=10&page=1&expand=1linuxGuest", "full_name": "CentOS 8 (64-bit)", "lastguest_urlid": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName%2Clike%2CCentOS%25&per_page=10&page=1&expand=1centos8_64Guest", "next_url"id": null,95 }, { "pagefamily": 1"linuxGuest", "full_name": "CentOS 4/5", "pagesguest_id": 1, "centosGuest", "per_pageid": 10,2 } ], "prev_urlmeta": null,{ "total"_link": 2{ }, "timeself": "0.00178s"https://vss-api.eis.utoronto.ca/v2/os?filter=full_name,like,CentOS%&expand=1" }, "count": 2, "userfilter": "josem"full_name,like,CentOS%", } } |
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 "pages": { "first_url": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,Windows%&expandfull_name%2Clike%2CCentOS%25&per_page=10&page=1&sortexpand=guestId,asc" "Authorization: Bearer $TK" curl -X GET -H "Authorization: Bearer $TK"1", "last_url": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullName,like,Windows%&expandfull_name%2Clike%2CCentOS%25&per_page=10&page=1&sortexpand=guestId,asc" | ||||||
Code Block | ||||||
| ||||||
{ "data": [ { "guestFullName": "Windows 7 (64 bit)", "guestId": "windows7_64Guest", 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 guest_id , filter by full_name and expand results :
Code Block |
---|
http GET "https://vss-api.eis.utoronto.ca/v2/os?filter=full_name,like,Windows%&expand=1&sort=guest_id,asc" "Authorization: Bearer $TK"
curl -X GET -H "Authorization: Bearer $TK" "https://vss-api.eis.utoronto.ca/v2/os?filter=full_name,like,Windows%&expand=1&sort=guest_id,asc" |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "data": [ { "family": "windowsGuest", "full_name": "Microsoft Windows 7 (64 bit)", "guest_id": "windows7_64Guest", "id": 34 }, { "family": "windowsGuest", "full_name": "Microsoft Windows 7", "guest_id": "windows7Guest", "id": 17 }, { "family": "windowsGuest", "full_name": "Microsoft Windows Server 2008 R2 (64 bit)", "guest_id": "windows7Server64Guest", "id": 8 }, { "family": "windowsGuest", "full_name": "Microsoft Windows 8 (64 bit)", "guest_id": "windows8_64Guest", "id": 44 }, { "family": "windowsGuest", "full_name": "Microsoft Windows 8 and Windows Server 2012", "guest_id": "windows8Guest", "id": 60 }, { "family": "windowsGuest", "full_name": "Microsoft Windows 8 Server (64 bit) and Windows Server 2012 (64 bit)", "guest_id": "windows8Server64Guest", "id": 1 32 }, { }"family": "windowsGuest", "full_name": "Microsoft Windows 10 {(64 bit) and Microsoft Windows Server 2016 (64-bit)", "guestFullNameguest_id": "Windows 7windows9_64Guest", "id": 42 }, { "guestIdfamily": "windows7GuestwindowsGuest", "full_name": "Microsoft Windows 10", "guest_id": 50"windows9Guest", "id": 63 }, { "family": "windowsGuest", "guestFullNamefull_name": "Microsoft Windows Server 20082016 R2 (64 -bit)", "guestId"guest_id": "windows7Server64Guest", windows9Server64Guest", "id": 26 54 }, { "family": "windowsGuest", "guestFullNamefull_name": "Microsoft Windows 8Server 2008 (64 -bit)", "guestId"guest_id": "windows8_64GuestwinLonghorn64Guest", "id": 1314 }, { }, "family": "windowsGuest", { "full_name": "Microsoft Windows Server 2008 (32-bit)", "guestFullNameguest_id": "Windows 8, Windows Server 2012, Windows Server 2016", winLonghornGuest", "id": 84 }, { "guestIdfamily": "windows8GuestwindowsGuest", "full_name": "Microsoft Windows Small Business Server 2003", "guest_id": 66"winNetBusinessGuest", "id": 80 }, { "family": "windowsGuest", "guestFullNamefull_name": "Microsoft Windows 8 Server (64 bit) and Windows Server 2012 2003, Datacenter Edition (64 bit)", "guestId": "windows8Server64Guest", "guest_id": "winNetDatacenter64Guest", "id": 2723 }, { }"family": "windowsGuest", "full_name": "Microsoft Windows Server {2003 Datacenter Edition", "guest_id": "winNetDatacenterGuest", "guestFullNameid": "Windows66 9 (64 bit)"}, { "family": "windowsGuest", "guestIdfull_name": "windows9_64Guest",Microsoft Windows Server 2003, Enterprise Edition (64 bit)", "guest_id": 24"winNetEnterprise64Guest", "id": 77 }, { "family": "windowsGuest", "guestFullNamefull_name": "Microsoft Windows 9 ", Server 2003, Enterprise Edition", "guestIdguest_id": "windows9GuestwinNetEnterpriseGuest", "id": 686 }, { }, "family": "windowsGuest", { "full_name": "Microsoft Windows Server 2003 Standard Edition (64 bit)", "guestFullNameguest_id": "WindowswinNetStandard64Guest", 9 Server (64 bit)"id",: 1 }, { "guestIdfamily": "windows9Server64GuestwindowsGuest", "full_name": "Microsoft Windows Server 2003, Standard Edition", "guest_id": 47"winNetStandardGuest", "id": 40 }, { "guestFullName"family": "Windows Small Business Server 2003", windowsGuest", "guestIdfull_name": "winNetBusinessGuest",Microsoft Windows Server 2003, Web Edition", "guest_id": 53"winNetWebGuest", "id": 56 } ], "meta": { "_link": { "self": "https://vss-api.eis.utoronto.ca/v2/os?filter=guestFullNamefull_name,like,Windows%&expand=1&sort=guestIdguest_id,asc" }, "count": 10, "filter": "guestFullNamefull_name,like,Windows%", "pages": { "first_url": "https://vss-api.eis.utoronto.ca/v2/os?sort=guestId%2Cascguest_id%2Casc&filter=guestFullName%2Clike%2CWindows%25full_name%2Clike%2CWindows%25&page=1&expand=1&per_page=10", "last_url": "https://vss-api.eis.utoronto.ca/v2/os?sort=guestId%2Cascguest_id%2Casc&filter=guestFullName%2Clike%2CWindows%25full_name%2Clike%2CWindows%25&page=2&expand=1&per_page=10", "next_url": "https://vss-api.eis.utoronto.ca/v2/os?sort=guestId%2Cascguest_id%2Casc&filter=guestFullName%2Clike%2CWindows%25full_name%2Clike%2CWindows%25&page=2&expand=1&per_page=10", "page": 1, "pages": 2, "per_page": 10, "prev_url": null, "total": 17 }, "sort": "guestIdguest_id,asc", "time": "0.00485s", "user": "josem" } } |