API Learning Online (Admin) | done

Admin Role (kecuali login untuk kedua role(admin,student)). note: setiap akan melakukan crud, membutuhkan token bearer yang didapat setelah login

Register & Login

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

Register Admin

POST https://salmanhack.sanbersy.com/api/v1/register/admin

Request Body

Name
Type
Description

email

string

admin@gmail.com

password

string

123456

Login

POST https://salmanhack.sanbersy.com/api/v1/login

Login untuk admin dan student

Request Body

Name
Type
Description

email

string

admin@gmail.com

password

string

123456

Playlists

Create playlist

POST https://salmanhack.sanbersy.com/api/v1/admin/playlists

Headers

Name
Type
Description

Bearer token

string

token yang didapat setelah login

Request Body

Name
Type
Description

title

string

description

string

Show all playlist

GET https://salmanhack.sanbersy.com/api/v1/admin/playlists

​

Headers

Name
Type
Description

Bearer token

string

token yang didapat setelah login

Show playlist by id

GET https://salmanhack.sanbersy.com/api/v1/admin/playlists/:idPlaylist

Path Parameters

Name
Type
Description

idPlaylist

integer

Headers

Name
Type
Description

Bearer token

string

token yang didapat setelah login

Update playlist by id

PUT https://salmanhack.sanbersy.com/api/v1/admin/playlists/:idPlaylist

Path Parameters

Name
Type
Description

idPlaylist

integer

Headers

Name
Type
Description

Bearer token

string

token yang didapat setelah login

Request Body

Name
Type
Description

title

string

description

string

Delete playlist by id

DELETE https://salmanhack.sanbersy.com/api/v1/admin/playlists/:idPlaylist

​

Path Parameters

Name
Type
Description

idPlaylist

integer

Headers

Name
Type
Description

Bearer token

string

Sections

Create Sections of a Playlist

POST https://salmanhack.sanbersy.com/api/v1/admin/playlists/:idPlaylist/sections

Path Parameters

Name
Type
Description

idPlaylist

integer

Headers

Name
Type
Description

Bearer token

string

Request Body

Name
Type
Description

title

string

serial_number

integer

nomor urut, mau taro di urutan ke berapa section tersebut

Show all sections of a playlist

GET https://salmanhack.sanbersy.com/api/v1/admin/playlists/:idPlaylist/sections

Path Parameters

Name
Type
Description

idPlaylist

integer

Headers

Name
Type
Description

Bearer token

string

Show sections of a playlist by id

GET https://salmanhack.sanbersy.com/api/v1/admin/playlists/:idPlaylist/sections/:idSection

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

Headers

Name
Type
Description

Bearer token

string

Update section of a playlist by id

PUT /api/v1/admin/playlists/:idPlaylist/sections/:idSection

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

Headers

Name
Type
Description

Bearer token

string

Request Body

Name
Type
Description

title

string

serial_number

integer

Delete sections of a playlist by id

DELETE /api/v1/admin/playlists/:idPlaylist/sections/:idSection

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

Headers

Name
Type
Description

Bearer token

string

Videos

/api/v1/admin/playlists/:idPlaylist/sections/:idSection/videos

/api/v1/admin/playlists/:idPlaylist/sections/:idSection/videos/:idVideo

Create videos of section of playlist

POST /api/v1/admin/playlists/:idPlaylist/sections/:idSection/videos

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

Headers

Name
Type
Description

Bearer token

string

Request Body

Name
Type
Description

title

string

description

string

link

string

serial_number

integer

Show all videos of section of playlist

GET /api/v1/admin/playlists/:idPlaylist/sections/:idSection/videos

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

Headers

Name
Type
Description

Bearer token

string

Show video of section of playlist by id

GET /api/v1/admin/playlists/:idPlaylist/sections/:idSection/videos/:idVideo

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

idVideo

integer

Headers

Name
Type
Description

Bearer token

string

Update video of section of playlist by id

PUT /api/v1/admin/playlists/:idPlaylist/sections/:idSection/videos/:idVideo

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

idVideo

integer

Headers

Name
Type
Description

Bearer token

string

Request Body

Name
Type
Description

title

string

description

string

link

string

serial_number

string

Delete video of section of playlist by id

DELETE /api/v1/admin/playlists/:idPlaylist/sections/:idSection/videos/:idVideo

Path Parameters

Name
Type
Description

idPlaylist

integer

idSection

integer

idVideo

integer

Headers

Name
Type
Description

Bearer token

string

Last updated

Was this helpful?