资源与文件/Bearer
Find related learning resources
Find explicitly or structurally related resources from a stable contentRef, such as course-to-practice and prediction-to-question relationships. Resource discovery and full reads remain owned by each resource Domain.
Endpoint
POST
/api/v1/agent/capabilities/ielts_resources_related请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| contentRef | unknown | 是 | Stable contentRef returned by the owning resource Domain. |
| limit | number | 否 | limit |
| relationTypes | unknown[] | 否 | Optional relation types to include. |
调用示例
curl -X POST \
'https://work.ieltsbuddy.igopx.cn/api/v1/agent/capabilities/ielts_resources_related' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $IELTS_BUDDY_TOKEN' \
--data '{"contentRef":"<contentRef>","limit":12,"relationTypes":[]}'请求结构
{
"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
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "prep_guide"
},
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"kind",
"slug"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"hitId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"const": "prediction_hit"
}
},
"required": [
"hitId",
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "speaking_material"
},
"materialId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"materialId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"assetId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"const": "asset"
}
},
"required": [
"assetId",
"kind"
],
"additionalProperties": false
}
],
"description": "Stable contentRef returned by the owning resource Domain."
},
"limit": {
"default": 12,
"type": "integer",
"minimum": 1,
"maximum": 30
},
"relationTypes": {
"default": [],
"description": "Optional relation types to include.",
"maxItems": 12,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
}
},
"required": [
"contentRef",
"limit",
"relationTypes"
],
"additionalProperties": false
}统一响应
接口结果位于 data;code 为 0 表示调用成功。
{
"code": 0,
"data": {},
"message": "ok"
}错误码
400
40001请求参数不符合接口契约401
40101缺少或使用了无效的访问令牌403
40301访问令牌不包含接口所需权限404
40401接口或目标资源不存在