သင်၏ application များနှင့်အတူ EstaCaido ပေါင်းစည်း
အဆိုပါ EstaCaido API ကိုသင်သည်သင်၏မော်နီတာစီမံခန့်ခွဲနိုင်ပါတယ်, အဖြစ်အပျက်များကိုကြည့်ရှု, သင့်ကိုယ်ပိုင် code ကိုမှသတိပေးချက်များနှင့်ပိုပြီး configurate. အားလုံး API endpoints request နှင့်တုံ့ပြန်မှုကိုယ်ခန္ဓာများအတွက် JSON ကိုအသုံးပြု.
https://www.estacaido.com/api/v1/
တစ်ခုချင်းစီကို API ကို token ကိုမိနစ်လျှင် 100 တောင်းဆိုမှုများကိုအထိလုပ်နိုင်သည်။ ဤအကနိမ့်ထက်တောင်းဆိုချက်များတစ်ဦး 429 Too Many Requests တုံ့ပြန်မှုရ.
အားလုံး API ကိုတောင်းဆိုချက်များအတွက် token-based အတည်ပြုအသုံးပြုပါ။ Authorization header မှာသင့်ရဲ့ token ကိုထည့်သွင်းပါ။
/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
သင်၏ website ကိုစောင့်ကြည့်ဖို့စီမံခန့်ခွဲ။
/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 |
လိုအပ်သည် | စောင့်ကြည့်ဖို့ 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 |
downtime အဖြစ်အပျက်များနှင့်၎င်းတို့၏သမိုင်းကိုကြည့်ရှုပါ။
/api/v1/incidents/
status |
ရွေးချယ်စရာ | အခြေအနေအရ စစ်ဆေးပါ: လုပ်ဆောင်နေသည်, ဖြေရှင်း |
monitor |
ရွေးချယ်စရာ | မျက်နှာပြင် အမည်ဖြင့် စစ်ထုတ် |
/api/v1/incidents/{id}/
သင်၏မော်နီတာများအတွက်သတိပေးချက် အသိပေးချက်များကို configure လုပ်ပါ
/api/v1/alerts/
/api/v1/alerts/
monitor |
လိုအပ်သည် | မျက်နှာပြင် အမည် |
alert_type |
လိုအပ်သည် | ဤတန်ဖိုးများထဲကတစ်ခု: email, sms, slack, discord, webhook, pagerduty, teams |
recipients |
လိုအပ်သည် | ရရှိသူ လိပ်စာများ သို့မဟုတ် webhook URLs |
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 slug (ဥပမာ၊ 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 token ကိုရယူပါ.
အခမဲ့စာရင်းသွင်းပါ။ API Token ကိုရယူပါ