Iнтегрirajte EstaCaido s vašim aplikacijama
EstaCaido API vam omogućava upravljanje svojim monitorima, pogled incidenta, konfiguriranje upozorenja i više iz vlastitog koda. Svi API ishodi koriste JSON za zahtjev i odgovor tijela.
https://www.estacaido.com/api/v1/
Svaki API žeton može nadoknaditi 100 zahtjeve po minuti. Zahtjevi preko tog ograničenja dobiti 429 Too Many Requests odgovor.
Koristite autorizaciju na bazi žetona za sve API zahtjeve. Uključite svoj žeton u zaglavlje autorizacije.
/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
Upravljajte svojim web monitorima.
/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 |
Potrebno | Ime monitora |
domain |
Potrebno | Domena za praćenje, na primjer example.com |
check_interval |
Slobodno | Provjerite interval u sekundama, jedan od 30, 60, 300, 600, 900, 1800, 3600. Uobičajeno: 300 |
check_type |
Slobodno | Jedna od ovih vrijednosti: http, https, ping. Uobičajeno: 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 |
Slobodno | Broj dana koji će se uključiti. Uobičajeno: 30 |
Pogledaj zastojne incidente i njihovu povijest.
/api/v1/incidents/
status |
Slobodno | Filtriraj po stanju: u tijeku, rešeno |
monitor |
Slobodno | Filtriraj po ID-u monitora |
/api/v1/incidents/{id}/
Podesite obavijesti o upozorenju za vaše monitore.
/api/v1/alerts/
/api/v1/alerts/
monitor |
Potrebno | ID monitora |
alert_type |
Potrebno | Jedna od ovih vrijednosti: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
Potrebno | Adresa primatelja ili webhook URL- a |
alert_on_down |
Slobodno | Obavijesti kada stranica krene dolje (zadano: postavljeno) |
alert_on_recovery |
Slobodno | Obavijesti kada se stranica oporavi (zadano: postavljeno) |
/api/v1/alerts/{id}/
/api/v1/alerts/{id}/
Kreirajte i upravljajte javnim statusnim stranicama.
/api/v1/status-pages/
/api/v1/status-pages/
title |
Potrebno | Naslov stranice statusa |
slug |
Potrebno | URL puževi (npr., moja-statusna stranica) |
description |
Slobodno | Opis teksta |
is_public |
Slobodno | Omogući javnost (uobičajeno: postavljeno) |
Upravljajte pristupom timu i suradnjom.
/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}'
Prijavite se besplatno i dobiti svoj API žeton za početak integracije.
Registriraj se besplatno Dobiti API Token