Learning Plan Course

This end point is use for get courses of learning plan

[GET] /ruangkerja/dashboard/learning-plans/:learningPlanSerial/courses

Information

This API contains information list Course by Learning Plan in Ruangkerja.

See also API: Learning Plan.

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
learningPlanSerialstringYESPATHFilter learning plan serial

Example cURL Request

curl --location --request GET 'https://api.ruangkerja.id/ruangkerja/dashboard/learning-plans/LRPN-YFXP3P98/courses?page=1&pageSize=10' \
--header 'Authorization: access_token'

Example Success Response

{
    "status": "success",
    "message": "Success",
    "data": {
        "currentPage": 1,
        "totalItems": 100,
        "totalPage": 10,
        "items": [
            ...,
            {
                "course": {
                    "name": "Belajar Algoritma",
                    "serial": "COURSE-SZNUBV8F",
                },
                "deadline": "2022-07-19T06:00:00Z",
                "avgPostTest": null,
                "avgPreTest": null,
                "numberOfCompleted": 0,
                "numberOfExpired": 1,
                "numberOfFailed": 0,
                "numberOfInProgress": 0,
                "numberOfNotStarted": 0,
                "numberOfParticipants": 1
            },
            {
                "course": {
                    "name": "Belajar Mahir",
                    "serial": "COURSE-EYKURWRI",
                },
                "deadline": "2022-07-19T06:00:00Z",
                "avgPostTest": null,
                "avgPreTest": null,
                "numberOfCompleted": 0,
                "numberOfExpired": 1,
                "numberOfFailed": 0,
                "numberOfInProgress": 0,
                "numberOfNotStarted": 0,
                "numberOfParticipants": 1
            }
        ]
    }
}

Response Body Terminology

LocationTypeDescription
data.items.*.avgPostTestfloat64 (nullable)The value will be null when no one user submit Post-Test
data.items.*.avgPretestfloat64 (nullable)The value will be null when no one user submit Pre-Test

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.