appliance networking proxy: test
Tests a proxy configuration by testing the connection to the proxy server and test host. This operation was added in vSphere API 6.7
Request:
HTTP request
POST https://{server}/rest/appliance/networking/proxy/{protocol}?action=test
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
protocol | string | Protocol whose proxy is to be tested. |
Request Body Structure:
{
"config": {
"enabled": true,
"password": "secret string",
"port": 1,
"server": "string",
"username": "string"
},
"host": "string"
}
"config": {
"enabled": true,
"password": "secret string",
"port": 1,
"server": "string",
"username": "string"
},
"host": "string"
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
host | string | A hostname, IPv4 or Ipv6 address. |
config | config | Proxy configuration to test. |
config.server | string | Hostname or IP address of the proxy server. This attribute was added in vSphere API 6.7 |
config.port | long | Port to connect to the proxy server. In a 'get' call, indicates the port connected to the proxy server. In a 'set' call, specifies the port to connect to the proxy server. A value of -1 indicates the default port. This attribute was added in vSphere API 6.7 |
config.username | string | Username for proxy server. This attribute was added in vSphere API 6.7 Optional. Only set if proxy requires username. |
config.password | secret | Password for proxy server. This attribute was added in vSphere API 6.7 Optional. Only set if proxy requires password. |
config.enabled | boolean | In the result of the #get and #list operations this field indicates whether proxying is enabled for a particular protocol. In the input to the test and set operations this field specifies whether proxying should be enabled for a particular protocol. This attribute was added in vSphere API 6.7 |
Response:
HTTP Status Code: 200
Representation:
{
"value": {
"message": {
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
"status": "SERVER_REACHABLE"
}
}
"value": {
"message": {
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
"status": "SERVER_REACHABLE"
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | test_result | Status of proxy settings. |
value.status | string | Status of the proxy server indicating whether the proxy server is reachable. This attribute was added in vSphere API 6.7 Defines the status of the server associated with the test run. This enumeration was added in vSphere API 6.7 Value is one of: SERVER_REACHABLE: Server is reachable. This constant was added in vSphere API 6.7 SERVER_UNREACHABLE: Server is unreachable. This constant was added in vSphere API 6.7 |
value.message | localizable_message | Message associated with status. This attribute was added in vSphere API 6.7 |
value.message.id | string | Unique identifier of the localizable string or message template. This identifier is typically used to retrieve a locale-specific string or message template from a message catalog. |
value.message.default_message | string | The value of this localizable string or message template in the en_US (English) locale. If vapi.std.localizable_message.id refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog. |
value.message.args | string[] | Arguments to be substituted into a message template. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | Generic error. |