Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Welcome to the Agon Swagger Specification Challenge. This is a First 2 Finish challenge where the first acceptable submission wins the challenge and closes it.

We are looking for a submission in the next 24 hours. Thus, we request you to ask questions early and submit your solution that meets all the requirements as soon as possible. A valid submission in the next 24 hours (beginning from registration start until the challenge closes or 24 hours - whichever is earlier) will get a $200 bonus (up to 3 submissions).

 

Project Overview

The customer has an analytics tool that provides a filter focused UI and visualizations that map funding processes. The solution is a Windows desktop application that is being converted to become more web-based in a separate stream of work.

 

We are currently building a web front-end for our analytics tool. In the final version it should have dashboard-like behavior, as it should be able to place multiple visualizations of the same dataset on a single screen.

 

Besides these visualizations an important part of our analytic tool is the 'tv remote' to navigate through the data. To filter data we use structured natural language queries (called filter). By stacking multiple of these queries, users can filter the data, on which visualizations are created.  The client is also looking to include a visual programming editor that allows users to visually define/configure (template) sentences that specify refinements and metrics.

 

Challenge Overview

As part of this challenge, we would like you to create a Swagger based API specification for our project. The details of the endpoints are as follows:

 

It concerns the “Folder” collection in a MongoDB database. The schema for this collection will be as follows:

  1. id (MongoDB's automatically generated ObjectIDs)

  2. name - String

  3. type - String. Enum: ‘actionTrail’ and ‘template’

  4. items - Array of Template / ActionTrail documents - only the objectIds.

  5. sortOrder - Integer (always positive)

 

We need the following endpoints for the above collection:

  • POST /api/folders

    • To create new folder.

    • Response should be created object.

  • PUT /api/folder/:id

    • Can only update “name”, “sortOrder” and “items” fields.

    • Response should be updated folder with items that are populated with the actual template / actionTrail documents.

  • PUT /api/folder/:id/position/:idx

    • Use this endpoint to change only the sortOrder of the folder corresponding to the id specified. The sortOrder is changed to idx.

    • Ideally, this API will be called twice in succession to swap the sortOrders of two folders - just an FYI

  • GET /api/folder/:id

    • Returns the folder corresponding to the id provided

  • DELETE /api/folder/:id

    • Use this endpoint to delete the folder and associated items.



Final Submission Guidelines

  1. Upload your Swagger based specification through the Submit and Review tool for this challenge.

  2. Your specification will be read using The Swagger Editor and thus kindly make sure that your specification does not contain any errors and can be easily imported into the editor.

  3. You need to include responses for the following HTTP Status codes: 404 (not Found), 500 (Internal Server Error), 400 (Bad Request) wherever applicable.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30052300