Description
Description of the enhancement request
It would be nice if the things that can be exported from the UI can also be exported from the API, to be able to do so automatically.
The goal you want to achieve
As jury, at the end of the contest, we would like to run some script that downloads the results of the contest. Most things we need can be retrieved as JSON from the API, but some things cannot, for example:
- The static scoreboard ZIP (both public and unfrozen)
clarifications.html
What I've tried
In mpsijm/BAPCtools@download-more
, I've added some code that should download the scoreboard ZIP and clarifications HTML from <domjudge_url>/jury/contests/<numeric_contest_id>/public-scoreboard.zip
and <domjudge_url>/jury/import-export/export/clarifications.html
. Instead, it downloads a login page, even though we pass HTTPBasicAuth
at https://github.com/RagnarGrootKoerkamp/BAPCtools/blob/master/bin/contest.py#L96.
(Note that the ../../
looks shady, but it actually works 😛 The base URL in call_api
currently ends with /api/v4
, and the ../../
removes this. If this wouldn't work, the server would respond with 404.)
Expected behaviour
Either:
- there should be dedicated endpoints in the API to export these files, or
- it should be possible to access the pages under
/jury
usingHTTPBasicAuth
.
Anything else you'd like to add?
Accessing the static scoreboard zip from a script currently requires the numeric ID of the contest, even though all of the API has switched to external IDs 😛 In general, perhaps the URLs of the jury pages should also switch from numeric IDs to external IDs (e.g. /jury/contests/2
would become /jury/contests/bapc2024
).
Tested at judge.bapc.eu, version 8.4.0DEV/ 2d6f4ff.