/v2/projects/{project_id}/snapshots

POST /v2/projects/{project_id}/snapshots

Create snapshot of a project

Parameters

  • project_id: Project UUID

Response status codes

  • 201: Snapshot created

  • 404: The project doesn’t exist

Input

Name Mandatory Type Description
name Snapshot name

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/25402c96-0aeb-4b65-9bce-4b36ed725b1b/snapshots' -d '{"name": "snap1"}'

POST /v2/projects/25402c96-0aeb-4b65-9bce-4b36ed725b1b/snapshots HTTP/1.1
{
    "name": "snap1"
}


HTTP/1.1 201
Connection: close
Content-Length: 170
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:29:18 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/projects/{project_id}/snapshots

{
    "created_at": 1578450535,
    "name": "snap1",
    "project_id": "25402c96-0aeb-4b65-9bce-4b36ed725b1b",
    "snapshot_id": "d7f7b452-0f8b-4f9d-b67e-8119fcf93898"
}

GET /v2/projects/{project_id}/snapshots

List snapshots of a project

Parameters

  • project_id: Project UUID

Response status codes

  • 200: Snapshot list returned

  • 404: The project doesn’t exist

Sample session

curl -i -X GET 'http://localhost:3080/v2/projects/39be72f3-b049-49f9-8cb4-d0c7c381f8a9/snapshots'

GET /v2/projects/39be72f3-b049-49f9-8cb4-d0c7c381f8a9/snapshots HTTP/1.1



HTTP/1.1 200
Connection: close
Content-Length: 197
Content-Type: application/json
Date: Wed, 08 Jan 2020 02:28:38 GMT
Server: Python/3.6 GNS3/2.2.4dev1
X-Route: /v2/projects/{project_id}/snapshots

[
    {
        "created_at": 1578450515,
        "name": "test",
        "project_id": "39be72f3-b049-49f9-8cb4-d0c7c381f8a9",
        "snapshot_id": "9739f956-fb70-4424-bb44-a101f52f4e59"
    }
]