Skip to content

Logs and metrics

Request, runtime and build logs, traffic and runtime metrics.

On this page

Concepts: Logs and analytics

Endpoint summaries come from the OpenAPI document.

GET/v1/projects/{project}/logs

Access, runtime and build logs, newest first; pass after=<cursor> to follow new lines (oldest first). Older than the plan's retention is cut (truncated: true)

Operation (MCP tool)
listProjectLogs
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring
streamOptionalquerystringComma-separated: access, runtime, build
levelOptionalquery"info" | "warn" | "error"This level and above
qOptionalquerystringCase-insensitive text in the messagemax length 200
versionOptionalquerystring`ver_…` or `v7`
sinceOptionalquerystringformat: date-time
untilOptionalquerystringformat: date-time
limitOptionalqueryintegermin 1, max 500, default 100
beforeOptionalquerystringCursor: older page
afterOptionalquerystringCursor: newer lines (follow)

Responses

Responses
StatusDescriptionBody
200OKLogPage
400ProblemProblem (RFC 9457)
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

GET/v1/projects/{project}/metrics

Traffic (requests, page views, visitors, bandwidth, status codes, top paths) and runtime metrics (invocations, duration, CPU, memory). Unmeasured values are null; runsCode false means the project runs no code

Operation (MCP tool)
getProjectMetrics
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
projectRequiredpathstring
rangeOptionalquery"1h" | "24h" | "7d" | "30d"default "24h"

Responses

Responses
StatusDescriptionBody
200OKProjectMetrics
400ProblemProblem (RFC 9457)
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

GET/v1/metrics/projects

The team's projects ranked by requests in the range, with errors, bandwidth, visitors, invocations and build seconds

Operation (MCP tool)
listProjectMetrics
Authentication
API key (pfa_…)OAuth token (pfo_…)

Parameters

Parameters
NameInTypeDescription
rangeOptionalquery"1h" | "24h" | "7d" | "30d"default "24h"

Responses

Responses
StatusDescriptionBody
200OKProjectRanking
400ProblemProblem (RFC 9457)
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.