وثائق API

تتيح لك واجهة FastPing REST API إدارة المراقبات وقراءة النتائج. وهي مضمّنة في إضافة وصول API. أنشئ المفاتيح من قسم مفاتيح API في لوحة التحكم.

المصادقة

أرسل مفتاحك كرمز Bearer. جميع الاستجابات بصيغة JSON. الحد: 120 طلبًا في الدقيقة لكل مفتاح.

curl -H "Authorization: Bearer fp_xxxxxxxx" https://fastping.app/api/v1/monitors

GET /api/v1/monitors

عرض جميع المراقبات مع حالتها الحالية ووقت التشغيل خلال 24 ساعة.

GET /api/v1/monitors/:id

مراقبة واحدة مع وقت التشغيل لـ 1 و7 و30 و90 يومًا، وآخر 100 فحص وآخر 20 حادثة.

POST /api/v1/monitors

إنشاء مراقبة. الحقول: type وname وurl (لأنواع الويب) أو host وport وinterval (بالثواني) وoptions.

curl -X POST https://fastping.app/api/v1/monitors \
  -H "Authorization: Bearer fp_xxxxxxxx" -H "Content-Type: application/json" \
  -d '{"type":"http","name":"Shop","url":"https://shop.example.com","interval":60}'

POST /api/v1/monitors/:id/pause · /resume

إيقاف الفحوصات مؤقتًا أو استئنافها.

DELETE /api/v1/monitors/:id

حذف مراقبة وسجلها.

أنواع المراقبة

http, keyword, api, ping, tcp, dns, ssl, domain, email, blacklist, game, heartbeat, security

تنبيهات Webhook

تتلقى قنوات Webhook طلب POST بمحتوى JSON التالي:

{
  "event": "down",            // down | up | warn | event
  "monitor": { "id": 12, "name": "Shop", "type": "http", "target": "https://shop.example.com" },
  "detail": "HTTP 503",
  "status": "down",
  "timestamp": "2026-10-17T09:30:00.000Z",
  "url": "https://fastping.app/app/monitors/12"
}

Heartbeats

تحصل مراقبات Heartbeat على رابط فريد. استدعِه باستخدام GET أو POST أو HEAD:

curl -fsS https://fastping.app/hb/<token>