დოკუმენტაცია

EstaCaido-ის ინტეგრირება თქვენს პროგრამებში

დაწყება

EstaCaido API საშუალებას გაძლევთ მონიტორების მართვა, ინციდენტების ნახვა, შეტყობინებების კონფიგურაცია და სხვა თქვენი კოდის გამოყენებით. ყველა API დასასრული JSON- ს იყენებს მოთხოვნისა და პასუხის სტრუქტურებისთვის.

ძირითადი URL

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

ფასის საზღვრები

თითოეული API ტოკენი შეიძლება შეიცავდეს 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

Monitors

Manage your website monitors.

მონიტორების სია

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

მონიტორების მიღება

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

მოდულის განახლების მონიტორი

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

მონიტორი

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

მონიტორიComment

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

მონიტორიComment

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

მონიტორების სტატისტიკის მიღება

GET /api/v1/monitors/{id}/statistics/
პარამეტრები
days დამატებითი დღის რიცხვი, რომელიც ჩაითვლება. ნაგულისხმევი: 30

ინციდენტები

ხილვა მოულოდნელი შეწყვეტის შემთხვევებისა და მათი ისტორიის.

ინციდენტების სია

GET /api/v1/incidents/
პარამეტრები
status დამატებითი ფილტრი სტატუსის მიხედვით: მიმდინარე, გადაწყვეტილი
monitor დამატებითი ფილტრი მონიტორი ID- ს მიხედვით

ინციდენტის მიღება

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

გაფრთხილებებიComment

Configure alert notifications for your monitors.

განგაშის სიის ნახვა

GET /api/v1/alerts/

განგაშის შექმნა

POST /api/v1/alerts/
პარამეტრები
monitor საჭირო მონიტორი ID
alert_type საჭირო ერთი ამ მნიშვნელობებიდან: email, sms, slack, discord, webhook, pagerduty, teams
recipients საჭირო მიმღების მისამართები ან webhook URL- ები
alert_on_down დამატებითი ვებ გვერდის დახურვის შესახებ შეტყობინება (ნაგულისხმევი: true)
alert_on_recovery დამატებითი ვებ გვერდის აღდგენის შესახებ შეტყობინება (ნაგულისხმევი: true)

გაფრთხილების განახლება

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

გაფრთხილების წაშლა

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

სტატუსის გვერდები

Create and manage public status pages.

სტატუსის გვერდების სია

GET /api/v1/status-pages/

სტატუსის გვერდის შექმნა

POST /api/v1/status-pages/
პარამეტრები
title საჭირო სტატუსის გვერდის სათაური
slug საჭირო URL-ის ბლოკი (მაგალითად, my-status-page)
description დამატებითი აღწერის ტექსტი
is_public დამატებითი საზოგადოებრივი ხელმისაწვდომობის შექმნა (ნაგულისხმევი: true)

გუნდები

მართეთ გუნდის წვდომა და თანამშრომლობა.

გუნდების სია

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}'

Ready to get started?

Sign up for free and get your API token to start integrating.

დარეგისტრირდით უფასოდ API ტოკენის მიღება