/v2/projects/{project_id}/snapshots¶
Contents
POST /v2/projects/{project_id}/snapshots¶
Create snapshot of a project
Parameters¶
- project_id: Project UUID
Response status codes¶
- 201: Snasphot created
- 404: The project doesn’t exist
Output¶
Name | Mandatory | Type | Description |
---|---|---|---|
created_at | ✔ | integer | Date of the snapshot (UTC timestamp) |
name | ✔ | string | Project name |
project_id | ✔ | string | Project UUID |
snapshot_id | ✔ | string | Snapshot UUID |
Sample session¶
curl -i -X POST 'http://localhost:3080/v2/projects/f7b4e81b-00cf-4e92-a783-f7a9ad71d225/snapshots' -d '{"name": "snap1"}'
POST /v2/projects/f7b4e81b-00cf-4e92-a783-f7a9ad71d225/snapshots HTTP/1.1
{
"name": "snap1"
}
HTTP/1.1 201
Connection: close
Content-Length: 170
Content-Type: application/json
Date: Thu, 29 Jun 2017 15:08:09 GMT
Server: Python/3.6 GNS3/2.1.0dev1
X-Route: /v2/projects/{project_id}/snapshots
{
"created_at": 1498748890,
"name": "snap1",
"project_id": "f7b4e81b-00cf-4e92-a783-f7a9ad71d225",
"snapshot_id": "f87df065-9340-4421-b67d-f1ecd81258b4"
}
GET /v2/projects/{project_id}/snapshots¶
List snapshots of a project
Parameters¶
- project_id: Project UUID
Response status codes¶
- 200: Snasphot list returned
- 404: The project doesn’t exist
Sample session¶
curl -i -X GET 'http://localhost:3080/v2/projects/62b2833a-6632-4387-8f20-ccb4096ed52d/snapshots'
GET /v2/projects/62b2833a-6632-4387-8f20-ccb4096ed52d/snapshots HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 197
Content-Type: application/json
Date: Thu, 29 Jun 2017 15:08:08 GMT
Server: Python/3.6 GNS3/2.1.0dev1
X-Route: /v2/projects/{project_id}/snapshots
[
{
"created_at": 1498748888,
"name": "test",
"project_id": "62b2833a-6632-4387-8f20-ccb4096ed52d",
"snapshot_id": "6b0d6759-5a9f-4499-be1a-6167db42afce"
}
]