आफ्नो अनुप्रयोगहरू EstaCaido एकीकृत
यो EstaCaido एपीआई तपाईं आफ्नो मोनिटर व्यवस्थापन गर्न अनुमति दिन्छ, घटनाहरू हेर्नुहोस्, आफ्नो कोड देखि चेतावनी र थप कन्फिगर. सबै एपीआई अन्त बिन्दुहरू अनुरोध र प्रतिक्रिया शरीर लागि JSON प्रयोग.
https://www.estacaido.com/api/v1/
प्रत्येक API टोकन प्रति मिनेट 100 अनुरोध सम्म बनाउन सक्छ। त्यो सीमा भन्दा अनुरोध एक 429 Too Many Requests प्रतिक्रिया प्राप्त।
सबै API अनुरोधका लागि टोकन-आधारित प्रमाणीकरण प्रयोग गर्नुहोस् । तपाईँको टोकनलाई प्रमाणीकरण हेडरमा समावेश गर्नुहोस् ।
/api/v1/auth/token/
curl -X POST https://www.estacaido.com/api/v1/auth/token/ \
-H "Content-Type: application/json" \
-d '{"username": "your@email.com", "password": "yourpassword"}'
{
"token": "your-api-token-here"
}
Authorization: Token your-api-token-here
तपाईँको वेबसाइट मोनिटरहरू प्रबन्ध गर्नुहोस् ।
/api/v1/monitors/
[
{
"id": 1,
"name": "Production API",
"company": {
"id": 1,
"website": "api.example.com"
},
"check_type": "http",
"check_interval": 300,
"is_active": true,
"is_paused": false,
"last_check_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
]
/api/v1/monitors/
name |
आवश्यक | मोनिटरका लागि नाम |
domain |
आवश्यक | मोनिटर गर्न डोमेन, उदाहरणका लागि example.com |
check_interval |
वैकल्पिक | सेकेन्डमा जाँच अन्तराल, 30, 60, 300, 600, 900, 1800, 3600 को एक । पूर्वनिर्धारित: 300 |
check_type |
वैकल्पिक | यी मानहरू मध्ये एउटा: http, https, ping । पूर्वनिर्धारित: https |
/api/v1/monitors/{id}/
/api/v1/monitors/{id}/
/api/v1/monitors/{id}/
/api/v1/monitors/{id}/pause/
/api/v1/monitors/{id}/resume/
/api/v1/monitors/{id}/statistics/
days |
वैकल्पिक | समावेश गर्नका लागि दिनको सङ्ख्या । पूर्वनिर्धारित: 30 |
अवरोध घटनाहरू र आफ्नो इतिहास हेर्नुहोस्।
/api/v1/incidents/
status |
वैकल्पिक | वस्तुस्थितिद्वारा फिल्टर गर्नुहोस्: जारी छ, समाधान गरियो |
monitor |
वैकल्पिक | मोनिटर आईडीद्वारा फिल्टर गर्नुहोस् |
/api/v1/incidents/{id}/
Configure alert notifications for your monitors.
/api/v1/alerts/
/api/v1/alerts/
monitor |
आवश्यक | मोनिटर आईडी |
alert_type |
आवश्यक | यी मानहरू मध्ये एउटा: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
आवश्यक | प्रापक ठेगाना वा वेबहुक यूआरएल |
alert_on_down |
वैकल्पिक | साइट तल जाँदा सूचना दिनुहोस् (पूर्वनिर्धारित: ठीक) |
alert_on_recovery |
वैकल्पिक | साइट पुन: प्राप्त गर्दा सूचना दिनुहोस् (पूर्वनिर्धारित: ठीक) |
/api/v1/alerts/{id}/
/api/v1/alerts/{id}/
सार्वजनिक वस्तुस्थिति पृष्ठ सिर्जना र व्यवस्थापन गर्नुहोस् ।
/api/v1/status-pages/
/api/v1/status-pages/
title |
आवश्यक | वस्तुस्थिति पृष्ठका लागि शीर्षक |
slug |
आवश्यक | यूआरएल स्लग (जस्तै, मेरो-स्थिति-पृष्ठ) |
description |
वैकल्पिक | वर्णन पाठ |
is_public |
वैकल्पिक | सार्वजनिक रूपमा पहुँचयोग्य बनाउनुहोस् (पूर्वनिर्धारित: ठीक) |
टीम पहुँच र सहकार्य प्रबन्ध गर्नुहोस्।
/api/v1/teams/
/api/v1/teams/
/api/v1/teams/{id}/
import requests
API_TOKEN = 'your-api-token'
BASE_URL = 'https://www.estacaido.com/api/v1'
headers = {
'Authorization': f'Token {API_TOKEN}',
'Content-Type': 'application/json'
}
# List all monitors
response = requests.get(f'{BASE_URL}/monitors/', headers=headers)
monitors = response.json()
print(monitors)
# Create a new monitor
new_monitor = {
'name': 'My Website',
'domain': 'example.com',
'check_interval': 300
}
response = requests.post(f'{BASE_URL}/monitors/', json=new_monitor, headers=headers)
print(response.json())
const API_TOKEN = 'your-api-token';
const BASE_URL = 'https://www.estacaido.com/api/v1';
const headers = {
'Authorization': `Token ${API_TOKEN}`,
'Content-Type': 'application/json'
};
// List all monitors
fetch(`${BASE_URL}/monitors/`, { headers })
.then(res => res.json())
.then(monitors => console.log(monitors));
// Create a new monitor
fetch(`${BASE_URL}/monitors/`, {
method: 'POST',
headers,
body: JSON.stringify({
name: 'My Website',
domain: 'example.com',
check_interval: 300
})
})
.then(res => res.json())
.then(data => console.log(data));
# List all monitors
curl -X GET https://www.estacaido.com/api/v1/monitors/ \
-H "Authorization: Token your-api-token"
# Create a new monitor
curl -X POST https://www.estacaido.com/api/v1/monitors/ \
-H "Authorization: Token your-api-token" \
-H "Content-Type: application/json" \
-d '{"name": "My Website", "domain": "example.com", "check_interval": 300}'
निःशुल्क लागि साइन अप र एकीकृत सुरु गर्न आफ्नो एपीआई टोकन प्राप्त.
नि:शुल्क साइन अप गर्नुहोस् API टोकन प्राप्त गर्नुहोस्