واجهة AYMS البرمجية (API)
تستطيع المؤسسات ربط مواقعها وأنظمتها بـAYMS: قراءة مكتبتي التمارين والتثقيف الصحي متعددتي اللغات والدورات، ونشر الوظائف.
لا تعيد أي نقطة نهاية بيانات مرضى، ولا يمكن منح أي مفتاح صلاحية عليها.
احصل على مفتاح
- يفتح مالك أو مدير مؤسسة موثَّقة قسم الإدارة، ثم المؤسسة، ثم مفاتيح الـAPI.
- ينشئ مفتاحاً بالصلاحيات اللازمة فقط، في جلسة بالتحقق بخطوتين.
- يظهر المفتاح مرة واحدة. أرسله في ترويسة Authorization مع كل طلب.
Authorization: Bearer ayms_xxxxxxxx_<secret>الصلاحيات
| الصلاحية | تسمح بـ |
|---|---|
exercises:read | قراءة مكتبة التمارين (العناوين والتعليمات والاحتياطات بكل اللغات). |
education:read | قراءة مقالات التثقيف الصحي المنشورة. |
opportunities:read | قراءة فرص مؤسستك. |
opportunities:write | نشر فرص باسم مؤسستك (تُفحص بحثاً عن بيانات المرضى كمنشورات التطبيق). |
courses:read | قراءة الدورات المنشورة. |
نقاط النهاية
GET /api/v1/exercisesExercise library. Scope: exercises:read. Multilingual titles and instructions.GET /api/v1/educationPatient education articles. Scope: education:read.GET /api/v1/coursesPublished courses. Scope: courses:read.GET /api/v1/opportunitiesYour organization's opportunities. Scope: opportunities:read.POST /api/v1/opportunitiesPost an opportunity for your organization. Scope: opportunities:write. The organization must be verified; text is checked for patient data.
الوصف القابل للقراءة آلياً (OpenAPI 3.1): /api/v1/openapi.json
أمثلة
curl -H "Authorization: Bearer ayms_xxxxxxxx_<secret>" \
"https://ayms.webmister.ai/api/v1/exercises?region=knee"curl -X POST -H "Authorization: Bearer ayms_xxxxxxxx_<secret>" \
-H "Content-Type: application/json" \
-d '{"kind":"job","title":"Physiotherapist","description":"Full-time role in our outpatient clinic."}' \
"https://ayms.webmister.ai/api/v1/opportunities"الحدود والأخطاء
- 120 طلباً في الدقيقة لكل مفتاح؛ وبعدها تردّ الواجهة بالرمز 429.
- الأخطاء بصيغة JSON مع رمز ثابت: unauthorized (401)، وforbidden أو organization_not_verified (403)، وinvalid_body أو phi_detected (422)، وrate_limited (429)، وunavailable (503).
- إلغاء المفتاح من قسم الإدارة يوقفه فوراً.
{ "error": { "code": "rate_limited", "message": "More than 120 requests per minute." } }