HTTP API: logs and traces
Request logs and traces, recorded errors, and the observability summaries behind the console's charts.
Read the project's request metrics, per-route latency, request logs and traces; set SLO alerts; and forward logs to your own tools. Guides: Logs and log drains, Alerts: latency, errors, function failures and connections, Request traces: why did this request fail?.
| Base URL | https://<project-ref>.sovarias.in — your project URL from Connect. |
| Keys | Send the project's key as apikey. Calls made for a signed-in user also send Authorization: Bearer <access token>. |
| Errors | A status code and {"detail": …} — a sentence, or {code, message} for errors your code may branch on (HTTP API). |
#Metrics and latency per route
GET/api/v1/observability/metrics
Requests, errors, latency percentiles and bytes over time for the project, per gateway service.
Points are 1-minute buckets up to 3 hours, 5-minute up to a day and hourly beyond (15-minute on plans with obs.metrics_resolution_minutes 15). How far back: the plan's obs.retention_days (Logs and log drains).
- Who
- The project team (not app users or the anon key).
Query parameters
hoursintegeroptionaldefault24- How far back (capped by the plan).
- 1–2160
servicestring | nulloptional- One service, as named in
service_series. - 0–32 characters
pointsintegeroptionaldefault96- About how many points the series has.
- 12–500
by_servicebooleanoptionaldefaultfalse- Also return
service_series: per service, [requests, errors] per point.
Returns
totals, services.<service>, series[]objectrequests,errors_4xx,errors_5xx,error_rate,avg_ms,p50_ms,p95_ms,p99_ms,bytes_in,bytes_out.retention_hoursinteger- How far back the plan lets you look.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/observability/metrics?hours=24" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
"hours": 24,
"retention_hours": 168,
"bucket_seconds": 900,
"totals": {
"requests": 1840,
"console_requests": 12,
"errors_4xx": 31,
"errors_5xx": 2,
"error_rate": 0.0179,
"avg_ms": 48.2,
"p50_ms": 25.0,
"p95_ms": 250.0,
"p99_ms": 1000.0,
"bytes_in": 512000,
"bytes_out": 8800000
},
"services": {
"atlas-rel": {
"requests": 1840,
"console_requests": 12,
"errors_4xx": 31,
"errors_5xx": 2,
"error_rate": 0.0179,
"avg_ms": 48.2,
"p50_ms": 25.0,
"p95_ms": 250.0,
"p99_ms": 1000.0,
"bytes_in": 512000,
"bytes_out": 8800000
}
},
"series": [
{
"t": 1792396800,
"requests": 1840,
"console_requests": 12,
"errors_4xx": 31,
"errors_5xx": 2,
"error_rate": 0.0179,
"avg_ms": 48.2,
"p50_ms": 25.0,
"p95_ms": 250.0,
"p99_ms": 1000.0,
"bytes_in": 512000,
"bytes_out": 8800000
}
]
}GET/api/v1/observability/routes
Latency (p50, p95, p99) and 4xx/5xx per route, busiest first.
A route is the method and the path with ids collapsed (GET /rest/v1/orders/:id). Your app's traffic only (not the console). 15-minute points up to a day, hourly up to 7 days (Logs and log drains).
- Who
- The project team (not app users or the anon key).
Query parameters
hoursintegeroptionaldefault24- How far back (1–168, capped by the plan).
- 1–168
envstring | nulloptional- Environment ids, comma-separated;
main= requests that named none. Default: every environment. - 0–400 characters
routestring | nulloptional- One route: adds its
series. - 0–140 characters
limitintegeroptionaldefault50- How many routes.
- 1–200
Returns
routes[]objectroute,method,path,requests,errors_4xx,errors_5xx,error_rate(4xx+5xx),server_error_rate(5xx),avg_ms,p50_ms,p95_ms,p99_ms.envsarray<string>- The environments read (
-= requests that named none). environmentsarray<string>- Every environment with route data.
seriesarray<object>- With
route: one point per bucket (t= Unix seconds) with the same fields.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/observability/routes?hours=24&env=main" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
"envs": [
"-"
],
"environments": [
"-",
"9b1d6c2e-5f4a-4e8b-9c7d-3a2f1e0d9c8b"
],
"hours": 24,
"retention_hours": 168,
"bucket_seconds": 900,
"routes": [
{
"route": "GET /rest/v1/orders",
"method": "GET",
"path": "/rest/v1/orders",
"requests": 1840,
"errors_4xx": 31,
"errors_5xx": 2,
"error_rate": 0.0179,
"server_error_rate": 0.0011,
"avg_ms": 48.2,
"p50_ms": 25.0,
"p95_ms": 250.0,
"p99_ms": 1000.0
}
],
"total_routes": 14
}#Logs and request traces
GET/api/v1/observability/logs
The project's recent requests, newest first, one page at a time.
For a live tail, poll with after = the newest time you have; to load older ones pass before = the oldest. How far back depends on the plan (Logs and log drains).
- Who
- The project team (not app users or the anon key).
Query parameters
limitintegeroptionaldefault50- Rows per page (1–200).
- 1–200
servicestring | nulloptional- One service (
rest,auth,storage,functions…). - 0–32 characters
statusstring | nulloptional2xx,3xx,4xx,5xxorerrors.- pattern `^(2xx|3xx|4xx|5xx|errors)$`
qstring | nulloptional- Text in the path or method.
- 0–200 characters
afternumber | nulloptional- Only newer than this Unix time (live tail).
beforenumber | nulloptional- Only older than this Unix time.
sourcestringoptionaldefaultappapp(your app's traffic, default),console(the team's activity) orall.- pattern `^(app|console|all)$`
envstring | nulloptional- One environment's requests (its id;
mainfor requests that named none). - 0–64 characters
Returns
logs[].timenumber- Unix seconds.
has_moreboolean- Older rows exist: page with
before. retention_minutesinteger- How far back the plan keeps logs.
logs[].trace_idstring | null- W3C trace id:
GET /api/v1/request-traces/{trace_id}explains a refused or failed request. logs[].env_idstring | null- The environment the request named (null: none).
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/observability/logs?status=errors&limit=50" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
"logs": [
{
"time": 1792396800.412,
"method": "GET",
"path": "/rest/v1/orders",
"status": 503,
"duration_ms": 12.4,
"service": "rest",
"source": "app",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"env_id": null
}
],
"has_more": true,
"retention_minutes": 1440
}GET/api/v1/request-traces
Recent refused (4xx) and failed (5xx) requests, each with why.
The trace id is the W3C traceparent id the SDKs send, also returned as X-Request-ID on every response. Kept for the plan's obs.trace_days (Request traces: why did this request fail?).
- Who
- The project team (not app users or the anon key).
Query parameters
kindstringoptionaldefaultalldenied,failedorall.- One of
denied,failed,all beforestring | nulloptional- Older than this time (paging).
- 0–40 characters
limitintegeroptionaldefault50- How many (1–100).
- 1–100
Returns
explanation.verdictstringdenied,failedorallowed.explanation.by, step, reason, hintstring- What decided, in which step, why, and what to do.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/request-traces?kind=denied" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"traces": [
{
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"occurred_at": "2026-10-18T10:40:00.412+00:00",
"method": "GET",
"path": "/rest/v1/orders",
"final_status": 403,
"duration_ms": 12,
"actor_id": null,
"env_id": "",
"explanation": {
"verdict": "denied",
"by": "policy",
"service": "gateway",
"step": "policy",
"status": 403,
"reason": "No access policy allows sql:select on orders for visitors who aren't signed in.",
"detail": "NO_POLICY_DEFINED",
"hint": "Add a policy for orders, or sign the user in first."
}
}
],
"days": 7
}GET/api/v1/request-traces/{trace_id}
One request, hop by hop (gateway checks, engine, SQL), with the explanation.
- Who
- The project team (not app users or the anon key).
Path parameters
trace_idstringrequired- 32 hex characters (dashes ignored).
Responses
- 200Success.
- 404No such trace in this project, or older than the plan keeps.
- 403App users and the anon key can't read traces.
- 401No valid session or key.
curl -s "$URL/api/v1/request-traces/4bf92f3577b34da6a3ce929d0e0e4736" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"occurred_at": "2026-10-18T10:40:00.412+00:00",
"method": "GET",
"path": "/rest/v1/orders",
"final_status": 403,
"duration_ms": 12,
"actor_id": null,
"env_id": "",
"explanation": {
"verdict": "denied",
"by": "policy",
"service": "gateway",
"step": "policy",
"status": 403,
"reason": "No access policy allows sql:select on orders for visitors who aren't signed in.",
"detail": "NO_POLICY_DEFINED",
"hint": "Add a policy for orders, or sign the user in first."
},
"hops": [
{
"seq": 1,
"service": "gateway",
"hop_kind": "gateway_denied",
"status_code": 403,
"error_class": "PolicyDenied",
"error_detail": "NO_POLICY_DEFINED",
"duration_ms": 6,
"at": "2026-10-18T10:40:00.420+00:00"
}
]
}#Log drains
GET/api/v1/observability/drains
Log drains: where the project's request logs are forwarded.
- Who
- The project team (not app users or the anon key).
Returns
drains[].activeboolean- Running (the oldest enabled drains up to the plan's
obs.log_drainsrun; the rest wait). sent, failed, last_delivery_at, last_errormixed- Delivery stats.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/observability/drains" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"drains": [
{
"id": "drn_3f9a1c0b7e2d4a6f",
"name": "Datadog prod",
"kind": "datadog",
"config": {
"site": "datadoghq.eu"
},
"has_secret": true,
"enabled": true,
"disabled_reason": null,
"active": true,
"created_at": 1792310000.0,
"sent": 18234,
"failed": 2,
"last_delivery_at": 1792396800.4,
"last_error": null
}
],
"limit": 1,
"used": 1
}POST/api/v1/observability/drains
Forward request logs to Datadog, Grafana Loki or any HTTPS endpoint.
HTTPS drains receive batches of JSON signed with X-Sovaria-Signature; the signing secret is in this answer only. The plan limits how many drains run (obs.log_drains) (Logs and log drains).
- Who
- A project owner or admin, or the service-role key.
Body
kindstringrequired- One of
http,datadog,loki namestringoptionalconfigobjectoptionalhttp:url,header_name;datadog:site(datadoghq.com,us3.datadoghq.com,us5.datadoghq.com,datadoghq.eu,ap1.datadoghq.com,ddog-gov.com);loki:url,username.secretstringoptionalhttp: the auth header's value;datadog: the API key (required);loki: password or token. Stored encrypted.
Responses
- 201Created.
- 403Not an owner/admin.
- 422Unknown kind, invalid URL, no Datadog site or key, or a bad header name.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/observability/drains" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"kind": "http", "name": "Our collector", "config": {"url": "https://logs.skolist.com/ingest", "header_name": "X-Api-Key"}, "secret": "<collector key>"}'Response
{
"id": "drn_7c2e…",
"name": "Our collector",
"kind": "http",
"config": {
"url": "https://logs.skolist.com/ingest",
"header_name": "X-Api-Key"
},
"has_secret": true,
"enabled": true,
"disabled_reason": null,
"active": true,
"created_at": 1792310000.0,
"sent": 0,
"failed": 0,
"last_delivery_at": null,
"last_error": null,
"signing_secret": "whsec_…(shown once)"
}PATCH/api/v1/observability/drains/{drain_id}
Rename, re-configure, change the secret, or pause a drain.
- Who
- A project owner or admin, or the service-role key.
Path parameters
drain_idstringrequired- The drain.
Body
namestring | nulloptional- Name.
- 0–80 characters
enabledboolean | nulloptional- On or off.
configobject | nulloptional- New settings.
secretstring | nulloptional- New secret.
- 0–4,000 characters
Responses
- 200Success.
- 404No such drain.
- 422Invalid settings.
- 401No valid session or key.
curl -s -X PATCH "$URL/api/v1/observability/drains/drn_3f9a1c0b7e2d4a6f" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"enabled": false}'Response
{
"id": "drn_3f9a1c0b7e2d4a6f",
"name": "Datadog prod",
"kind": "datadog",
"config": {
"site": "datadoghq.eu"
},
"has_secret": true,
"enabled": false,
"disabled_reason": null,
"active": false,
"created_at": 1792310000.0,
"sent": 18234,
"failed": 2,
"last_delivery_at": 1792396800.4,
"last_error": null
}DELETE/api/v1/observability/drains/{drain_id}
Delete a drain.
- Who
- A project owner or admin, or the service-role key.
Path parameters
drain_idstringrequired- The drain.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/observability/drains/drn_3f9a1c0b7e2d4a6f" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"deleted": "drn_3f9a1c0b7e2d4a6f"
}POST/api/v1/observability/drains/{drain_id}/test
Send a test batch to a drain now.
- Who
- A project owner or admin, or the service-role key.
Path parameters
drain_idstringrequired- The drain.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/observability/drains/drn_3f9a1c0b7e2d4a6f/test" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"ok": true,
"error": null
}#SLO alerts
GET/api/v1/observability/alerts
The project's alert rules with their state, the plan limit, the metric catalog and recent events.
state: pending (not checked yet), ok, firing (since since), no_data or paused. active: false = over the plan's obs.alert_rules (the oldest rules run) (Alerts: latency, errors, function failures and connections).
- Who
- The project team (not app users or the anon key).
Returns
rules[].valuenumber | null- The last measured value (null: not enough data).
resolution_minutesinteger- 15 when the plan keeps 15-minute metrics: request alerts then need a window of 15+ minutes.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/observability/alerts" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"rules": [
{
"id": "alr_3f9a1c0b7e2d4a6f",
"name": "Slow orders",
"metric": "latency_p95_ms",
"threshold": 800.0,
"window_minutes": 15,
"target": "GET /rest/v1/orders",
"env": null,
"min_requests": 20,
"email": true,
"webhook_url": "https://hooks.example.com/sovaria",
"enabled": true,
"disabled_reason": null,
"created_at": 1792310000.0,
"unit": "ms",
"has_signing_secret": true,
"active": true,
"state": "firing",
"since": 1792396800.0,
"value": 2500.0,
"checked_at": 1792396860.0,
"last_delivery": {
"kind": "firing",
"at": 1792396800.0,
"email": true,
"webhook": {
"ok": true,
"error": null
}
}
}
],
"limit": 10,
"used": 1,
"metrics": [
{
"id": "latency_p95_ms",
"label": "Latency p95",
"unit": "ms",
"target": "route",
"min": 1,
"max": 60000
}
],
"windows": [
5,
10,
15,
30,
60
],
"resolution_minutes": 1,
"events": [
{
"t": 1792396800.0,
"rule_id": "alr_3f9a1c0b7e2d4a6f",
"name": "Slow orders",
"kind": "firing",
"value": 2500.0,
"threshold": 800.0,
"metric": "latency_p95_ms"
}
]
}POST/api/v1/observability/alerts
Create an alert rule: email the team and/or post a signed webhook when a metric crosses a threshold.
It fires when the value over window_minutes goes over threshold and resolves after two checks back under it. Webhooks get X-Sovaria-Signature: sha256=<HMAC of the body>; the signing secret is in this answer only. The plan limits how many rules exist (obs.alert_rules) (Alerts: latency, errors, function failures and connections).
- Who
- A project owner or admin, or the service-role key.
Body
metricstringrequired- One of
latency_p95_ms,latency_p99_ms,error_rate,function_failures,db_connections thresholdnumberrequired- ms for latency, percent of 5xx for
error_rate, a count for failures and connections. window_minutesintegeroptional- 5, 10, 15, 30 or 60. Route alerts and plans with 15-minute metrics: 15 or more.
targetstring | nulloptional- A route (
GET /rest/v1/orders) for latency anderror_rate, a function name forfunction_failures; empty = the whole project. envstring | nulloptional- Route alerts: environment ids, comma-separated (
main= none named); empty = every environment. min_requestsintegeroptional- Request alerts ignore windows with fewer requests.
emailbooleanoptional- Email the project team (and the notification feed).
webhook_urlstring | nulloptional- A public HTTPS URL that receives a signed POST.
namestringoptional
Responses
- 201Created.
- 403Not an owner/admin, or the plan has no (more) alert rules (
PLAN_FEATURE_REQUIRED,PLAN_LIMIT_REACHED). - 422Unknown metric, threshold out of range, a window the rule can't use, a route that isn't
METHOD /path, no channel, or an unsafe webhook URL. - 401No valid session or key.
curl -s -X POST "$URL/api/v1/observability/alerts" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"metric": "latency_p95_ms", "threshold": 800, "window_minutes": 15, "target": "GET /rest/v1/orders", "email": true, "webhook_url": "https://hooks.example.com/sovaria"}'Response
{
"id": "alr_3f9a1c0b7e2d4a6f",
"name": "Slow orders",
"metric": "latency_p95_ms",
"threshold": 800.0,
"window_minutes": 15,
"target": "GET /rest/v1/orders",
"env": null,
"min_requests": 20,
"email": true,
"webhook_url": "https://hooks.example.com/sovaria",
"enabled": true,
"disabled_reason": null,
"created_at": 1792310000.0,
"unit": "ms",
"has_signing_secret": true,
"active": true,
"state": "pending",
"since": null,
"value": null,
"checked_at": null,
"last_delivery": null,
"signing_secret": "whsec_…(shown once)"
}PATCH/api/v1/observability/alerts/{rule_id}
Change an alert rule, or pause and resume it.
Send only what changes. A changed rule starts fresh (its state resets). Adding a webhook to a rule without one returns a signing_secret once. A rule paused by Sovaria support can't be resumed here.
- Who
- A project owner or admin, or the service-role key.
Path parameters
rule_idstringrequired- The rule.
Body
namestring | nulloptional- 0–80 characters
metricstring | nulloptional- 0–32 characters
thresholdnumber | nulloptionalwindow_minutesinteger | nulloptionaltargetstring | nulloptional- 0–140 characters
envstring | nulloptional- 0–400 characters
min_requestsinteger | nulloptionalemailboolean | nulloptionalwebhook_urlstring | nulloptional- 0–500 characters
enabledboolean | nulloptional
Responses
- 200Success.
- 403Not an owner/admin, or paused by Sovaria support.
- 404No such rule.
- 422Invalid settings.
- 401No valid session or key.
curl -s -X PATCH "$URL/api/v1/observability/alerts/alr_3f9a1c0b7e2d4a6f" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"enabled": false}'Response
{
"id": "alr_3f9a1c0b7e2d4a6f",
"name": "Slow orders",
"metric": "latency_p95_ms",
"threshold": 800.0,
"window_minutes": 15,
"target": "GET /rest/v1/orders",
"env": null,
"min_requests": 20,
"email": true,
"webhook_url": "https://hooks.example.com/sovaria",
"enabled": false,
"disabled_reason": null,
"created_at": 1792310000.0,
"unit": "ms",
"has_signing_secret": true,
"active": true,
"state": "paused",
"since": 1792396800.0,
"value": 2500.0,
"checked_at": 1792396860.0,
"last_delivery": {
"kind": "firing",
"at": 1792396800.0,
"email": true,
"webhook": {
"ok": true,
"error": null
}
}
}DELETE/api/v1/observability/alerts/{rule_id}
Delete an alert rule.
- Who
- A project owner or admin, or the service-role key.
Path parameters
rule_idstringrequired- The rule.
Responses
- 200Success.
- 404No such rule.
- 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/observability/alerts/alr_3f9a1c0b7e2d4a6f" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"deleted": "alr_3f9a1c0b7e2d4a6f"
}POST/api/v1/observability/alerts/{rule_id}/test
Measure a rule now and send an alert.test to its webhook (no email).
- Who
- A project owner or admin, or the service-role key.
Path parameters
rule_idstringrequired- The rule.
Responses
- 200Success.
- 404No such rule.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/observability/alerts/alr_3f9a1c0b7e2d4a6f/test" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"value": 2500.0,
"note": null,
"would_fire": true,
"webhook": {
"ok": true,
"error": null
}
}GET/api/v1/observability/alerts/events
Fired and resolved alerts, newest first.
- Who
- The project team (not app users or the anon key).
Query parameters
limitintegeroptionaldefault50- How many (1–200).
- 1–200
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/observability/alerts/events" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"events": [
{
"t": 1792396800.0,
"rule_id": "alr_3f9a1c0b7e2d4a6f",
"name": "Slow orders",
"kind": "firing",
"value": 2500.0,
"threshold": 800.0,
"metric": "latency_p95_ms"
}
]
}#Platform status
GET/api/v1/public/status
Sovaria's live status: overall state, each component's uptime and latency over 90 days, and incidents.
No sign-in needed; cached for 30 seconds. The same data as the public status page.
- Who
- Anyone: no key or session is needed.
Returns
statusstring- Overall state, e.g.
operational. components[].daysarray<object>- Daily uptime (null before monitoring started).
incidentsarray<object>- Announced incidents, newest first.
Responses
- 200Success.
curl -s "$URL/api/v1/public/status" \
-H "apikey: $ANON_KEY"Response
{
"status": "operational",
"updated_at": "2026-10-20T00:38:41+00:00",
"days": 90,
"components": [
{
"id": "api",
"name": "API gateway",
"status": "operational",
"uptime": 100.0,
"latency_ms": 37.1,
"days": [
{
"date": "2026-10-19",
"uptime": 100.0
}
]
}
],
"incidents": []
}