live24h REST API

De live24h API biedt u programmatische toegang tot alle functies van het platform. De API is beschikbaar vanaf het Business-tarief.

Authenticatie

Alle API-requests vereisen een API-key in de header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://api.live24h.eu/v1/checks

De API-key vindt u in uw accountinstellingen onder API-toegang.

Basis-URL

https://api.live24h.eu/v1/

Endpoints

Checks

MethodeEndpointBeschrijving
GET/checksAlle checks ophalen
POST/checksNieuwe check aanmaken
GET/checks/{id}Check-details opvragen
PUT/checks/{id}Check bijwerken
DELETE/checks/{id}Check verwijderen
GET/checks/{id}/historyCheck-historie opvragen

Status Pages

MethodeEndpointBeschrijving
GET/status-pagesAlle Status Pages ophalen
POST/status-pagesNieuwe Status Page aanmaken
GET/status-pages/{id}Status Page details

Incidents

MethodeEndpointBeschrijving
GET/incidentsAlle incidents ophalen
POST/incidentsIncident aanmaken
PUT/incidents/{id}Incident bijwerken

Voorbeeld: Check aanmaken

curl -X POST https://api.live24h.eu/v1/checks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mijn website",
    "url": "https://www.example.com",
    "type": "http",
    "interval": 60,
    "alertChannels": ["email"]
  }'

Antwoordformaat

Alle antwoorden worden in JSON-formaat geretourneerd:

{
  "data": {
    "id": "chk_abc123",
    "name": "Mijn website",
    "url": "https://www.example.com",
    "status": "up",
    "lastCheckedAt": "2025-01-15T10:30:00Z",
    "responseTime": 245
  }
}

Rate Limiting

De API is beperkt tot 100 requests per minuut. Bij overschrijding ontvangt u een 429 Too Many Requests status.

Foutafhandeling

StatusBetekenis
400Ongeldig verzoek
401Ontbrekende of ongeldige authenticatie
404Resource niet gevonden
429Rate limit overschreden
500Interne serverfout