API ਡੌਕੂਮੈਂਟੇਸ਼ਨ

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

ਮਾਨੀਟਰ

ਆਪਣੀ ਵੈੱਬਸਾਈਟ ਮਾਨੀਟਰ ਪਰਬੰਧ ਕਰੋ ।

ਮਾਨੀਟਰ ਲਿਸਟ

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

ਮਾਨੀਟਰ ਵਿਰਾਮ

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 ਨਾਲ ਫਿਲਟਰ

ਘਟਨਾ ਲਵੋ

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

ਚੇਤਾਵਨੀ

ਆਪਣੇ ਮਾਨੀਟਰ ਲਈ ਚੇਤਾਵਨੀ ਨੋਟੀਫਿਕੇਸ਼ਨ ਸੰਰਚਨਾ ਕਰੋ ।

ਲਿਸਟ ਅਲਾਰਮ

GET /api/v1/alerts/

ਅਲਾਰਮ ਬਣਾਓ

POST /api/v1/alerts/
ਪੈਰਾਮੀਟਰ
monitor ਲੋੜੀਦਾ ਮਾਨੀਟਰ ID
alert_type ਲੋੜੀਦਾ ਇਹਨਾਂ ਮੁੱਲਾਂ ਵਿੱਚੋਂ ਇੱਕ: email, sms, slack, discord, webhook, pagerduty, teams
recipients ਲੋੜੀਦਾ ਪ੍ਰਾਪਤ ਕਰਤਾ ਐਡਰੈੱਸ ਜਾਂ ਵੈਬਹੌਕ URL
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 ਸਲਾਗ (ਜਿਵੇਂ ਕਿ ਮੇਰਾ-ਸਟੇਟਸ-ਪੇਜ)
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 ਟੋਕਨ ਪ੍ਰਾਪਤ ਕਰੋ।

ਮੁਫ਼ਤ ਸਾਈਨ ਅੱਪ ਕਰੋ API ਟੋਕਨ ਲਵੋ