API DocumentationVirtual Private Cloud (VPC)
List All VPC Resources
lists resources associated with given VPC
Authorization
bearer_auth AuthorizationBearer <token>
Authentication
Create an API token on Profile, or with osctl auth login. Send it in the Authorization header:
Authorization: Bearer os1_...Do not use the Keycloak web-session JWT as an API token. Keep the secret secure and do not share it.
In: header
Query Parameters
resource_type?string
Resource type, one of :
vm(virtual machine)db(database)lb(load balancer)
Value in
- "vm"
- "db"
- "lb"
summary?boolean
If set to true, the response will include a summary of number of resources per type.
Default
falseResponse Body
application/json
application/json
text/pain
application/json
application/json
curl -X GET "https://example.com/v1/vpcs/{vpc_id}/resources"[ { "resource_type": "vm", "resource_id": "cc3ccab2-0ae2-11ef-9136-6a0922f6458b", "mac": "02:00:00:00:00:01", "private_ip": "10.0.2.2", "vpc_subnet": "10.0.2.0/24", "vpc_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "region": "alg1", "public_ip": "10.99.88.77", "public_ip_ports": [ { "description": "SSH port for VM 35 (internal port 22)", "port": 9000, "internal_port": 22 }, { "description": "HTTP port for VM 35 (internal port 80)", "port": 9001, "internal_port": 80 }, { "description": "HTTPS port for VM 35 (internal port 443)", "port": 9002, "internal_port": 443 } ] }]{ "errors": [ { "message": "'vcpus' field must be an integer", "field": "resource_id" } ]}"Access denied"{ "errors": [ { "message": "User not initialized. Send POST /v1/init, then retry the request." } ]}{ "errors": [ { "message": "VM with ID 23 not found" } ]}