Skip to content

Dashboard API Reference

This guide provides detailed information about the Dashboard API endpoints.

Authentication

All dashboard endpoints require authentication using a Project API Token. Include your token in the Authorization header:

bash
Authorization: Bearer YOUR_PROJECT_API_TOKEN

For more information about authentication, see the Authentication Guide.

Get Dashboard Statistics

Retrieve dashboard statistics for your project, including overall uptime, monitor counts, and average response time.

http
GET /api/v1/dashboard/statistics
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET "https://app.uptinio.com/api/v1/dashboard/statistics?period=30d" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Query Parameters

ParameterTypeDescriptionDefault
periodstringTime period for uptime calculation (24h, 7d, 30d)30d

Response

json
{
  "overall_uptime": 99.95,
  "period": "30d",
  "period_start": "2024-01-01T00:00:00Z",
  "period_end": "2024-01-31T23:59:59Z",
  "total_monitors": 133,
  "active_monitors": 113,
  "down_monitors": 20,
  "paused_monitors": 0,
  "operational_monitors": 113,
  "average_response_time": 4592.038,
  "status_counts": {
    "success": 113,
    "failure": 20,
    "paused": 0
  }
}

Response Fields

FieldTypeDescription
overall_uptimefloatOverall uptime percentage across all monitors for the specified period
periodstringTime period used for calculation (24h, 7d, 30d)
period_startstringISO 8601 timestamp of the period start
period_endstringISO 8601 timestamp of the period end
total_monitorsintegerTotal number of network monitors in the project
active_monitorsintegerNumber of monitors with status 'success' and not paused
down_monitorsintegerNumber of monitors with status 'failure'
paused_monitorsintegerNumber of monitors that are paused
operational_monitorsintegerNumber of monitors that are operational (same as active_monitors)
average_response_timefloat|nullAverage response time in milliseconds across all monitors (from last 24 hours)
status_countsobjectBreakdown of monitors by status
status_counts.successintegerNumber of monitors with 'success' status
status_counts.failureintegerNumber of monitors with 'failure' status
status_counts.pausedintegerNumber of monitors that are paused

Notes

  • Overall Uptime: Calculated as the average success rate across all monitors for the specified time period.
  • Average Response Time: Calculated from transactions in the last 24 hours, excluding SSL and domain transactions.
  • Period Options:
    • 24h: Last 24 hours
    • 7d: Last 7 days
    • 30d: Last 30 days (default)
  • Monitor Status Definitions:
    • success: Monitor is operational with no ongoing incidents
    • failure: Monitor has ongoing incidents
    • paused: Monitor is manually paused
    • initializing: Monitor has no transactions yet

Example Use Cases

Get 30-day statistics (default):

bash
curl -X GET "https://app.uptinio.com/api/v1/dashboard/statistics" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN"

Get 24-hour statistics:

bash
curl -X GET "https://app.uptinio.com/api/v1/dashboard/statistics?period=24h" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN"

Get 7-day statistics:

bash
curl -X GET "https://app.uptinio.com/api/v1/dashboard/statistics?period=7d" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN"

Error Codes

CodeDescription
unauthorizedInvalid or missing authentication token

Next Steps