Snapservice. Clusters. Virtual Machines. Snapshots List

Snapservice. Clusters. Virtual Machines. Snapshots List

List the snapshots for the given virtual machine.

This operation was added in vSphere API 8.0.3.0.

Returns an authorization error if you do not have all of the privileges described as follows:

  • The resource ClusterComputeResource referenced by the parameter cluster requires System.Read.
Request
URI
GET
https://{host}/api/snapservice/clusters/{cluster}/virtual-machines/{vm}/snapshots
COPY
Path Parameters
string
cluster
Required

Identifier of the cluster.

The parameter must be an identifier for the resource type: ClusterComputeResource.

string
vm
Required

Identifier of the virtual machine.

The parameter must be an identifier for the resource type: VirtualMachine.

Query Parameters
filter
Optional

Specification of matching snapshots for which information should be returned.

If missing or null, the behavior is equivalent to a Snapservice.Clusters.VirtualMachines.Snapshots.FilterSpec with all properties missing or null which means all virtual machine snapshots match the filter.

string of array
snapshots
Optional

Identifiers of the snapshots that must match the filter.

This property was added in vSphere API 8.0.3.0.

If missing or null snapshots with any identifier match the filter.

When clients pass a value of this schema as a parameter, the property must contain identifiers for the resource type: com.vmware.snapservice.vm.snapshot. When operations return a value of this schema as a response, the property will contain identifiers for the resource type: com.vmware.snapservice.vm.snapshot.

string of array
names
Optional

Names of the snapshots that must match the filter.

This property was added in vSphere API 8.0.3.0.

If missing or null snapshots with any name match the filter.


Authentication
This operation uses the following authentication methods.
Responses
200

Information about the snapshots matching the Snapservice.Clusters.VirtualMachines.Snapshots.FilterSpec for the specified virtual machine.

Returns Snapservice.Clusters.VirtualMachines.Snapshots.ListResult of type(s) application/json
"Snapservice.Clusters.VirtualMachines.Snapshots.ListResult Object"

400

If validation of the filter fails.

Returns Vapi.Std.Errors.InvalidArgument of type(s) application/json
"Vapi.Std.Errors.InvalidArgument 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"

404

If there is no cluster associated with cluster or no or no virtual machine associated with vmin the system.

Returns Vapi.Std.Errors.NotFound of type(s) application/json
"Vapi.Std.Errors.NotFound 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 service is not available.

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

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/snapservice/clusters/{cluster}/virtual-machines/{vm}/snapshots