Create a snapshot

This command creates a snapshot by specifying the components for the snapshot, rather than taking a snapshot of an environment.

Request

PUT https://{hostname}:{port}
  /cli/snapshot/createSnapshot
This command takes a JSON request string or file. Use the following template for the request:
{
  "application": "Application name or ID",
  "description": "Description",
  "name": "Snapshot name",
  "versions": "JSON array of mappings from components to 
  versions, such as [{\"JPetStore-APP\": \"latest\"}, {\"
  JPetStore-DB\": \"1.0\"}]"
}

Example JSON request

{
  "name": "My snapshot",
  "application": "JPetStore",
  "description": "JPetStore snapshot",
  "versions": [{"JPetStore-APP": "latest"}, {"JPetStore-DB": "1.0"}, {"JPetStore-WEB": "1.1"}]
}

Example response

{
  "id": "ff9274d4-bc3d-493c-90aa-5020e2fda56d",
  "name": "My snapshot",
  "description": "JPetStore snapshot",
  "created": 1391451659050,
  "active": true,
  "locked": false
}

Related CLI command: createSnapshot.


Feedback