Fast 72hrs!! Topcoder - Add REST APIs For Closing and Cancelling Task

Register
Submit a solution
The challenge is finished.

Challenge Overview

For this challenge, we'd like to add endpoints for closing and canceling task.

Notes, both endpoints need to be check if the challenge is Task type, otherwise return error status.

1. Cancel Task
the endpoint should be POST /challenges/{challenge_id}/cancel

- if challenge_id is not existing, return 404 error.
- if challenge_id is not task, return 400 error
- for other exception cases, proper error message should be returned, so call know easily what is the problem.

2. Close Task
the endpoint should be POST /challenges/{challenge_id}/close, it will take a winnerID parameter.

- the winner id should be passed
- if challenge_id is not existing, return 404 error.
- if challenge_id is not task, return 400 error
- if winnerID is not registered for this task, return 400 error.
- for other exception cases, proper error message should be returned, so call know easily what is the problem.

3. both endpoints are going to mimic similar logic as in https://github.com/appirio-tech/direct-app/blob/dev/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ejb/ContestServiceFacadeBean.java#L9073-L9279

General Requirements

1. swagger.yaml should be updated to describe the new apis properly
2. The API requests and responses should follow the v3 API standards.

About Local Setup

- The Challenge APIs need to communicate with Direct App, Please check https://github.com/appirio-tech/tc-common-tutorials/tree/master/docker/direct-app about how to build, deploy and run direct-app locally.
- Please check ap-challenge-microservice.zip/docs/Deployment Guide.docx about how to run the service and test with the API.

Final Submission Guidelines

- Code changes to new apis
- Updated swagger.yaml file
- Deployment Guide and Verification Steps

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30056398