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
- Navigate to User Settings → API Tokens
- Click Create New Token
- Enter a descriptive name (e.g., "CI/CD Pipeline", "Monitoring Dashboard")
- Click Create and copy your token immediately
- 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 monitorsGET /api/monitors/{id}- Get monitor detailsPOST /api/monitors- Create a new monitorPUT /api/monitors/{id}- Update a monitorDELETE /api/monitors/{id}- Delete a monitorPOST /api/monitors/{id}/check- Trigger manual checkPOST /api/monitors/{id}/pause- Pause monitoringPOST /api/monitors/{id}/resume- Resume monitoring
Incidents
GET /api/incidents- List all incidentsGET /api/incidents/{id}- Get incident detailsGET /api/monitors/{id}/incidents- Get incidents for a monitorPOST /api/incidents- Create an incidentPUT /api/incidents/{id}- Update an incidentDELETE /api/incidents/{id}- Delete an incidentPOST /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.