API Documentation

Integrate EstaCaido with your applications

Getting Started

Le EstaCaido API faodaidh tu na monarairean agad a riaghladh, tachartasan fhaicinn, rabhadh a shuidheachadh agus barrachd bhon chòd agad fhèin. Bidh na h-uile ceann-uidhe API a' cleachdadh JSON airson bodhaig iarrtais is freagairtean.

URL bunaiteach

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

Teirmean an ìre

'S urrainn do gach tocan API suas ri 10 iarrtas 100 a dhèanamh gach mionaid. Gheibh iarrtas a tha os cionn na h-ìre seo freagairt 429 Too Many Requests.

Dearbhadh

Cleachd dearbhadh a tha stèidhichte air tocan airson gach iarrtas API. Cuir an tocan agad ris a' cheann-làimh Authorization.

Faigh tocan dearbhaidh

POST /api/v1/auth/token/
Iarrtas
curl -X POST https://www.estacaido.com/api/v1/auth/token/ \
  -H "Content-Type: application/json" \
  -d '{"username": "your@email.com", "password": "yourpassword"}'
Freagairt
{
  "token": "your-api-token-here"
}

Cleachd an tocan anns an ceann-latha ceadachaidh

Authorization: Token your-api-token-here

Sgrùdaidhean

Manage your website monitors.

Liostaichean sgrion

GET /api/v1/monitors/
Freagairt
[
  {
    "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"
  }
]

Cruthaich Monitor

POST /api/v1/monitors/
Paramadairean
name Riatanas Ainm an sgrion
domain Riatanas An làraich a thèid a mhonarachadh, mar eisimpleir example.com
check_interval Roghainneil An eadar-ama sgrùdadh is sgrùdaidh sna diogan, aon de 30, 60, 300, 600, 900, 1800, 3600. Bòrd-bùird: 300
check_type Roghainneil Aon de na luachan seo: http, https, ping. Buidheann-glèidhidh: https

Faigh an monitor

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

Update Monitor

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

Sguab às an sgrìn

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

Monitor

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

Resume Monitor

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

Get Monitor Statistics

GET /api/v1/monitors/{id}/statistics/
Paramadairean
days Roghainneil An àireamh làithean a thèid a chur a-steach. Bòrd-bùird: 30

Tachartasan

View downtime incidents and their history.

List Incidents

GET /api/v1/incidents/
Paramadairean
status Roghainneil Sgrùdadh a rèir staid: air a dhol air adhart, air fhuasgladh
monitor Roghainneil Criathrag a rèir ID a' mhonaid

Get Incident

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

Rabhadh

Configure alert notification for your monitors.

List Alerts

GET /api/v1/alerts/

Cruthaich rabhadh

POST /api/v1/alerts/
Paramadairean
monitor Riatanas Monitor ID
alert_type Riatanas Aon de na luachan seo: email, sms, slack, discord, webhook, pagerduty, teams
recipients Riatanas Seòlaidhean no URLan webhook an neach-fhaighneachd
alert_on_down Roghainneil Cuir fios ma thèid an làrach sìos (buidheann-chlàr: fìor)
alert_on_recovery Roghainneil Cuir fios air nuair a dh'fhaodas an làrach ath-shuidheachadh (bhùthan-obrach: fìor)

Update Alert

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

Sguab às an àrdachadh

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

Tuilleadan staid

Create and manage public status pages.

List Status Pages

GET /api/v1/status-pages/

Cruthaich duilleag staid

POST /api/v1/status-pages/
Paramadairean
title Riatanas Tiotal airson duilleag na staid
slug Riatanas Slug URL (m.e. my-status-page)
description Roghainneil Teacsa an tuairisgeul
is_public Roghainneil Dèan a h-uile duine ri làimh (bhùthan-obrach: fìor)

Teams

Manage team access and collaboration.

List Teams

GET /api/v1/teams/

Cruthaich sgioba

POST /api/v1/teams/

Get Team

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

Code examples

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

A bheil thu deiseil airson tòiseachadh?

Clàraich an-asgaidh agus faigh do thocan API gus tòiseachadh air a' cho-theacsa a chur an gnìomh.

Clàraich an-asgaidh Get API Token