API Learning Online (Student) | done

Student Role (kecuali login untuk kedua role(admin,student)). note: setiap route kecuali (login dan register), membutuhkan token bearer yang didapat setelah login

https://salmanhack.sanbersy.com/onlinelearning/api/v1/~blablabla

note: patokan main path nya di atas ini ya. mungkin kebawahnya ga kami tulis ulang, yang penting udah tau main path nya

Regitster & Login

Register Student

POST https://api.cakes.com/api/v1/register

This endpoint allows you to get free cakes.

Request Body

Name
Type
Description

email

string

password

string

{
    "message": "Register Successfully",
    "user": {
        "email": "student@gmail.com",
        "role": "student",
        "created_at": "2021-02-06T23:07:10.645+07:00",
        "updated_at": "2021-02-06T23:07:10.645+07:00",
        "id": 2
    }
}

Login

POST /api/v1/login

Request Body

Name
Type
Description

email

string

password

string

Playlists

Show all playlists

GET /api/v1/student/playlists

Headers

Name
Type
Description

Bearer token

string

Bearer token didapat setelah login

Join playlist by id

POST /api/v1/student/playlists/:id/join

endpoint ini digunakan untuk student agar dapat melihat sections dan menonton video-video di dalam playlist tersebut

Path Parameters

Name
Type
Description

:id

integer

id playlist

Headers

Name
Type
Description

Bearer token

string

Sections

Show all sections in playlist

GET /api/v1/student/playlists/:idplaylist

Path Parameters

Name
Type
Description

:idplaylist

integer

Headers

Name
Type
Description

Bearer Token

string

videos

Show all videos in section in playlist

GET /api/v1/student/playlists/:idplaylist/section/:serialnumberSection

Path Parameters

Name
Type
Description

:serialnumbersection

integer

idplaylists

integer

Show video

GET /v1/student/playlist/:idplaylist/sections/:numbersection/videos/:numbervideo

Path Parameters

Name
Type
Description

:numbervideo

integer

serial_number in videos

:numbersection

number

serial_number in sections

:idplaylist

integer

update status video

POST api/v1/student/playlists/:idplaylist/sections/:numbersection/videos/:numbervideo

Path Parameters

Name
Type
Description

:idplaylist

string

id playlist

:numbersection

integer

serial_number in sections

:numbervideo

integer

serial_number in videos

Status of Playlists

Show status of all playlists (status perjalanan kelas)

GET /api/v1/student/playlists/status

Headers

Name
Type
Description

Bearer token

string

Show status of a playlist by id

GET /api/v1/student/playlists/status/:id

Path Parameters

Name
Type
Description

:id

integer

id playlist

Headers

Name
Type
Description

Bearer token

string

update status playlist

POST /api/v1/student/playlists/status/:id

Path Parameters

Name
Type
Description

:id

integer

Headers

Name
Type
Description

Bearer token

string

Last updated

Was this helpful?