This section includes the following topics:
- Input Parameters
- Output Parameters
Input Parameters
The following table provides the parameters and descriptions.
Parameter | Description |
id | Integer. Numeric host id, id of the host, either obtained when it was registered the first time, or via the Get registered hosts API call. |
sessionId | String. Containing a GUID, obtained via a call to API Hyper-V Create Host Browsing Session. |
Example
{
"id": 2,
"sessionId": "5d05495f-39e5-4e4e-ad0c-e351cc2c78f3"
}
Output Parameters
The following table provides the parameters and descriptions.
Parameter | Description |
id | String. Virtual switch id (GUID format), store this parameter and use it later during the Restore API, while using ProductionRecovery. This is not necessary for TestRecovery. |
name | String. Name of the switch, used for display purposes only. |
Error codes
ErrorCode.HostNotInCatalog - if the provided host id integer from Input section does not point to a valid Hyper-V server (the correct ids can be obtained via get list of hosts)
Sample result
{
"Id": "C08CE7B8-9B3C-408E-8E30-5E16A3AEB444",
"Name": "Switch 1"
}
Example POST
POST /v2/accounts/test_acc/computers/0000/restore/hyperv/host/switches
Input Parameters
{
"id": 1,
"sessionId": "string"
}
Output parameters
Response status: 200 Accepted (for online operation)
Response body:
{
"data": [
{
"id":"C08CE7B8-9B3C-408E-8E30 5E16A3AEB444",
"name":"Switch 1"
}
]
}
Output Parameters
Response status: 200 Accepted (for online operation)
Example Response
{
"data": [
{
"id":"C08CE7B8-9B3C-408E-8E30 5E16A3AEB444",
"name":"Switch 1"
}
]
}