Teenager adalah sebuah Learning Management System(LMS) bagi yang mempunyai kekurangan dalam penglihatan dan pendengaran untuk tetap bisa melaksanakan pelajaran seperti orang normal. Anda akan dibantu dengan fitur-fitur yang mempermudah anda dalam menerima pelajaran dan mengerjakan tugas. Anda juga bisa menyampaikan pertanyaan dan melakukan konsultasi terkait kesulitan anda saat mempelajari materi atau mengerjakan tugas anda. Let's try with us.
Explore the docs »
Open our project that has been deployed by clicking here »
Project ini dibuat berdasarkan permasalahan yang ditemukan yaitu pengguna disabilitas kesulitan dalam memanagement pembelajaran yang ada pada LMS lainnya. Dengan adanya project ini, kita berharap dapat mengatasi kesulitan yang dihadapi oleh disabilitas terutama Tuna Netra dan Tuna Rungu dengan fasilitas yang ada pada LMS ini. LMS ini memiliki beberapa fitur, yaitu:
- Mempelajari materi yang diberikan oleh guru melalui fitur course atau mata pelajaran
- Mengerjakan tugas yang diberikan oleh guru melalui fitur assignment atau tugas
- Menyampaikan pertanyaan dan konsultasi terkait kesulitan pembelajaran atau tugas yang diberikan oleh guru melalui fitur diskusi
- Fitur disabilitas yang berupa Screen Reader
Kami menggunakan logo yang menggambar kepala dengan wajah yang ceria dan bentuk buku berwana biru. Coba Lihat Detail filosofi logo kami lewat link di bawah ini.
- Install Chrome Extension Screen Reader
Click Here >>
- Clone the repo
git clone https://github.com/rg-km/final-project-engineering-12.git
- Go to frontend
cd frontend
- Install dependencies
install npm
- Starting
npm start
- Go to backend
cd ../backend
- Run Go Main
go run main.go
Irfan Kurniawan |
Mohd Ryan Obillah |
Umbu Theofilus Dendimara |
Widdy Arfiansyah |
Muhammad Abid Fajar |
Rudiansyah Wijaya Pratama |
All API must use this authentication Request:
- Header:
- X-Api-Key:
"your secret api key"
- X-Api-Key:
SUMMARY:
- Users
(11/11) 100%
- User_course
(5/5) 100%
- Courses
(7/7) 100%
- Module_submissions
(8/8) 100%
- Module_articles
(7/7) 100%
- User_Submissions
(4/4) 100%
- Answers
(6/6) 100%
- Questions
(6/6) 100%
There are a total of 54
APIs
Request:
- Method:
POST
- Endpoint:
/api/users
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body:
{
"name": "string",
"username": "string",
"email": "string",
"password": "string",
"role": "integer", // enum (1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"birthdate": "date"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"email": "string", // unique
"password": "string",
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"birthdate": "string",
"email_verification": "timestamp",
"created_at": "timestamp",
"updated_at": "timestamp"
}
}
Request:
- Method:
POST
- Endpoint:
/api/users/login
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body:
{
"email": "string",
"password": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"email": "string", // unique
"role": "integer", // enum(1, 2)
"gender": "integer",
"type_of_disability" : "integer" // enum
}
}
Request:
- Method:
GET
- Endpoint:
/api/userstatus
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"email": "string", // unique
"role": "integer", // enum(1, 2)
"gender": "integer",
"type_of_disability" : "integer", // enum
"address" : "string",
"birthdate" : "string",
"image" : "string",
"description" : "string"
}
}
Request:
- Method:
POST
- Endpoint:
/api/users/logout
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
Response:
{
"code" : "number",
"status" : "string"
}
Request:
- Method:
GET
- Endpoint:
/api/users/{id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Variable:
- id:
integer
- id:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
}
Request:
- Method:
PUT
- Endpoint:
/api/users/{id}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Variable:
- id:
integer
- id:
- Body:
{
"name": "string",
"username": "string", // unique
"role": "integer", // enum (1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "string", // enum (1, 2)
"type_of_disability": "integer", // enum(0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
}
Request:
- Method:
PUT
- Endpoint:
/api/users/roleupdate/{id}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Variable:
- id:
integer
- id:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"name" : "string",
"username" : "string", // unique
"role" : "integer", // enum(1,2)
"phone" : "string",
"gender" : "integer", // enum(1,2)
"type_of_disability": "integer", // enum(0,1,2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
}
Request:
- Method:
GET
- Endpoint:
/api/users
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "integer", // enum(1, 2)
"type_of_disability": "integer", // enum(0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
},
]
}
Request:
- Method:
DELETE
- Endpoint:
/api/users/{id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Variable:
- id:
integer
- id:
Response:
{
"code" : "number",
"status" : "string"
}
Request:
- Method:
GET
- Endpoint:
/api/users/submissions
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- limit :
number
optional
default = all list
- limit :
Response:
{
"id_module_submission": "integer",
"name_course": "string",
"name_module_submission": "string",
"grade": "integer",
"file": "string"
}
Request:
- Method:
GET
- Endpoint:
/api/users/verify?email=&signature=
- Header:
- Accept:
application/json
- Accept:
- Query Param:
- signature :
string
required
- email :
string
required
- signature :
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
Request:
- Method:
POST
- Endpoint:
/api/usercourse
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
}
}
Request:
- Method:
GET
- Endpoint:
/api/usercourse/{id}/{course}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
}
}
Request:
- Method:
GET
- Endpoint:
/api/usercourse
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
},
]
}
Request:
- Method:
DELETE
- Endpoint:
/api/usercourse/{user_id}/{course_id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
}
Request:
- Method:
GET
- Endpoint:
/api/usercourse/courses
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id_course": "integer", // Primary Key
"course_name": "string",
"course_code": "string",
"course_class": "string"
}
}
Request:
- Method:
POST
- Endpoint:
/api/courses
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string" // longtext
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"is_active" : "boolean",
"description" : "string", // longtext
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"is_active" : "boolean",
"description" : "string", // longtext
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string", // longtext
"is_active" : "boolean",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name" : "string",
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string" // longtext
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string", // longtext
"is_active" : "boolean",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses?status=true&limit=1
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- status :
boolean
optional
default = true
- limit :
number
optional
default = all list
- status :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string", // longtext
"is_active" : "boolean",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Request:
- Method:
DELETE
- Endpoint:
/api/courses/{code}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- code :
string
- code :
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}/status
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- code :
string
- code :
- Body:
{
"is_active" : "boolean",
}
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/users
- Query Param:
- code :
string
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id_user": "integer", // primary key
"user_name": "string",
"user_username": "string",
"user_email": "string"
}
}
Request:
- Method:
POST
- Endpoint:
/api/courses/{code}/submissions
- Query Param:
- code :
string
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"description": "string",
"deadline": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
}
}
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}/submissions/{submissionId}
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"description": "string",
"deadline": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions
- Query Param:
- code :
string
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
},
]
}
Request:
- Method:
DELETE
- Endpoint:
/api/courses/{code}/submissions/{submissionId}
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
"data": null
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}/next
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}/previous
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}/get
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id_user_submission": "integer", // primary key
"user_name": "string",
"module_submission_name": "string",
"file": "string"
}
}
Request:
- Method:
POST
- Endpoint:
/api/courses/{code}/articles
- Query Param:
- code :
string
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"content": "string",
"estimate": "integer"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles/{articleId}
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
}
}
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}/articles/{articleId}
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"content": "string",
"estimate": "integer"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles
- Query Param:
- code :
string
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
},
]
}
Request:
- Method:
DELETE
- Endpoint:
/api/courses/{code}/articles/{articleId}
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": null
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles/{articleId}/next
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles/{articleId}/previous
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
Request:
- Method:
POST
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Content-Type:
multipart/form-data
- Authorization:
Token
- Content-Type:
- Body:
{
"file" : "string",
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"user_id" : "integer", // foreign key1
"module_submission_id" : "integer", //foreign key2
"file" : "string"
}
}
Request:
- Method:
PATCH
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId
- Query Param:
- code :
string
- submissionId :
number
- userSubmissionId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"grade" : "integer",
}
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
Request:
- Method:
GET
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId
- Query Param:
- code :
string
- submissionId :
number
- userSubmissionId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"user_id" : "integer", // foreign key1
"module_submission_id" : "integer", //foreign key2
"file" : "string",
"grade" : "integer"
}
}
Request:
- Method:
POST
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId/download
- Query Param:
- code :
string
- submissionId :
number
- userSubmissionId :
number
- code :
- Header:
- Content-Type:
{mimetype}
- Content-Disposition:
{attachment; filename=file}
- Authorization:
Token
- Content-Type:
Request:
- Method:
POST
- Endpoint:
/api/answers/create
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
GET
- Endpoint:
/api/answers/by-user/{userId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
PUT
- Endpoint:
/api/answers/update/{answerId}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
GET
- Endpoint:
/api/answers/all
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Request:
- Method:
DELETE
- Endpoint:
/api/answers/{answerId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
}
Request:
- Method:
GET
- Endpoint:
/api/answers/{questionId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- questionId :
number
- questionId :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Request:
- Method:
POST
- Endpoint:
/api/questions/create
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
GET
- Endpoint:
/api/questions/by-user/{userId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id" : "integer", // foreign key1
"course_name" : "string",
"user_id" : "integer", // foreign key2
"user_name" : "string",
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
PUT
- Endpoint:
/api/questions/update/{questionId}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Request:
- Method:
GET
- Endpoint:
/api/questions/all
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"course_id" : "integer", // foreign key1
"course_name" : "string",
"user_id" : "integer", // foreign key2
"user_name" : "string",
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Request:
- Method:
DELETE
- Endpoint:
/api/questions/{questionId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
}
Request:
- Method:
GET
- Endpoint:
/api/questions/{id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- id :
number
- id :
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id" : "integer", // foreign key1
"course_name" : "string",
"user_id" : "integer", // foreign key2
"user_name" : "string",
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
}