# Get the service-level report — API reference

> Returns SLA KPIs, monitor coverage and report provenance for the selected window, with optional file formats.

Source: https://upfour.io/docs/api/reports/get-the-service-level-report

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

Returns SLA KPIs, monitor coverage and report provenance for the selected window, with optional file formats.

GET https://app.upfour.io/v1/reports/sla

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. |
| `target` optional | number 0–100 | query parameter · Replaces every monitor's SLA target (percent, 0 to 100). |

## 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 response-time report](https://upfour.io/docs/api/reports/get-the-response-time-report.md) [NextGet the downtime ledger](https://upfour.io/docs/api/reports/get-the-downtime-ledger.md)

## Request

### cURL

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

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/reports/sla", {
  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/sla",
    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/sla", 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/sla");
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": "monitors_meeting_sla",
        "label": "Monitors meeting SLA",
        "raw": 1,
        "value": "1 / 1"
      },
      {
        "key": "average_sla",
        "label": "Average SLA",
        "raw": 100,
        "unit": "%",
        "value": "100.00 %"
      },
      {
        "key": "worst_sla",
        "label": "Worst SLA",
        "raw": 100,
        "unit": "%",
        "value": "100.00 %"
      },
      {
        "key": "incident_downtime",
        "label": "Incident downtime",
        "raw": 12,
        "unit": "min",
        "value": "12m"
      },
      {
        "key": "no_data",
        "label": "No data",
        "raw": 2,
        "value": "2"
      },
      {
        "key": "partial_observation",
        "label": "Partial observation",
        "raw": 1,
        "value": "1"
      }
    ],
    "lang": "en",
    "narrative": "1 of 3 monitors evaluated using verified checks. See each monitor's observed dates and days below. Days without measurements are not counted as uptime. Results labelled observed data apply only to those observations, not the full selected period.",
    "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": "Service levels",
        "note": "Achieved % = (1 − failed/total) using verified observations within the selected report range. Days without measurements are not counted as uptime. An observed-data result does not certify the entire selected period. A policy window narrows that range per monitor when it is shorter, but never expands it beyond the period shown in this report. Paused or new monitors without checks are shown as No data and excluded from the headline. Incident downtime is a separate incident-record total and does not alter the check-based achieved percentage.",
        "tables": [
          {
            "columns": [
              {
                "header": "Monitor",
                "key": "monitor",
                "kind": "text"
              },
              {
                "align": "right",
                "header": "Target",
                "key": "target",
                "kind": "percent"
              },
              {
                "align": "right",
                "header": "Achieved",
                "key": "achieved",
                "kind": "percent"
              },
              {
                "align": "right",
                "header": "Budget used",
                "key": "budget_used",
                "kind": "percent"
              },
              {
                "align": "right",
                "header": "Downtime",
                "key": "downtime",
                "kind": "duration"
              },
              {
                "align": "right",
                "header": "Outages",
                "key": "outages",
                "kind": "number"
              },
              {
                "align": "right",
                "header": "Status",
                "key": "status",
                "kind": "text"
              }
            ],
            "rows": [
              [
                {
                  "text": "Docs site"
                },
                {
                  "raw": 99.9,
                  "text": "99.9 %"
                },
                {
                  "emphasis": "muted",
                  "text": "—"
                },
                {
                  "emphasis": "muted",
                  "text": "—"
                },
                {
                  "raw": 0,
                  "text": "—"
                },
                {
                  "raw": 0,
                  "text": "0"
                },
                {
                  "emphasis": "muted",
                  "text": "No data"
                }
              ],
              [
                {
                  "text": "Status page"
                },
                {
                  "raw": 99.9,
                  "text": "99.9 %"
                },
                {
                  "emphasis": "muted",
                  "text": "—"
                },
                {
                  "emphasis": "muted",
                  "text": "—"
                },
                {
                  "raw": 0,
                  "text": "—"
                },
                {
                  "raw": 0,
                  "text": "0"
                },
                {
                  "emphasis": "muted",
                  "text": "No data"
                }
              ],
              [
                {
                  "text": "Marketing website"
                },
                {
                  "raw": 99.9,
                  "text": "99.9 %"
                },
                {
                  "emphasis": "good",
                  "raw": 100,
                  "text": "100.00 %"
                },
                {
                  "raw": 0,
                  "text": "0.0 %"
                },
                {
                  "raw": 12,
                  "text": "12m"
                },
                {
                  "raw": 1,
                  "text": "1"
                },
                {
                  "emphasis": "good",
                  "text": "Met (observed data)"
                }
              ],
              [
                {
                  "emphasis": "muted",
                  "text": "Average (evaluated monitors)"
                },
                {
                  "text": "—"
                },
                {
                  "emphasis": "muted",
                  "raw": 100,
                  "text": "100.00 %"
                },
                {
                  "text": "—"
                },
                {
                  "text": "—"
                },
                {
                  "text": "—"
                },
                {
                  "text": "—"
                }
              ]
            ],
            "title": "Service levels by monitor"
          }
        ]
      },
      {
        "heading": "Observation coverage",
        "note": "The dates bound the available data, not a continuous observation period. Each counted UTC day contains at least one verified check after applying the monitor's policy and business hours.",
        "tables": [
          {
            "columns": [
              {
                "header": "Monitor",
                "key": "monitor",
                "kind": "text"
              },
              {
                "header": "Data from (UTC)",
                "key": "data_from_utc",
                "kind": "text"
              },
              {
                "header": "Data through (UTC)",
                "key": "data_through_utc",
                "kind": "text"
              },
              {
                "header": "Days with checks",
                "key": "days_with_checks",
                "kind": "text"
              },
              {
                "header": "Assessment basis",
                "key": "assessment_basis",
                "kind": "text"
              }
            ],
            "rows": [
              [
                {
                  "text": "Docs site"
                },
                {
                  "text": "—"
                },
                {
                  "text": "—"
                },
                {
                  "text": "0 / 31"
                },
                {
                  "text": "No checks in the selected period or business hours"
                }
              ],
              [
                {
                  "text": "Status page"
                },
                {
                  "text": "—"
                },
                {
                  "text": "—"
                },
                {
                  "text": "0 / 31"
                },
                {
                  "text": "No checks in the selected period or business hours"
                }
              ],
              [
                {
                  "text": "Marketing website"
                },
                {
                  "text": "2026-10-27"
                },
                {
                  "text": "2026-10-27"
                },
                {
                  "text": "1 / 31"
                },
                {
                  "text": "Observed data only; fewer days with checks than requested"
                }
              ]
            ],
            "title": "Observation coverage by monitor"
          }
        ]
      },
      {
        "heading": "Outage detail",
        "tables": [
          {
            "columns": [
              {
                "header": "Monitor",
                "key": "monitor",
                "kind": "text"
              },
              {
                "header": "Started",
                "key": "started",
                "kind": "timestamp"
              },
              {
                "header": "Resolved",
                "key": "resolved",
                "kind": "timestamp"
              },
              {
                "align": "right",
                "header": "Duration",
                "key": "duration",
                "kind": "duration"
              },
              {
                "header": "Severity",
                "key": "severity",
                "kind": "text"
              }
            ],
            "rows": [
              [
                {
                  "text": "Marketing website"
                },
                {
                  "raw": "2026-10-24T09:00:00Z",
                  "text": "2026-10-24 09:00 UTC"
                },
                {
                  "raw": "2026-10-24T09:10:00Z",
                  "text": "2026-10-24 09:10 UTC"
                },
                {
                  "raw": 720,
                  "text": "12m"
                },
                {
                  "emphasis": "muted",
                  "text": "warning"
                }
              ]
            ],
            "title": "Outages in the window"
          }
        ]
      }
    ],
    "sla": {
      "evaluated": 1,
      "inconclusive": 0,
      "met": 1,
      "monitors": 3,
      "no_data": 2,
      "partial": 1
    },
    "subtitle": "Targets from SLA policies, with a 99.9 % default where no policy applies · last 30 days",
    "title": "Service-level report — Acme GmbH",
    "type": "monitor_sla"
  }
}
```

### 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_…"
  }
}
```
