ඔබේ යෙදුම් සමග 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}/
ඔබේ මොනිටර සඳහා අනතුරු ඇඟවීම් දැනුම්දීම් සකසන්න.
/api/v1/alerts/
/api/v1/alerts/
monitor |
අවශ්ය | දර්ශක ID |
alert_type |
අවශ්ය | මෙම අගයන් එක්: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
අවශ්ය | ලැබුම්කරුගේ ලිපින හෝ webhook URL |
alert_on_down |
විකල්ප | අඩවිය බිඳවැටෙන විට දැනුම් දෙන්න (පෙරනිමි: සත්ය) |
alert_on_recovery |
විකල්ප | අඩවිය යළි ලබාගත් විට දැනුම් දෙන්න (පෙරනිමි: සත්ය) |
/api/v1/alerts/{id}/
/api/v1/alerts/{id}/
නිර්මාණය සහ පොදු තත්ත්වය පිටු කළමනාකරණය.
/api/v1/status-pages/
/api/v1/status-pages/
title |
අවශ්ය | තත්ව පිටුව සඳහා මාතෘකාව |
slug |
අවශ්ය | URL ස්ලග් (උදා. my-status-page) |
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 ටොකන් ලබා ගන්න.
නොමිලේ ලියාපදිංචි වන්න API ටොකන් ලබා ගන්න