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
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 |
learningPlanSerial | string | YES | PATH | Filter 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
Location | Type | Description |
---|---|---|
data.items.*.avgPostTest | float64 (nullable) | The value will be null when no one user submit Post-Test |
data.items.*.avgPretest | float64 (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.