Integriraj EstaCaido sa svojim aplikacijama
EstaCaido API vam omogućava da upravljate svojim monitorima, pregledavate incidente, konfigurirate upozorenja i još mnogo toga iz vašeg vlastitog koda. Sve krajnje tačke API-ja koriste JSON za tijela zahtjeva i odgovora.
https://www.estacaido.com/api/v1/
Svaki API token može izvršiti do 100 zahtjeva u minuti. Zahtjevi iznad tog ograničenja dobivaju 429 Too Many Requests odgovor.
Koristi autentifikaciju zasnovanu na tokenu za sve API zahtjeve. Uključite svoj token u zaglavlje Autorizacija.
/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 |
Obvezno | Ime za monitor |
domain |
Obvezno | Domena koju treba pratiti, na primjer example.com |
check_interval |
Neobavezno | Interval provjere u sekundama, jedan od 30, 60, 300, 600, 900, 1800, 3600. Uobičajeno: 300 |
check_type |
Neobavezno | 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 |
Neobavezno | Broj dana za uključivanje. Uobičajeno: 30 |
Pogledajmo slučajeve neispravnosti i njihovu historiju.
/api/v1/incidents/
status |
Neobavezno | Filtriraj po statusu: u toku, riješeno |
monitor |
Neobavezno | Filtriraj po ID-u monitora |
/api/v1/incidents/{id}/
Konfiguriraj obavijesti o upozorenjima za svoje monitore.
/api/v1/alerts/
/api/v1/alerts/
monitor |
Obvezno | Monitor ID |
alert_type |
Obvezno | Jedna od ovih vrijednosti: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
Obvezno | Adrese primalaca ili webhook URL-ovi |
alert_on_down |
Neobavezno | Obavijesti kada stranica ne radi (uobičajeno: true) |
alert_on_recovery |
Neobavezno | Obavijesti kada se stranica oporavi (uobičajeno: true) |
/api/v1/alerts/{id}/
/api/v1/alerts/{id}/
Stvara i upravlja javnim statusnim stranicama.
/api/v1/status-pages/
/api/v1/status-pages/
title |
Obvezno | Naslov za statusnu stranicu |
slug |
Obvezno | URL slug (npr. my-status-page) |
description |
Neobavezno | Opis teksta |
is_public |
Neobavezno | Učini javno dostupnim (uobičajeno: istina) |
Upravljanje timskim pristupom i saradnjom.
/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}'
Registrirajte se besplatno i dobijte svoj API token da počnete integrirati.
Registrujte se besplatno Primi API token