Features

API Access

API Access

Sentinel provides a comprehensive RESTful API for programmatic access to your monitoring data. Automate workflows, integrate with your existing tools, and build custom dashboards using our API.

Authentication

All API requests require authentication using API tokens. Tokens are passed in the Authorization header as Bearer tokens.

Creating an API Token

  1. Navigate to User Settings → API Tokens
  2. Click Create New Token
  3. Enter a descriptive name (e.g., "CI/CD Pipeline", "Monitoring Dashboard")
  4. Click Create and copy your token immediately
  5. Store the token securely - it won't be shown again

Security Best Practices

  • Never commit API tokens to version control
  • Store tokens in environment variables or secret managers
  • Rotate tokens regularly
  • Use separate tokens for different applications or environments
  • Revoke tokens immediately if compromised

Making API Requests

Include your API token in the Authorization header:

curl https://sentinel.rootstuff.io/api/monitors \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Available Endpoints

Monitors
  • GET /api/monitors - List all monitors
  • GET /api/monitors/{id} - Get monitor details
  • POST /api/monitors - Create a new monitor
  • PUT /api/monitors/{id} - Update a monitor
  • DELETE /api/monitors/{id} - Delete a monitor
  • POST /api/monitors/{id}/check - Trigger manual check
  • POST /api/monitors/{id}/pause - Pause monitoring
  • POST /api/monitors/{id}/resume - Resume monitoring
Incidents
  • GET /api/incidents - List all incidents
  • GET /api/incidents/{id} - Get incident details
  • GET /api/monitors/{id}/incidents - Get incidents for a monitor
  • POST /api/incidents - Create an incident
  • PUT /api/incidents/{id} - Update an incident
  • DELETE /api/incidents/{id} - Delete an incident
  • POST /api/incidents/{id}/resolve - Resolve an incident

Example: List Monitors

curl https://sentinel.rootstuff.io/api/monitors \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

# Response:
{
  "data": [
    {
      "id": 1,
      "url": "https://example.com",
      "status": "online",
      "check_interval": 5,
      "last_checked_at": "2025-10-03T10:30:00Z",
      "is_paused": false
    }
  ]
}

Example: Create Monitor

curl -X POST https://sentinel.rootstuff.io/api/monitors \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "check_interval": 5,
    "check_types": ["ssl", "dns"]
  }'

# Response:
{
  "id": 2,
  "url": "https://example.com",
  "status": "pending",
  "check_interval": 5,
  "created_at": "2025-10-03T10:30:00Z"
}

Query Parameters

Filter and paginate your API requests:

# List monitors with filters
GET /api/monitors?status=online&per_page=50&sort=url

# List incidents by status
GET /api/incidents?status=open&start_date=2025-10-01

# List incidents for a specific monitor
GET /api/monitors/1/incidents?status=resolved

Rate Limiting

API requests are rate-limited to ensure service stability. Current limits:

  • 60 requests per minute per API token
  • Rate limit headers included in all responses
  • 429 status code returned when limit exceeded

Error Handling

The API uses standard HTTP status codes:

  • 200 OK: Request succeeded
  • 201 Created: Resource created successfully
  • 204 No Content: Resource deleted successfully
  • 400 Bad Request: Invalid request data
  • 401 Unauthorized: Missing or invalid token
  • 403 Forbidden: Plan doesn't include API access
  • 404 Not Found: Resource not found
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error

Common Use Cases

  • CI/CD Integration: Pause monitoring during deployments
  • Custom Dashboards: Build internal dashboards with live monitoring data
  • Automation: Automatically add new monitors to monitoring
  • Reporting: Generate custom uptime reports and analytics
  • Incident Management: Integrate with your ticketing system

Response Format

All API responses are returned as JSON. Pagination follows Laravel's standard format:

{
  "data": [...],
  "current_page": 1,
  "per_page": 20,
  "total": 50,
  "last_page": 3,
  "next_page_url": "https://sentinel.rootstuff.io/api/monitors?page=2",
  "prev_page_url": null
}

Need Help?

Check out our API Reference for detailed endpoint documentation, or see the CI/CD Integration guide for deployment examples.