Integro EstaCaido me aplikacionet e tua
API EstaCaido ju lejon të menaxhoni monitorët tuaj, të shihni incidentet, të konfiguroni alarmet dhe më shumë nga kodi juaj. Të gjitha pikat e fundit të API përdorin JSON për trupat e kërkesave dhe përgjigjeve.
https://www.estacaido.com/api/v1/
Çdo token API mund të përbërë deri në kërkesa 100 për minutë. Kërkesat mbi këtë limit marrin një përgjigje 429 Too Many Requests.
Përdor autentifikimin bazuar në token për të gjitha kërkesat API. Përfshi token në header Autorizimi.
/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
Menazho monitorët e faqes tënde web.
/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 |
E nevojshme | Emri i monitorit |
domain |
E nevojshme | Domain për tu mbikqyrur, për shembull example.com |
check_interval |
Opsionale | Intervali i kontrollimit në sekonda, një nga 30, 60, 300, 600, 900, 1800, 3600. I paracaktuar: 300 |
check_type |
Opsionale | Një nga këto vlera: http, https, ping. E prezgjedhur: 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 |
Opsionale | Numri i ditëve për t'u përfshirë. E paracaktuar: 30 |
Shiko incidentet e kohës së mbylljes dhe historinë e tyre.
/api/v1/incidents/
status |
Opsionale | Filtro sipas gjendjes: në vazhdim, zgjidhur |
monitor |
Opsionale | Filtro sipas ID të monitorit |
/api/v1/incidents/{id}/
Konfiguro njoftimet e alarmit për monitorët tuaj.
/api/v1/alerts/
/api/v1/alerts/
monitor |
E nevojshme | ID e monitorit |
alert_type |
E nevojshme | Një nga këto vlera: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
E nevojshme | Adresat e marrësit ose URL-të webhook |
alert_on_down |
Opsionale | Lajmëro kur site-i bjen (i prezgjedhur: i vërtetë) |
alert_on_recovery |
Opsionale | Lajmëro kur site-i rimerr (i prezgjedhur: i vërtetë) |
/api/v1/alerts/{id}/
/api/v1/alerts/{id}/
Krijo dhe menaxhoje faqet e gjendjes publike.
/api/v1/status-pages/
/api/v1/status-pages/
title |
E nevojshme | Titulli i faqes së gjendjes |
slug |
E nevojshme | URL slug (p.sh. my-status-page) |
description |
Opsionale | Teksti i përshkrimit |
is_public |
Opsionale | Bëje të përshtatshëm publikisht (i prezgjedhur: i vërtetë) |
Menaxhimi i aksesit dhe bashkëpunimit të ekipit.
/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}'
Regjistrohu pa pagesë dhe merr token e API-së për të filluar integrimin.
Regjistrohu Falas Merr token API