/v1/projects/{project_id}/vpcs/vms — GNS3 1.3.dev1 documentation

### Navigation

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

# /v1/projects/{project_id}/vpcs/vms

Contents

- /v1/projects/{project_id}/vpcs/vms
  - POST /v1/projects/{project_id}/vpcs/vms
    - Parameters
    - Response status codes
    - Input
    - Output
    - Sample session

## POST /v1/projects/{project_id}/vpcs/vms

Create a new VPCS instance

### Parameters

- project_id: UUID for the project

### Response status codes

- 400: Invalid request
- 201: Instance created
- 409: Conflict

### Input

Name | Mandatory | Type | Description
--- | --- | --- | ---
console |  | ['integer', 'null'] | console TCP port
name | ✔ | string | VPCS VM name
startup_script |  | ['string', 'null'] | Content of the VPCS startup script
vm_id |  |  | VPCS VM identifier

### Output

Name | Mandatory | Type | Description
--- | --- | --- | ---
console | ✔ | integer | console TCP port
name | ✔ | string | VPCS VM name
project_id | ✔ | string | Project UUID
startup_script |  | ['string', 'null'] | Content of the VPCS startup script
startup_script_path | ✔ | ['string', 'null'] | Path of the VPCS startup script relative to project directory
vm_id | ✔ | string | VPCS VM UUID

### Sample session

    curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms' -d '{"name": "PC TEST 1"}'

    POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms HTTP/1.1
    {
        "name": "PC TEST 1"
    }

    HTTP/1.1 201
    CONNECTION: keep-alive
    CONTENT-LENGTH: 220
    CONTENT-TYPE: application/json
    DATE: Thu, 08 Jan 2015 16:09:15 GMT
    SERVER: Python/3.4 GNS3/1.3.dev1
    X-ROUTE: /v1/projects/{project_id}/vpcs/vms

    {
        "console": 2009,
        "name": "PC TEST 1",
        "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
        "startup_script": null,
        "startup_script_path": null,
        "vm_id": "b0d1df2e-ebd1-4783-bb62-871e24f01543"
    }

### Navigation

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