// DOCUMENTATION

API REFERENCE

REST API with Sanctum bearer token authentication.

BASE URL
https://pulselog.alihamzaazam.com/api/v1

All authenticated endpoints are prefixed with this URL.

AUTHENTICATION

All endpoints require a bearer token in the header:

Authorization: Bearer <token>

Generate via Tinker: $user->createToken('name')->plainTextToken

PROJECTS 5 ENDPOINTS
GET /api/v1/projects

List all your projects.

POST /api/v1/projects

Create a project.

REQUEST BODY
{ "name": "Production", "description": "...", "is_public": true }
EXAMPLE
curl -s -X POST https://pulselog.alihamzaazam.com/api/v1/projects \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d ''{"name":"Production","is_public":true}' | jq .
GET /api/v1/projects/{id}

Get a single project by ID.

PUT /api/v1/projects/{id}

Update a project.

REQUEST BODY
{ "name": "Production API", "description": "...", "is_public": true }
DELETE /api/v1/projects/{id}

Delete a project and all its monitors. Returns 204.

MONITORS 7 ENDPOINTS
GET /api/v1/projects/{project_id}/monitors

List all monitors for a project.

POST /api/v1/projects/{project_id}/monitors

Create a monitor.

REQUEST BODY
{ "name": "API Health", "url": "https://api.example.com/health", "http_method": "GET", "interval_minutes": 5, "expected_status": 200, "is_active": true }
EXAMPLE
curl -s -X POST https://pulselog.alihamzaazam.com/api/v1/projects/1/monitors \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d ''{"name":"API Health","url":"https://api.example.com/health","http_method":"GET","interval_minutes":5,"is_active":true}' | jq .
GET /api/v1/monitors/{id}

Get a monitor with its latest check data.

PUT /api/v1/monitors/{id}

Update monitor settings.

REQUEST BODY
{ "name": "API Health", "interval_minutes": 10, "is_active": true }
DELETE /api/v1/monitors/{id}

Delete a monitor and all its history. Returns 204.

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

Toggle monitor between active and paused.

EXAMPLE
curl -s -X POST https://pulselog.alihamzaazam.com/api/v1/monitors/1/toggle \
-H "Authorization: Bearer $TOKEN" | jq . \
POST /api/v1/monitors/{id}/check-now

Trigger an immediate health check.

EXAMPLE
curl -s -X POST https://pulselog.alihamzaazam.com/api/v1/monitors/1/check-now \
-H "Authorization: Bearer $TOKEN" | jq . \
INCIDENTS 4 ENDPOINTS
GET /api/v1/monitors/{monitor_id}/incidents

List all incidents for a monitor.

GET /api/v1/incidents/{id}

Get incident details with full update timeline.

POST /api/v1/incidents/{id}/updates

Add a status update to an incident.

REQUEST BODY
{ "status": "investigating|identified|monitoring|resolved", "message": "Update text here" }
EXAMPLE
curl -s -X POST https://pulselog.alihamzaazam.com/api/v1/incidents/1/updates \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d ''{"status":"investigating","message":"Looking into this now"}' | jq .
POST /api/v1/incidents/{id}/resolve

Resolve an open incident.

EXAMPLE
curl -s -X POST https://pulselog.alihamzaazam.com/api/v1/incidents/1/resolve \
-H "Authorization: Bearer $TOKEN" | jq . \
TOKENS 1 ENDPOINT
POST /api/v1/tokens

Create a new API token (requires existing bearer token).

REQUEST BODY
{ "name": "cli-token" }
EXAMPLE
curl -s -X POST https://pulselog.alihamzaazam.com/api/v1/tokens \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d ''{"name":"cli-token"}' | jq .
PUBLIC STATUS API NO AUTH REQUIRED
GET /api/status/{slug}

Returns status page data as JSON. Works only for projects with is_public: true. No token required.

EXAMPLE
curl -s https://pulselog.alihamzaazam.com/api/status/your-project-slug | jq .
HTTP STATUS CODES
200
Success
201
Created
204
Deleted
401
Unauthorized
403
Forbidden
404
Not Found
422
Validation Error
500
Server Error