Medium | Topcoder Skill Builder Competition | Java + Springboot + PostgreSQL | Bullet Train

Register
Submit a solution
Status: ‌Cancelled client request

Challenge Overview



Bullet Train

This is the MEDIUM Level Competition

Next day into the office He is informed, the new train arrival has been canceled. So, his supervisor asks him to search for a train with some clues and requests him to delete it.

Solving this problem you learn:
  • Create new endpoint to search train that have same description values
  • Create new endpoint to search train based on keyword
  • Create new endpoint to Delete a train
Learning Material: https://bezkoder.com/spring-boot-postgresql-example/


What do you need to do next?

IMPORTANT:
  • Follow the exact base API endpoint, automated testers will check the exact same address: http://localhost:8080/api/trains
  • This is a continuation competition, please complete the previous Easy level before working on this level.
  • Match the exact code status & wording (lowercase) for the returned message.


Task:

1. Search train that have same values
  • Method : GET
  • Url : /api/trains/sharing-tracks
  • This need return train that have sharing-tracks === true values
  • Response:
    • Success:
      • need return 200 code and
      • list all train
    • Error:
      • When search with incorrect route for example:  /api/trains/distance-between-stop
        • need return 405 code and
        • {message: "invalid endpoint"}

2. Search trains which amenities values contains keyword
  • Method : GET
  • Url : /api/trains?amenities=[keyword]
  • Response:
    • Success:
      • need return 200 code and
      • list all train
    • Error:
      • When use other parameters than the amenities
        • need return 405 code and
        • {message: "invalid endpoint"}
      • When search result empty
        • need return 200 code and
        • {message: “train not found”}

3. Create new endpoint to delete a train
  • Method : DELETE
  • Url : /api/trains/:id
  • Delete Train with Id: 1
  • Response:
    • Success:
      • need return 200 code and
      • {message: “train removed successfully”}
    • Error:
      • If train not exists id: 10
        • need return 404 code and
        • {message: “train not found”}
Sample Submission: https://drive.google.com/drive/folders/1h_PDXHKdd9TC-eshxydMjUyRUtcx-JQz?usp=sharing

Final Submission Guidelines

Topcoder Skill Builder | Java + Springboot + PostgreSQL Levels

Host Challenge & Submission Guideline | Challenge Link: http://www.topcoder.com/challenges/30168990
Easy | Challenge Link: http://www.topcoder.com/challenges/30168991
Medium | Challenge Link: http://www.topcoder.com/challenges/30168980
Hard |  Challenge Link: http://www.topcoder.com/challenges/30168986

ELIGIBLE EVENTS:

2021 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30168980