文档首页> Classroom> API参考> API> job> 查询指定作业下的习题信息
更新时间:2023-07-03 GMT+08:00
分享

查询指定作业下的习题信息

功能介绍

查询指定作业下的习题信息

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v3/jobs/{job_id}/exercises

表1 路径参数

参数

是否必选

参数类型

描述

job_id

String

作业ID。

最小长度:32

最大长度:32

表2 Query参数

参数

是否必选

参数类型

描述

source_from

String

作业来源于课堂或课程。 取值范围: classroom:课堂作业 course:课程作业

最小长度:6

最大长度:9

source_id

String

课堂ID或者课程ID。

最小长度:32

最大长度:32

offset

Integer

信息记录的起始编号

最小值:1

最大值:1000

limit

Integer

每页包含的信息记录数

最小值:1

最大值:100

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

x-auth-token

String

用户token

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

group_exercises

Array of ExerciseGroup objects

作业下习题列表

total

Integer

作业下习题总数

表5 ExerciseGroup

参数

参数类型

描述

exercises

Array of ExerciseCard objects

习题列表

type

String

习题分类

表6 ExerciseCard

参数

参数类型

描述

name

String

习题名称

exercise_id

String

习题ID

description

String

习题描述

resource_sub_type

Integer

习题子类型 1:函数c 2:函数c++ 3:函数Java 4:函数Python 5:单人项目java 6:单人项目Hadoop 7:通用 8:企业级软件项目 10:web习题 11:AI习题 12:单选题 13:多选题 14:填空题 15:单人项目C 16:单人项目C++

target_score

Integer

习题分值

状态码: 400

表7 响应Body参数

参数

参数类型

描述

error_code

String

异常错误码

error_msg

String

异常错误描述

状态码: 403

表8 响应Body参数

参数

参数类型

描述

error_code

String

异常错误码

error_msg

String

异常错误描述

状态码: 500

表9 响应Body参数

参数

参数类型

描述

error_code

String

异常错误码

error_msg

String

异常错误描述

请求示例

GET https://{endpoint}/v3/jobs/{job_id}/exercises

响应示例

状态码: 200

OK

{
  "group_exercises" : [ {
    "type" : "单选题",
    "exercises" : [ {
      "name" : "习题",
      "exercise_id" : "0529d74ba93040c1a785be4f95bffef2",
      "description" : "作业习题",
      "resource_sub_type" : 13,
      "target_score" : 50
    } ]
  } ],
  "total" : 1
}

状态码: 400

Bad Request

{
  "error_code" : "CM.0003",
  "error_msg" : "请求参数有误"
}

状态码: 403

Forbidden

{
  "error_code" : "CM.0001",
  "error_msg" : "请求被拒绝访问"
}

状态码: 500

Internal Server Error

{
  "error_code" : "CM.0000",
  "error_msg" : "服务内部错误"
}

状态码

状态码

描述

200

OK

400

Bad Request

403

Forbidden

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品