Introduction
A fault domain consists of one or more ESXI hosts and Datastore Clusters grouped together according to their physical location in the datacenter.
The following table shows a brief description and HTTP methods allowed to interact with Fault Domains.
On this page:
Resource | URI | Description | GET | POST | PUT | PATCH |
---|---|---|---|---|---|---|
Fault Domain | /domain | Fault Domain resource. List fault domains and their attributes |
OPTIONS HTTP method
Remember, you can also show what methods are allowed and method description, parameters, etc. by making an OPTIONS HTTP request to /v2/domain.
http OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/domain" curl -X OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/domain"
List
In order to list allowed Fault Domains you should make a GET request to the endpoint /v2/domain passing your access token. As a result, you will get a reference URI /v2/domain/<moref> to get detailed information about that domain, human readable name and Managed Object Reference (moref).
Name | Type | Description |
---|---|---|
Name | string | Fault Domain Human readable name |
moref | string | vCenter Managed Object Reference (moref) |
_links | array | List of URIs related to the resource. |
The following examples implements HTTPie and CURL to list available fault domains:
http GET "https://vss-api.eis.utoronto.ca:8001/v2/domain" "Authorization: Bearer $TK" curl -H "Authorization: Bearer $TK" -u $TK -X GET "https://vss-api.eis.utoronto.ca:8001/v2/dmoain"
Filters
This resource has two main filters to narrow down the number of Fault Domains shown in the result.
Name | Description |
---|---|
Name | Fault Domain human readable name |
moref | vCenter Managed Object Reference (moref) |
The following examples show how to structure a GET request, with filters:
http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain?name=FD2" http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/domain?moref=4402"
List specific Fault Domain Info
Some of the attributes will have an object value. Such is the case of items in attribute vms.
Name | Type | Description |
---|---|---|
name | string | Fault Domain name. |
moref | string | vCenter Managed object reference. |
status | string | Fault Domain general "health" value:
|
vms | array | Array of Virtual Machines hosted in given fault domain. |
The following example, requests information about a particular Fault domain using the base resource /v2/domain and appending the moref to get the URI /v2/domain/domain-c5877:
http GET https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877?summary=1 "Authorization: Bearer $TK" curl -H "Authorization: Bearer $TK" -u $TK -X GET https://vss-api.eis.utoronto.ca:8001/v2/domain/domain-c5877?summary=1
HTTP response body would look something like:
Attribute VMs contain Hypermedia Control to each VM you have access to in that particular Fault Domain.