Skip to content

Add phase endpoint for challenges #11

@jmgasper

Description

@jmgasper

Managing phases is an important part of the admin process, to correct issues, extend, open phases that were skipped by autopilot, etc...

In anticipation of having new features in the system-admin app for phase management, I'd like some new endpoints added to the challenge API:

  1. GET /v6/challenges/{challengeId}/phases
  • Returns all phase information for that challenge
  1. GET /v6/challenges/{challengeId}/phases/{id}, where id is the id value of the phase
  • Returns the information for a single phase associated with the challenge
  1. PATCH /v6/challenges/{challengeId}/phases/{id}, where id is the id value of the phase
  • Partially update a phase. For instance, if I only want to open the phase, I could give body: {"isOpen":true}
  • Any combination of phase object values should be accepted and validation should occur (end date can't be before start, duration can't be negative, phaseId has to match a known phase, predecessor must exist, etc..)
  1. DELETE /v6/challenges/{challengeId}/phases/{id}, where id is the id value of the phase
  • Deletes a phase and recalculates the predecessors. This will mainly be used to delete any added phases that aren't needed. For instance, if we want to rewind a challenge and remove the Post-Mortem phase and reopen submission, which is something I had to do recently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions