API ya Motsamaisi
Motsamaisi API o sebetsa ka sekepe. E tlhoka nako ya modirisi kgotsa — go ka nna botoka — senotlolo sa API se se nang le sekoupu. Mong le e mong ngola e ngotsweng ho boruni log le senotlolo kapa opareitara boitsebahatso.
Dintlha tsa bokhutlo
| Mokgwa | Tsela | Sekoupu |
|---|---|---|
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
| WFP0X | WFP0X | WFP0X |
Lenaane la badirisi
GET /api/admin/users?status=active&package=business&per_page=50
Authorization: Bearer <api-key>{
"ok": true,
"data": [
{
"id": 1042,
"email": "owner@acme.example",
"package": "business",
"node": "fra-01",
"status": "active",
"usage": { "disk_gb": 12.4, "sites": 6, "databases": 9, "mailboxes": 18 },
"created_at": "2026-04-11T08:20:00Z"
}
],
"meta": { "page": 1, "per_page": 50, "total": 1 }
}Tlhama modirisi
POST /api/admin/users
Idempotency-Key: 9b2f1c4d-6a3e-4f8b-9d1c-7e5a2b6f8c30
{
"email": "new@acme.example",
"package": "business",
"node": "fra-01",
"send_invite": true
}Kopo e busetsa 201 ka selo sa akhaonto le seemo sa provisioning. Poll rekoto ya modirisi go fitlha status e nna active.
Emisa le go busetsa
POST /api/admin/users/1042/suspend
{ "reason": "overdue_invoice" }PATCH /api/admin/users/1042
{ "status": "active" }Go emisiwa go emisa diwebosaete le poso mme go boloka tshedimosetso. Lebaka le bolokwa ka fa gare mme le akareditswe mo tsenong ya boruni.
Dinoutu
GET /api/admin/nodes{
"ok": true,
"data": [
{
"id": "fra-01",
"region": "eu-central",
"state": "healthy",
"capacity": { "cpu": 8, "memory_gb": 32, "disk_gb": 500 },
"usage": { "cpu_pct": 41, "memory_pct": 58, "disk_pct": 63 },
"last_seen": "2026-12-01T09:15:12Z"
}
]
}Noutu e e mo seemong sa degraded kgotsa offline e tshwanetse go batlisisiwa pele ga go rulaganya diakhaonto tse dišwa.
Diphuthelwana
POST /api/admin/packages
{
"name": "Business",
"price_cents": 2900,
"currency": "USD",
"cycle": "monthly",
"limits": { "disk_gb": 50, "sites": 25, "databases": 50, "mailboxes": 100 },
"features": { "ssh": true, "git_deploy": true, "api": true }
}Diphetogo tsa sephuthelwana ga di kwale gape diakhaonto tse di leng teng ka go boela morago ntle le fa apply_to_existing e le true, e e tlhomang tiro ya poelano mo meleng.
Dipusetso
POST /api/admin/orders/8812/refund
{ "amount_cents": 2900, "reason": "duplicate_charge" }Dipusetso di na le maatla ka taelo le selekanyo. Mogala wa bobedi o o tshwanang o busetsa madi a ntlha go na le go ntsha o mosha.
Dinotlolo tsa API
POST /api/admin/api-keys
{
"name": "billing-sync",
"scopes": ["orders:read", "users:read"],
"expires_in_days": 90
}Sephiri se busiwa gangwe fela. E boloke mo motsamaisi wa sephiri; phanele e boloka hash fela.
Lokwalo lwa boruni
GET /api/admin/logs?action=user.suspend&from=2026-11-01&to=2026-12-01{
"ok": true,
"data": [
{
"actor": "ops@example.com",
"action": "user.suspend",
"target": "customer:1042",
"before": { "status": "active" },
"after": { "status": "suspended" },
"ip": "203.0.113.9",
"at": "2026-12-01T09:14:22Z"
}
]
}Go tshwaragana le diphoso
Motsamaisi o kwala a ka palelwa ka WFP0X, WFP1X, conflict kgotsa provisioning_failed. Go palelwa ke go tlamela go akaretsa job_id; leka gape ka senotlolo se se tshwanang sa idempotency morago ga go baakanya se se bakang.
{
"ok": false,
"error": {
"code": "scope_missing",
"message": "API key lacks users:write",
"request_id": "req_01J8Z5C1"
}
}Amana
- Tshobokanyo ya API ya ditekanyetso tsa netefatso le tsa selekanyo
- Badirisi le bareki ya kelelotiro ya khonsole
- Tshireletso le dipeakanyo tsa pholisi ya konokono