Register
Submit a solution
The challenge is finished.

Challenge Overview

For this challenge, we'd like to make some improvement for Permissions API.

currently, we only provide one api for addition, update or removal, and there is no GET apis.

we'd like to have separate apis for different operations clearly. For better understanding of permissions, you can check https://github.com/appirio-tech/direct-app/tree/dev/services/project_service/src/java/main/com/topcoder/service/permission

1. Retrieval - GET /v3/direct/projects/{projectId}/permissions
the responses should be a list of user permissions.

following info should be returned.
 - userId
 - permissionTypeId
 - permissionTypeName

a sample data is like 
[
{
    userId: 123456, 
    permissionType: {
         typeId:   1,
         name: "Read" 
    }
]

2. Addition - POST /v3/direct/projects/{projectId}/permissions
the body should be a list of user permissions to add

a sample body is like 

{
    userId: 123456, 
    permissionType: {
         typeId:   1, 
         name: "Read" 
    }
]

the name field is just for readability and not used in addtion.

3. Update - PUT /v3/direct/projects/{projectId}/permissions
the body should be a list of user permissions to update

a sample body is like 

{
    userId: 123456, 
    permissionType: {
         typeId:   2, 
         name: "Write" 
    }
]


4. Removal - DELETE /v3/direct/projects/{projectId}/permissions
the body should be a list of user permissions to remove

a sample body is like 

{
    userId: 123456
}

]

5. Please keep the request body and response as minimum as possible, if you fell something unclear, please raise quickly in forum.

6. swagger.yaml file should be properly updated.

7. Please create a separate postman script mainly for permissions apis, and making it using environment variables should we can easily adjust for different environment, like projectId, authorization token, basePath.

8. For these apis, please make sure they are returning proper and descriptive error messages.

About Local Setup 

The direct project service need to test against direct app, so it needs to first up the direct app, 

Please check https://github.com/appirio-tech/tc-common-tutorials/tree/master/docker/direct-app

You can easily run it without any build like `docker-compose up tc-direct`

for running direct project service, please check README.md file.


 

Final Submission Guidelines

- Code changes for improving the Permissions API
- Easy to use postman script for testing
- Updated swagger.yaml file

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30056828