Request :
- Method : GET
- Endpoint :
/api/users - Header :
- Accept: application/json
Response :
{
"code": 200,
"status": "Success",
"message": "Data User berhasil ditemukan.",
"data": [
{
"uuid": "string",
"nama": "string",
"email": "string",
"role": "string",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : POST
- Endpoint :
/api/users - Header :
- Content-Type: application/json
- Accept: application/json
- Body :
{
"nama": "string",
"email": "string",
"password": "string",
"konfirmPassword": "string",
"role": "string"
}Response :
{
"status": 201,
"message": "Data user berhasil dibuat",
"data": [
{
"nama": "string",
"email": "string",
"role": "string"
}
]
}Request :
- Method : GET
- Endpoint :
/api/users/{uuid} - Header :
- Accept: application/json
Response :
{
"code": 200,
"status": "Success",
"message": "Data User: {uuid} berhasil ditemukan.",
"data": {
"uuid": "string",
"nama": "string",
"email": "string",
"role": "string",
"createdAt": "date",
"updatedAt": "date"
}
}Request :
- Method : PATCH
- Endpoint :
/api/users/{uuid} - Header :
- Content-Type: application/json
- Accept: application/json
- Body :
{
"nama": "string",
"email": "string",
"password": "string",
"konfirmPassword": "string",
"role": "string"
}Response :
{
"code": 200,
"status": "Success",
"message": "Update data berhasil",
"data": [
{
"nama": "string",
"email": "string",
"role": "string",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : DELETE
- Endpoint :
/api/users/{uuid} - Header :
- Accept: application/json
Response :
{
"code": 200,
"status": "Success",
"message": "Hapus data berhasil"
}Request :
- Method : POST
- Endpoint :
/api/login - Header :
- Content-Type: application/json
- Accept: application/json
- Body :
{
"email": "string",
"password": "string"
}Response :
{
"code": 200,
"status": "Success",
"message": "Login berhasil",
"data": [
{
"nama": "string",
"email": "string",
"role": "string"
}
]
}Request :
- Method : DELETE
- Endpoint :
/api/logout - Header :
- Accept: application/json
Response :
{
"code": 200,
"status": "Success",
"message": "Anda telah logout"
}