学习计划/BearerWrite
Create study plan
Create a plan from explicit learning tasks. Each task binds one exact selected contentRef, a calendar date, and one of morning, afternoon, or evening; the Tool resolves current content facts and stores the execution snapshot.
Endpoint
POST
/api/v1/agent/capabilities/ielts_study_plans_create请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| goal | string | 是 | goal |
| tasks | record[] | 是 | 计划由多个已选定的学习任务组成。 |
| tasks.contentRef | unknown | 是 | 已选定且可排入计划的学习内容引用,由内容资源模块提供。 |
| tasks.date | string | 是 | 任务所在的中国日历日期。 |
| tasks.durationMinutes | number | 否 | durationMinutes |
| tasks.timeSlot | morning | afternoon | evening | 是 | 任务时段:morning=上午,afternoon=下午,evening=晚上。不提供具体钟点。 |
| title | string | 否 | title |
调用示例
curl -X POST \
'https://work.ieltsbuddy.igopx.cn/api/v1/agent/capabilities/ielts_study_plans_create' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $IELTS_BUDDY_TOKEN' \
--data '{"goal":"<goal>","tasks":[]}'请求结构
{
"type": "object",
"properties": {
"goal": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"tasks": {
"minItems": 1,
"maxItems": 90,
"type": "array",
"items": {
"type": "object",
"properties": {
"contentRef": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "question_part"
},
"partId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"partId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "mock_paper"
},
"paperId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"kind",
"paperId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"courseId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"const": "course_section"
},
"sectionId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"courseId",
"kind",
"sectionId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "listening_dictation"
},
"partId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"partId"
],
"additionalProperties": false
}
],
"description": "已选定且可排入计划的学习内容引用,由内容资源模块提供。"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "任务所在的中国日历日期。"
},
"durationMinutes": {
"default": 45,
"type": "integer",
"minimum": 5,
"maximum": 240
},
"timeSlot": {
"type": "string",
"enum": [
"morning",
"afternoon",
"evening"
],
"description": "任务时段:morning=上午,afternoon=下午,evening=晚上。不提供具体钟点。"
}
},
"required": [
"contentRef",
"date",
"durationMinutes",
"timeSlot"
],
"additionalProperties": false
},
"description": "计划由多个已选定的学习任务组成。"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"goal",
"tasks"
],
"additionalProperties": false
}统一响应
接口结果位于 data;code 为 0 表示调用成功。
{
"code": 0,
"data": {},
"message": "ok"
}错误码
400
40001请求参数不符合接口契约401
40101缺少或使用了无效的访问令牌403
40301访问令牌不包含接口所需权限404
40401接口或目标资源不存在