Skip to main content

Overview

This endpoint returns comprehensive details about a single check execution result. This is useful for debugging specific failures, analyzing detailed performance metrics, or examining the exact request/response data for a particular check run.

Response Example

{
  "id": "result_789123456",
  "checkId": "check_api_health",
  "checkName": "Production API Health Check",
  "checkType": "api",
  "runId": "run_456789123",
  "status": "failed",
  "startedAt": "2024-01-25T14:30:00.000Z",
  "finishedAt": "2024-01-25T14:30:05.240Z",
  "duration": 5240,
  "location": {
    "id": "us-east-1",
    "name": "N. Virginia, USA",
    "region": "us-east-1",
    "provider": "AWS",
    "coordinates": {
      "latitude": 39.0458,
      "longitude": -77.5081
    }
  },
  "environment": {
    "runtimeVersion": "16.x",
    "browserVersion": null,
    "userAgent": "Checkly/1.0 Node.js/16.14.0"
  },
  "request": {
    "method": "GET",
    "url": "https://api.production.com/health",
    "headers": {
      "User-Agent": "Checkly/1.0 Node.js/16.14.0",
      "Accept": "application/json",
      "X-Request-ID": "req_789123456"
    },
    "body": null,
    "bodySize": 0
  },
  "response": {
    "statusCode": 500,
    "statusText": "Internal Server Error",
    "headers": {
      "content-type": "application/json; charset=utf-8",
      "content-length": "67",
      "server": "nginx/1.18.0",
      "date": "Thu, 25 Jan 2024 14:30:05 GMT",
      "connection": "keep-alive",
      "x-response-time": "4832ms"
    },
    "body": "{\"error\": \"Database connection failed\", \"code\": \"DB_CONNECTION_ERROR\"}",
    "bodySize": 67,
    "responseTime": 4832,
    "redirectCount": 0,
    "redirects": []
  },
  "error": {
    "name": "AssertionError",
    "message": "Expected status code 200 but got 500",
    "stack": "AssertionError: Expected status code 200 but got 500\n    at checkAssertion (file:///tmp/check.js:45:12)\n    at runCheck (file:///tmp/check.js:120:8)",
    "type": "assertion_error",
    "code": "ASSERTION_FAILED"
  },
  "assertions": [
    {
      "id": "assertion_1",
      "source": "STATUS_CODE",
      "property": "",
      "comparison": "EQUALS",
      "target": "200",
      "actual": "500",
      "passed": false,
      "message": "Expected status code to equal 200, but got 500"
    },
    {
      "id": "assertion_2",
      "source": "RESPONSE_TIME",
      "property": "",
      "comparison": "LESS_THAN",
      "target": "2000",
      "actual": "4832",
      "passed": false,
      "message": "Expected response time to be less than 2000ms, but got 4832ms"
    },
    {
      "id": "assertion_3",
      "source": "JSON_BODY",
      "property": "$.status",
      "comparison": "EQUALS",
      "target": "healthy",
      "actual": null,
      "passed": false,
      "message": "Property $.status not found in response body"
    }
  ],
  "timing": {
    "dns": 18,
    "tcp": 34,
    "tls": 67,
    "firstByte": 4689,
    "download": 24,
    "total": 4832,
    "phases": {
      "blocked": 0,
      "connecting": 119,
      "sending": 0,
      "waiting": 4689,
      "receiving": 24
    }
  },
  "network": {
    "ip": "54.239.28.85",
    "port": 443,
    "protocol": "HTTP/1.1",
    "remoteAddress": "54.239.28.85:443"
  },
  "certificate": {
    "subject": "CN=api.production.com",
    "issuer": "CN=Amazon RSA 2048 M01, O=Amazon, C=US",
    "validFrom": "2023-11-01T00:00:00.000Z",
    "validTo": "2024-11-30T23:59:59.000Z",
    "serialNumber": "0a1b2c3d4e5f6789",
    "fingerprint": "sha256:1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890"
  },
  "tags": ["api", "production", "health"],
  "triggeredBy": "schedule",
  "triggeredAt": "2024-01-25T14:30:00.000Z",
  "metadata": {
    "checkVersion": "1.2.3",
    "accountId": "550e8400-e29b-41d4-a716-446655440000",
    "groupId": "group_production_apis",
    "environmentVariables": {
      "API_BASE_URL": "https://api.production.com",
      "TIMEOUT_MS": "5000"
    }
  },
  "performance": {
    "resourcesLoaded": 1,
    "transferSize": 67,
    "resourceSize": 67,
    "compressionRatio": 1.0
  }
}

Common Use Cases

Debugging Failed Checks

Investigate specific check failures with detailed error analysis
GET /v1/check-results/{checkId}/{resultId}

Performance Analysis

Analyze performance bottlenecks and timing breakdowns
GET /v1/check-results/{checkId}/{resultId}

Security Analysis

Examine SSL certificates and security headers
GET /v1/check-results/{checkId}/{resultId}

Compliance Reporting

Generate detailed audit trails and compliance documentation
GET /v1/check-results/{checkId}/{resultId}

Detailed Information Sections

Environment Information:
  • Runtime version (Node.js, browser version)
  • User agent string used for requests
  • Geographic location where check executed
  • Network provider information
Timing Details:
  • Precise start and finish timestamps
  • Total execution duration
  • Detailed timing breakdown by phase
  • Network protocol information
