Skip to content

Commit

Permalink
Judge capabilities
Browse files Browse the repository at this point in the history
Add judge_clar and judge_comment capability with access equivalent to what a judge/analyst should be able to do, and described similar to other capabilities.
  • Loading branch information
deboer-tim committed Apr 11, 2023
1 parent eab138f commit 93357f0
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions Contest_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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-\<award> | A submission was accepted that changed the set of teams awarded \<award>. 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:
Expand Down

0 comments on commit 93357f0

Please sign in to comment.