Course Batch
This end point is use for get list of batch course
[GET] /ruangkerja/dashboard/courses/:courseSerial/batches
Information
This API contains information Batch of Assignment Course 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-EXAMPLE2/batches?page=1&pageSize=10' \
--header 'Authorization: access_token'
Example Success Response
{
"status": "success",
"message": "Success",
"data": {
"currentPage": 1,
"totalItems": 100,
"totalPage": 10,
"items": [
...,
{
"serial": "BATCH-EXP-01",
"name": "Offline Training Batch 1",
"mainActivityStartAt": "2022-07-30T02:00:00.000Z",
"mainActivityEndAt": "2022-07-30T03:00:00.000Z",
"postActivityStartAt": null,
"postActivityEndAt": null,
"platform": "",
"location": "Jakarta, Indonesia",
"note": "Don't forget to join",
"status": "Completed"
},
{
"serial": "BATCH-EXP-02",
"name": "Webinar Training Batch 1",
"mainActivityStartAt": "2022-08-01T02:00:00.000Z",
"mainActivityEndAt": "2022-08-01T03:00:00.000Z",
"postActivityStartAt": null,
"postActivityEndAt": null,
"platform": "Google Meet",
"location": "https://meet.google.com/hru-ryba-ske",
"note": "Don't forget to join",
"status": "Ongoing"
},
{
"serial": "BATCH-EXP-03",
"name": "Webinar Training Batch 2",
"mainActivityStartAt": "2022-09-01T02:00:00.000Z",
"mainActivityEndAt": "2022-09-01T03:00:00.000Z",
"postActivityStartAt": null,
"postActivityEndAt": null,
"platform": "Google Meet",
"location": "https://meet.google.com/hru-ryba-ske",
"note": "Don't forget to join",
"status": "Scheduled"
}
]
}
}
Response Body Terminology
Location | Type | Description |
---|---|---|
data.items.*.status | enum(Scheduled, Ongoing, Completed) | The status of batch |
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.