Metadata:
  • Check configuration version
  • Account and group associations
  • Environment variables used
  • Trigger source (schedule, API, manual)
Complete Request Information:
  • HTTP method and full URL
  • All request headers sent
  • Request body content and size
  • Request ID for tracing
Complete Response Information:
  • Status code and status text
  • All response headers received
  • Response body content and size
  • Redirect information if applicable
  • Compression details
Network-Level Details:
  • Resolved IP address and port
  • Protocol version used
  • SSL/TLS certificate information
  • Connection reuse information
Timing Breakdown:
  • DNS resolution time
  • TCP connection establishment
  • TLS handshake duration
  • Time to first byte
  • Content download time
Network Performance:
  • Total transfer size
  • Compression ratios
  • Resource loading metrics
  • Connection efficiency
Bottleneck Identification: Use timing data to identify where delays occur in the request lifecycle.
Error Information:
  • Error type and classification
  • Detailed error messages
  • Stack traces for debugging
  • Error codes for categorization
Assertion Details:
  • Each assertion that was evaluated
  • Expected vs actual values
  • Specific failure reasons
  • Assertion source (status code, headers, body)
Debug Context:
  • Environment variables used
  • Check configuration applied
  • Runtime environment details

Use Cases

Investigate specific check failures in detail:
  • Examine exact error messages and stack traces
  • Review all assertion failures
  • Analyze request/response headers
  • Check timing for timeout issues
// Example: Debug a failed check result
if (result.status === 'failed') {
  console.log(`Failed check: ${result.checkName}`);
  console.log(`Error: ${result.error.message}`);
  
  // Analyze failed assertions
  const failedAssertions = result.assertions.filter(a => !a.passed);
  failedAssertions.forEach(assertion => {
    console.log(`Failed assertion: ${assertion.message}`);
    console.log(`Expected: ${assertion.target}, Got: ${assertion.actual}`);
  });
  
  // Check for timing issues
  if (result.timing.total > 5000) {
    console.log(`Slow response detected: ${result.timing.total}ms`);
    console.log(`Time to first byte: ${result.timing.firstByte}ms`);
  }
}
Analyze performance bottlenecks:
  • Identify slow network components
  • Examine server processing times
  • Analyze compression effectiveness
  • Review certificate validation times
# Example: Analyze performance bottlenecks
timing = result['timing']
total_time = timing['total']

print(f"Performance Analysis for {result['checkName']}:")
print(f"Total time: {total_time}ms")

# Calculate percentage breakdown
dns_pct = (timing['dns'] / total_time) * 100
tcp_pct = (timing['tcp'] / total_time) * 100
tls_pct = (timing['tls'] / total_time) * 100
server_pct = (timing['firstByte'] / total_time) * 100
download_pct = (timing['download'] / total_time) * 100

print(f"DNS resolution: {timing['dns']}ms ({dns_pct:.1f}%)")
print(f"TCP connection: {timing['tcp']}ms ({tcp_pct:.1f}%)")
print(f"TLS handshake: {timing['tls']}ms ({tls_pct:.1f}%)")
print(f"Server processing: {timing['firstByte']}ms ({server_pct:.1f}%)")
print(f"Download: {timing['download']}ms ({download_pct:.1f}%)")

# Identify the slowest component
phases = {
    'DNS': timing['dns'],
    'TCP': timing['tcp'], 
    'TLS': timing['tls'],
    'Server': timing['firstByte'],
    'Download': timing['download']
}
slowest = max(phases, key=phases.get)
print(f"Slowest component: {slowest} ({phases[slowest]}ms)")
Examine security-related information:
  • SSL/TLS certificate details
  • Security headers analysis
  • Protocol version verification
  • Certificate validity checking
# Example: Extract security information
curl -X GET "https://api.checklyhq.com/v1/check-results/check_api_health/result_789123456" \
  -H "Authorization: Bearer cu_1234567890abcdef" \
  -H "X-Checkly-Account: 550e8400-e29b-41d4-a716-446655440000" \
  | jq '.certificate, .network.protocol, .response.headers'
Generate detailed compliance documentation:
  • Document exact response times
  • Record security configurations
  • Track assertion compliance
  • Generate audit trails
// Example: Generate compliance report
const complianceReport = {
  checkName: result.checkName,
  executionTime: result.startedAt,
  location: result.location.name,
  duration: result.duration,
  status: result.status,
  sslValid: new Date(result.certificate.validTo) > new Date(),
  responseTime: result.response.responseTime,
  statusCode: result.response.statusCode,
  assertionsPassed: result.assertions.every(a => a.passed),
  securityHeaders: {
    hasHSTS: 'strict-transport-security' in result.response.headers,
    hasCSP: 'content-security-policy' in result.response.headers,
    hasXFrame: 'x-frame-options' in result.response.headers
  }
};

console.log('Compliance Report:', JSON.stringify(complianceReport, null, 2));

Additional Examples

curl -X GET "https://api.checklyhq.com/v1/check-results/check_api_health/result_789123456" \
  -H "Authorization: Bearer cu_1234567890abcdef" \
  -H "X-Checkly-Account: 550e8400-e29b-41d4-a716-446655440000"
Individual check results provide the most detailed information available about check executions, including complete request/response data, timing breakdowns, and error details for comprehensive debugging and analysis.