واجهة REST
تحكّم في كل إجراء عبر HTTP بمفتاح واجهة برمجة bearer.
كل إجراء في لوحة التحكّم هو أيضًا نقطة نهاية REST تحت https://gheima.ma/api/v1. صادِق بجزء bearer؛ المفاتيح محدودة بـ 120 طلبًا في الدقيقة (انظر ترويسات الاستجابة X-RateLimit-*). المواصفة الكاملة على /api/v1/openapi.json.
Shell
# List services (cursor-paginated: ?limit=&cursor=&type=WEB|WORKER|STATIC)
curl "https://gheima.ma/api/v1/services?limit=20" \
-H "Authorization: Bearer gh_xxxxx"
# Create a service
curl -X POST https://gheima.ma/api/v1/services \
-H "Authorization: Bearer gh_xxxxx" -H "content-type: application/json" \
-d '{"projectId":"prj_1","name":"web","repoUrl":"https://github.com/me/app"}'
# Trigger a deployment -> 202 { deploymentId }
curl -X POST https://gheima.ma/api/v1/services/<id>/deploy \
-H "Authorization: Bearer gh_xxxxx"نقاط نهاية القوائم مقسّمة بالمؤشّر: مرّر ?limit= (1–100) و?cursor=، واقرأ المؤشّر التالي من pagination.nextCursor في الاستجابة.
✦ أي لغة تستطيع إرسال طلب HTTP يمكنها التحكّم في غيمة.