/project/{uuid} — GNS3 1.3.dev1 documentation

### Navigation

- index
- next |
- previous |
- GNS3 1.3.dev1 documentation »

# /project/{uuid}

Contents

- /project/{uuid}
  - GET /project/{uuid}
    - Parameters
    - Response status codes
    - Output
    - Sample session
  - PUT /project/{uuid}
    - Parameters
    - Response status codes
    - Input
    - Output
    - Sample session
  - DELETE /project/{uuid}
    - Parameters
    - Response status codes
    - Sample session

## GET /project/{uuid}

Get project information

### Parameters

- uuid: Project instance UUID

### Response status codes

- 200: OK
- 404: Project instance doesn’t exist

### Output

Name | Mandatory | Type | Description
--- | --- | --- | ---
location | ✔ | string | Base directory where the project should be created on remote server
temporary | ✔ | boolean | If project is a temporary project
uuid | ✔ | string | Project UUID

### Sample session

    curl -i -X GET 'http://localhost:8000/project/{uuid}'

    GET /project/{uuid} HTTP/1.1

    HTTP/1.1 200
    CONNECTION: keep-alive
    CONTENT-LENGTH: 102
    CONTENT-TYPE: application/json
    DATE: Thu, 08 Jan 2015 16:09:15 GMT
    SERVER: Python/3.4 GNS3/1.3.dev1
    X-ROUTE: /project/{uuid}

    {
        "location": "/tmp",
        "temporary": false,
        "uuid": "00010203-0405-0607-0809-0a0b0c0d0e0f"
    }

## PUT /project/{uuid}

Update a project

### Parameters

- uuid: Project instance UUID

### Response status codes

- 200: Project updated
- 404: Project instance doesn’t exist

### Input

Name | Mandatory | Type | Description
--- | --- | --- | ---
temporary |  | boolean | If project is a temporary project

### Output

Name | Mandatory | Type | Description
--- | --- | --- | ---
location | ✔ | string | Base directory where the project should be created on remote server
temporary | ✔ | boolean | If project is a temporary project
uuid | ✔ | string | Project UUID

### Sample session

    curl -i -X PUT 'http://localhost:8000/project/{uuid}' -d '{"temporary": false}'

    PUT /project/{uuid} HTTP/1.1
    {
        "temporary": false
    }

    HTTP/1.1 200
    CONNECTION: keep-alive
    CONTENT-LENGTH: 158
    CONTENT-TYPE: application/json
    DATE: Thu, 08 Jan 2015 16:09:15 GMT
    SERVER: Python/3.4 GNS3/1.3.dev1
    X-ROUTE: /project/{uuid}

    {
        "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmphb8dmyls",
        "temporary": false,
        "uuid": "1aa054dd-e672-4961-90c3-fef730fc6301"
    }

## DELETE /project/{uuid}

Delete a project from disk

### Parameters

- uuid: Project instance UUID

### Response status codes

- 404: Project instance doesn’t exist
- 204: Changes write on disk

### Sample session

    curl -i -X DELETE 'http://localhost:8000/project/{uuid}'

    DELETE /project/{uuid} HTTP/1.1

    HTTP/1.1 204
    CONNECTION: keep-alive
    CONTENT-LENGTH: 0
    DATE: Thu, 08 Jan 2015 16:09:15 GMT
    SERVER: Python/3.4 GNS3/1.3.dev1
    X-ROUTE: /project/{uuid}

### Navigation

- index
- next |
- previous |
- GNS3 1.3.dev1 documentation »