Demo

API reference

Authentication

Every request needs a token in the Authorization header. Create tokens with lantern token create <name>; Lantern shows each token once.

curl -H "Authorization: Bearer $LANTERN_API_TOKEN" http://localhost:8080/api/v1/checks

Endpoints

MethodPathResult
GET/api/v1/checksAll checks with their current state
GET/api/v1/checks/{name}/resultsResults of one check, newest first, 100 per page
POST/api/v1/checks/{name}/pausePauses a check, for example during maintenance
POST/api/v1/checks/{name}/resumeResumes a paused check

Example response

{
  "checks": [
    {
      "name": "Website",
      "state": "healthy",
      "last_run": "2026-10-19T08:15:00Z",
      "response_ms": 182
    }
  ]
}

Errors

Errors use the usual HTTP status codes and a JSON body with error and message. A missing or wrong token gives 401, an unknown check 404.