API Reference - RESTful Endpoints
Real-time infrastructure monitoring for DevOps
Sidebar Navigation
Authentication & Scopes
Bearer token setup, read/write permissions, and team-level access controls.
Webhook Payloads
Event schemas for state changes, SLA breaches, and manual incident triggers.
Error Handling
HTTP status codes, retry-after headers, and throttling guidelines.
Endpoint List
Interact with the StatusPulse monitoring engine using standard HTTP methods. All responses return JSON with consistent envelope formatting and strict schema validation.
/v1/monitors
Create a new HTTP, TCP, or DNS monitor. Define check intervals, regional probe distribution, and expected response codes. Returns a unique `monitor_id`.
/v1/status/{monitor_id}
Fetch real-time health state, last probe timestamp, latency percentiles, and rolling 24-hour uptime metrics for a specific target.
/v1/incidents
Manually trigger, acknowledge, or resolve incidents. Sync with PagerDuty or Jira by passing external ticket IDs in the payload.
/v1/monitors/{monitor_id}/config
Update monitor parameters without service interruption. Adjust timeout thresholds, maintenance windows, and notification routing rules.
Code Examples
Production-ready snippets for integrating StatusPulse into your automation pipelines, internal dashboards, and incident response workflows.
cURL: Provision a New Monitor
Register a production API health check with 30-second intervals and Slack escalation.
curl -X POST https://api.statuspulse.io/v1/monitors \
-H "Authorization: Bearer sk_live_8f3a9c2d1e4b7f6a" \
-H "Content-Type: application/json" \
-d '{
"name": "Checkout Service Gateway",
"type": "http",
"url": "https://api.acmecorp.com/v2/health",
"interval_seconds": 30,
"expected_status": 200,
"escalation_policy": "oncall_senior",
"notifications": ["slack://hooks/T0A1B2C3D/B0X9Y8Z7W/abc123"]
}'
Python: Query Real-Time Status
Retrieve live metrics and calculate SLA compliance for dashboard rendering.
import requests
API_TOKEN = "sk_live_8f3a9c2d1e4b7f6a"
MONITOR_ID = "mon_9x2k4p7q"
BASE_URL = "https://api.statuspulse.io/v1"
headers = {"Authorization": f"Bearer {API_TOKEN}"}
response = requests.get(f"{BASE_URL}/status/{MONITOR_ID}", headers=headers)
if response.status_code == 200:
data = response.json()
print(f"Current State: {data['state']}")
print(f"Avg Response: {data['metrics']['p95_latency_ms']}ms")
print(f"Uptime (7d): {data['metrics']['uptime_pct']}%")
else:
print(f"API Error: {response.status_code} - {response.text}")
Python: Acknowledge Active Incident
Programmatically update incident state to sync with internal ticketing workflows.
import requests
headers = {"Authorization": f"Bearer {API_TOKEN}"}
payload = {
"incident_id": "inc_4m8n2v5w",
"state": "acknowledged",
"assignee": "maya.rodriguez@acmecorp.com",
"notes": "Investigating Redis connection pool saturation. Scaling read replicas."
}
response = requests.post(f"{BASE_URL}/incidents", json=payload, headers=headers)
print(response.json()["message"])