EstaCaido ला तुमच्या अनुप्रयोगांशी एकत्र करा
EstaCaido API तुम्हाला तुमच्या मॉनिटरचे व्यवस्थापन, घटना पहा, अलर्टची रचना आणि तुमच्या स्वतःच्या कोडपासून अधिक देते. सर्व API अंतबिंदू विनंती आणि प्रतिसाद शरीरासाठी 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 |
वैकल्पिक | मॉनीटर ID द्वारे फिल्टर करा |
/api/v1/incidents/{id}/
Configure alert notifications for your monitors.
/api/v1/alerts/
/api/v1/alerts/
monitor |
आवश्यक | मॉनीटर ID |
alert_type |
आवश्यक | यापैकी एक मूल्य: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
आवश्यक | प्राप्तकर्ता पत्ता किंवा वेबहॉक URLs |
alert_on_down |
वैकल्पिक | स्थळ बंद झाल्यास सूचना द्या (मासिक: true) |
alert_on_recovery |
वैकल्पिक | स्थळ पुन्हप्राप्ती करीता सूचना (मासिक: true) |
/api/v1/alerts/{id}/
/api/v1/alerts/{id}/
सार्वजनिक स्थिती पान तयार करा व व्यवस्थापन करा.
/api/v1/status-pages/
/api/v1/status-pages/
title |
आवश्यक | स्थिती पान करीता शिर्षक |
slug |
आवश्यक | URL slagg (उदा. माझे-स्थिती-पान) |
description |
वैकल्पिक | वर्णन पाठ्य |
is_public |
वैकल्पिक | सार्वजनिकरित्या उपलब्ध करा (मासिक: true) |
या संस्थेचे कार्य व कार्यपद्धती खालीलप्रमाणे आहे.
/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 टोकन प्राप्त करा