Get vCenter VS Snapshot Details

To get the details of a vCenter virtual server snapshot, use the following request:

1
2
GET /virtual_machines/:virtual_machine_id/snapshots/:id.xml
GET /virtual_machines/:virtual_machine_id/snapshots/:id.json

XML Request Example

1
curl -i -X GET -u user_email:api_key --url http://onapp.test/virtual_machines/44/snapshots/7.xml -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

1
curl -i -X GET -u user_email:api_key --url http://onapp.test/virtual_machines/44/snapshots/7.json -H 'Accept: application/json' -H 'Content-type: application/json'

XML Output Example

1
2
3
4
5
6
7
8
9
<virtual_machine_snapshot>
  <id>7</id>
  <virtual_machine_id>44</virtual_machine_id>
  <name>test</name>
  <is_built>true</is_built>
  <created_at>2022-06-01T13:42:13.394+03:00</created_at>
  <updated_at>2022-06-01T13:42:21.016+03:00</updated_at>
  <note>null</note>
</virtual_machine_snapshot>

Where:

id - the ID of the snapshot

virtual_machine_id - the ID of the virtual server for which the snapshot is created

name - the label of the snapshot

is_built - true if the snapshot is built; otherwise, false

created_at - the date when the snapshot was created in the [YYYY][MM][DD]T[hh][mm][ss] format

updated_at - the date when the snapshot was updated in the [YYYY][MM][DD]T[hh][mm][ss] format

note - the text added to the snapshot