REST API - test

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:

{
    "host""string",
    "config"{
        "server""string",
        "password""secret string",
        "port"1,
        "enabled"true,
        "username""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 URL 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",
            "localized""string",
            "id""string",
            "params"[
                {
                    "value"{
                        "dt""2015-01-01T22:13:05.651Z",
                        "s""string",
                        "d"1.5,
                        "precision"1,
                        "format""SHORT_DATE",
                        "i"1,
                        "l"{
                            "id""string",
                            "params"[
                                {
                                    "value"{
                                        "dt""2015-01-01T22:13:05.651Z",
                                        "s""string",
                                        "d"1.5,
                                        "precision"1,
                                        "format""SHORT_DATE",
                                        "i"1,
                                        "l"{
                                            "id""string",
                                            "params"[
                                                {
                                                    "key""string"
                                                }
                                            ]
                                        }
                                    },
                                    "key""string"
                                }
                            ]
                        }
                    },
                    "key""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[] Positional arguments to be substituted into the message template. This list will be empty if the message uses named arguments or has no arguments.

value.message.params list Named arguments to be substituted into the message template. This attribute was added in vSphere API 7.0.0.0.

Optional. Unset means that the message template requires no arguments or positional arguments are used.

value.message.localized string Localized string value as per request requirements. This attribute was added in vSphere API 7.0.0.0.

Optional. when the client has not requested specific locale the implementation may not populate this field to conserve resources.

Errors:

HTTP Status Code Type Description
500 error Generic error.