考试数据
1、获取考试信息
2、获取考试成绩
3、获取考生待参加考试
获取考试信息
获取考试信息列表,如考试基本信息、考试时间、及格分/总分、参加人次、最值成绩、考试入口等。
接口地址:https://api.kaoshiyun.com.cn/api/v5/examaction.ashx?token=[Token]&action=getExamList&pageIndex=[pageIndex]&pageSize=[pageSize]
请求方式:GET或POST
参数说明:
参数名称 | 说明 |
token | 接口调用凭证,2小时内有效,请注意时效性 |
action | getExamList |
pageIndex | 分页页码,默认第1页 |
pageSize | 每页条数,默认1000条 |
返回值说明:
1、执行成功
JSON返回值格式
{ "totalCount": 60, "currentPageIndex": 3, "items": [ { "examID": "d7310f", "examName": "会计基础考试A卷", "beginTime": "2022-03-18 17:12", "endTime": "2022-07-13 17:12", "examTime": "60", "passScore": "60", "paperScore": "100", "attendNum": "650", "passNum": "628", "maxScore": "100.0", "avgScore": "39.8", "minScore": "0.0", "creatTime": "2022-03-18 17:12:22", "examUrl": "https://考试网址/v5/exam/d7310f" }, { "examID": "91c510", "examName": "会计基础考试B卷", "beginTime": "2022-03-17 15:05", "endTime": "2022-07-20 15:05", "examTime": "60", "passScore": "80.00", "paperScore": "100.00", "attendNum": "300", "passNum": "252", "maxScore": "80.00", "avgScore": "40.00", "minScore": "0.00", "creatTime": "2022-03-17 15:05:45", "examUrl": "https://考试网址/v5/exam/91c510" } ] }
返回值参数说明:
参数名称 | 说明 |
totalCount | 总记录数 |
currentPageIndex | 当前页码 |
examID | 考试编号 |
beginTime | 考试开始时间 |
endTime | 考试结束时间 |
examTime | 答题时间(分钟) |
passScore | 通过考试分数线 |
paperScore | 卷面总分 |
attendNum | 已参加人次 |
passNum | 通过考试人次 |
maxScore | 最好成绩 |
avgScore | 平均成绩 |
minScore | 最差成绩 |
createTime | 创建时间 |
examURL | 考试入口链接 |
2、执行失败,返回值
{"errcode":"40006","errmsg":"AccessToken has expired"}
获取考试成绩
获取某个考试的所有成绩信息,如考生信息、答题开始/结束时间、用时、成绩、排名等信息。
接口地址:https://api.kaoshiyun.com.cn/api/v5/gradeaction.ashx?token=[Token]&action=getExamGrade&examid=[examid]&pageIndex=[pageIndex]&pageSize=[pageSize]
请求方式:GET或POST
参数说明:
参数名称 | 说明 |
token | 接口调用凭证,2小时内有效,请注意时效性 |
action | getExamGrade |
examID | 考试编号 |
pageIndex | 分页页码,默认第1页 |
pageSize | 每页条数,默认1000条 |
返回值说明:
1、执行成功
JSON返回值格式
{ "examID": "b1e8ef", "examName": "会计基础考试A卷", "totalCount": 590, "pageSize": 1000, "currentPageIndex": 1, "items": [ { "account": "c089d6", "userName": "陈翰林", "deptName": "销售部", "fullDeptName": "考试云/销售中心/销售部", "gradeID": "dc3d4020622b46a0bf82d8fa1e38bc00", "beginTime": "2022-04-25 13:03:03", "endTime": "2022-04-25 13:33:07", "usedTime": "30分4秒", "paperScore": "100.0", "passScore": "80.0", "gradeScore": "75.0", "order": "82", "isPass": "N", "integral": "7.5", "status": "已发布" }, { "account": "c089d6", "userName": "李一鸣", "deptName": "技术部", "fullDeptName": "考试云/研发中心/开发部", "gradeID": "28e4bea1f2904c15814d0b6cca39457d", "beginTime": "2022-04-25 13:01:50", "endTime": "2022-04-25 13:54:53", "usedTime": "53分3秒", "paperScore": "100.0", "passScore": "60.0", "gradeScore": "100.0", "order": "1", "isPass": "Y", "integral": "10", "status": "已发布" } ] }
返回值参数说明:
参数名称 | 说明 |
examID | 考试编号 |
examName | 考试名称 |
totalCount | 总记录数 |
pageSize | 每页条数,默认1000条 |
currentPageIndex | 当前页码 |
account | 考生账号 |
userName | 考生姓名 |
deptName | 所属部门 |
fullDeptName | 部门全路径 |
beginTime | 考试开始时间 |
endTime | 考试结束时间 |
usedTime | 答题时间 |
passScore | 及格分数线 |
paperScore | 卷面总分 |
gradeScore | 考试成绩 |
order | 排名 |
isPass | 是否通过考试,Y为通过,N为不通过 |
integral | 所得积分 |
status | 成绩状态 |
2、执行失败,返回值
{"errcode":"40006","errmsg":"AccessToken has expired"}
{"errcode":"40803","errmsg":"examID不存在,获取失败"}
获取考生待参加考试
获取考生待参加考试列表信息。如在第三方应用或App中,需要展示考试云待参加考试列表。
接口地址:https://api.kaoshiyun.com.cn/api/v5/examaction.ashx?token=[Token]&action=getUserExam&account=[account]&pageIndex=[pageIndex]&pageSize=[pageSize]
请求方式:GET或POST
参数说明:
参数名称 | 说明 |
token | 接口调用凭证,2小时内有效,请注意时效性 |
action | getUserExam |
account | 考生账号 |
pageIndex | 分页页码,默认第1页 |
pageSize | 每页条数,默认10条 |
返回值说明:
1、执行成功
JSON返回值格式
{ "totalCount": 2, "currentPageIndex": 1, "items": [ { "examID": "661502", "examName": "会计基础考试A卷", "beginTime": "2021-04-25 09:30", "endTime": "2021-05-02 09:30", "examUrl": "https://考试网址/v5/exam/661502", "examTime": "60", "allowTimes": "4", "passScore": "80", "paperScore": "100" }, { "examID": "d7310f", "examName": "会计基础考试B卷", "beginTime": "2021-03-18 17:12", "endTime": "2021-07-13 17:12", "examUrl": "https://考试网址/v5/exam/d7310f", "examTime": "60", "allowTimes": "100", "passScore": "80", "paperScore": "100" } ] }
返回值参数说明:
参数名称 | 说明 |
totalCount | 总记录数 |
currentPageIndex | 当前页码 |
examID | 考试编号 |
beginTime | 考试开始时间 |
endTime | 考试结束时间 |
examURL | 考试入口链接,点击链接进入考试 |
examTime | 答题时间(分钟) |
allowTimes | 允许参加次数 |
passScore | 通过考试分数线 |
paperScore | 卷面总分 |
2、执行失败,返回值
{"errcode":"40006","errmsg":"AccessToken has expired"}
{"errcode":"40501","errmsg":"account参数不允许为空"}
{"errcode":"40502","errmsg":"account:[账号]在考试云中不存在"}