-
Notifications
You must be signed in to change notification settings - Fork 1
User
Syarif Ubaidillah edited this page Jul 7, 2022
·
1 revision
Setiap fitur yang memiliki header
Authorization
berarti harus login untuk mendapatkanaccess_token
danrefresh_token
.
Setiap fitur yang memiliki
Query Param
dapat digunakan seperti ini/api/example?paramA=12¶mB=331
.
Fitur terbatas pada role Administrator
Method | Path |
---|---|
POST | /api/user |
Header | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <access_token> |
{
"email": "milimnava@holyhos.co.id",
"password": "password",
"full_name": "Milim Nava",
"gender": "Female",
"role_id": 2
"facility_id": 3,
}
{
"message": "User Created",
}
Method | Path |
---|---|
GET | /api/user |
Header | Value |
---|---|
Authorization | Bearer <access_token> |
Query Param | Data Type |
---|---|
role_id | Numeric |
facility_id | Numeric |
{
"data": [
{
"id": 1,
"code": "DR00001",
"email": "alsyadahmad@holyhos.co.id",
"full_name": "Alsyad Ahmad",
"gender": "Male",
"facility": "General",
"roles": "Doctor",
"status": 1
}
],
"message": "User Fetched"
}
Method | Path |
---|---|
GET | /api/user/{id} |
Header | Value |
---|---|
Authorization | Bearer <access_token> |
{
"data": {
"id": 1,
"code": "DR00001",
"email": "alsyadahmad@holyhos.co.id",
"full_name": "Alsyad Ahmad",
"gender": "Male",
"facility": "General",
"roles": "Doctor",
"status": 1
},
"message": "User Fetched"
}
Fitur terbatas pada role Administrator
Method | Path |
---|---|
PUT | /api/user/{id}/update |
Header | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <access_token> |
{
"email": "alsyadahmad@holyhos.co.id",
"password": "password",
"full_name": "Alsyad Ahmad",
"gender": "Male",
"facility": "General",
"roles": "Doctor",
}
{
"message": "User #{id} Updated",
}
Fitur terbatas pada role Administrator
Method | Path |
---|---|
DELETE | /api/user/{id}/delete |
Header | Value |
---|---|
Authorization | Bearer <access_token> |
{
"message": "User #{id} Deleted",
}