REST API - validate

vcenter vcha vc credentials: validate

Validates the credentials of the management vCenter server of the active node of a VCHA cluster. This operation was added in vSphere API 6.7.1.

Request:

HTTP request

POST https://{server}/rest/vcenter/vcha/vc-credentials?action=validate

Request Body Structure:

{
    "spec"{
        "active_location"{
            "hostname""string",
            "password""secret string",
            "port"1,
            "ssl_thumbprint""string",
            "username""string"
        }
    }
}

Request Body Parameters:

Name Type Description
bold = required
spec credentials_spec Structure with information to connect to the management vCenter server of the Active Node in the VCHA cluster.
spec.active_location connection_spec Connection information for the management vCenter Server of the Active Node in a VCHA Cluster. This attribute was added in vSphere API 6.7.1.

spec.active_location.hostname string IP Address or DNS of the vCenter. This attribute was added in vSphere API 6.7.1.

spec.active_location.port long Port number. This attribute was added in vSphere API 6.7.1.

Optional. If unset, port 443 will be used.

spec.active_location.ssl_thumbprint string SHA1 hash of the server SSL certificate. This attribute was added in vSphere API 6.7.1.

Optional. If unset, empty ssl thumbprint is assumed.

spec.active_location.username string Username to access the server. This attribute was added in vSphere API 6.7.1.

Optional. This field is currently required. If unset, an error is returned. In the future, if this field is unset, the system will attempt to identify the user. If a user cannot be identified, then the requested operation will fail.

spec.active_location.password secret Password for the specified user. This attribute was added in vSphere API 6.7.1.

Optional. This field is currently required. If unset, an empty password is assumed. In the future, if this field is unset, the system will attempt to authenticate the user. If a user cannot be identified, then the requested operation will fail.

Response:

HTTP Status Code: 200

None

Errors:

HTTP Status Code Type Description
400 invalid_argument If the credentials provided for authenticating with the active node's management vCenter server are invalid.
403 unauthorized If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.
400 unverified_peer If the SSL certificate of the management vCenter server cannot be validated.
The value of the data field of vapi.std.errors.error will be a structure that contains all the fields defined in vcenter.vcha.certificate_info.
404 not_found If the active virtual machine is not managed by the specified vCenter server for the active node.
500 error If any other error occurs.