GET
/
v1
/
analytics
/
api-checks
/
{id}
API checks
curl --request GET \
  --url https://api.checklyhq.com/v1/analytics/api-checks/{id} \
  --header 'Authorization: <api-key>'
{
  "checkId": "<string>",
  "name": "<string>",
  "checkType": "API",
  "activated": true,
  "muted": true,
  "frequency": 123,
  "from": "2023-12-25",
  "to": "2023-12-25",
  "tags": [
    "<string>"
  ],
  "series": [
    "<string>"
  ],
  "pagination": {
    "page": 123,
    "limit": 123
  },
  "metadata": {
    "responseTime": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "availability": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "retries": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_avg": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_max": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_median": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_min": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_p50": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_p90": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_p95": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_p99": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_stddev": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "responseTime_sum": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_avg": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_max": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_median": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_min": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_p50": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_p90": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_p95": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_p99": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_stddev": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "wait_sum": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_avg": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_max": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_median": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_min": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_p50": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_p90": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_p95": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_p99": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_stddev": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "dns_sum": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_avg": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_max": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_median": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_min": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_p50": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_p90": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_p95": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_p99": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_stddev": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "tcp_sum": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_avg": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_max": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_median": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_min": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_p50": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_p90": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_p95": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_p99": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_stddev": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "firstByte_sum": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_avg": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_max": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_median": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_min": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_p50": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_p90": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_p95": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_p99": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_stddev": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    },
    "download_sum": {
      "unit": "milliseconds",
      "label": "<string>",
      "aggregation": "avg"
    }
  }
}

Overview

This endpoint provides detailed analytics for API checks, including response times, success rates, error rates, and other performance metrics over time. This data is essential for understanding the performance trends of your API endpoints.

Response Example

{
  "data": {
    "checkId": "api_check_123456",
    "checkName": "Production API Health Check",
    "timeframe": {
      "from": "2024-01-01T00:00:00.000Z",
      "to": "2024-01-31T23:59:59.999Z"
    },
    "metrics": {
      "averageResponseTime": 245.5,
      "p95ResponseTime": 380.2,
      "p99ResponseTime": 520.8,
      "successRate": 99.2,
      "errorRate": 0.8,
      "totalRequests": 8640,
      "successfulRequests": 8571,
      "failedRequests": 69
    },
    "timeline": [
      {
        "timestamp": "2024-01-01T00:00:00.000Z",
        "responseTime": 234.5,
        "status": "success"
      },
      {
        "timestamp": "2024-01-01T00:10:00.000Z",
        "responseTime": 256.2,
        "status": "success"
      }
    ],
    "locationBreakdown": [
      {
        "location": "us-east-1",
        "locationName": "N. Virginia, USA",
        "averageResponseTime": 234.5,
        "successRate": 99.5,
        "requestCount": 2880
      },
      {
        "location": "eu-west-1",
        "locationName": "Ireland, Europe",
        "averageResponseTime": 267.8,
        "successRate": 98.9,
        "requestCount": 2880
      }
    ]
  }
}

Query Parameters

  • from (string): Start date for analytics data (ISO 8601 format)
  • to (string): End date for analytics data (ISO 8601 format)
  • period (string): Predefined time period (24h, 7d, 30d, 90d)
Default: Last 30 days if no parameters provided
  • granularity (string): Data point granularity (5m, 15m, 1h, 1d)
  • locations (array): Filter by specific monitoring locations
  • includeTimeline (boolean): Include detailed timeline data (default: true)
Example:
?from=2024-01-01T00:00:00Z&to=2024-01-31T23:59:59Z&granularity=1h&locations=us-east-1,eu-west-1

Metrics Explained

Response Time Metrics

  • Average Response Time: Mean response time across all requests
  • P95 Response Time: 95th percentile response time
  • P99 Response Time: 99th percentile response time

Success Metrics

  • Success Rate: Percentage of successful requests (HTTP 2xx)
  • Error Rate: Percentage of failed requests
  • Total Requests: Total number of check executions

Geographic Breakdown

  • Location Performance: Response times by monitoring location
  • Regional Success Rates: Success rates per geographic region
  • Request Distribution: How requests are distributed across locations

Trend Analysis

  • Timeline Data: Minute-by-minute or hourly performance data
  • Performance Trends: Identify performance degradation patterns
  • Anomaly Detection: Spot unusual response time spikes

Use Cases

Track API response times and identify performance bottlenecks:
  • Monitor average response times across different time periods
  • Identify peak usage times and performance degradation
  • Compare performance across different monitoring locations
  • Set up alerts based on response time thresholds
Ensure your APIs meet service level agreements:
  • Track success rates against SLA targets
  • Monitor P95 and P99 response times for SLA compliance
  • Generate reports for stakeholders and customers
  • Identify trends that might impact SLA compliance
Use analytics data for infrastructure planning:
  • Analyze request volume trends over time
  • Identify peak usage periods for scaling decisions
  • Monitor performance impact of traffic increases
  • Plan infrastructure upgrades based on growth trends
Optimize global API performance:
  • Compare response times across different regions
  • Identify geographic areas with performance issues
  • Make decisions about CDN or additional infrastructure
  • Optimize API routing based on geographic performance

Code Examples

curl -X GET "https://api.checklyhq.com/v1/analytics/api-checks/api_check_123456?from=2024-01-01T00:00:00Z&to=2024-01-31T23:59:59Z&granularity=1h" \
  -H "Authorization: Bearer cu_1234567890abcdef" \
  -H "X-Checkly-Account: 550e8400-e29b-41d4-a716-446655440000"
Analytics data is updated in real-time and includes data from all monitoring locations configured for your API check.

Authorizations

Authorization
string
header
required

The Checkly Public API uses API keys to authenticate requests. You can get the API Key here.

Your API key is like a password: keep it secure!

Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.

For example, set Authorization header while using cURL:

curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"

Headers

x-checkly-account
string

Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

Path Parameters

id
string
required

Query Parameters

from
string<date>

Custom start time of reporting window in unix timestamp format. Setting a custom "from" timestamp overrides the use of any "quickRange".

to
string<date>

Custom end time of reporting window in unix timestamp format. Setting a custom "to" timestamp overrides the use of any "quickRange".

quickRange
enum<string>
default:last24Hours

Preset reporting windows are used for quickly generating report on commonly used windows. Can be overridden by using a custom "to" and "from" timestamp.

Available options:
last24Hours,
last7Days,
last30Days,
thisWeek,
thisMonth,
lastWeek,
lastMonth
aggregationInterval
number

The time interval to use for aggregating metrics in minutes. For example, five minutes is 5, 24 hours is 1440.

Required range: 1 <= x <= 43200
filterByStatus
enum<string>[]

Filter based on whether a check result was either failing or passing

groupBy
enum<string>

Determines how the series data is grouped. Note that grouped queries are a bit more expensive and might take longer.

Available options:
runLocation,
statusCode
metrics
enum<string>[]
required

Available metrics for API Checks. You can pass multiple metrics as a comma separated string.

limit
integer
default:10

Limit the number of results

Required range: 1 <= x <= 100
page
number
default:1

Page number

Response

Success

checkId
string
name
string
checkType
enum<string>
Available options:
API,
BROWSER,
HEARTBEAT,
MULTI_STEP,
TCP,
PLAYWRIGHT,
URL
activated
boolean
muted
boolean
frequency
number
from
string<date>
to
string<date>
tags
string[]
series
string[]
pagination
object
metadata
object