All API must use this authentication
Request :
- Header
- API-Key : "your secret api key"
Request :
- Method : POST
- Endpoint :
/api/categories
- Header
- Content-Type : applicatication/json
- Accept: application/json
- Body :
{
"name": "string"
}
Response :
{
"status": "string",
"message": "string",
"data": {
"id": "number, unique",
"name": "string"
}
}
Request :
- Method : GET
- Endpoint :
/api/categories/{category_id}
- Header
- Accept: application/json
Response :
{
"status": "string",
"message": "string",
"data": {
"id": "number, unique",
"name": "string"
}
}
Request :
- Method : GET
- Endpoint :
/api/categories
- Header
- Accept: application/json
Response :
{
"status": "string",
"message": "string",
"data": [
{
"id": "string, unique",
"name": "string"
}
]
}
Request :
- Method : PUT
- Endpoint :
/api/categories/{category_id}
- Header
- Content-Type : applicatication/json
- Accept: application/json
- Body :
{
"name": "string"
}
Response :
{
"status": "string",
"message": "string",
"data": "string"
}
Request :
- Method : DELETE
- Endpoint :
/api/categories/{category_id}
- Header
- Accept: application/json
Response :
{
"status": "string",
"message": "string",
"data": "string"
}
Request :
- Method : POST
- Endpoint :
/api/questions
- Header
- Content-Type : applicatication/json
- Accept: application/json
- Body :
{
"question": "string",
"categoryId": "number, unique",
"answers": [
{
"answer": "string",
"isCorrect": "boolean"
}
]
}
Response :
{
"status": "string",
"message": "string",
"data": {
"id": "number, unique",
"question": "string",
"categoryId": "number, unique",
"answers": [
{
"id": "number, unique",
"answer": "string",
"isCorrect": "boolean",
"questionId": "number"
}
]
}
}
Request :
- Method : GET
- Endpoint :
/api/questions/{question_id}
- Header
- Accept: application/json
Response :
{
"status": "string",
"message": "string",
"data": {
"id": "number, unique",
"question": "string",
"categoryId": "number, unique",
"answers": [
{
"id": "number, unique",
"answer": "string",
"isCorrect": "boolean",
"questionId": "number"
}
]
}
}
Request :
- Method : GET
- Endpoint :
/api/questions
- Header
- Accept: application/json
Response :
{
"status": "string",
"message": "string",
"data": [
{
"id": "number, unique",
"question": "string",
"categoryId": "number, unique",
"answers": [
{
"id": "number, unique",
"answer": "string",
"isCorrect": "boolean",
"questionId": "number"
}
]
}
]
}
Request :
- Method : PUT
- Endpoint :
/api/questions/{question_id}
- Header
- Content-Type : applicatication/json
- Accept: application/json
- Body :
{
"question": "string",
"categoryId": "number, unique",
"answers": [
{
"answer": "string",
"isCorrect": "boolean"
}
]
}
Response :
{
"status": "string",
"message": "string",
"data": "string"
}
Request :
- Method : DELETE
- Endpoint :
/api/questions/{question_id}
- Header
- Accept: application/json
Response :
{
"status": "string",
"message": "string",
"data": "string"
}