Challenge Overview
Project Overview
TopCoder and the TopCoder community have worked hard to get the platform to its currently level of maturity, but we're far from done. It's time to take the platform to the next level. TopCoder is going to start taking some steps to open up the platform API to the outside and community developers so they could incorporate it in their websites, applications or build their own applications (web, mobile or desktop).
The ultimate goal is to open up and build an "API" that is targeting all different type of audiences - Software and Studio Competitors, SRM/MM competitors, Copilots, Admins and TopCoder partners - each audience will have different interests and usages of the API, so it will be a huge project and we need to make sure that we are in the right direction from the beginning.
In this contest, we will build the REST service to project related functionality.
The TC Platform API can be found here with the deployment script : https://coder.topcoder.com/tcs/clients/cronos/applications/tc_platform_api/trunk
Competition Task Overview
Base URL: http://api.topcoder.com/rest/
This contest should add the implementation of following APIs to existing Project Services: https://coder.topcoder.com/tcs/clients/cronos/applications/tc_platform_api/trunk/src/main/com/topcoder/web/tc/rest/project/ProjectService.java and related code.
Note: We must use POJO + Spring in this contest. No EJBs.
Here are the direct services for reference (just for reference, don't use it directly, they are EJBs:
ProjectServiceFacadeBean
ProjectServiceBean
Project POJO
POJO Mapping
- Create a new Direct Project
- EndPoint: /projects
- Method: POST
- Parameters:
- name : string - required
- description : string - required
- billingaccounts : [id] - optional
- users : [{handle : string, permissionLevel : int}] - optional
- Get information about a specific project (caller must have read permission)
- EndPoint: /projects/{projectId}
- Method: GET
- Update an existing project (caller must have update permission)
- EndPoint: /projects/{projectId}
- Method: PUT
- Parameters:
- name : string - optional
- description : string - optional
- billingaccounts : [id] - optional
- users : [{handle : string, permissionLevel : int}] - optional
- Gets all the billing accounts to which the caller has access.
- EndPoint: /billingAccount
- Method: GET
Authentication
All these calls assume OAuth as the authentication method.
Active Docs
The contestants are also required to update active docs and integrate the new APIs to 3scale. Please extend and follow existing code.
Exception Handling
When some server error occurs, it will throw exception to end user directly.
It must follow the error codes responses here and return json error message
https://dev.twitter.com/docs/error-codes-responses
config.apiCodes = {
OK : {name : 'OK', value : 200, description : 'Success' },
notModified : {name : 'Not Modified', value: 304, description : 'There was no new data to return.' },
badRequest : {name : 'Bad Request', value: 400, description : 'The request was invalid. An accompanying message will explain why.' },
unauthorized : {name : 'Unauthorized', value: 401, description : 'Authentication credentials were missing or incorrect.' },
forbidden : {name : 'Forbidden', value: 403, description : 'The request is understood, but it has been refused or access is not allowed.' },
notFound : {name : 'Not Found', value: 404, description : 'The URI requested is invalid or the requested resource does not exist.' },
serverError : {name : 'Internal Server Error', value: 500, description : 'Something is broken. Please contact support.' }
};
with an optional "message" parameter for more details
Testing
You need to provide manual steps to verify your submission.
Existing Code
(Please send your request to subversion@topcoder.com if you don't have access)
web_module: https://coder.topcoder.com/internal/web_module/trunk
platform api: https://coder.topcoder.com/tcs/clients/cronos/applications/tc_platform_api/trunk
test data tool: https://coder.topcoder.com/internal/database/scripts/trunk/tools/TestDataTool
Virtual Machine (VM)
VM specific information is found here: http://www.topcoder.com/wiki/display/docs/VM+Image+2.5
Upon registration as a submitter or reviewer you will need to request a VM based on the TopCoder systems image. The VM will be active through aggregation review, after which it will be terminated except for the winner's and the reviewers'. To request your image, please post in contest forum.
Before requesting your VM, you need to ensure that you have an SSH key created and in your member profile. Instructions to do so are here: http://www.topcoder.com/wiki/display/projects/Generate+SSH+Key, and instructions to connect afterwards are here: http://www.topcoder.com/wiki/display/projects/Connect+Using+SSH+Key.
Please realize that VMs are currently issued manually. We make every attempt to issue the VM as soon as it is requested, however, there may be delays of up to 12 hours depending on time of day when you request. We encourage everyone to request a VM as soon as possible to minimize any such delays.
VMs will be granted only during registration phase!
Set up and Deploy API
Refer to this document to deploy the API locally or on VM
https://coder.topcoder.com/tcs/clients/cronos/applications/tc_platform_api/trunk/doc/APIDG.docx
Refer to this document to setup 3scale integration
https://coder.topcoder.com/tcs/clients/cronos/applications/tc_platform_api/trunk/doc/3scale_DeploymentGuide.doc
Refer to this document for details about Active Docs deployment
https://coder.topcoder.com/tcs/clients/cronos/applications/tc_platform_api/trunk/doc/ActiveDocs_DG.doc
Final Submission Guidelines
N/A