方法路径摘要认证
POST/v1/observability/frontend-eventsAppend a sanitized frontend event登录会话
GET/v1/observability/logsList authorized observability facts登录会话
GET/v1/observability/logs/exportExport authorized observability facts as bounded CSV登录会话

契约文件:api/openapi/v1/observability-log.yaml

接口详情

POST /v1/observability/frontend-events

Append a sanitized frontend event

operationId
recordObservabilityFrontendEvent
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Tenant sessions append only to their own actor and subject scope. Platform sessions require platform.admin and one explicit target_scope_id. Source IP, actor, and request ID are derived from the trusted request and session.

参数

recordObservabilityFrontendEvent 参数
名称位置类型必填说明
target_scope_idquerystring(uuid)否—

请求体

application/json · 必填:是

recordObservabilityFrontendEvent 请求体
名称类型必填说明
event_codestring: route_error / api_error / render_error是—
routestring是—
reason_codestring是—
result_codestring: success / denied / failure是—
releasestring是—

响应

recordObservabilityFrontendEvent 响应
状态码说明
202Event accepted into the durable audit fact stream.
400Stable error code without raw dependency messages.
401Stable error code without raw dependency messages.
403Stable error code without raw dependency messages.
503Stable error code without raw dependency messages.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/observability/logs

List authorized observability facts

operationId
listObservabilityLogs
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Tenant sessions are restricted to their own scope and facts where they are the actor or subject. Platform sessions require platform.admin and one explicit target_scope_id. Platform automation may capture a signed opaque audit boundary, then query an exact actor after that boundary without exposing stream positions; notification facts cannot be mixed into boundary queries.

参数

listObservabilityLogs 参数
名称位置类型必填说明
target_scope_idquerystring(uuid)否—
kindqueryarray<string: login / operation / notification / frontend>否—
resultqueryarray<string>否—
actionquerystring否—
action_verbquerystring: create / update / delete否—
resource_typequerystring否—
resource_idquerystring否—
changequerystring否—
source_ipquerystring(ipv4) | string(ipv6) | string否—
fromquerystring(date-time)否—
toquerystring(date-time)否—
limitqueryinteger否—
cursorquerystring否—
audit_boundaryquerystring否Capture a signed target-scope audit head. Must be used alone with target_scope_id by a platform administrator.
after_audit_boundaryquerystring否Signed boundary returned by a prior capture. Must be paired with actor_user_id and resent unchanged on cursor pages.
actor_user_idquerystring(uuid)否Exact browser actor for platform filtering. A signed-boundary query must pair this parameter with after_audit_boundary; subject-only notification matching is not permitted in that mode.

响应

listObservabilityLogs 响应
状态码说明
200Stable snapshot-bound keyset page.

字段:items: array<LogFact> snapshot_at: string(date-time) total_count: integer(int64) next_cursor?: string audit_boundary?: string

400Stable error code without raw dependency messages.
401Stable error code without raw dependency messages.
403Stable error code without raw dependency messages.
503Stable error code without raw dependency messages.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/observability/logs/export

Export authorized observability facts as bounded CSV

operationId
exportObservabilityLogs
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Tenant sessions are restricted to their own scope and facts where they are the actor or subject. Platform sessions require platform.admin and one explicit target_scope_id.

参数

exportObservabilityLogs 参数
名称位置类型必填说明
target_scope_idquerystring(uuid)否—
kindqueryarray<string: login / operation / notification / frontend>否—
resultqueryarray<string>否—
actionquerystring否—
action_verbquerystring: create / update / delete否—
resource_typequerystring否—
resource_idquerystring否—
changequerystring否—
source_ipquerystring(ipv4) | string(ipv6) | string否—
fromquerystring(date-time)否—
toquerystring(date-time)否—

响应

exportObservabilityLogs 响应
状态码说明
200RFC 4180 CSV limited to 8 MiB with a digest of the exact safe bytes.
400Stable error code without raw dependency messages.
401Stable error code without raw dependency messages.
403Stable error code without raw dependency messages.
503Stable error code without raw dependency messages.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表