Challenge Overview

Project Overview

In this project, we want to add a new API endpoint to the Direct API to retrieve direct projects data. See the following section for details.

Competition Task Overview

The API endpoints should be /direct/v2/projects.

Direct API use the tech-core (https://github.com/cloudspokes/tech-core) as base, refer to how the existing challenges API utilize the tech-core.

  • If no search criteria, the API returns all the projects the user has access to. For TC staff role, please add a new filter called 'scope', the scope can be 'all' or 'my'. If the scope is 'all', all the direct projects in the system should be returned. If the scope is 'my', only the projects the user has access to will be returned. The filter 'scope' does not apply to normal user.
  • The following filters should be supported for all the users
    • ���project name
      • ���exact match
      • particial text match using wildcards
    • project id - extact match
    • billing account name
      • ���exact match
      • particial text match using wildcards
    • billing account id - exact match
    • project status - extact match 
  • multiple filters will be combined using AND logic
  • sorting, the following sorting column can be indicated
    • ���project id
    • project name
    • project status
    • project created Date
    • project updated date
    • project billing account id

The model:

Project extends AbstractIdResource:

  • id:Integer
  • projectName:String
  • projectBillingAccountName:String
  • projectBillingAccountId:Integer
  • projectStatusId:Integer
  • projectStatusName:String
  • projectCreatedDate:String
  • projectCreatedBy:Integer (userId)
  • projectLastUpdatedDate:String

Security

The security utility should be used to authenticate the user.

API Standard

https://docs.google.com/a/appirio.com/presentation/d/15pucEI0MHj9y778EyaAWGh4MBH-I73i1-GS0ir7FhxE/edit#slide=id.p9

This standard needs to be followed for all direct apis.

Http Response Code and Error Handling

200 - Success

401 - Unauthorized (anonymous user can't access my challenges api)

405 - Method Not Allowed (my challenges api only support GET method)

500 - Internal Server Error (any other errors)

Success Response Format

{

id: <backend_created_id>,

result: {

success: true|false,

status: 200,

content: {id:}

}

}

status--> http status code

id --> some id that is created in backend to use in future for frontend app and logging

Error Response Format

{

id: <backend_created_id>,

result: {

success: false,

status: 400,

content: {<error_message>}

debug: {

detail: <detailed_message>

stackTrace: <stack_trace>

}

}

}

status-->http status code
id-->some id that is created in backend to use in future for frontend app and logging
debug-->debug information

Integration Test

Integration test should be provided. You can find the example in https://github.com/cloudspokes/tech-core/tree/master/tech.core/tech.core.sample.basic/src/test

Environment Setup

The tomcat should be setup in your local environment for development, for the informix database, you can either setup the informix 11.5 database at your local environment or request a VM to use the informix database on VM remotely.

Source Repo: https://github.com/cloudspokes/direct-api/tree/project_retrieval_api

The technology requirements

  • JDK version 6
  • Spring version 3.2.9 – Spring MVC with Rest support will be used to implement the REST API.
  • Spring Security 3.2.4 - http://projects.spring.io/spring-security/
  • Latest Jackson version compatible with Java 6 and Spring 3.2 (https://github.com/FasterXML/jackson) – for Json processing
  • Log4J 1.2.5 – for logging in the API
  • JUnit 4.7 – for unit testing
  • Maven – for managing project dependences, build, and deploy
  • Informix 11.5 – database which stores all the topcoder data
  • Tomcat sever 7.0.54 - use as the app server to host the direct API

VM Environment:

If You need a TopCoder VM which has informix database setup to work on this challenge, please request the VM in the challenge forum.

Information about VM can be found below:

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 new TopCoder image. To request your image, please use the 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.



Final Submission Guidelines

  • Deployment Guide with the details on setup the local development environment
  • Source Code
  • Test Data

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30047945