online-judge
online-judge copied to clipboard
Deprecate API v1
We should consider deprecating API v1. There are some endpoints that dump megabytes of data and were not designed for the current size of DMOJ. Notably:
- https://dmoj.ca/api/user/list dumps all users (9MB at the time of writing)
- https://dmoj.ca/api/user/submissions/wleung_bvg (4.1MB at the time of writing)
- https://dmoj.ca/api/user/submissions/xyene (4.8MB at the time of writing)
API v2 contains all the data in v1 and has proper support for pagination, so we should be directing users to upgrade to v2.
How should we go about deprecating exactly?
We should probably put a deprecation notice into the JSON output and announce it on channels where people actually care, if we are doing this.
I did a survey today.
- We have a consistent 4 requests a day to problem endpoints from a
python-requestsbot. - We have a 2 requests a day to contest endpoints from the same
python-requestsbot.- Notably, clist.by has migrated over to using the API v2 contest endpoint.
- We have ~14K requests a day to user endpoints from what seems to be a bot tracking the submission activity of 7 users.
I think we can just go ahead and delete API v1.