/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/ca0187d8-c183-49b1-a714-b7160264172b/snapshots' -d '{"name": "snap1"}'
POST /v2/projects/ca0187d8-c183-49b1-a714-b7160264172b/snapshots HTTP/1.1
{
"name": "snap1"
}
HTTP/1.1 201
Connection: close
Content-Length: 170
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/snapshots
{
"created_at": 1490088724,
"name": "snap1",
"project_id": "ca0187d8-c183-49b1-a714-b7160264172b",
"snapshot_id": "b5fed8f7-3482-435c-9df0-d25b9afa9cec"
}
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/ea93460a-c843-4c89-b8ad-5cfd322292fc/snapshots'
GET /v2/projects/ea93460a-c843-4c89-b8ad-5cfd322292fc/snapshots HTTP/1.1
HTTP/1.1 200
Connection: close
Content-Length: 197
Content-Type: application/json
Date: Tue, 21 Mar 2017 09:32:04 GMT
Server: Python/3.6 GNS3/2.0.0dev11
X-Route: /v2/projects/{project_id}/snapshots
[
{
"created_at": 1490088724,
"name": "test",
"project_id": "ea93460a-c843-4c89-b8ad-5cfd322292fc",
"snapshot_id": "2f250c44-3f80-437a-bac7-b03e66e0482a"
}
]