Snapservice. Sites Add$ Task

Snapservice. Sites Add$ Task

Add the remote site. As part of this call, local and remote site will be paired. In other words, it will setup services on both local and remote sites to be able to connect to each other to perform replication in either direction.

The logged in interactive user must be a member of Administrators group on local site to execute the operation. The remote user must be a member of Administrators group on remote site too.

If vCenter and Data Protection Virtual appliance certificates returned by Probe API are not trusted yet, respective certificate has to be accepted by the user and supplied as an input to this API.

This operation was added in vSphere API 9.0.0.0.

Request
URI
POST
https://{host}/api/snapservice/sites?action=add&vmw-task=true
COPY
Request Body

Spec used to add site.

Snapservice.Sites.AddSpec of type(s) application/json
Required
"Snapservice.Sites.AddSpec Object"
Authentication
This operation uses the following authentication methods.
Responses
202

ID of the paired site.

The response will be an identifier for the resource type: com.vmware.snapservice.site.

Returns string of type(s) application/json
Operation doesn't return any data structure

400

Vapi.Std.Errors.InvalidArgument If validation of the spec fails.

Vapi.Std.Errors.NotAllowedInCurrentState when the local site is already paired to a remote site.

Vapi.Std.Errors.Unsupported If the API is not supported.

Vapi.Std.Errors.UnverifiedPeer If vCenter or virtual appliance certificate is not trusted and has not been supplied in the request.

Returns Vapi.Std.Errors.Error of type(s) application/json
"Vapi.Std.Errors.Error Object"

401

If the caller is not authenticated.

Returns Vapi.Std.Errors.Unauthenticated of type(s) application/json
"Vapi.Std.Errors.Unauthenticated Object"

403

If the caller is not authorized to perform the operation.

Returns Vapi.Std.Errors.Unauthorized of type(s) application/json
"Vapi.Std.Errors.Unauthorized Object"

500

If there is unknown internal error.

Returns Vapi.Std.Errors.Error of type(s) application/json
"Vapi.Std.Errors.Error Object"

503

if the system is unable to communicate with a service to complete the request.

Returns Vapi.Std.Errors.ServiceUnavailable of type(s) application/json
"Vapi.Std.Errors.ServiceUnavailable Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/api/snapservice/sites?action=add&vmw-task=true