dingtalk.oapi.edu.course.participant.list (获取课程参与方列表)

获取课程参与方列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
course_code String 必须 GJKI49001 课程编码
op_userid String 必须 manager 当前操作人的用户ID
cursor Number 必须 0
  • 最小值:0
  • 表示分页游标,从0开始
    size Number 必须 10
  • 最小值:1
  • 最大值:100
  • 表示分页大小

    响应参数

    名称 类型 示例值 描述
    result ListCourseParticipantResponse result
    • └ has_more
    • Boolean
    • true
    • 表示是否还有更多的数据
    • list
    • CourseParticipantVO []
    • list
    • └ role
    • String
    • student
    • 参与方角色。student:学生、teacher:老师、guardian: 监护人
    • └ participant_id
    • String
    • user01
    • 参与方ID。participant_type=1时,participant_id表示用户ID;participant_type=2时,participant_id表示部门ID;participant_type=3时,participant_id表示组织ID;
    • └ participant_type
    • String
    • 1
    • 参与方类型。1:用户、2:部门(对应家校通讯录中的班级、年级。详情请参考https://ding-doc.dingtalk.com/doc#/serverapi3/gga05a/z3y0h)、3:组织
    • └ participant_corpid
    • String
    • ding4220d8e5128d0edd
    • 参与方的组织CorpId
    • └ participant_name
    • String
    • 学生1
    • 参与方名称
    • └ next_cursor
    • Number
    • 10
    • 表示下一次分页的游标,如果next_corsor为null或者has_more为false,表示没有更多的分页数据
    success Boolean true 请求是否成功
    errcode Number 0 dingOpenErrcode
    errmsg String 成功 errorMsg

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/edu/course/participant/list");
    OapiEduCourseParticipantListRequest req = new OapiEduCourseParticipantListRequest();
    req.setCourseCode("GJKI49001");
    req.setOpUserid("manager");
    req.setCursor(0L);
    req.setSize(10L);
    OapiEduCourseParticipantListResponse rsp = client.execute(req, access_token);
    System.out.println(rsp.getBody());

    响应示例

    • JSON示例
    {
        "result":{
            "has_more":true,
            "list":[
                {
                        "role":"student",
                        "participant_id":"user01",
                        "participant_type":"1",
                        "participant_corpid":"ding4220d8e5128d0edd",
                        "participant_name":"学生1"
                }
            ],
            "next_cursor":10
        },
        "success":true,
        "errcode":0,
        "errmsg":"成功"
    }

    异常示例

    • JSON示例
    {
    	"errcode":88,
    	"errmsg":"ding talk error"
    }

    错误码解释

    错误码 错误描述 解决方案

    API工具

    如何获得此API

    FAQ

    返回
    顶部