In entrypoints list, every entrypoint is described with sample cURL request. This request will contain "URL" variable,
which corresponds to full URL to Adventure backend. In case of production environment used by Divante, while frontend is
located in https://adventure.divante.pl
, backend is located in https://adventure.divante.pl:8181
. The other common
variable is "TOKEN", which contains Bearer token aquired during login.
Sample cURL in documentation:
curl --request GET \
--url URL/api/leaveRequest \
--header 'authorization: Bearer TOKEN'
for production environment and access token equal to "ABC12345" cURL above will correspond to this:
curl --request GET \
--url https://adventure.divante.pl:8181/api/leaveRequest \
--header 'authorization: Bearer ABC12345'
Currently the only way to acquire JWT token is during login. After clicking "Login" on frontend user is redirected to
backend URL URL/connect/google
. This entrypoint checks parameters for connection with Google and uses it to access
user data from Google. Google redirects back to URL/login/check-google
, which then redirects back to frontend with
generated JWT token. The user is created now if wasn't existing before.
JWT is generated and encrypted with RS256 algorithm, so header of this JWT is:
{
"typ": "JWT",
"alg": "RS256"
}
Body is made of following fields:
{
"iat": 1580709294,
"exp": 1580795694,
"roles": {
"0": "ROLE_USER",
"2": "ROLE_SUPER_ADMIN",
"3": "ROLE_HELPDESK",
"5": "ROLE_TRIBE_MASTER",
"6": "ROLE_MANAGER",
"8": "ROLE_HR"
},
"username": "[email protected]",
"ip": "312.353.123.15",
"employeeId": 123
}
iat
- timestamp when token was issuedexp
- timestamp when token will expireroles
- contains list user's roles. Can be either array of strings or, as in sample above, object. Ifroles
is an object, keys don't have any importance and can be safely ignored.username
- e-mail used for logging in to Googleip
- user's IP addressemployeeId
- user's ID in Adventure
Following roles currently exist:
ROLE_USER
(default role, which every logged in user has)ROLE_MANAGER
(extendsUSER
)ROLE_HR
(extendsUSER
)ROLE_HELPDESK
(extendsUSER
)ROLE_TRIBE_MASTER
(extendsMANAGER
andHR
)ROLE_SUPER_ADMIN
(extendsTRIBE_MASTER
andHELPDESK
)
Entrypoints, sorted alphabetically by URL, then by methods in order: GET, POST, PATCH, PUT, DELETE
Method | URL | Documentation |
---|---|---|
/api/config |
Link | |
/api/config |
Link | |
/api/config/{entry} |
Link | |
/api/employees |
Link | |
/api/employees/{id} |
Link | |
/api/employees/{id} |
Link | |
/api/employees/{id}/checklists |
Link | |
/api/employees/assign/tribe/{id} |
Link | |
/api/employees/details |
Link | |
/api/employees/endedWork |
Link | |
/api/employees/endedWork |
Link | |
/api/employees/endedWork/{id} |
Link | |
/api/employees/endedWork/{id} |
Link | |
/api/employees/firstHiredDate |
Link | |
/api/employees/hardware/{id} |
Link | |
/api/employees/hideSlack |
Link | |
/api/employees/id/{id} |
Link | |
/api/employees/isPinSet |
Link | |
/api/employees/unassign/tribe/{id} |
Link | |
/api/employees/unlock/{id} |
Link | |
/api/employees/verifyPin |
Link | |
/api/employees/workLocation |
Link | |
/api/employees/workLocation |
Link | |
/api/employees/workLocation/{id} |
Link | |
/api/employees/workLocation/all |
Link | |
/api/news |
Link | |
/api/news |
Link | |
/api/news/{id} |
Link | |
/api/news/{id} |
Link | |
/api/period |
Link | |
/api/period |
Link | |
/api/period/{id} |
Link | |
/api/period/{id} |
Link | |
/api/period/{id} |
Link | |
/api/period/report |
Link | |
/api/potential_employee |
Link | |
/api/potential_employee |
Link | |
/api/potential_employee/{id} |
Link | |
/api/potential_employee/{id} |
Link | |
/api/projects |
Link | |
/api/projects |
Link | |
/api/projects/{id} |
Link | |
/api/projects/{id} |
Link | |
/api/projects/{id}/criterium |
Link | |
/api/projects/{id}/criterium/{critId} |
Link | |
/api/projects/{id}/disconnectSlack |
Link | |
/api/projects/details |
Link | |
/api/projects/hide/{id} |
Link | |
/api/projects/sendEmail/{id} |
Link | |
/api/tribe |
Link | |
/api/tribe |
Link | |
/api/tribe/{id} |
Link | |
/api/tribe/{id} |
Link | |
/api/tribe/{id}/disconnectSlack |
Link | |
/api/tribe/{id}/position/{posId} |
Link | |
/api/tribe/{id}/position/{posId} |
Link |