Other endpoints

Health, providers, regions, instance types. GET examples with query params.

Health check

Request
curl -s http://localhost:8000/health
Response
{
  "status": "ok",
  "checks": {
    "database": {"status": "ok"}
  }
}

Providers

Request
curl -s "http://localhost:8000/api/providers?limit=5"
Response
{
  "items": [
    {"id": 1, "name": "AWS", "slug": "aws",
     "website": "https://aws.amazon.com", "type": "regional"},
    {"id": 2, "name": "GCP", "slug": "gcp",
     "website": "https://cloud.google.com", "type": "regional"}
  ],
  "total": 17,
  "limit": 5,
  "offset": 0
}

Regions (by provider)

Request
curl -s "http://localhost:8000/api/regions?provider=aws"
Response
{
  "items": [
    {"id": 1, "provider_id": 1, "name": "EU (Ireland)",
     "slug": "eu-west-1", "country": "IE", "is_eu": true},
    {"id": 2, "provider_id": 1, "name": "US East (N. Virginia)",
     "slug": "us-east-1", "country": "US", "is_eu": false}
  ],
  "total": 32,
  "limit": 20,
  "offset": 0
}

Instance types

Request
curl -s "http://localhost:8000/api/instance-types?\
  min_vcpu=2&min_ram_gb=4&arch=x86_64&limit=10"
Response
{
  "items": [
    {"id": 1, "provider_id": 3, "name": "cx23",
     "family": "cx", "vcpu": 2, "ram_gb": 4.0, "arch": "x86_64"},
    {"id": 2, "provider_id": 1, "name": "t3.medium",
     "family": "t3", "vcpu": 2, "ram_gb": 4.0, "arch": "x86_64"}
  ],
  "total": 156,
  "limit": 10,
  "offset": 0
}

← All examples