获取主要失败原因

OpenAPI 契约

方法
GET
路径
/api/v1/analytics/failures/top
认证
jwtBearer (bearer) OR automationKey (bearer)
响应状态
200 400 401 403 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Top failures",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/AnalyticsTopResponse"
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RequestError"
        }
      }
    },
    "401": {
      "description": "Authentication required or invalid",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "403": {
      "description": "Authenticated but not permitted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

GET /api/v1/analytics/failures/top 接受 JWT 或带 analytics:read 的 nfy_ 密钥。它统计当前认证用户在 range(7d、30d 默认、90d 或 1y)内处于 FAILED 状态的非草稿构建的错误信息。分组前每条错误信息都会截断为 200 个字符。limit 默认为 5,最大为 50。

http
GET /api/v1/analytics/failures/top?range=30d&limit=5
Authorization: Bearer <access token>