# 报告查询 按 recordId 查询一次评测的报告。 来源:https://open.shengzhiai.com/sdk/v2/api/report/ `GET https://open.shengzhiai.com/api/v1/report/{recordId}` ## 请求示例 cURL: ```bash # 报告查询。被签名参数为空集合,recordId 是路径的一段 RECORD_ID=eval_a31712f40cbf TS=$(date +%s) NONCE=$(openssl rand -hex 16) SIGN=$(printf '' | openssl dgst -sha256 -hmac "$YUGU_SECRET_KEY" -binary | base64) curl -sS "https://open.shengzhiai.com/api/v1/report/$RECORD_ID" \ -H "X-App-Key: $YUGU_APP_KEY" \ -H "X-Timestamp: $TS" \ -H "X-Nonce: $NONCE" \ -H "X-Signature: $SIGN" ``` Java: ```java ReportResult report = client.getReport(args[0]); JsonNode data = report.getData(); System.out.println("总分 " + data.path("score").path("overall").asDouble()); System.out.println("点评 " + data.path("report").path("summary").asText()); ``` 网页: ```js const report = await client.getReport(process.argv[2]); console.log('点评', report.report?.summary, '维度分', report.report?.dimensionScores); ``` ## 返回示例 ```json { "code": 0, "message": "success", "data": { "recordId": "eval_a31712f40cbf", "score": { "overall": 88.9, "pronunciation": 100, "fluency": 96, "integrity": 100, "tone": 83, "rhythm": 78, "speed": 225, "rear_tone": "fall", "duration": "1.920", "warning": [] }, "report": { "summary": "朗读整体表现优秀,语音清晰流畅,情感自然贴合文本。", "suggestions": [ "读到『很』时注意第三声的降升调型。", "在『今天』后稍作停顿以增强节奏感。", "强调『很好』时加重语气突出情感。", "用更明亮的语调传递天气好的愉悦感。" ], "dimensionScores": { "accuracy": 100, "fluency": 96, "integrity": 100, "reading_skill": 78, "affect": 76, "speechRate": 85, "readSpeedRaw": 225 }, "rubricVersion": "v20260707b" } }, "timestamp": 1791484346331 } ``` `GET /api/v1/report/{recordId}`,响应 `{"code": 0, "data": {...}}`,只能查询本账号的记录。 ## 路径参数 | 参数 | 类型 | 必填 | 说明 | |---|---|---|---| | `recordId` | string | 是 | 评测返回的记录号,例如 `eval_3fb45f4c8e71` | 被签名参数为空集合,recordId 是路径的一段,不参与签名。 ## 返回 | 字段 | 类型 | 必填 | 说明 | |---|---|---|---| | `data.recordId` | string | 是 | 记录号 | | `data.score` | object | 是 | 评测分数,字段与评测结果的 `result` 一致,总分为 `data.score.overall` | | `data.report.summary` | string | 否 | 整体点评 | | `data.report.suggestions` | array | 否 | 改进建议 | | `data.report.dimensionScores` | object | 否 | 维度分,键随语种与题型不同,值为 null 表示本次不评该维 | 报告查询天然幂等,可以重试,不需要幂等键。 ## 状态码 | 状态 | 错误码 | 原因 | |---|---|---| | 200 | 无 | 返回报告 | | 400 | 40001 | 记录不存在 | | 401 | 40100,2001 到 2011 | 未认证,签名错误,token 或 API Key 无效 |