setup
First-run Setup
Unauthenticated first-run bootstrap of a self-hosted install: whether this deployment still needs setup, and the one call that creates its institute and owner account. Both answer 404 on the cloud platform and once an institute exists.
2 نقاط النهاية
POST /api/v1/setup/bootstrap
Create this self-hosted install's institute and its owner account, and sign the owner in. 404 in cloud mode or once an institute exists.
محتوى الطلب
| الاسم | النوع | القيود |
|---|---|---|
setupTokenمطلوب | string | ≥1 chars |
instituteمطلوب | object | — |
ownerمطلوب | object | — |
مثال
{
"setupToken": "string",
"institute": {
"slug": "string",
"name": "Algebra I",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD"
},
"owner": {
"email": "ada.lovelace@example.com",
"password": "string",
"firstName": "Ada",
"lastName": "Lovelace"
}
}مثال بأمر curl
curl -X POST "https://your-institute.example/api/v1/setup/bootstrap" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"setupToken": "string",
"institute": {
"slug": "string",
"name": "Algebra I",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD"
},
"owner": {
"email": "ada.lovelace@example.com",
"password": "string",
"firstName": "Ada",
"lastName": "Lovelace"
}
}'الاستجابات
{
"mfaRequired": true,
"mfaEnrollmentRequired": true,
"mfaToken": "string"
}تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
GET /api/v1/setup/status
Whether this deployment still needs first-run setup. Public: the login page reads it before any session exists.
مثال بأمر curl
curl -X GET "https://your-institute.example/api/v1/setup/status" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"الاستجابات
| الاسم | النوع | القيود |
|---|---|---|
deploymentModeمطلوب | enum: "cloud" | "self_hosted" | — |
needsSetupمطلوب | boolean | — |
{
"deploymentMode": "cloud",
"needsSetup": true
}تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.