loading-img
考试列表查询

1、爱科举开放接口使用JWT规范(Json web token);

2、获取AppID和AppKey,商业版用户登录管理端,进入【系统管理】-【开发平台】获取AppID和AppKey;

3、以Java开发为例,安装maven依赖:

<dependency>
 <groupId>io.jsonwebtoken</groupId>
 <artifactId>jjwt</artifactId>
 <version>0.9.1</version>
 </dependency><br>


3、接口地址https://admin.ikeju.net/api/{AppID}


4、生成jwt数据:

String app_key = "SV0opAea621484K3fcLRGfM05W2";
Map map = new HashMap();
map.put("action", "examList");
Date now = new Date(System.currentTimeMillis());
String jwt = "";
try {
   jwt ="ikeju_"+ Jwts.builder().setClaims(map).setExpiration(new Date(now.getTime() + 1000 * 10 * 60)).signWith(SignatureAlgorithm.HS512, app_key.getBytes("UTF-8")).compact();
} catch (UnsupportedEncodingException e) {
   e.printStackTrace();
}

代码说明:

(1)必须使用ikeju作为前缀;

(2)一定要使用getBytes("UTF-8");

(3)map.put("action", "examList") 为固定格式,action为examList表示执行的是查询考生列表;


5、封装数据,发送请求到接口https://admin.ikeju.net/api/{AppID}

参数编号参数名称是否必填参数示例参数说明
1

pageNumber

1查询页码,不填自动为1


6、返回数据

{
    "rows":[
        {
            "exam_begin_date":1623772800000,
            "exam_duration":0,
            "exam_end_date":1624982400000,
            "exam_highestScore":0,
            "exam_id":94,
            "exam_minimumScore":0,
            "exam_name":"录屏测试",
            "exam_pass_score":36,
            "exam_persons":1,
            "exam_should_count":0,
            "exam_status":1,
            "exam_total_score":60
        },
        {
            "exam_begin_date":1621872000000,
            "exam_duration":90,
            "exam_end_date":1624982400000,
            "exam_highestScore":0,
            "exam_id":93,
            "exam_minimumScore":0,
            "exam_name":"人脸识别整体测试",
            "exam_pass_score":52.8,
            "exam_persons":41,
            "exam_should_count":40,
            "exam_status":0,
            "exam_total_score":88
        },
        {
            "exam_begin_date":1616342400000,
            "exam_duration":120,
            "exam_end_date":1624982400000,
            "exam_highestScore":0,
            "exam_id":92,
            "exam_minimumScore":0,
            "exam_name":"测试身份证识别及人脸识别",
            "exam_pass_score":52.8,
            "exam_persons":45,
            "exam_should_count":33,
            "exam_status":1,
            "exam_total_score":88
        },
        {
            "exam_begin_date":1623340800000,
            "exam_duration":30,
            "exam_end_date":1624982400000,
            "exam_highestScore":8,
            "exam_id":91,
            "exam_minimumScore":0,
            "exam_name":"人脸识别监考",
            "exam_pass_score":52.8,
            "exam_persons":49,
            "exam_should_count":40,
            "exam_status":1,
            "exam_total_score":88
        },
        {
            "exam_begin_date":1615219200000,
            "exam_duration":0,
            "exam_end_date":1622304000000,
            "exam_highestScore":31,
            "exam_id":90,
            "exam_minimumScore":0,
            "exam_name":"实操题",
            "exam_pass_score":24,
            "exam_persons":6,
            "exam_should_count":36,
            "exam_status":1,
            "exam_total_score":40
        }
    ],
    "total":27
}

rows:返回当前页码查询结果

total:结果总数

字段说明:

参数编号参数名称参数说明
1

exam_id

考试id
2

exam_name

考试名称
3

exam_begin_date

考试开始时间
4

exam_end_date

考试结束时间
5

exam_total_score

考试总分
6

exam_pass_score

及格分数
7

exam_status

考试状态,0为禁止,1为开启
8

exam_duration

考试时长
9

exam_should_count

应考人数
10

exam_persons

实考人数
11

exam_highestScore

最高分
12

exam_minimumScore

最低分