返回接口目录
模考/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 | customOptional paper category. Empty searches every category.
limitnumberMaximum number of available mock papers to return.
maxDurationMinutesnumberMaximum duration in minutes. Zero disables the duration filter.
offsetnumberPagination offset returned by the preceding search.
querystringOptional title, source, category, or level keyword.
subjectsunknown[]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"
}

错误码

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