dingtalk.oapi.edu.course.participant.remove (移除课程参与方)

移除课程参与方

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
op_userid String 必须 manager1 当前用户ID
participant_corpid String 必须 ding4220d8e5128d0edd 参与方的组织CropId
course_code String 必须 GJKI49001 课程编码
participant_id String 必须 user01 参与方ID。participant_type=1时,participant_id表示用户ID;participant_type=2时,participant_id表示部门ID;participant_type=3时,participant_id表示组织ID;
role String 必须 student student:学生、guardian: 监护人、teacher:老师(注意:授课老师不支持移除)
participant_type Number 必须 1 1:用户、2:部门(对应家校通讯录中的班级、年级。详情请参考https://ding-doc.dingtalk.com/doc#/serverapi3/gga05a/z3y0h)、3:组织

响应参数

名称 类型 示例值 描述
result Boolean true 操作是否成功
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/remove");
OapiEduCourseParticipantRemoveRequest req = new OapiEduCourseParticipantRemoveRequest();
req.setOpUserid("manager1");
req.setParticipantCorpid("ding4220d8e5128d0edd");
req.setCourseCode("GJKI49001");
req.setParticipantId("user01");
req.setRole("student");
req.setParticipantType(1L);
OapiEduCourseParticipantRemoveResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());

响应示例

  • JSON示例
{
    "result":true,
    "success":true,
    "errcode":0,
    "errmsg":"成功"
}

异常示例

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

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部