# Get the response-time report — API reference

> Returns response-time KPIs, coverage and report provenance for the selected window, with optional file formats.

Source: https://upfour.io/docs/api/reports/get-the-response-time-report

[Developers](https://upfour.io/docs/api.md)/[Reports](https://upfour.io/docs/api/reports.md)

Returns response-time KPIs, coverage and report provenance for the selected window, with optional file formats.

GET https://app.upfour.io/v1/reports/response-time

scope report.read stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `format` optional | string one of`csv` `json` `pdf` `xlsx` | query parameter · Without it the answer is the JSON envelope; with it the answer is a file download of that format. |
| `preset` optional | string one of`24h` `7d` `30d` `90d` `mtd` `last_month` `qtd` `ytd` | query parameter · Reporting window; `period` is accepted as an alias. Without `preset`, `from` and `to` the window is the last 30 days. The window is cut to the plan's history. |
| `from` optional | string | query parameter · Start of the window: an RFC 3339 timestamp or a date (`YYYY-MM-DD`, in `tz`). Replaces `preset`. |
| `to` optional | string | query parameter · End of the window, same formats as `from`; a date means the end of that day. Defaults to now. |
| `tz` optional | string | query parameter · IANA time zone for calendar presets and dates. Defaults to the Company's report time zone. |
| `lang` optional | string one of`en` `de` default `"en"` | query parameter · Language of the report text. |
| `monitor_id` optional | uuid | query parameter · Only this monitor; repeat the parameter or send a comma-separated list for several. |
| `severity` optional | string | query parameter · Incident reports only: keep incidents of this severity; repeat the parameter or send a comma-separated list for several. |
| `q` optional | string | query parameter · Case-insensitive text: keeps monitors whose name, or incidents whose title, contains it. |
| `business_hours` optional | string | query parameter · Count only these hours in SLA and response-time reports, for example `mon-fri,09:00-17:00` (several groups separated by `;`). The hours are read in `tz`, or in UTC when `tz` is not sent. |
| `client_id` optional | uuid | query parameter · Report on one client. |
| `all_clients` optional | boolean | query parameter · `true` includes all clients; without `client_id` the report covers the Company level. |

## Returns

A successful request returns `200` with application/json, application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv.

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | ReportDocument | |
| ReportDocument · 89 fields FieldTypeDescription `branding` ReportDocumentBranding ReportDocumentBranding · 8 fields FieldTypeDescription `accent_color_hex` string `footer_text` string `logo_data_url` string `logo_url` string `org_name` string `primary_color_hex` string `watermark` string `website_url` string `content_hash` string Fingerprint of the content; GET /reports/verify/{hash} confirms it. `generated_at` string (date-time) `kpis` ReportKPI[]  · nullable Each item · 10 fields FieldTypeDescription `label` string `value` string Formatted for display, for example "99.94 %". `delta` ReportKPIDelta ReportKPIDelta · 4 fields FieldTypeDescription `abs` number `direction` string one of`up` `down` `flat` `good` boolean `pct` number `key` string `raw` any The machine-readable value (a number, mostly); absent when there is no data. `unit` string `org` ReportCompany ReportCompany · 2 fields FieldTypeDescription `id` uuid `name` string `range` ReportRange ReportRange · 5 fields FieldTypeDescription `from` string (date-time) `to` string (date-time) `clamped` boolean true when the window was cut to the plan's history. `preset` string one of`24h` `1d` `7d` `30d` `90d` `mtd` `last_month` `qtd` `ytd` `timezone` string `sections` ReportSection[]  · nullable Each item · 20 fields FieldTypeDescription `heading` string `charts` ReportChart[] Each item · 9 fields FieldTypeDescription `categories` string[]  · nullable `kind` string one of`line` `bar` `donut` `stacked_bar` `heatmap` `series` ReportChartSeries[]  · nullable Each item · 4 fields FieldTypeDescription `data` number[]  · nullable `name` string `color` string `dash` boolean `title` string `y_unit` string `note` string `tables` ReportTable[] Each item · 7 fields FieldTypeDescription `columns` ReportColumn[]  · nullable Each item · 4 fields FieldTypeDescription `header` string `align` string one of`left` `right` `center` `key` string `kind` string one of`text` `number` `percent` `duration` `timestamp` `rows` ReportCell[][]  · nullable `title` string `title` string `type` string one of`executive_summary` `monitor_report` `monitor_sla` `downtime_ledger` `incident_analytics` `response_time` `trends` `client` ReportClient ReportClient · 3 fields FieldTypeDescription `id` uuid `name` string `logo_data_url` string `coverage` ReportCoverage ReportCoverage · 4 fields FieldTypeDescription `observed_days` integer `total_days` integer `partial_buckets` boolean `unavailable` boolean `date_format` string one of`day_month_year` `month_day_year` `iso` `lang` string one of`en` `de` `narrative` string `period` string `provenance` ReportProvenance ReportProvenance · 13 fields FieldTypeDescription `data_sources` string[]  · nullable Where the figures come from, for example hot:check_results or cold:check_result_archive_daily_stats. `tool` string `hot_window` ReportRange ReportRange · 5 fields FieldTypeDescription `from` string (date-time) `to` string (date-time) `clamped` boolean true when the window was cut to the plan's history. `preset` string one of`24h` `1d` `7d` `30d` `90d` `mtd` `last_month` `qtd` `ytd` `timezone` string `manifests` ReportArchiveManifest[] Each item · 4 fields FieldTypeDescription `max_created_at` string (date-time) `min_created_at` string (date-time) `sha256` string `storage_key` string `sla` ReportSLAAssessment ReportSLAAssessment · 6 fields FieldTypeDescription `evaluated` integer `inconclusive` integer `met` integer `monitors` integer `no_data` integer `partial` integer `subtitle` string | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | [bad_request](https://upfour.io/docs/api/errors#code-bad_request) | The request is malformed or fails validation. |
| 403 | [permission_denied](https://upfour.io/docs/api/errors#code-permission_denied) | The credentials do not permit this action. |

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

[PreviousGet the incident report](https://upfour.io/docs/api/reports/get-the-incident-report.md) [NextGet the service-level report](https://upfour.io/docs/api/reports/get-the-service-level-report.md)

## Request

### cURL

```bash
curl -s "https://app.upfour.io/v1/reports/response-time" \
  -H "Authorization: Bearer $UP4_API_KEY"
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/reports/response-time", {
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://app.upfour.io/v1/reports/response-time",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.upfour.io/v1/reports/response-time", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(out))
}
```

### PHP

```php
<?php
$ch = curl_init("https://app.upfour.io/v1/reports/response-time");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
    ],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 200

```json
{
  "data": {
    "branding": {
      "accent_color_hex": "#294E9E",
      "footer_text": "Acme GmbH",
      "org_name": "Acme GmbH",
      "primary_color_hex": "#294E9E"
    },
    "content_hash": "",
    "coverage": {
      "observed_days": 1,
      "total_days": 31
    },
    "date_format": "day_month_year",
    "generated_at": "1734-07-18T09:15:00Z",
    "kpis": [
      {
        "key": "average",
        "label": "Average",
        "raw": 97.5,
        "unit": "ms",
        "value": "98 ms"
      },
      {
        "key": "median_p50",
        "label": "Median (P50)",
        "raw": 97.5,
        "unit": "ms",
        "value": "98 ms*"
      },
      {
        "key": "p95",
        "label": "P95",
        "raw": 113.25,
        "unit": "ms",
        "value": "113 ms*"
      },
      {
        "key": "p99",
        "label": "P99",
        "unit": "ms",
        "value": "n/a"
      },
      {
        "key": "slowest_sample",
        "label": "Slowest sample",
        "raw": 115,
        "unit": "ms",
        "value": "115 ms"
      },
      {
        "key": "successful_checks",
        "label": "Successful checks",
        "raw": 6,
        "value": "6"
      }
    ],
    "lang": "en",
    "org": {
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "Acme GmbH"
    },
    "period": "27 Sep 2026 09:00:00 - 27 Oct 2026 09:00:00 (end exclusive) · UTC",
    "range": {
      "from": "2026-09-27T09:00:00Z",
      "preset": "30d",
      "timezone": "UTC",
      "to": "2026-10-27T09:00:00Z"
    },
    "sections": [
      {
        "heading": "Coverage",
        "note": "Values marked * (p50/p95/p99, connection timing) use available full-resolution data within the last 7d. With no such samples in this period, they are shown as n/a. Older days retain daily averages, p95 and maxima. The window average and check counts span the whole period. Daily and regional charts use 300-second rollups for recent data and daily archives for older data. Their p95 is the maximum of bucket percentiles, not an exact whole-period percentile. p99 is unavailable at this granularity."
      },
      {
        "charts": [
          {
            "categories": [],
            "kind": "line",
            "series": [
              {
                "data": [],
                "name": "Avg"
              },
              {
                "dash": true,
                "data": [],
                "name": "P95"
              }
            ],
            "title": "Daily latency · UTC",
            "y_unit": "ms"
          }
        ],
        "heading": "Latency over time",
        "tables": [
          {
            "columns": [
              {
                "header": "Date (UTC)",
                "key": "date_utc",
                "kind": "text"
              },
              {
                "align": "right",
                "header": "Avg (ms)",
                "key": "avg_ms",
                "kind": "number"
              },
              {
                "align": "right",
                "header": "P95 (ms)",
                "key": "p95_ms",
                "kind": "number"
              },
              {
                "header": "Source",
                "key": "source",
                "kind": "text"
              }
            ],
            "rows": null
          }
        ]
      },
      {
        "heading": "Slowest endpoints",
        "note": "Top monitors by p95 latency over the full-resolution window.",
        "tables": [
          {
            "columns": [
              {
                "header": "Monitor",
                "key": "monitor",
                "kind": "text"
              },
              {
                "align": "right",
                "header": "Checks",
                "key": "checks",
                "kind": "number"
              },
              {
                "align": "right",
                "header": "Avg (ms)",
                "key": "avg_ms",
                "kind": "number"
              },
              {
                "align": "right",
                "header": "P95 (ms)",
                "key": "p95_ms",
                "kind": "number"
              },
              {
                "align": "right",
                "header": "Max (ms)",
                "key": "max_ms",
                "kind": "number"
              }
            ],
            "rows": [
              [
                {
                  "text": "Marketing website"
                },
                {
                  "raw": 6,
                  "text": "6"
                },
                {
                  "raw": 97.5,
                  "text": "97.5"
                },
                {
                  "raw": 113.25,
                  "text": "113.2"
                },
                {
                  "raw": 115,
                  "text": "115"
                }
              ]
            ]
          }
        ]
      }
    ],
    "subtitle": "Latency distribution & timing breakdown · last 30 days",
    "title": "Response-time report — Acme GmbH",
    "type": "response_time"
  }
}
```

### 400

```json
{
  "error": {
    "code": "bad_request",
    "message": "The request is malformed or fails validation.",
    "request_id": "req_…"
  }
}
```

### 403

```json
{
  "error": {
    "code": "permission_denied",
    "message": "The credentials do not permit this action.",
    "request_id": "req_…"
  }
}
```
