Provision Service API

Provision and manage tenant environments with automated infrastructure setup and configuration.

Endpoints

MethodEndpointDescription
POST/api/provision/tenantProvision new tenant
GET/api/provision/tenant/:idGet tenant status
POST/api/provision/tenant/:id/scaleScale tenant resources
DELETE/api/provision/tenant/:idDeprovision tenant

Provision Tenant

POST /api/provision/tenant
Content-Type: application/json

{
  "name": "acme-corp",
  "plan": "enterprise",
  "region": "us-central1",
  "config": {
    "customDomain": "api.acme.com",
    "features": ["custody", "bridge", "ai"]
  }
}

Response

{
  "data": {
    "id": "tenant_abc123",
    "name": "acme-corp",
    "status": "provisioning",
    "plan": "enterprise",
    "region": "us-central1",
    "endpoints": {
      "api": "https://api.acme.com",
      "console": "https://console.acme.com"
    },
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Get Tenant Status

GET /api/provision/tenant/tenant_abc123

Response

{
  "data": {
    "id": "tenant_abc123",
    "name": "acme-corp",
    "status": "active",
    "health": {
      "api": "healthy",
      "database": "healthy",
      "services": {
        "wallet": "healthy",
        "bridge": "healthy",
        "ai": "healthy"
      }
    },
    "usage": {
      "apiCalls": 125000,
      "storage": "2.5GB",
      "bandwidth": "15GB"
    }
  }
}

Scale Resources

POST /api/provision/tenant/tenant_abc123/scale
Content-Type: application/json

{
  "replicas": 3,
  "resources": {
    "cpu": "2",
    "memory": "4Gi"
  }
}

Tenant Status

StatusDescription
provisioningInfrastructure being created
activeFully operational
suspendedTemporarily disabled
deprovisioningBeing removed

Plans

PlanFeatures
starterBasic API access, shared resources
professionalDedicated resources, custom domain
enterpriseFull isolation, SLA, priority support