ማስረጃ

EstaCaidoን ከፕሮግራሞችዎ ጋር ያዋህዱ

መጀመሪያ

የ EstaCaido API እርስዎ ማኒተሮችዎን ማስተዳደር, ክስተቶች ማየት, ማስጠንቀቂያዎችን ማቀናጀት እና ከራስዎ ኮድ የበለጠ ያስችልዎታል. ሁሉም API መጨረሻ ነጥቦች ለጠየቅ እና መልስ አካላት JSON ይጠቀማሉ.

መሠረታዊ URL

https://www.estacaido.com/api/v1/

የፍጥነት ገደቦች

API Token ሁሉ በአንድ ደቂቃ ውስጥ 100 ጥያቄዎችን ሊያደርግ ይችላል። ከዛ በላይ ጥያቄዎች 429 Too Many Requests መልስ ይስጡ

ማረጋገጫ

ለሁሉም API ጥያቄዎች በቶኬን ላይ የተመሠረተ ማረጋገጫን ይጠቀሙ. ቶኬንዎን በሥልጣን አናት ላይ ያካትቱ

የምስክር ወረቀት

POST /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

ማሳያ

የድረ ገጽ ማሳያዎን አስተዳደር

የሞኒተር ዝርዝር

GET /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"
  }
]

መከታተያ ፍጠር

POST /api/v1/monitors/
መተላለፊያ
name ያስፈልጋል የሞኒተር ስም
domain ያስፈልጋል ለምሳሌ example.com
check_interval የማይፈለግ በሴኮንዶች ውስጥ የምርመራ ጊዜ፣ ከ 30, 60, 300, 600, 900, 1800, 3600 አንዱ። መነሻ፦ 300
check_type የማይፈለግ ከእነዚህ ዋጋዎች አንዱ: http, https, ping. ቅድመ ዕይታ: https

ፋይል (_F)

GET /api/v1/monitors/{id}/

የቀን መቁጠሪያ ማሻሻያ

PUT /api/v1/monitors/{id}/

ማሳያ

DELETE /api/v1/monitors/{id}/

ማሳያ

POST /api/v1/monitors/{id}/pause/

የቀን/ሰዓት መተላለፊያ

POST /api/v1/monitors/{id}/resume/

የሞኒተር መረጃ

GET /api/v1/monitors/{id}/statistics/
መተላለፊያ
days የማይፈለግ የቀን ብዛት ለማካተት. ቅድመ ዕይታ: 30

መተላለፊያ

የጊዜ ርዝመት እና ታሪክ

የቀን መቁጠሪያ ዝርዝር

GET /api/v1/incidents/
መተላለፊያ
status የማይፈለግ በደረጃው አጣራ፦ በሂደት ላይ፣ የተፈታ
monitor የማይፈለግ በሞኒተር ID አጣራ

ፋይል (_F)

GET /api/v1/incidents/{id}/

ማስጠንቀቂያ

ለሞኒተርዎ ማስጠንቀቂያ ማስታወቂያዎችን ያስተካክሉ

የዝርዝር ማስጠንቀቂያዎች

GET /api/v1/alerts/

አዲስ ማስታወሻ ፍጠር

POST /api/v1/alerts/
መተላለፊያ
monitor ያስፈልጋል ማሳያ
alert_type ያስፈልጋል ከእነዚህ ዋጋዎች አንዱ: email, sms, slack, discord, webhook, pagerduty, teams
recipients ያስፈልጋል የተቀባዩ አድራሻዎች ወይም የዌብሆክ URLs
alert_on_down የማይፈለግ ድረ ገጽ ሲወድቅ አስታውስ (የመጀመሪያው፦ እውነት)
alert_on_recovery የማይፈለግ የጣቢያው መተላለፊያ

የቀን/ሰዓት ተጨማሪ ፕሮግራም ይጫን

PUT /api/v1/alerts/{id}/

አጥፉ

DELETE /api/v1/alerts/{id}/

የደረጃ ገጾች

የሕዝብ ስታቲስቲክስ ገጾችን መፍጠርና ማስተዳደር

የደረጃ ገጾች

GET /api/v1/status-pages/

የደረጃ ገጽ

POST /api/v1/status-pages/
መተላለፊያ
title ያስፈልጋል የደረጃ ገጽ አርእስት
slug ያስፈልጋል URL ሰርቨር (ለምሳሌ፣ my-status-page)
description የማይፈለግ የጽሑፍ መግለጫ
is_public የማይፈለግ ለሕዝብ ተቀባይነት ያለው (የመጀመሪያ: እውነት)

ቡድኖች

ቡድን መዳረሻ እና መተባበርን አስተዳደር

ቡድኖች

GET /api/v1/teams/

ቡድን ፍጠር

POST /api/v1/teams/

ቡድን

GET /api/v1/teams/{id}/

የኮድ ምሳሌዎች

Python

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())

JavaScript

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));

cURL

# 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ዎን ለማካተት መጀመሩን.

በነጻ ይመዝገቡ ፋይል