题库与练习/Bearer
Search practice parts
Search up to six compact IELTS Buddy question-bank candidates by subject, text, difficulty, exact tag ids, or literal tagQueries. Each result includes partId and a stable question_part contentRef. Source claims come only from origin fields; the server returns facts and the local Agent chooses the question.
Endpoint
POST
/api/v1/agent/capabilities/ielts_practice_search_parts请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| cursor | string | 否 | Cursor returned by the previous practice.search_parts call. |
| difficulty | | 基础 | 核心 | 冲刺 | 否 | Practice difficulty filter. |
| excludePartIds | number[] | 否 | Part ids the local Agent has ruled out for this selection. |
| includeCourseLinked | boolean | 否 | Whether to include course-linked parts. |
| limit | number | 否 | Result limit, 1-6. |
| preferUnseen | boolean | 否 | Whether the caller explicitly wants unseen parts before previously attempted parts. |
| search | string | 否 | Optional free-text title search. |
| sort | catalog | latest | 否 | Catalog order or latest-first order chosen by the caller. |
| subject | | listening | reading | speaking | writing | 否 | Practice subject. |
| tagIds | number[] | 否 | Exact taxonomy tag ids resolved by practice.list_taxonomy. |
| tagQueries | unknown[] | 否 | Literal user-mentioned taxonomy terms. The Tool resolves them to exact tag ids before filtering. |
调用示例
curl -X POST \
'https://work.ieltsbuddy.igopx.cn/api/v1/agent/capabilities/ielts_practice_search_parts' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $IELTS_BUDDY_TOKEN' \
--data '{"cursor":"","difficulty":"","excludePartIds":[],"includeCourseLinked":false,"limit":6,"preferUnseen":false,"search":"","sort":"catalog","subject":"","tagIds":[],"tagQueries":[]}'请求结构
{
"type": "object",
"properties": {
"cursor": {
"default": "",
"description": "Cursor returned by the previous practice.search_parts call.",
"type": "string"
},
"difficulty": {
"default": "",
"description": "Practice difficulty filter.",
"type": "string",
"enum": [
"",
"基础",
"核心",
"冲刺"
]
},
"excludePartIds": {
"default": [],
"description": "Part ids the local Agent has ruled out for this selection.",
"maxItems": 30,
"type": "array",
"items": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"includeCourseLinked": {
"default": false,
"description": "Whether to include course-linked parts.",
"type": "boolean"
},
"limit": {
"default": 6,
"description": "Result limit, 1-6.",
"type": "integer",
"minimum": 1,
"maximum": 6
},
"preferUnseen": {
"default": false,
"description": "Whether the caller explicitly wants unseen parts before previously attempted parts.",
"type": "boolean"
},
"search": {
"default": "",
"description": "Optional free-text title search.",
"type": "string"
},
"sort": {
"default": "catalog",
"description": "Catalog order or latest-first order chosen by the caller.",
"type": "string",
"enum": [
"catalog",
"latest"
]
},
"subject": {
"default": "",
"description": "Practice subject.",
"type": "string",
"enum": [
"",
"listening",
"reading",
"speaking",
"writing"
]
},
"tagIds": {
"default": [],
"description": "Exact taxonomy tag ids resolved by practice.list_taxonomy.",
"maxItems": 12,
"type": "array",
"items": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"tagQueries": {
"default": [],
"description": "Literal user-mentioned taxonomy terms. The Tool resolves them to exact tag ids before filtering.",
"maxItems": 6,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
}
},
"required": [
"cursor",
"difficulty",
"excludePartIds",
"includeCourseLinked",
"limit",
"preferUnseen",
"search",
"sort",
"subject",
"tagIds",
"tagQueries"
],
"additionalProperties": false
}统一响应
接口结果位于 data;code 为 0 表示调用成功。
{
"code": 0,
"data": {},
"message": "ok"
}错误码
400
40001请求参数不符合接口契约401
40101缺少或使用了无效的访问令牌403
40301访问令牌不包含接口所需权限404
40401接口或目标资源不存在