top
关闭

开发者登录

资源编目API

主要使用场景:主要开放了教学资源编目的基础信息API

1、获取教材章节

基础 需要授权

根据教材ID或者章节上级ID获取章节信息。

前置条件

获取接口访问令牌:accessToken

请求说明

urlhttps://api.wuhaneduyun.cn/rescBase/queryChapters?accessToken=ACCESS_TOKEN
请求方式post
是否需要鉴权
请求数限制
接口方向第三方应用->开放平台

参数说明

序号 字段名 约束 类型 长度 说明

1

parentType

可选

String

1

0=根据教材ID查章节1=根据上级章节ID查章节

2

parentId

可选

String

64

parentType为0时parentId传教材ID;parentType为1时parentId传上级章节ID

3

retType

可选

String

1

返回类型:0=返回整棵子树1=返回下级节点

返回说明

序号 字段名 约束 类型 长度 说明

1

retCode

必选

String

6

返回码

2

retDesc

必选

String

100

返回码描述

3

data

必选

JSON对象

-

返回结果集

3.1

chapterList

必选

Json对象

-

结果列表

3.1.1

chapterId

必选

String

-

章节ID

3.1.2

chapterTitle

必选

String

-

章节标题

3.1.3

chapterPid

必选

String

-

父章节ID,根节点为0

3.1.4

textbookId

必选

String

-

教材ID

3.1.5

depth

必选

Int

-

章节层级

3.1.6

isLeaf

必选

String

-

是否叶子节点Y=是N=否

示例

请求报文:
{
    "parentType": "0",
    "parentId": "TEX0000******",
    "retType": "0"
}
应答报文:
   {
    "retCode": "000000",
    "retDesc": "success",
    "chapterList": [
        {
            "chapterId": "CHA000******",
            "chapterTitle": "一单元",
            "chapterPid": "0",
            "textbookId": "TEX0******",
            "chapterLevel": "2",
            "isLeaf": "N"
        },
        {
            "chapterId": "CHA000******",
            "chapterTitle": "二单元",
            "chapterPid": "0",
            "textbookId": "TEX00000******",
            "chapterLevel": "2",
            "isLeaf": "N"
        }
        ]
}