PulseAPI प्रलेखन
PulseAPI आपके API endpoints को मॉनिटर करता है और कुछ गलत होने पर अलर्ट करता है। ये डॉक्स सेटअप, REST API, और मुख्य अवधारणाएं कवर करते हैं।
मुख्य अवधारणाएं
वो URLs जिन्हें आप मॉनिटर करना चाहते हैं। हर endpoint कॉन्फ़िगर करने योग्य इंटरवल (1 मिनट से 1 घंटा) पर HTTP से चेक होता है।
अलग-अलग मॉनिटरिंग प्रोब। हर चेक स्टेटस कोड, रिस्पॉन्स टाइम, और वैकल्पिक असर्शन नतीजे रिकॉर्ड करता है।
लगातार 2+ फ़ेल होने के बाद अपने-आप ट्रिगर होते हैं। Endpoint वापस आने पर रिकवरी अलर्ट फ़ायर होते हैं। धीमे रिस्पॉन्स अलर्ट 1/घंटा रेट-लिमिटेड हैं।
Endpoint हेल्थ, अपटाइम बार, और इंसिडेंट दिखाने वाले पब्लिक-फ़ेसिंग पेज। कस्टम डोमेन और ब्रांडिंग सपोर्ट करते हैं।
टाइमलाइन अपडेट, गंभीरता स्तर, और पोस्टमॉर्टम के साथ आउटेज ट्रैक करें। सब्सक्राइबर अपने-आप सूचित होते हैं।
बेस URL
सभी API endpoints इस बेस URL के सापेक्ष हैं।
Public endpoints (auth की ज़रूरत नहीं)
ये endpoints वही data देते हैं जो आपके ग्राहक hosted status page पर देखते हैं। Browser से call करना safe; अपनी ऐप, README, या docs में status embed करने के लिए perfect।
/status/:slugStatus dataPage metadata, overall status, endpoint statuses, uptime arrays, incidents, और components का JSON।
/sse/status/:slugRealtime stream (SSE)Server-Sent Events stream — status changes, नए incidents, और check results तुरंत पाएं। Polling नहीं।
/badge/:slug/uptime.svgEmbeddable badgesShields.io-compatible SVG badges: uptime percentage, current status, average response time। किसी भी README या landing में डालें।
Realtime example
const es = new EventSource('https://api.pulseapi.tech/sse/status/acme')
es.addEventListener('status:changed', (e) => {
const payload = JSON.parse(e.data)
updateBanner(payload.status)
})
es.addEventListener('incident:created', (e) => {
showNotification(JSON.parse(e.data))
})त्वरित उदाहरण
# Create an API key in Dashboard > Settings > API Keys, then:
# List your endpoints
curl -H "Authorization: pk_live_abc123..." \
https://api.pulseapi.tech/endpoints
# Create a new endpoint
curl -X POST https://api.pulseapi.tech/endpoints \
-H "Authorization: pk_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"name":"My API","url":"https://api.example.com/health","method":"GET","checkInterval":300,"timeout":10}'
# Check uptime stats
curl -H "Authorization: pk_live_abc123..." \
"https://api.pulseapi.tech/endpoints/ENDPOINT_ID/stats?period=24h"शुरू करने के लिए तैयार? पढ़ेंशुरू करें या सीधे जाएं API संदर्भ.