模考/Bearer
Search mock papers
Search available preset and reusable user mock papers by keyword, category, required subjects, and maximum duration. Each result includes factual paper details and a stable mock_paper contentRef; the local Agent chooses the paper.
Endpoint
POST
/api/v1/agent/capabilities/ielts_mock_search_papers请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| category | | entry | basic | intensive | sprint | jian21 | xie21 | custom | 否 | Optional paper category. Empty searches every category. |
| limit | number | 否 | Maximum number of available mock papers to return. |
| maxDurationMinutes | number | 否 | Maximum duration in minutes. Zero disables the duration filter. |
| offset | number | 否 | Pagination offset returned by the preceding search. |
| query | string | 否 | Optional title, source, category, or level keyword. |
| subjects | unknown[] | 否 | Subjects every returned paper must contain. Pass all four for a full mock. |
调用示例
curl -X POST \
'https://work.ieltsbuddy.igopx.cn/api/v1/agent/capabilities/ielts_mock_search_papers' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $IELTS_BUDDY_TOKEN' \
--data '{"category":"","limit":8,"maxDurationMinutes":0,"offset":0,"query":"","subjects":[]}'请求结构
{
"type": "object",
"properties": {
"category": {
"default": "",
"description": "Optional paper category. Empty searches every category.",
"type": "string",
"enum": [
"",
"entry",
"basic",
"intensive",
"sprint",
"jian21",
"xie21",
"custom"
]
},
"limit": {
"default": 8,
"description": "Maximum number of available mock papers to return.",
"type": "integer",
"minimum": 1,
"maximum": 12
},
"maxDurationMinutes": {
"default": 0,
"description": "Maximum duration in minutes. Zero disables the duration filter.",
"type": "integer",
"minimum": 0,
"maximum": 300
},
"offset": {
"default": 0,
"description": "Pagination offset returned by the preceding search.",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"query": {
"default": "",
"description": "Optional title, source, category, or level keyword.",
"type": "string"
},
"subjects": {
"default": [],
"description": "Subjects every returned paper must contain. Pass all four for a full mock.",
"maxItems": 4,
"type": "array",
"items": {
"type": "string",
"enum": [
"listening",
"reading",
"speaking",
"writing"
]
}
}
},
"required": [
"category",
"limit",
"maxDurationMinutes",
"offset",
"query",
"subjects"
],
"additionalProperties": false
}统一响应
接口结果位于 data;code 为 0 表示调用成功。
{
"code": 0,
"data": {},
"message": "ok"
}错误码
400
40001请求参数不符合接口契约401
40101缺少或使用了无效的访问令牌403
40301访问令牌不包含接口所需权限404
40401接口或目标资源不存在