A RESTful API built with Drogon, a high-performance C++ framework. This API is designed to manage organizational structures, including persons, departments, and job roles.
🔐 All routes are protected using JWT for token-based authentication.
Method | URI | Action |
---|---|---|
GET |
/persons?limit={}&offset={}&sort_field={}&sort_order={} |
Retrieve all persons |
GET |
/persons/{id} |
Retrieve a single person |
GET |
/persons/{id}/reports |
Retrieve direct reports |
POST |
/persons |
Create a new person |
PUT |
/persons/{id} |
Update a person's details |
DELETE |
/persons/{id} |
Delete a person |
Method | URI | Action |
---|---|---|
GET |
/departments?limit={}&offset={}&sort_field={}&sort_order={} |
Retrieve all departments |
GET |
/departments/{id} |
Retrieve a department |
GET |
/departments/{id}/persons |
Retrieve department members |
POST |
/departments |
Create a department |
PUT |
/departments/{id} |
Update department info |
DELETE |
/departments/{id} |
Delete a department |
Method | URI | Action |
---|---|---|
GET |
/jobs?limit={}&offset={}&sort_fields={}&sort_order={} |
Retrieve all job roles |
GET |
/jobs/{id} |
Retrieve a job role |
GET |
/jobs/{id}/persons |
Retrieve people in a job role |
POST |
/jobs |
Create a job role |
PUT |
/jobs/{id} |
Update job role |
DELETE |
/jobs/{id} |
Delete a job role |
Method | URI | Action |
---|---|---|
POST |
/auth/register |
Register a user and get a JWT token |
POST |
/auth/login |
Login and receive a JWT token |
docker compose up
UI will be available on http://localhost:5173
Integrate Keploy to automatically record, replay, and generate coverage for your API tests.
keploy record -c "docker compose up" --container-name "drogon_app"
keploy test -c "docker compose up" --container-name "drogon_app" --delay 20
coverage report will be created in coverage_report folder automatically
For more, see Keploy Docs.