diff --git a/Contest_API.md b/Contest_API.md index 3ba58cdf..bf0b3bb9 100644 --- a/Contest_API.md +++ b/Contest_API.md @@ -330,6 +330,8 @@ access to. | [contest\_thaw](#modifying-contests) | Control the contest's thaw time | [team\_submit](#modifying-submissions) | Submit as a team | [team\_clar](#modifying-clarifications) | Submit clarifications as a team +| [judge\_clar](#modifying-clarifications) | Submit clarifications as a judge +| [judge\_comment](#modifying-commentary) | Submit commentary as a judge | [proxy\_submit](#modifying-submissions) | Submit as a shared team proxy | [proxy\_clar](#modifying-clarifications) | Submit clarifications as a shared team proxy | [admin\_submit](#modifying-submissions) | Submit as an admin @@ -1522,7 +1524,7 @@ zip archive. These must be stored directly from the root of the zip file, i.e. there must not be extra directories (or files) added unless these are explicitly part of the submission content. -#### Modifying submissions +#### Modifying submissions To add a submission, clients can use the `POST` method on the submissions endpoint or the `PUT` method directly on an object url. One of the following [capabilities](#capabilities) @@ -1798,6 +1800,7 @@ is required to add clarifications, with descriptions below: | Name | Description | :----------------- | :---------- | team\_clar | POST a clarification as a team +| judge\_clar | POST a clarification as a judge | proxy\_clar | POST a clarification as a proxy (able to submit on behalf of team(s)) | admin\_clar | POST or PUT a clarification as an admin @@ -1812,6 +1815,9 @@ exceptions: `time`, and `contest_time` must not be provided. `from_team_id` may be provided but then must match the ID of the team associated with the request. The server will determine an `id` and the current `time` and `contest_time`. +- The `judge_clar` capability only has access to `POST`. `id`, `from_team_id`, + `time`, and `contest_time` must not be provided. + The server will determine an `id` and the current `time` and `contest_time`. - The `proxy_clar` capability only has access to `POST`. `id`, `to_team_id`, `time`, and `contest_time` must not be provided. `from_team_id` must be provided. The server will determine an `id` and the current `time` and @@ -2046,7 +2052,7 @@ Request: ### Commentary -Commentary on events happening in the contest +Commentary on events happening in the contest. The following endpoints are associated with commentary: @@ -2096,6 +2102,33 @@ tags below are used. | accepted-winner | A submission was accepted that changed the set of teams currently in the lead. | accepted-\ | A submission was accepted that changed the set of teams awarded \. Note that the above 4 are special cases of this. +#### Modifying commentary + +To add a commentary message, clients can use the `POST` method on the commentary endpoint. +The following [capability](#capabilities) is required to add commentary, +with description below: + +| Name | Description +| :----------------- | :---------- +| judge\_comment | POST a commentary as a judge + +All requests must include a valid JSON object with the same properties as the commentary +endpoint returns from a `GET` request with the following exceptions: + +- The `judge\_comment` capability only has access to `POST`. `id`, `time`, + `contest\_time`, and `source\_id` must not be provided, and will be set by the server. + +The request must fail with a 4xx error code if any of the following happens: + +- A required property is missing. +- A property that must not be provided is provided. +- The supplied team, problem, or submission can not be found. + +The response will contain a `Location` header pointing to the newly created commentary +and the response body will contain the initial state of the commentary. + +Performing a `POST` is not supported when this capability is not available. + #### Examples Request: