{"openapi":"3.1.0","info":{"title":"HTX Cloud Portal API","version":"1.1.0","description":"Create and manage HTX Cloud services with an API token. Create a token at Account → API tokens and send it as `Authorization: Bearer <token>`.\n\n**Scopes** — a token is created with one of: `full` (read+write everything), `read` (read-only), or a single product (`databases`, `functions`, `proxies`). Out-of-scope calls return `403`.\n\n**Rate limit** — requests are limited per token (default 120/min). Exceeding it returns `429` with a `Retry-After` header."},"servers":[{"url":"https://portal.vinacis.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API token (htx_…). Scope (full / read / per-product) is fixed at creation."}},"schemas":{"Database":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"engine":{"type":"string","examples":["postgresql","mysql","mongodb","clickhouse"]},"sku":{"type":"string"},"status":{"type":"string"},"cluster_target":{"type":"string"}}},"CreateDatabase":{"type":"object","required":["name","engine","sku"],"properties":{"name":{"type":"string"},"engine":{"type":"string","enum":["postgresql","mysql","mongodb","clickhouse"]},"sku":{"type":"string","description":"e.g. db-s-1vcpu-2gb, ch-s-1vcpu-2gb"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/api/portal/databases":{"get":{"summary":"List databases","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Database"}}}}},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create a database","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatabase"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Database"}}}},"401":{"description":"Unauthorized"},"402":{"description":"Plan quota reached"},"403":{"description":"Token scope does not permit writes / this product"},"429":{"description":"Rate limit exceeded (see Retry-After)"}}}},"/api/portal/databases/{name}":{"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a database","responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}},"delete":{"summary":"Delete a database","responses":{"200":{"description":"Deleted"},"404":{"description":"Not found"}}}},"/api/portal/databases/{name}/backups":{"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List backups / snapshots","responses":{"200":{"description":"OK"}}},"post":{"summary":"Trigger an on-demand backup","responses":{"201":{"description":"Started"}}}},"/api/portal/functions":{"get":{"summary":"List serverless functions","responses":{"200":{"description":"OK"}}}},"/api/portal/proxies":{"get":{"summary":"List SOCKS5 proxies","responses":{"200":{"description":"OK"}}}}}}