Request cURL
curl -s "https://app.upfour.io/v1/reports/runs" \
-H "Authorization: Bearer $UP4_API_KEY"
JavaScript
const res = await fetch("https://app.upfour.io/v1/reports/runs", {
headers: {
Authorization: `Bearer ${process.env.UP4_API_KEY}`,
},
});
console.log(res.status, await res.json());
Python
import os
import requests
res = requests.get(
"https://app.upfour.io/v1/reports/runs",
headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
)
print(res.status_code, res.json())
Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://app.upfour.io/v1/reports/runs", 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
$ch = curl_init("https://app.upfour.io/v1/reports/runs");
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
{
"data": [
{
"content_hash": "721378bc96ef2ddece4a66b447ba60d6a1266860d9cb23f4e0e6c152f30279cb",
"created_at": "2026-10-27T09:00:00Z",
"delivery": {
"attempts": 1,
"next_attempt_at": "2026-10-27T09:00:00Z",
"sent": 0,
"total": 1
},
"error": "1 recipient(s) could not be reached: anna@example.com: email delivery is not configured",
"format": "pdf",
"id": "00000000-0000-4000-8000-000000000001",
"organization_id": "00000000-0000-4000-8000-000000000002",
"output_bytes": 18432,
"output_sha256": "3c8dc35de8b20338c83d488ff7e387f6ff1542a8747f8aa45665c4bacefe149a",
"params": {
"from": "2026-10-20T09:00:00Z",
"lang": "en",
"preset": "7d",
"scope": {
"HideCompanyLevel": false,
"ID": "00000000-0000-4000-8000-000000000003",
"Mode": 1,
"TeamVisibleClientIDs": null
},
"timezone": "Europe/Berlin",
"to": "2026-10-27T09:00:00Z"
},
"range_from": "2026-10-20T09:00:00Z",
"range_to": "2026-10-27T09:00:00Z",
"report_type": "summary",
"requested_by": "00000000-0000-4000-8000-000000000004",
"schedule_id": "00000000-0000-4000-8000-000000000005",
"status": "retrying",
"storage_key": "example/reports/v1/00000000-0000-4000-8000-000000000002/00000000-0000-4000-8000-000000000001.pdf"
},
{
"completed_at": "2026-10-27T09:00:00Z",
"content_hash": "67720e645b28c194f156531039886954216b868a49b6b75701842fc7ca1e80ee",
"created_at": "2026-10-27T09:00:00Z",
"format": "json",
"id": "00000000-0000-4000-8000-000000000006",
"organization_id": "00000000-0000-4000-8000-000000000002",
"params": {
"from": "2026-09-27T09:00:00Z",
"preset": "30d",
"scope": {
"HideCompanyLevel": false,
"ID": "00000000-0000-4000-8000-000000000003",
"Mode": 1,
"TeamVisibleClientIDs": null
},
"timezone": "UTC",
"to": "2026-10-27T09:00:00Z"
},
"range_from": "2026-09-27T09:00:00Z",
"range_to": "2026-10-27T09:00:00Z",
"report_type": "monitor_report",
"requested_by": "00000000-0000-4000-8000-000000000004",
"status": "succeeded"
},
{
"completed_at": "2026-10-27T09:00:00Z",
"content_hash": "1a6f66d8015109dd9fad363cb57981130e563515228285185bcdf1bff74ebb8d",
"created_at": "2026-10-27T09:00:00Z",
"format": "csv",
"id": "00000000-0000-4000-8000-000000000007",
"organization_id": "00000000-0000-4000-8000-000000000002",
"params": {
"from": "2026-09-27T09:00:00Z",
"preset": "30d",
"scope": {
"HideCompanyLevel": false,
"ID": "00000000-0000-4000-8000-000000000003",
"Mode": 1,
"TeamVisibleClientIDs": null
},
"timezone": "UTC",
"to": "2026-10-27T09:00:00Z"
},
"range_from": "2026-09-27T09:00:00Z",
"range_to": "2026-10-27T09:00:00Z",
"report_type": "monitor_report",
"requested_by": "00000000-0000-4000-8000-000000000004",
"status": "succeeded"
},
{
"completed_at": "2026-10-27T09:00:00Z",
"content_hash": "ed686270eb166d01c13673f8f7e9cccb4c08251cea4f1a25809307f592b32a44",
"created_at": "2026-10-27T09:00:00Z",
"format": "json",
"id": "00000000-0000-4000-8000-000000000008",
"organization_id": "00000000-0000-4000-8000-000000000002",
"params": {
"from": "2026-09-27T09:00:00Z",
"preset": "30d",
"scope": {
"HideCompanyLevel": false,
"ID": "00000000-0000-4000-8000-000000000003",
"Mode": 1,
"TeamVisibleClientIDs": null
},
"timezone": "UTC",
"to": "2026-10-27T09:00:00Z"
},
"range_from": "2026-09-27T09:00:00Z",
"range_to": "2026-10-27T09:00:00Z",
"report_type": "downtime_ledger",
"requested_by": "00000000-0000-4000-8000-000000000004",
"status": "succeeded"
}
],
"pagination": {
"cursor": null,
"has_more": false,
"limit": 50,
"next_cursor": null,
"prev_cursor": null
}
}
400
{
"error": {
"code": "bad_request",
"message": "The request is malformed or fails validation.",
"request_id": "req_…"
}
}
403
{
"error": {
"code": "permission_denied",
"message": "The credentials do not permit this action.",
"request_id": "req_…"
}
}