課程數(shù)據(jù)
1、獲取課程信息
2、獲取學(xué)習(xí)成績(jī)
3、獲取學(xué)員待參加課程
獲取課程信息
獲取當(dāng)前學(xué)員所有待參加練習(xí)和練習(xí)入口。如在第三方應(yīng)用或App中,需要展示考試云待參加練習(xí)列表。
接口地址:https://api.kaoshiyun.com.cn/api/v5/lessonaction.ashx?token=[Token]&action=getLessonList&pageIndex=[pageIndex]&pageSize=[pageSize]
請(qǐng)求方式:GET或POST
參數(shù)說(shuō)明:
參數(shù)名稱 | 說(shuō)明 |
token | 接口調(diào)用憑證,2小時(shí)內(nèi)有效,請(qǐng)注意時(shí)效性 |
action | getLessonList |
pageIndex | 分頁(yè)頁(yè)碼,默認(rèn)第1頁(yè) |
pageSize | 每頁(yè)條數(shù),默認(rèn)1000條 |
返回值說(shuō)明:
1、執(zhí)行成功
JSON返回值格式
{
"totalCount": 2,
"currentPageIndex": 1,
"items": [
{
"lessonID": "8bf058",
"lessonName": "第一季度崗位培訓(xùn)在線課程",
"beginTime": "2022-01-11 17:17",
"endTime": "2022-04-01 17:17",
"passCondition": "達(dá)到課程學(xué)時(shí)",
"attendNum": "4",
"passNum": "2",
"unPassNum": "2",
"creatTime": "2021-07-25 17:17:34",
"lessonUrl": "https://課程地址/v5/lesson/8bf058"
},
{
"lessonID": "06a1ad",
"lessonName": "第二季度崗位培訓(xùn)在線課程 ",
"beginTime": "2022-04-24 15:05",
"endTime": "2022-07-01 15:05",
"passCondition": "通過(guò)課程考試",
"attendNum": "9",
"passNum": "0",
"unPassNum": "9",
"creatTime": "2022-03-24 15:06:41",
"lessonUrl": "https://課程地址/v5/lesson/06a1ad"
}
]
}返回值參數(shù)說(shuō)明
參數(shù)名稱 | 說(shuō)明 |
totalCount | 總記錄數(shù) |
currentPageIndex | 當(dāng)前頁(yè)碼 |
lessonID | 課程編號(hào) |
lessonName | 課程名稱 |
beginTime | 課程開始時(shí)間 |
endTime | 課程結(jié)束時(shí)間 |
passCondition | 課程通過(guò)條件 |
attendNum | 參加課程人數(shù) |
passNum | 通過(guò)課程人數(shù) |
unPassNum | 未通過(guò)課程人數(shù) |
lessonURL | 學(xué)習(xí)入口鏈接,點(diǎn)擊鏈接進(jìn)入課程學(xué)習(xí) |
2、執(zhí)行失敗,返回值
{"errcode":"40006","errmsg":"AccessToken has expired"}{"errcode":"40501","errmsg":"account參數(shù)不允許為空"}{"errcode":"40502","errmsg":"account:[賬號(hào)]在考試云中不存在"}獲取學(xué)習(xí)成績(jī)
獲取某個(gè)課程的所有學(xué)習(xí)成績(jī),如學(xué)習(xí)記錄、學(xué)習(xí)時(shí)間、次數(shù)、學(xué)時(shí)、成績(jī)、學(xué)分、狀態(tài)等信息。
接口地址:https://api.kaoshiyun.com.cn/api/v5/lessongrade.ashx?token=[Token]&action=getLessonGrade&lessonID=[examid]&pageIndex=[pageIndex]&pageSize=[pageSize]
請(qǐng)求方式:GET或POST
參數(shù)說(shuō)明:
參數(shù)名稱 | 說(shuō)明 |
token | 接口調(diào)用憑證,2小時(shí)內(nèi)有效,請(qǐng)注意時(shí)效性 |
action | getLessonGrade |
lessonID | 課程編號(hào) |
pageIndex | 分頁(yè)頁(yè)碼,默認(rèn)第1頁(yè) |
pageSize | 每頁(yè)條數(shù),默認(rèn)1000條 |
返回值說(shuō)明:
1、執(zhí)行成功
JSON返回值格式
{
"lessonID": "b1e8ef",
"lessonName": "第一季度在線培訓(xùn)課程",
"totalCount": 750,
"pageSize": 1000,
"currentPageIndex": 1,
"items": [
{
"account": "c089d6",
"userName": "陳翰林",
"deptName": "銷售部",
"fullDeptName": "考試云/銷售中心/銷售部",
"gradeID": "dc3d4020622b46a0bf82d8fa1e38bc00",
"beginTime": "2022-04-25 13:03:03",
"endTime": "2022-04-28 13:33:07",
"learnedTime": "210分4秒",
"learnedCount": "5",
"gradeScore": "80.0",
"isPass": "Y",
"integral": "10",
"finishPercent": "100%",
"statusCode": "finished",
"status": "已完成"
},
{
"account": "c089d6",
"userName": "李一鳴",
"deptName": "技術(shù)部",
"fullDeptName": "考試云/研發(fā)中心/開發(fā)部",
"gradeID": "28e4bea1f2904c15814d0b6cca39457d",
"beginTime": "2022-04-25 13:01:50",
"endTime": "2022-04-29 13:54:53",
"learnedTime": "53分3秒",
"learnedCount": "2",
"gradeScore": "-",
"isPass": "-",
"integral": "10",
"finishPercent": "40%",
"statusCode": "progress",
"status": "學(xué)習(xí)中"
}
]
}返回值參數(shù)說(shuō)明:
參數(shù)名稱 | 說(shuō)明 |
lessonID | 課程編號(hào) |
lessonName | 課程名稱 |
totalCount | 總記錄數(shù) |
pageSize | 每頁(yè)條數(shù),默認(rèn)1000條 |
currentPageIndex | 當(dāng)前頁(yè)碼 |
account | 考生賬號(hào) |
userName | 考生姓名 |
deptName | 所屬部門 |
fullDeptName | 部門全路徑 |
beginTime | 學(xué)習(xí)開始時(shí)間 |
endTime | 學(xué)習(xí)結(jié)束時(shí)間 |
learnedTime | 學(xué)習(xí)時(shí)長(zhǎng) |
learnedCount | 學(xué)習(xí)次數(shù) |
gradeScore | 考試成績(jī)(如果有設(shè)定課程考試) |
isPass | 是否通過(guò)考試,Y為通過(guò),N為未通過(guò). |
integral | 所得積分 |
finishPercent | 課程學(xué)習(xí)進(jìn)度 |
integral | 所得積分 |
status | 課程學(xué)習(xí)狀態(tài): nostart 未學(xué)習(xí) progress 學(xué)習(xí)中 examing 待考試 examfailed未通過(guò)考試 finished已完成 unfinished 未完成 |
2、執(zhí)行失敗,返回值
{"errcode":"40006","errmsg":"AccessToken has expired"}{"errcode":"40902","errmsg":"lessonID不存在,獲取失敗"}{"errcode":"40903","errmsg":"課程參加方式為非賬號(hào)密碼,獲取失敗"}獲取學(xué)員待參加課程
獲取當(dāng)前學(xué)員待參加練習(xí)和練習(xí)入口。如在第三方應(yīng)用或App中,需要展示考試云待參加練習(xí)列表。
接口地址:https://api.kaoshiyun.com.cn/api/v5/lessonaction.ashx?token=[Token]&action=getUserLesson&account=[account]&pageIndex=[pageIndex]&pageSize=[pageSize]
請(qǐng)求方式:GET或POST
參數(shù)說(shuō)明:
參數(shù)名稱 | 說(shuō)明 |
token | 接口調(diào)用憑證,2小時(shí)內(nèi)有效,請(qǐng)注意時(shí)效性 |
action | getUserLesson |
account | 考生(學(xué)員)賬號(hào) |
pageIndex | 分頁(yè)頁(yè)碼,默認(rèn)第1頁(yè) |
pageSize | 每頁(yè)條數(shù),默認(rèn)10條 |
返回值說(shuō)明:
1、執(zhí)行成功
JSON返回值格式
{
"totalCount": 2,
"currentPageIndex": 1,
"items": [
{
"lessonID": "8bf058",
"lessonName": "第一季度崗位培訓(xùn)在線課程",
"beginTime": "2022-01-11 17:17",
"endTime": "2022-03-01 17:17",
"passCondition": "達(dá)到課程學(xué)時(shí)",
"lessonUrl": "https://學(xué)習(xí)鏈接/v5/lesson/8bf058"
},
{
"lessonID": "06a1ad",
"lessonName": "第二季度崗位培訓(xùn)在線課程",
"beginTime": "2022-03-24 15:05",
"endTime": "2022-06-01 15:05",
"passCondition": "通過(guò)課程考試",
"lessonUrl": "https://學(xué)習(xí)鏈接/v5/lesson/06a1ad"
}
]
}返回值參數(shù)說(shuō)明
參數(shù)名稱 | 說(shuō)明 |
totalCount | 總記錄數(shù) |
currentPageIndex | 當(dāng)前頁(yè)碼 |
lessonID | 課程編號(hào) |
lessonName | 課程名稱 |
beginTime | 課程開始時(shí)間 |
endTime | 課程結(jié)束時(shí)間 |
passCondition | 課程通過(guò)條件 |
lessonURL | 學(xué)習(xí)入口鏈接,點(diǎn)擊鏈接進(jìn)入課程學(xué)習(xí) |
2、執(zhí)行失敗,返回值
{"errcode":"40006","errmsg":"AccessToken has expired"}{"errcode":"40501","errmsg":"account參數(shù)不允許為空"}{"errcode":"40502","errmsg":"account:[賬號(hào)]在考試云中不存在"}