Batches

APIs related to batches

List Batches

GET https://example.com/api/batches

This endpoint will return a list of batches if a valid accessToken is provided as a Bearer token You can use the login API to generate fresh accessToken

Headers

Name
Type
Description

Authorization

string

Bearer 7|vC2gUQC8ajaMOa2juAnaiE4ZLgmH5dcbCDY8Hwsy

Accept

string

application/json

{
    "data": [
        {
            "id": 1,
            "name": "Morning Batch",
            "sub_category": "Class 3 to 5 ",
            "category": "Coding for kids",
            "start_date": "2021-04-25",
            "batch_time": "09:00 AM",
            "enable_student_mic": 1,
            "enable_student_camera": 0,
            "enable_student_screen_share": 0,
            "course_name": "Block Based Coding",
            "course_image": "https://zero-to-one.s3.ap-south-1.amazonaws.com/course-images/2021-04-20 08:27:01_course_1",
            "course_type": "Live",
            "room_name": "zero-2-one_morning-batch_1_d_20210516"
        },
        {
            "id": 2,
            "name": "Test Batch 2",
            "sub_category": "Class 3 to 5 ",
            "category": "Coding for kids",
            "start_date": "2021-05-25",
            "batch_time": "09:00 AM",
            "enable_student_mic": 1,
            "enable_student_camera": 1,
            "enable_student_screen_share": 1,
            "course_name": "Block Based Coding",
            "course_image": "https://zero-to-one.s3.ap-south-1.amazonaws.com/course-images/2021-04-20 08:27:01_course_1",
            "course_type": "Live",
            "room_name": "zero-2-one_test-batch-2_2_d_20210516"
        }
    ],
    "links": {
        "first": "http://localhost:8000/api/batches?page=1",
        "last": "http://localhost:8000/api/batches?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "http://localhost:8000/api/batches?page=1",
                "label": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "http://localhost:8000/api/batches",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}

Single Batch info

GET https://example.com/api/batches/{id}

{id} => id of an existing batch (integer value only) This endpoint will return information for a single batch if a valid accessToken is provided as a Bearer token You can use the login API to generate fresh accessToken

Headers

Name
Type
Description

Authorization

string

Bearer 7|vC2gUQC8ajaMOa2juAnaiE4ZLgmH5dcbCDY8Hwsy

Accept

string

application/json

Last updated

Was this helpful?