Documentation for Listening Manager Backend with Node JS.
HTTP | URI | Description |
---|---|---|
GET | /audios | Retrieve all audio list |
GET | /audios/{id} | Retrieve audio specified by id |
POST | /audios | Store new audio |
PUT | /audios/{id} | Update audio specified by id |
DELETE | /audios/{id} | Delete audio specified by id |
GET /audios
Optional Params :
-> search
Response Body :
{
"datas": [
{
"id": 3,
"name": "IBT_VAR_1",
"path": "public/...",
"categories":[
{
"id": 3,
"name": "IBT"
},
{
"id": 2,
"name": "TPKS"
}
]
},
{
"id": 2,
"name": "TOEFL_VAR_7",
"path": "public/...",
"categories":[
{
"id": 3,
"name": "IBT"
},
{
"id": 2,
"name": "TPKS"
}
]
}
]
}
GET /audios/{id}
Response Body:
{
"id": 2,
"name": "TOEFL_VAR_7",
"path": "public/...",
"categories":[
{
"id": 3,
"name": "IBT"
},
{
"id": 2,
"name": "TPKS"
}
]
}
POST /audios
Request Body :
- audio_name : string
- audio_file : file[audio/mpeg,audio/ogg]
- categories : array with value integer (ex: [2,5,4])
Response Body: OK
PUT /audios/{id}
Request Body :
- audio_name : string
- audio_file : file[audio/mpeg,audio/ogg]
- categories : [] array of integer
Response Body: OK
DELETE /audios/{id}
Response Body: OK
HTTP | URI | Description |
---|---|---|
GET | /categories | Retrieve all category list |
GET | /categories/{id} | Retrieve category specified by id |
POST | /categories | Store new category |
PUT | /categories/{id} | Update category specified by id |
DELETE | /categories/{id} | Delete category specified by id |
GET /categories
Optional Params :
-> search
Response Body :
{
"datas": [
{
"id": 3,
"name": "IBT"
},
{
"id": 2,
"name": "TPKS"
}
]
}
GET /categories/{id}
Response Body :
{
"id": 1,
"name": "adsfdsaf"
}
POST /categories/{id}
Request Body :
- category_name
Response Body: OK
PUT /categories/{id}
Request Body :
- category_name
Response Body: OK
DELETE /categories/{id}
Response Body: OK
HTTP | URI | Description |
---|---|---|
GET | /subjects | Retrieve all subject list |
GET | /subjects/{id} | Retrieve subject specified by id |
POST | /subjects | Store new subject |
PUT | /subjects/{id} | Update subject specified by id |
DELETE | /subjects/{id} | Delete subject specified by id |
GET /subjects
Optional Params :
-> search
Response Body :
{
"datas": [
{
"id": 3,
"name": "ENGL1122"
},
{
"id": 2,
"name": "ENGL1212"
}
]
}
GET /subjects/{id}
Response Body :
{
"id": 2,
"name": "ENGL1212"
}
POST /subjects/{id}
Request Body :
- subject_name
Response Body: OK
PUT /subjects/{id}
Request Body :
- subject_name
Response Body: OK
DELETE /subjects/{id}
Response Body: OK