...
Make a GET request disabling summary and looking for the name in question, in this case our target folder will be API Demo
Code Block title Request http GET "https://vss-api.eis.utoronto.ca:8001/v2/folder?name=APIDemo&summaryfilter=name,like,%APIDemo%" "Authorization: Bearer $TK" curl -H "Authorization: Bearer $TK" -X GET "https://vss-api.eis.utoronto.ca:8001/v2/folder?name=APIDemo&summaryfilter=name,like,%APIDemo%"
Code Block language py title Response Body collapse true { "_links": { "api": "https://vss-api.eis.utoronto.ca:8001/v2/", "self": "https://vss-api.eis.utoronto.ca:8001/v2/folder" }, "data": [ { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/folder/group-v6736" }, "moref": "group-v6666", "name": "APIDemo" } ], "meta": { "count": 1, "time": "0.35628s", "user": "jm" } }
- From the response body, save the managed object reference (moref) of the folder in question: group-6666. This will be the value of the parameter folder in the VM deployment request.
...
Make a GET request with the filter name equals to the operating system to use, for instance ubuntu:
Code Block http GET "https://vss-api.eis.utoronto.ca:8001/v2/os?name=ubuntufilter=guest_id,like,%ubuntu%" "Authorization: Bearer $TK" curl -H "Authorization: Bearer $TK" -X GET "https://vss-api.eis.utoronto.ca:8001/v2/os?name=ubuntufilter=guest_id,like,%ubuntu%"
Code Block language py title Response Body collapse true { "_links": { "api": "https://vss-api.eis.utoronto.ca:8001/v2/", "self": "https://vss-api.eis.utoronto.ca:8001/v2/os" }, "data": [ { "guest_id": "ubuntuGuest", "full_name": "Ubuntu Linux" }, { "guest_id": "ubuntu64Guest", "full_name": "Ubuntu Linux (64 bit)" } ], "meta": { "count": 2, "time": "0.00197s", "user": "jm" } }
- Copy the attribute id value ubuntu64Guest which will be used to populate the os parameter in the VM deployment request.
...
Make a GET request to the network resource filtering by name as follows:
Code Block http GET "https://vss-api.eis.utoronto.ca:8001/v2/network?name=1072&summaryfilter=name,like,%1072%" "Authorization: Bearer $TK" curl -H "Authorization: Bearer $TK" -X GET "https://vss-api.eis.utoronto.ca:8001/v2/network?name=1072&summaryfilter=name,like,%1072%"
Code Block language py title Response Body collapse true { "_links": { "api": "https://vss-api.eis.utoronto.ca:8001/v2/", "self": "https://vss-api.eis.utoronto.ca:8001/v2/network" }, "data": [ { "_links": { "self": "https://vss-api.eis.utoronto.ca:8001/v2/network/dvportgroup-92" }, "moref": "dvportgroup-92", "name": "VL-1072-VSGAN" } ], "meta": { "count": 1, "time": "0.50400s", "user": "jm" } }
- The managed object reference dvportgroup-92 will be used to map any existent NIC. If it does not exist, a new NIC will be created.
...