Request cURL
curl -s "https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/timeline" \
-H "Authorization: Bearer $UP4_API_KEY"
JavaScript
const res = await fetch("https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/timeline", {
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/incidents/00000000-0000-4000-8000-000000000001/timeline",
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/incidents/00000000-0000-4000-8000-000000000001/timeline", 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/incidents/00000000-0000-4000-8000-000000000001/timeline");
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": [
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000002",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "created",
"id": "00000000-0000-4000-8000-000000000003",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Incident reported manually.",
"message_code": "incident_created_manual",
"payload": {}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000002",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "escalated",
"id": "00000000-0000-4000-8000-000000000004",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Escalated to anna@example.com; the alert plan continues until they confirm",
"payload": {
"alert_plan_continues": true,
"channel_ids": [
"00000000-0000-4000-8000-000000000005"
],
"manual_escalation_id": "00000000-0000-4000-8000-000000000004",
"manual_escalation_step": 1000001,
"request_key": "walk-60",
"status": "waiting_for_target_confirmation",
"target_label": "anna@example.com",
"target_user_id": "00000000-0000-4000-8000-000000000002"
}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000002",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "escalation_target_acknowledged",
"id": "00000000-0000-4000-8000-000000000006",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "anna@example.com confirmed the manual escalation; the alert plan stopped",
"payload": {
"manual_escalation_id": "00000000-0000-4000-8000-000000000004",
"source": "authenticated_user",
"target_user_id": "00000000-0000-4000-8000-000000000002"
}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000002",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "comment",
"id": "00000000-0000-4000-8000-000000000007",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Looking into the payment provider.",
"payload": {}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000002",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "comment",
"id": "00000000-0000-4000-8000-000000000008",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "The provider confirms a partial outage.",
"payload": {}
}
],
"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_…"
}
}
404
{
"error": {
"code": "not_found",
"message": "The requested resource does not exist or is outside the caller's scope.",
"request_id": "req_…"
}
}