Kpọnye EstaCaido na usoroiheomume gị
EstaCaido API na-enye gị ohere ịrụzi monitors gị, hụ ihe mere, họrọ n'ime ihe n'ime na ihe ndị ọzọ site na koodu gị. API endpoints niile na-eji JSON maka arịrịọ na arụmọrụ nzaghachi.
https://www.estacaido.com/api/v1/
Token API ọbụla nwere ike imepụta ruo 100 n'ime nkeji. Nnweta n'elu nke ahụ ga-enweta nzaghachi 429 Too Many Requests.
Jiri ikikembanye token-base maka ihenhọrọ API niile. Tinye token gị na n'ihenhọrọ ikikembanye.
/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
Kọọ ndị nlekọta weebụsaịtị gị.
/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 |
Ekwesịrị | Aha maka ngosi |
domain |
Ekwesịrị | Domeenụ́ ahụ a ga-enyocha, dịka ọmụmaatụ example.com |
check_interval |
Nhọrọ | Nchedo n'etiti n'ime sekọnd, otu n'ime 30, 60, 300, 600, 900, 1800, 3600. Dìfọ́ọ̀ltụ̀: 300 |
check_type |
Nhọrọ | Otu n'ime valiu ndị a: http, https, ping. Dìfọ́ọ̀ltụ̀: 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 |
Nhọrọ | Nọmba ụbọchị ka a gbakwunye. Dìfọ́ọ̀ltụ̀: 30 |
Gosi ihenhọrọ ndị ahụ na akụkọ ihe mere eme ha.
/api/v1/incidents/
status |
Nhọrọ | Filtara site na ọnọdụ: na-aga n'ihu, rụzigharịrị |
monitor |
Nhọrọ | Filtara site na ngosi ID |
/api/v1/incidents/{id}/
Nhazi nkwenye maka monítọ́ọ̀tụ̀ gị.
/api/v1/alerts/
/api/v1/alerts/
monitor |
Ekwesịrị | Ngosi ID |
alert_type |
Ekwesịrị | Otu n'ime valiu ndị a: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
Ekwesịrị | Ndesịta adreesị ndịna-eziga mọọbụ webụhook URLs |
alert_on_down |
Nhọrọ | Nnyemaka mgbe saịtị ahụ na-akwụsị (dìfọ́ọ̀ltụ̀: eziokwu) |
alert_on_recovery |
Nhọrọ | Nnyemaka mgbe saịtị ahụ na-abanye (dìfọ́ọ̀ltụ̀: eziokwu) |
/api/v1/alerts/{id}/
/api/v1/alerts/{id}/
Kewapụta na chịkwaa ihuakwụkwọ ọnọdụ ndị mmadụ.
/api/v1/status-pages/
/api/v1/status-pages/
title |
Ekwesịrị | Aha maka ihuakwụkwọ ọnọdụ |
slug |
Ekwesịrị | URL slug (eg, my-status-page) |
description |
Nhọrọ | Ndesịta nkọwa |
is_public |
Nhọrọ | Mee ka ọbụla nwee ike ịga (dìfọ́ọ̀ltụ̀: eziokwu) |
Nlekọta nbanye na ọrụ n'ime otu.
/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}'
Nweta maka free na-enweta gị API Token ka ịmalite integrating.
Debanye aha n'efu Wepụta Token API