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

NameTypeExampleRequiredDescription
Authorizationstringaccess_tokenYESToken of authentication. Get from Authentication API
Acceptstringapplication/jsonYESDefines the message format that is expected by the client
Content-Typestringapplication/jsonYESDefines the message format of the request body that is sent by the client

Parameter

NameTypeRequiredLocationDescription
pageintYESqueryQuery for skip page of collection
pageSizeintYESqueryQuery for limit result data from server. Maximum value 100
courseSerialstringYESpathFilter 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

LocationTypeDescription
data.items.*.preTestfloat (nullable)The value will be null if user not submit task/reached timeout
data.items.*.postTestfloat (nullable)The value will be null if user not submit task/reached timeout
data.items.*.completedAtstringThe value will be empty string if user not submit task/reached timeout
data.items.*.statusenum(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.