Service observability
Read service metrics, backup status and network flows.
Send a project token scoped to the project or environment.
BASE = https://api.cloud.simplifyd.com/v1/workspaces/{workspace}/projects/{project}/envs/{env}/svcs/{service}Set BASE using your workspace, project, environment, and service slugs. The examples read the bearer token from SIMPLIFYD_API_TOKEN.
| Method and path | Query parameters | Response |
|---|---|---|
GET {BASE}/metrics | range is 1h (default), 6h, 1d, 7d or 30d | range, resource usage points, vcpus, memory_mib and has_volume |
GET {BASE}/slow-queries | range is 1h (default), 6h, 1d or 7d | A report of the statements that took the most time on a managed PostgreSQL service |
GET {BASE}/backup-status | Backup status for a managed PostgreSQL service | |
GET {BASE}/network-traffic | range is 6h, 1d (default), 7d or 30d | range and a traffic breakdown |
GET {BASE}/flows | since is 1m, 5m (default) or 15m | since and a snapshot of recent flows |
GET {BASE}/flows/stream | A server-sent events stream with one JSON flow per data: event |
Successful reads return 200 OK. The flow endpoints can return 503 Service Unavailable where flow collection is unavailable.
Read resource metrics
GET {BASE}/metrics?range=1hReturns sampled CPU, memory, pod count, and disk usage.
curl --fail-with-body "$BASE/metrics?range=1h" \
-H "Authorization: Bearer $SIMPLIFYD_API_TOKEN"const response = await fetch(`${BASE}/metrics?range=1h`, {
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_API_TOKEN}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
200 OK.
{
"range": "1h",
"points": [
{
"timestamp": "2026-01-15T12:00:00Z",
"cpu_millicores": 120,
"memory_mib": 256,
"pod_count": 1,
"disk_used_mib": 0,
"disk_capacity_mib": 0
}
],
"vcpus": 1,
"memory_mib": 1024,
"has_volume": false
}The top-level memory_mib is allocated memory. Each point reports sampled memory. CPU usage is in millicores, where 1,000 millicores is one vCPU.
Read slow queries
GET {BASE}/slow-queries?range=1hReturns execution totals and the statements that took the most time on managed PostgreSQL.
curl --fail-with-body "$BASE/slow-queries?range=1h" \
-H "Authorization: Bearer $SIMPLIFYD_API_TOKEN"const response = await fetch(`${BASE}/slow-queries?range=1h`, {
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_API_TOKEN}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
200 OK.
{
"range": "1h",
"collecting": false,
"from": "2026-01-15T11:00:00Z",
"to": "2026-01-15T12:00:00Z",
"total_exec_ms": 240,
"total_calls": 12,
"queries": [
{
"database": "app",
"query_id": "12345",
"calls": 12,
"total_exec_ms": 240,
"mean_exec_ms": 20,
"pct_db_time": 100,
"rows_per_call": 1,
"cache_hit_pct": 100,
"query": "SELECT name FROM products WHERE id = $1"
}
]
}Execution times are in milliseconds. Keep query_id as a string.
Read backup status
GET {BASE}/backup-status?archive=trueReturns backup and recovery status for managed PostgreSQL. Pass archive=true to list backups in the archive as well.
curl --fail-with-body "$BASE/backup-status?archive=true" \
-H "Authorization: Bearer $SIMPLIFYD_API_TOKEN"const response = await fetch(`${BASE}/backup-status?archive=true`, {
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_API_TOKEN}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
200 OK.
{
"cluster_ready": true,
"continuous_archiving": {
"status": "True"
},
"last_backup_succeeded": {
"status": "True"
},
"last_successful_backup": "2026-01-15T12:00:00Z",
"recent_backups": [],
"archive_backups": [
{
"backup_id": "20260115T120000",
"end_time": "2026-01-15T12:00:00Z"
}
]
}If the archive lookup fails, the response still returns status and includes archive_error.
Read network traffic
GET {BASE}/network-traffic?range=1dReturns traffic totals grouped by carrier and direction.
curl --fail-with-body "$BASE/network-traffic?range=1d" \
-H "Authorization: Bearer $SIMPLIFYD_API_TOKEN"const response = await fetch(`${BASE}/network-traffic?range=1d`, {
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_API_TOKEN}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
200 OK.
{
"range": "1d",
"breakdown": [
{
"carrier_tier": "public",
"carrier_name": "Internet",
"direction": "egress",
"total_bytes": 1048576,
"total_cost": 0
}
]
}Read recent flows
GET {BASE}/flows?since=5mReturns a snapshot of network flows for the service.
curl --fail-with-body "$BASE/flows?since=5m" \
-H "Authorization: Bearer $SIMPLIFYD_API_TOKEN"const response = await fetch(`${BASE}/flows?since=5m`, {
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_API_TOKEN}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
200 OK.
{
"since": "5m",
"flows": [
{
"timestamp": "2026-01-15T12:00:00Z",
"src_ip": "192.0.2.10",
"src_port": 51542,
"dst_ip": "192.0.2.20",
"dst_port": 443,
"protocol": "TCP",
"direction": "ingress",
"verdict": "FORWARDED"
}
]
}Stream live flows
GET {BASE}/flows/stream
Accept: text/event-streamUse the same project token as the other observability calls. Disable output buffering in curl to see events as they arrive.
curl --fail-with-body --no-buffer "$BASE/flows/stream" \
-H "Authorization: Bearer $SIMPLIFYD_API_TOKEN" \
-H "Accept: text/event-stream"Response
200 OK with Content-Type: text/event-stream. Each event has one JSON flow in its data: line, followed by a blank line. Close the connection to stop streaming.
data: {"timestamp": "2026-01-15T12:00:00Z", "src_ip": "192.0.2.10", "src_port": 51542, "dst_ip": "192.0.2.20", "dst_port": 443, "protocol": "TCP", "direction": "ingress", "verdict": "FORWARDED"}Errors
| Status | When |
|---|---|
400 | Slow queries or backup status were requested for a service other than PostgreSQL. |
401 | The project token is missing or invalid. |
403 | The service is outside the token scope. |
503 | Flow collection is unavailable for the recent or live flows endpoint. |