Course Online User Assignment
This end point is use for get list of user in online course
[GET] /ruangkerja/dashboard/courses/:courseSerial/online/users
Information
This API contains information Online Course Assignment in Ruangkerja.
See also API: Course.
Headers
Name | Type | Example | Required | Description |
---|---|---|---|---|
Authorization | string | access_token | YES | Token of authentication. Get from Authentication API |
Accept | string | application/json | YES | Defines the message format that is expected by the client |
Content-Type | string | application/json | YES | Defines the message format of the request body that is sent by the client |
Parameter
Name | Type | Required | Location | Description |
---|---|---|---|---|
page | int | YES | query | Query for skip page of collection |
pageSize | int | YES | query | Query for limit result data from server. Maximum value 100 |
courseSerial | string | YES | path | Filter course serial |
Example cURL Request
curl --location --request GET 'https://api.ruangkerja.id/ruangkerja/dashboard/courses/COURSE-EXAMPLE1/online/users?page=1&pageSize=10' \
--header 'Authorization: access_token'
Example Success Response
{
"status": "success",
"message": "Success",
"data": {
"currentPage": 1,
"totalItems": 100,
"totalPage": 10,
"items": [
...,
{
"user": {
"serial": "JOHNILXV3QAJJEL3",
"name": "John Doe",
"employeeID": "EMPLY001"
},
"postTest": null,
"preTest": null,
"timeSpent": 0,
"lastAccessMission": "2022-07-22T01:00:00.000Z",
"completedAt": "",
"status": "not_started"
},
{
"user": {
"serial": "JOHNIASD318JJEL5",
"name": "John Smith",
"employeeID": "EMPLY005"
},
"postTest": 100,
"preTest": 100,
"timeSpent": 873,
"lastAccessMission": "2022-07-22T01:00:00.000Z",
"completedAt": "2022-07-22",
"status": "completed"
}
]
}
}
Response Body Terminology
Location | Type | Description |
---|---|---|
data.items.*.preTest | float (nullable) | The value will be null if user not submit task/reached timeout |
data.items.*.postTest | float (nullable) | The value will be null if user not submit task/reached timeout |
data.items.*.completedAt | string | The value will be empty string if user not submit task/reached timeout |
data.items.*.status | enum(not_started, completed, expired, failed, in_progress) | The status of user task |
Example Failed Response
{
"errorCode": 123,
"message": "rpc error: code = PermissionDenied desc = Token is not valid",
"detail": "rpc error: code = PermissionDenied desc = Token is not valid"
}
See also: Error Dictionary.