NAMESPACE | METHOD | ROUTE | FUNCTIONALITY | REQUIRE | RESPONSE SUCCESS | RESPONSE FAIL |
---|---|---|---|---|---|---|
USER | GET | v1/user/ |
List All Users | Authorization Header, Role = 0 | [ { user_id : int, username: String, firstname: String, lastname: String, email: String, phone: String, created_at: DateTime, updated_at: DateTime, status: int } ] |
FAIL |
POST | v1/user/ |
Create A User | Authorization Header, Role = 0 | OK | FAIL | |
GET | v1/user/{id} |
Get User By ID | Authorization Header | { user_id : int, username: String, firstname: String, lastname: String, email: String, phone: String, created_at: DateTime, updated_at: DateTime, status: int } |
FAIL | |
PUT | v1/user/{id} |
Update A User | Authorization Header | OK | FAIL | |
DELETE | v1/user/{id} |
Delete A User | Authorization Header | OK | FAIL | |
DEPARTMENT | POST | v1/department/ |
Create A Department | Authorization Header | OK | FAIL |
GET | v1/department/{id} |
Get Deparment By ID | Authorization Header | { department_id : int, department_name: String, created_by: int created_at: DateTime, updated_at: DateTime, status: int } |
FAIL | |
PUT | v1/deparment/{id} |
Update A Deparment | Authorization Header | OK | FAIL | |
DELETE | v1/deparment/{id} |
Delete A Deparment | Authorization HeaderAuthorization Header | OK | FAIL | |
USER DEPARTMENT | POST | v1/user_department/ |
Create A UserDepartment | Authorization Header | OK | FAIL |
GET | v1/user_department/{id} |
Get UserDeparment By ID | Authorization Header | { ud_id : int, user_id: int, department_id: int } |
FAIL | |
DELETE | v1/user_department/{id} |
Delete A UserDeparment | Authorization Header | OK | FAIL |
NAMESPACE | METHOD | ROUTE | FUNCTIONALITY | REQUIRE | RESPONSE SUCCESS | RESPONSE FAIL |
---|---|---|---|---|---|---|
AUTH | POST | v1/auth/signin |
SIGN IN | None | { access token : String, refresh_token: String } |
|
POST | v1/auth/register |
SIGN UP | None | OK | FAIL | |
GET | v1/auth/refresh |
REFRESH TOKEN | Cookies: refresh_token=String | String (new access token) | FAIL | |
DELETE | v1/auth/delete/{token} |
DELETE REFRESH TOKEN | NONE | String (new access token) | FAIL |
NAMESPACE | METHOD | ROUTE | FUNCTIONALITY | REQUIRE |
---|---|---|---|---|
POST | GET | v1/post |
GET ALL POST | |
POST | v1/post |
CREATE | ||
GET | v1/post/{id} |
GET A POST | ||
PUT | v1/post/{id} |
UPDATE | ||
* | DELETE | v1/post/{id} |
DELETE |
NAMESPACE | METHOD | ROUTE | FUNCTIONALITY | REQUIRE |
---|---|---|---|---|
NOTIFICATION | GET | v1/notification |
GET ALL NOTIFICATION |
-
To use
docker-compose
you must fill in POSTGRES_USER, POSTGRES_DB and POSTGRES_PASSWORD in postgres service and DATABASE_URL (like postgres://{db_user_name}:{db_user_password}@db:5432/{db_name} ) in other service -
API gateway config in api/gate-way/config.toml