-
Notifications
You must be signed in to change notification settings - Fork 12
Project management api
...
| Parameter | Value |
|---|---|
| URL | /getprojects/«user id» |
| Verb | GET |
| Authentication | Bearer |
| Response | { "projects": [ { "id": 1, "name": "Project 1" }, { "id": 2, "name": "Project 2" }, ...] } |
| Exception response | Http response code 40x, body: {message:«message error»} |
- Load only if user is authenticated.
- Get user projects (own and shared).
****Notes:
- Add name attribute in table project.
-- | -- Verb| GET URL| /getproject/«projectid» Authentication| Bearer Response| «project json» Exception response| Http response code 40x, body: {message:«message error»}
Load content only if the user is authenticated and the project is either owned by the user or shared with them.
| Parameter | Value |
|---|---|
| Verb | PUT |
| URL | /saveproject/«projectid» |
| Authentication | Bearer |
| Payload | «project json» |
| Response | 200 OK |
| Exception response | Http response code 40x, body: {message:«message error»} |
Save content only if the user is authenticated and the project is either owned by the user or shared with them with "Modify permission".
Notes: Add table permission_project and add foreing key in table user_project
| Parameter | Value |
|---|---|
| Verb | PUT |
| URL | /shareproject/«projectid» |
| Authentication | Bearer |
| Payload | { |
"users": [
{
"userId": «user id»,
"permissionIds": [«permission ids»]
},
{
"userId": «user id»,
"permissionIds": [«permission ids»]
},
...
]
} Response| 200 OK Exception response| Http response code 40x, body: {message:«message error»}
Save content only if the user is authenticated and the project is either owned by the user or shared with them with "Modify permission".
| Parameter | Value |
|---|---|
| Verb | GET |
| URL | /usersproject/«projectid» |
| Authentication | Bearer |
| Response | |
| { |
"users": [
{
"userId": «user id»,
"permissionIds": [«permission ids»]
},
...
]
} Exception response| Http response code 40x, body: {message:«message error»}
Load content only if the user is authenticated and the project is either owned by the user or shared with them.
| Parameter | Value |
|---|---|
| Verb | GET |
| URL | /finduser/«user email» |
| Authentication | Bearer |
| Response | |
| { |
"userId": «user id»,
"userName": «user name»,
"userEmail": «user email»
} Exception response| Http response code 40x, body: {message:«message error»}
Load content only if the user is authenticated.
| Parameter | Value |
|---|---|
| Verb | GET |
| URL | /permissionproject |
| Authentication | Bearer |
| Response | |
| { |
[
{
"permissionId": «permission id»,
"permissionName": «permission name»
},
...
]
} Exception response| Http response code 40x, body: {message:«message error»}
Load content only if the user is authenticated.