Référence#
Cette page est générée depuis api/agent.yaml, à la racine du dépôt. C’est la source unique
du contrat : en cas d’écart avec le reste de la documentation, c’est elle qui fait foi.
- GET /vpcs#
List all VPCs
Example request:
GET /vpcs HTTP/1.1 Host: example.com
- Codes de statut:
200 OK –
List of VPCs
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "name": "string", "state": "creating", "cidr": "string" } ]
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- POST /vpcs#
Create a VPC
Example request:
POST /vpcs HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "cidr": "string" }
- Codes de statut:
VPC creation accepted
Example response:
HTTP/1.1 202 Accepted Content-Type: application/json { "name": "string", "state": "creating", "cidr": "string" }
Missing required field or invalid request body
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error": "string" }
VPC already exists
Example response:
HTTP/1.1 409 Conflict Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- GET /vpcs/{name}#
Get VPC status and info
- Paramètres:
name (string) – Resource name
Example request:
GET /vpcs/{name} HTTP/1.1 Host: example.com
- Codes de statut:
200 OK –
VPC found
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "name": "string", "state": "creating", "cidr": "string" }
Resource not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- DELETE /vpcs/{name}#
Delete a VPC
- Paramètres:
name (string) – Resource name
- Codes de statut:
VPC deletion accepted
Example response:
HTTP/1.1 202 Accepted Content-Type: application/json { "name": "string", "state": "creating", "cidr": "string" }
Resource not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json { "error": "string" }
VPC not deletable — only running or error states can be deleted, and all its subnets must be deleted first
Example response:
HTTP/1.1 409 Conflict Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- GET /vms#
List all VMs
Example request:
GET /vms HTTP/1.1 Host: example.com
- Codes de statut:
200 OK –
List of VMs
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "name": "string", "state": "creating", "metadata_port": "string", "memory": 1, "cpus": 1, "interfaces": [ { "subnet": "string", "ip": "string", "primary": true } ], "storage": [ { "path": "string", "dev": "string" } ], "uefi": true } ]
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- POST /vms#
Start a VM
Example request:
POST /vms HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "memory": 1, "cpus": 1, "metadata": { "password": "string", "sshkey": "string", "user_data": "c3RyaW5n" }, "interfaces": [ { "subnet": "string", "ip": "string", "primary": true } ], "storage": [ { "path": "string", "dev": "string" } ], "uefi": true }
- Codes de statut:
VM start accepted
Example response:
HTTP/1.1 202 Accepted Content-Type: application/json { "name": "string", "state": "creating", "metadata_port": "string", "memory": 1, "cpus": 1, "interfaces": [ { "subnet": "string", "ip": "string", "primary": true } ], "storage": [ { "path": "string", "dev": "string" } ], "uefi": true }
Missing required field or invalid request body
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error": "string" }
VM already exists
Example response:
HTTP/1.1 409 Conflict Content-Type: application/json { "error": "string" }
Subnet not found, or not in creating/running state
Example response:
HTTP/1.1 422 Unprocessable Content Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- GET /vms/{name}#
Get VM status and info
- Paramètres:
name (string) – Resource name
Example request:
GET /vms/{name} HTTP/1.1 Host: example.com
- Codes de statut:
200 OK –
VM found
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "name": "string", "state": "creating", "metadata_port": "string", "memory": 1, "cpus": 1, "interfaces": [ { "subnet": "string", "ip": "string", "primary": true } ], "storage": [ { "path": "string", "dev": "string" } ], "uefi": true }
Resource not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- DELETE /vms/{name}#
Stop a VM
- Paramètres:
name (string) – Resource name
- Codes de statut:
VM stop accepted
Example response:
HTTP/1.1 202 Accepted Content-Type: application/json { "name": "string", "state": "creating", "metadata_port": "string", "memory": 1, "cpus": 1, "interfaces": [ { "subnet": "string", "ip": "string", "primary": true } ], "storage": [ { "path": "string", "dev": "string" } ], "uefi": true }
Resource not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json { "error": "string" }
VM not stoppable — only running or error states can be stopped
Example response:
HTTP/1.1 409 Conflict Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- GET /subnets#
List all subnets
Example request:
GET /subnets HTTP/1.1 Host: example.com
- Codes de statut:
200 OK –
List of subnets
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "name": "string", "state": "creating", "vpc": "string", "mode": "vxlan", "vxlan_id": 1, "local_iface": "string", "interface_ip": "string", "cidr": "string", "default_route": true, "gateway": "string" } ]
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- POST /subnets#
Create a subnet
Example request:
POST /subnets HTTP/1.1 Host: example.com Content-Type: application/json { "name": "string", "vpc": "string", "mode": "vxlan", "vxlan_id": 1, "iface_type": "string", "interface_ip": "string", "cidr": "string", "default_route": true, "gateway": "string" }
- Codes de statut:
Subnet creation accepted
Example response:
HTTP/1.1 202 Accepted Content-Type: application/json { "name": "string", "state": "creating", "vpc": "string", "mode": "vxlan", "vxlan_id": 1, "local_iface": "string", "interface_ip": "string", "cidr": "string", "default_route": true, "gateway": "string" }
Missing required field or unknown iface_type
Example response:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error": "string" }
Subnet already exists
Example response:
HTTP/1.1 409 Conflict Content-Type: application/json { "error": "string" }
Parent VPC does not exist or is not ready
Example response:
HTTP/1.1 422 Unprocessable Content Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- GET /subnets/{name}#
Get subnet status and info
- Paramètres:
name (string) – Resource name
Example request:
GET /subnets/{name} HTTP/1.1 Host: example.com
- Codes de statut:
200 OK –
Subnet found
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "name": "string", "state": "creating", "vpc": "string", "mode": "vxlan", "vxlan_id": 1, "local_iface": "string", "interface_ip": "string", "cidr": "string", "default_route": true, "gateway": "string" }
Resource not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }
- DELETE /subnets/{name}#
Delete a subnet
- Paramètres:
name (string) – Resource name
- Codes de statut:
Subnet deletion accepted
Example response:
HTTP/1.1 202 Accepted Content-Type: application/json { "name": "string", "state": "creating", "vpc": "string", "mode": "vxlan", "vxlan_id": 1, "local_iface": "string", "interface_ip": "string", "cidr": "string", "default_route": true, "gateway": "string" }
Resource not found
Example response:
HTTP/1.1 404 Not Found Content-Type: application/json { "error": "string" }
Subnet not deletable — only running or error states can be deleted
Example response:
HTTP/1.1 409 Conflict Content-Type: application/json { "error": "string" }
Internal server error
Example response:
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "string" }