Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

- DO send submission receipt notification to all users on submission list

- --Allow submission permission to be restricted to the Team leader (aka 'captain' or 'admin')-- (later we decided not to add this restriction)

- service to return all registered Teams in which a given user is a member should ALSO be able to filter by whether a user is a Team leader (aka 'captain' or 'admin').  We can further refine this to say the client should pass a user ID and the service should return a list of teams on whose behalf the user may submit, taking into account any restrictions. ( I'm not sure if we still need this. )

- When retrieving a TeamState, a hash of the object should be returned.  The client submits the hash with the Submission and the server throws an exception if the hash is out of date.  This ensures that the Team State at the time of submission is the same as that which the user saw.

...

B. It is a valid Team Submission, i.e. (1) it has a Team ID of a registered Team, (2) the Team hasn't exceeded its per-round submission limit, (3) all contributors are registered for the challenge and are on the specified Team at the time of submission, and (4) neither the submitter nor any contributor has made an individual Submission or was the subitter of or contributer to a Team Submission having a different Team ID in the current round.

 

Given a User and a Challenge, need a service to return a paginated list of teams which the user is on and which either (1) they are an admin or (2) the team is already registered for the challenge.  More Generally we need a list of Teams either (1) on whose behalf the user is eligible to submit or (2) on whose behalf the user WOULD be eligible to submit if the Team has been registered for the Challenge, and which the User CAN register for the Challenge.

 

 

Design Approach

1) A Challenge is a Project with some extra metadata.  Implement this as a new object which a Project can 'own', and on which CRUD operations can be done independently from the Project.

...

URIMethodRequest ParametersRequest BodyResponse BodyAuthorizationNotes
/challengePOST--ChallengeChallengeCREATE permission required in referenced project 
/entity/{projectId}/challengeGET----ChallengeREAD permission required in project 
/challengeGETparticipantId--PaginatedList<ChallengeSummary>PUBLICreturns the projects/challenges for which 'participantId' is registered.
/challenge/{id}PUT--Challenge--UPDATE permission required in referenced project 
/challenge/{id}DELETE------DELETE permission required in referenced project 
/challenge/{id}/challengeTeamPOST--ChallengeTeamChallengeTeamMust be a member of the Participant Team and be an admin on the referenced Challenge Team. 
/evaluation/{id}/challengeTeamPOST--ChallengeTeamChallengeTeamMust be a member of the Participant Team and be an admin on the referenced Challenge Team.The service 'looks up' the Challenge associated with the given evaluation and then associates the Team with that challenge.  Does nothing if there is no Challenge or if the Team is already registered.
/challenge/{id}/challengeTeam/{challTeamId}GET----ChallengeTeamMust have READ permission in the Challenge Project. 
/challenge/{id}/challengeTeamGETlimit, offset--PaginatedList<ChallengeTeam>Must have READ permission in the Challenge Project. 
/challenge/{id}/challengeTeam/{challTeamId}PUT--ChallengeTeamChallengeTeamMust be a member of the Participant Team and be an admin on the referenced Challenge Team. 
/challenge/{id}/challengeTeam/{challTeamId}DELETE------Must be an admin on the referenced Challenge Team. 
/challenge/{id}/submissionTeamsGETprincipalId, limit, offset--PaginatedList<SubmissionEligibility>Must be the user specified by 'principalId' or be a Synapse AdminReturns a list of Teams either (1) on whose behalf the user is eligible to submit or (2) on whose behalf the user WOULD be eligible to submit if the Team has been registered for the Challenge, and which the User CAN register for the Challenge.
/evaluation/submissionPOSTetag, teamId, teamStateHashSubmissionSubmissionMust have SUBMIT permission in the Evaluation referenced in the Submission.If teamId is included then a TeamState object is created for the Submission.  If 'contributer' list is not empty then teamId is required and Submission is rejected if submitter or any specified contributers is not on the given team.  If teamStateHash is included then teamId must also be included and submission will be rejected if computed TeamState does not match hash.  Notifications sent to all contributers except for submitter, with instructions for opting out.
/evaluation/submission/{id}/optOutPUTuserId----userId must be the one making the request.Sets 'optOut' field for given userId in the Submission.  userId must be a contributer in the Submission (not the submitter himself) and Submission must not be in one of the Evaluation's 'optOutDisallowed' states.
/evaluation/{evaluationId}/teamState/{teamId}GET----TeamStateuser making the request must have SUBMIT permission in the Evaluation and must be eligible to submit on behalf of the specified Team. 

/user/{id}/team

GETlimit, offset, isAdmin--PaginatedResults<Team>PUBLICAdd 'isAdmin' query parameter to the existing query to get the teams a user is on.  This optional filter reduces the results to just those teams on which the user is an administrator.