接口详情
GET /v1/package-monitor/alerts
List the current package-monitor alert heads owned by the tenant user
- operationId
listTenantPackageMonitorAlerts- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
契约没有单独标注权限码,权限要求见下方说明与 403 响应。
说明(契约原文)
Tenant scope and owner are derived from the current server-side session. Requires package_subscriptions.read.
参数
listTenantPackageMonitorAlerts 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
limit | query | integer | 否 | — |
|---|
cursor | query | string | 否 | — |
|---|
current_phase | query | string: before / triggered / recovered / suppressed_stale | 否 | Exact alert phase projected from the latest immutable receipt in the frozen snapshot. |
|---|
threshold_id | query | string | 否 | Exact lowercase SHA-256 threshold identity. Input-only and never returned. |
|---|
响应
listTenantPackageMonitorAlerts 响应| 状态码 | 说明 |
|---|
200 | Stable keyset page of current alert heads. 字段:items: array<PackageMonitorAlertHead> next_cursor?: string |
|---|
400 | Invalid request |
|---|
401 | Authentication required |
|---|
403 | Permission denied |
|---|
405 | Method not allowed |
|---|
408 | Request cancelled |
|---|
503 | Dependency unavailable |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/package-monitor/alerts/{alert_id}/transitions
List immutable transition facts for a tenant-owned alert
- operationId
listTenantPackageMonitorTransitions- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
契约没有单独标注权限码,权限要求见下方说明与 403 响应。
说明(契约原文)
Tenant scope and owner are derived from the current server-side session. The first page freezes the alert head revision. The signed cursor is bound to the exact phase filter, including an explicit empty filter.
参数
listTenantPackageMonitorTransitions 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
alert_id | path | string(uuid) | 是 | — |
|---|
limit | query | integer | 否 | — |
|---|
cursor | query | string | 否 | — |
|---|
phase | query | string: before / triggered / recovered / suppressed_stale | 否 | Exact immutable threshold transition phase. |
|---|
响应
listTenantPackageMonitorTransitions 响应| 状态码 | 说明 |
|---|
200 | Frozen-revision keyset page of immutable transition facts. 字段:items: array<PackageMonitorTransition> next_cursor?: string |
|---|
400 | Invalid request |
|---|
401 | Authentication required |
|---|
403 | Permission denied |
|---|
404 | Resource not found |
|---|
405 | Method not allowed |
|---|
408 | Request cancelled |
|---|
503 | Dependency unavailable |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/package-monitor/alerts/{alert_id}/transitions/{revision}
Get one immutable transition fact for a tenant-owned alert
- operationId
getTenantPackageMonitorTransition- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
契约没有单独标注权限码,权限要求见下方说明与 403 响应。
说明(契约原文)
Tenant scope and owner are derived from the current server-side session.
参数
getTenantPackageMonitorTransition 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
alert_id | path | string(uuid) | 是 | — |
|---|
revision | path | integer(int64) | 是 | — |
|---|
响应
getTenantPackageMonitorTransition 响应| 状态码 | 说明 |
|---|
200 | One immutable transition fact. 字段:alert_id: string(uuid) revision: integer(int64) subscription_id: string(uuid) policy_id: string(uuid) policy_revision: integer(int64) metric: string: traffic_bytes / bandwidth_bps / connections / expiration period_key: string phase: string: before / triggered / recovered / suppressed_stale observed_value: string metric_schema_version: string: package-monitor-metric/v1 / deadline/v1 source_watermark: string observed_at: string(date-time) finalized_through: string(date-time) evaluated_at: string(date-time) reason_code: string |
|---|
400 | Invalid request |
|---|
401 | Authentication required |
|---|
403 | Permission denied |
|---|
404 | Resource not found |
|---|
405 | Method not allowed |
|---|
408 | Request cancelled |
|---|
503 | Dependency unavailable |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/package-monitor/policies
List the current package-monitor policies owned by the tenant user
- operationId
listTenantPackageMonitorPolicies- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
契约没有单独标注权限码,权限要求见下方说明与 403 响应。
说明(契约原文)
Tenant scope and owner are derived from the current server-side session. Requires package_subscriptions.read.
参数
listTenantPackageMonitorPolicies 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
limit | query | integer | 否 | — |
|---|
cursor | query | string | 否 | — |
|---|
响应
listTenantPackageMonitorPolicies 响应| 状态码 | 说明 |
|---|
200 | Stable keyset page of current policy heads. 字段:items: array<PackageMonitorPolicy> next_cursor?: string |
|---|
400 | Invalid request |
|---|
401 | Authentication required |
|---|
403 | Permission denied |
|---|
405 | Method not allowed |
|---|
408 | Request cancelled |
|---|
503 | Dependency unavailable |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表