Check Endpoints
CRUD operations for managing checks.
Authentication
Section titled “Authentication”All endpoints require authentication via API key or JWT token:
curl -H "Authorization: Bearer pk_live_xxx" \ https://api.pakyas.com/api/v1/checksList Checks
Section titled “List Checks”GET /api/v1/checks?project_id={project_id}Query Parameters:
| Parameter | Required | Description |
|---|---|---|
project_id | Yes | Project UUID |
Response:
{ "checks": [ { "id": "uuid", "name": "Nightly Backup", "slug": "backup-nightly", "status": "up", "period_seconds": 86400, "grace_seconds": 3600, "last_ping_at": "2025-01-02T10:00:00Z" } ]}Create Check
Section titled “Create Check”POST /api/v1/checksRequest Body:
{ "project_id": "uuid", "name": "Nightly Backup", "slug": "backup-nightly", "period_seconds": 86400, "grace_seconds": 3600, "description": "Database backup job"}Response: 201 Created
{ "id": "uuid", "public_id": "uuid-for-pings", "name": "Nightly Backup", "slug": "backup-nightly"}Get Check
Section titled “Get Check”GET /api/v1/checks/{id}Response:
{ "id": "uuid", "public_id": "uuid", "name": "Nightly Backup", "slug": "backup-nightly", "status": "up", "period_seconds": 86400, "grace_seconds": 3600, "last_ping_at": "2025-01-02T10:00:00Z", "last_start_at": "2025-01-02T09:55:00Z", "created_at": "2025-01-01T00:00:00Z"}Update Check
Section titled “Update Check”PUT /api/v1/checks/{id}Request Body:
{ "name": "Updated Name", "period_seconds": 43200, "grace_seconds": 1800}Delete Check
Section titled “Delete Check”DELETE /api/v1/checks/{id}Response: 204 No Content
Pause/Resume Check
Section titled “Pause/Resume Check”PATCH /api/v1/checks/{id}/pausePATCH /api/v1/checks/{id}/resumePaused checks don’t generate alerts for missed pings.
Get Ping History
Section titled “Get Ping History”GET /api/v1/checks/{id}/pings?limit=50Response:
{ "pings": [ { "id": "uuid", "type": "success", "exit_code": 0, "created_at": "2025-01-02T10:00:00Z", "duration_ms": 12345 } ]}