返回接口目录
题库与练习/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

请求参数

字段类型必填说明
cursorstringCursor returned by the previous practice.search_parts call.
difficulty | 基础 | 核心 | 冲刺Practice difficulty filter.
excludePartIdsnumber[]Part ids the local Agent has ruled out for this selection.
includeCourseLinkedbooleanWhether to include course-linked parts.
limitnumberResult limit, 1-6.
preferUnseenbooleanWhether the caller explicitly wants unseen parts before previously attempted parts.
searchstringOptional free-text title search.
sortcatalog | latestCatalog order or latest-first order chosen by the caller.
subject | listening | reading | speaking | writingPractice subject.
tagIdsnumber[]Exact taxonomy tag ids resolved by practice.list_taxonomy.
tagQueriesunknown[]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"
}

错误码

40040001请求参数不符合接口契约
40140101缺少或使用了无效的访问令牌
40340301访问令牌不包含接口所需权限
40440401接口或目标资源不存在