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
| Methode | Endpoint | Beschrijving |
|---|---|---|
GET | /checks | Alle checks ophalen |
POST | /checks | Nieuwe check aanmaken |
GET | /checks/{id} | Check-details opvragen |
PUT | /checks/{id} | Check bijwerken |
DELETE | /checks/{id} | Check verwijderen |
GET | /checks/{id}/history | Check-historie opvragen |
Status Pages
| Methode | Endpoint | Beschrijving |
|---|---|---|
GET | /status-pages | Alle Status Pages ophalen |
POST | /status-pages | Nieuwe Status Page aanmaken |
GET | /status-pages/{id} | Status Page details |
Incidents
| Methode | Endpoint | Beschrijving |
|---|---|---|
GET | /incidents | Alle incidents ophalen |
POST | /incidents | Incident 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
| Status | Betekenis |
|---|---|
400 | Ongeldig verzoek |
401 | Ontbrekende of ongeldige authenticatie |
404 | Resource niet gevonden |
429 | Rate limit overschreden |
500 | Interne serverfout |