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

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-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

LocationTypeDescription
data.items.*.statusenum(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.