diff --git a/doc/specs/lichess-api.yaml b/doc/specs/lichess-api.yaml index a5576e4b..05fead51 100644 --- a/doc/specs/lichess-api.yaml +++ b/doc/specs/lichess-api.yaml @@ -117,11 +117,11 @@ tags: Works with normal Lichess accounts. Engine play or assistance is [forbidden](https://lichess.org/page/fair-play). ### Features - - [Stream incoming chess moves](#tag/board/get/apiboardgamestreamgameid) - - [Play chess moves](#tag/board/post/apiboardgamegameidmovemove) - - [Read](#tag/board/get/apiboardgamestreamgameid) and [write](#tag/board/post/apiboardgamegameidchat) in the player and spectator chats - - [Receive](#tag/board/get/apistreamevent), [create](#tag/challenges/post/apichallengeusername) and [accept](#tag/challenges/post/apichallengechallengeidaccept) (or [decline](#tag/challenges/post/apichallengechallengeiddecline)) challenges - - [Abort](#tag/board/post/apiboardgamegameidabort) and [resign](#tag/board/post/apiboardgamegameidresign) games + - [Stream incoming chess moves](#tag/board/GET/api/board/game/stream/{gameId}) + - [Play chess moves](#tag/board/POST/api/board/game/{gameId}/move/{move}) + - [Read](#tag/board/GET/api/board/game/stream/{gameId}) and [write](#tag/board/POST/api/board/game/{gameId}/chat) in the player and spectator chats + - [Receive](#tag/board/GET/api/stream/event), [create](#tag/challenges/POST/api/challenge/{username}) and [accept](#tag/challenges/POST/api/challenge/{challengeId}/accept) (or [decline](#tag/challenges/POST/api/challenge/{challengeId}/decline)) challenges + - [Abort](#tag/board/POST/api/board/game/{gameId}/abort) and [resign](#tag/board/POST/api/board/game/{gameId}/resign) games - Compatible with normal Lichess accounts ### Restrictions @@ -141,14 +141,14 @@ tags: Play on Lichess as a bot. Allows engine play. Read the [blog post announcement of lichess bots](https://lichess.org/blog/WvDNticAAMu_mHKP/welcome-lichess-bots). - Only works with [Bot accounts](#tag/bot/post/apibotaccountupgrade). + Only works with [Bot accounts](#tag/bot/POST/api/bot/account/upgrade). ### Features - - [Stream incoming chess moves](#tag/bot/get/apibotgamestreamgameid) - - [Play chess moves](#tag/bot/post/apibotgamegameidmovemove) - - [Read](#tag/bot/get/apibotgamestreamgameid) and [write](#tag/bot/post/apibotgamegameidchat) in the player and spectator chats - - [Receive](#tag/bot/get/apistreamevent), [create](#tag/challenges/post/apichallengeusername) and [accept](#tag/challenges/post/apichallengechallengeidaccept) (or [decline](#tag/challenges/post/apichallengechallengeiddecline)) challenges - - [Abort](#tag/bot/post/apibotgamegameidabort) and [resign](#tag/bot/post/apibotgamegameidresign) games + - [Stream incoming chess moves](#tag/bot/GET/api/bot/game/stream/{gameId}) + - [Play chess moves](#tag/bot/POST/api/bot/game/{gameId}/move/{move}) + - [Read](#tag/bot/GET/api/bot/game/stream/{gameId}) and [write](#tag/bot/POST/api/bot/game/{gameId}/chat) in the player and spectator chats + - [Receive](#tag/bot/GET/api/stream/event), [create](#tag/challenges/POST/api/challenge/{username}) and [accept](#tag/challenges/POST/api/challenge/{challengeId}/accept) (or [decline](#tag/challenges/POST/api/challenge/{challengeId}/decline)) challenges + - [Abort](#tag/bot/POST/api/bot/game/{gameId}/abort) and [resign](#tag/bot/POST/api/bot/game/{gameId}/resign) games - Engine assistance is [allowed](https://lichess.org/page/fair-play) ### Restrictions - Bots can only play challenge games: pools and tournaments are off-limits @@ -173,7 +173,7 @@ tags: [Official broadcasts](https://lichess.org/broadcast) are maintained by Lichess, but you can [create your own broadcasts](https://lichess.org/broadcast/new) to cover any live game or chess event. You will need to publish PGN on a public URL so that Lichess can pull updates from it. - Alternatively, you can push PGN updates to Lichess using [this API endpoint](#tag/Broadcasts/operation/broadcastPush). + Alternatively, you can push PGN updates to Lichess using [this API endpoint](#tag/broadcasts/POST/api/broadcast/round/{broadcastRoundId}/push). Broadcasts are organized in tournaments, which have several rounds, which have several games. You must first create a tournament, then you can add rounds to them. @@ -186,7 +186,7 @@ tags: description: | Send and receive challenges to play. - To create a lot of challenges, consider [bulk pairing](#tag/bulk-pairings/post/apibulk-pairing) instead. + To create a lot of challenges, consider [bulk pairing](#tag/bulk-pairings/POST/api/bulk-pairing) instead. - name: External engine description: | **This API is in alpha and subject to change.** @@ -802,5 +802,5 @@ components: "follow:write": Follow and unfollow other players "msg:write": Send private messages to other players "board:play": Play with the Board API - "bot:play": Play with the Bot API. Only for [Bot accounts](#tag/bot/post/apibotaccountupgrade) + "bot:play": Play with the Bot API. Only for [Bot accounts](#tag/bot/POST/api/bot/account/upgrade) "web:mod": Use moderator tools (within the bounds of your permissions) diff --git a/doc/specs/schemas/ExternalEngine.yaml b/doc/specs/schemas/ExternalEngine.yaml index dba75cb3..4f310951 100644 --- a/doc/specs/schemas/ExternalEngine.yaml +++ b/doc/specs/schemas/ExternalEngine.yaml @@ -12,7 +12,7 @@ properties: type: string description: | A secret token that can be used to - [*request* analysis](#tag/External-engine/operation/apiExternalEngineAnalyse) + [*request* analysis](#tag/external-engine/POST/api/external-engine/{id}/analyse) from this external engine. userId: type: string diff --git a/doc/specs/schemas/ExternalEngineRegistration.yaml b/doc/specs/schemas/ExternalEngineRegistration.yaml index 584e159e..88c3591d 100644 --- a/doc/specs/schemas/ExternalEngineRegistration.yaml +++ b/doc/specs/schemas/ExternalEngineRegistration.yaml @@ -33,7 +33,7 @@ properties: type: string description: | A random token that can be used to - [wait for analysis requests](#tag/External-engine/operation/apiExternalEngineAcquire) + [wait for analysis requests](#tag/external-engine/POST/api/external-engine/work) and provide analysis. The engine provider should securely generate a random string. diff --git a/doc/specs/tags/arenatournaments/api-tournament-id-join.yaml b/doc/specs/tags/arenatournaments/api-tournament-id-join.yaml index 998aba23..190efdd6 100644 --- a/doc/specs/tags/arenatournaments/api-tournament-id-join.yaml +++ b/doc/specs/tags/arenatournaments/api-tournament-id-join.yaml @@ -3,7 +3,7 @@ post: summary: Join an Arena tournament description: | Join an Arena tournament, possibly with a password and/or a team. - Also unpauses if you had previously [paused](#tag/arena-tournaments/post/apitournamentidwithdraw) the tournament. + Also unpauses if you had previously [paused](#tag/arena-tournaments/POST/api/tournament/{id}/withdraw) the tournament. tags: - "Tournaments (Arena)" security: diff --git a/doc/specs/tags/arenatournaments/api-tournament-team-battle-id.yaml b/doc/specs/tags/arenatournaments/api-tournament-team-battle-id.yaml index 3a2cc12d..3864f6f4 100644 --- a/doc/specs/tags/arenatournaments/api-tournament-team-battle-id.yaml +++ b/doc/specs/tags/arenatournaments/api-tournament-team-battle-id.yaml @@ -3,7 +3,7 @@ post: summary: Update a team battle description: | Set the teams and number of leaders of a team battle. - To update the other attributes of a team battle, use the [tournament update endpoint](#tag/arena-tournaments/post/apitournamentid). + To update the other attributes of a team battle, use the [tournament update endpoint](#tag/arena-tournaments/POST/api/tournament/{id}). tags: - "Tournaments (Arena)" security: diff --git a/doc/specs/tags/arenatournaments/api-tournament.yaml b/doc/specs/tags/arenatournaments/api-tournament.yaml index 1f31e2e2..bec8c97f 100644 --- a/doc/specs/tags/arenatournaments/api-tournament.yaml +++ b/doc/specs/tags/arenatournaments/api-tournament.yaml @@ -163,7 +163,7 @@ post: type: string description: | Set the ID of a team you lead to create a team battle. - The other teams can be added using the [team battle edit endpoint](#tag/arena-tournaments/post/apitournamentteam-battleid). + The other teams can be added using the [team battle edit endpoint](#tag/arena-tournaments/POST/api/tournament/team-battle/{id}). conditions.teamMember.teamId: type: string description: | diff --git a/doc/specs/tags/board/api-board-seek.yaml b/doc/specs/tags/board/api-board-seek.yaml index 6fe9200d..e53912eb 100644 --- a/doc/specs/tags/board/api-board-seek.yaml +++ b/doc/specs/tags/board/api-board-seek.yaml @@ -14,8 +14,8 @@ post: If the client closes the connection, the seek is canceled. This way, if the client terminates, the user won't be paired in a game they wouldn't play. When the seek is accepted, or expires, the server closes the connection. - **Make sure to also have an [Event stream](#tag/board/get/apiboardgamestreamgameid) open**, to be notified when a game starts. - We recommend opening the [Event stream](#tag/board/get/apiboardgamestreamgameid) first, then the seek stream. This way, + **Make sure to also have an [Event stream](#tag/board/GET/api/board/game/stream/{gameId}) open**, to be notified when a game starts. + We recommend opening the [Event stream](#tag/board/GET/api/board/game/stream/{gameId}) first, then the seek stream. This way, you won't miss the game event if the seek is accepted immediately. ### Correspondence seek diff --git a/doc/specs/tags/bot/api-bot-account-upgrade.yaml b/doc/specs/tags/bot/api-bot-account-upgrade.yaml index c1bec8e9..56893518 100644 --- a/doc/specs/tags/bot/api-bot-account-upgrade.yaml +++ b/doc/specs/tags/bot/api-bot-account-upgrade.yaml @@ -7,7 +7,7 @@ post: To upgrade an account to Bot, use the [official lichess-bot client](https://github.com/lichess-bot-devs/lichess-bot), or follow these steps: - Create an [API access token](https://lichess.org/account/oauth/token/create?scopes[]=bot:play) with "Play bot moves" permission. - `curl -d '' https://lichess.org/api/bot/account/upgrade -H "Authorization: Bearer "` - To know if an account has already been upgraded, use the [Get my profile API](#tag/account/get/apiaccount): + To know if an account has already been upgraded, use the [Get my profile API](#tag/account/GET/api/account): the `title` field should be set to `BOT`. tags: - Bot diff --git a/doc/specs/tags/broadcasts/api-broadcast-broadcastTournamentId-pgn.yaml b/doc/specs/tags/broadcasts/api-broadcast-broadcastTournamentId-pgn.yaml index 213bc60e..74bc34d4 100644 --- a/doc/specs/tags/broadcasts/api-broadcast-broadcastTournamentId-pgn.yaml +++ b/doc/specs/tags/broadcasts/api-broadcast-broadcastTournamentId-pgn.yaml @@ -5,7 +5,7 @@ get: Download all games of all rounds of a broadcast in PGN format. If a `study:read` [OAuth token](#tag/OAuth) is provided, the private rounds where the user is a contributor will be available. - You may want to [download only the games of a single round](#tag/broadcasts/get/apibroadcastroundbroadcastroundidpgn) instead. + You may want to [download only the games of a single round](#tag/broadcasts/GET/api/broadcast/round/{broadcastRoundId}.pgn) instead. tags: - Broadcasts security: diff --git a/doc/specs/tags/broadcasts/api-broadcast-round-broadcastRoundId-pgn.yaml b/doc/specs/tags/broadcasts/api-broadcast-round-broadcastRoundId-pgn.yaml index 6ebea4c0..9fc30f54 100644 --- a/doc/specs/tags/broadcasts/api-broadcast-round-broadcastRoundId-pgn.yaml +++ b/doc/specs/tags/broadcasts/api-broadcast-round-broadcastRoundId-pgn.yaml @@ -5,7 +5,7 @@ get: Download all games of a single round of a broadcast tournament in PGN format. You *could* poll this endpoint to get updates about a tournament, but it would be slow, and very inefficient. - Instead, consider [streaming the tournament](#tag/broadcasts/get/apistreambroadcastroundbroadcastroundidpgn) to get + Instead, consider [streaming the tournament](#tag/broadcasts/GET/api/stream/broadcast/round/{broadcastRoundId}.pgn) to get a new PGN every time a game is updated, in real-time. tags: - Broadcasts diff --git a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml index a7c4803d..35fc0d14 100644 --- a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml +++ b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml @@ -5,7 +5,7 @@ post: Create a new broadcast round to relay external games. This endpoint accepts the same form data as the web form. - Choose one between `syncUrl`, `syncUrls`, `syncIds` and `syncUsers`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#tag/broadcasts/post/apibroadcastroundbroadcastroundidpush) + Choose one between `syncUrl`, `syncUrls`, `syncIds` and `syncUsers`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#tag/broadcasts/POST/api/broadcast/round/{broadcastRoundId}/push) tags: - Broadcasts security: diff --git a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-players-playerId.yaml b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-players-playerId.yaml index 05e3086b..664643fc 100644 --- a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-players-playerId.yaml +++ b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-players-playerId.yaml @@ -19,7 +19,7 @@ get: name: playerId description: | The unique player ID within the broadcast. This is usually their fideId. - If the player does not have a fideId, it is their name. Consult the [list of players for the broadcast](#tag/Broadcasts/operation/broadcastPlayersGet) for which ID to use. + If the player does not have a fideId, it is their name. Consult the [list of players for the broadcast](#tag/broadcasts/GET/broadcast/{broadcastTournamentId}/players) for which ID to use. required: true schema: type: string diff --git a/doc/specs/tags/challenges/api-challenge-ai.yaml b/doc/specs/tags/challenges/api-challenge-ai.yaml index 04535f08..87489c47 100644 --- a/doc/specs/tags/challenges/api-challenge-ai.yaml +++ b/doc/specs/tags/challenges/api-challenge-ai.yaml @@ -3,7 +3,7 @@ post: summary: Challenge the AI description: | Start a game with Lichess AI. - You will be notified on the [event stream](#tag/board/get/apiboardgamestreamgameid) that a new game has started. + You will be notified on the [event stream](#tag/board/GET/api/board/game/stream/{gameId}) that a new game has started. tags: - Challenges security: diff --git a/doc/specs/tags/challenges/api-challenge-challengeId-accept.yaml b/doc/specs/tags/challenges/api-challenge-challengeId-accept.yaml index eff9cc03..4e6cdfc5 100644 --- a/doc/specs/tags/challenges/api-challenge-challengeId-accept.yaml +++ b/doc/specs/tags/challenges/api-challenge-challengeId-accept.yaml @@ -3,7 +3,7 @@ post: summary: Accept a challenge description: | Accept an incoming challenge. - You should receive a `gameStart` event on the [incoming events stream](#tag/board/get/apiboardgamestreamgameid). + You should receive a `gameStart` event on the [incoming events stream](#tag/board/GET/api/board/game/stream/{gameId}). tags: - Challenges security: diff --git a/doc/specs/tags/challenges/api-challenge-open.yaml b/doc/specs/tags/challenges/api-challenge-open.yaml index 06d57bf8..bda0a7fa 100644 --- a/doc/specs/tags/challenges/api-challenge-open.yaml +++ b/doc/specs/tags/challenges/api-challenge-open.yaml @@ -9,8 +9,8 @@ post: instead of the main challenge URL. Open challenges expire after 24h. If the challenge creation is [authenticated with OAuth2](/#description/authentication), - then you can use the [challenge cancel endpoint](#tag/challenges/post/apichallengechallengeidcancel) to cancel it. - To directly pair 2 known players, use [this endpoint](#tag/bulk-pairings/get/apibulk-pairing) instead. + then you can use the [challenge cancel endpoint](#tag/challenges/POST/api/challenge/{challengeId}/cancel) to cancel it. + To directly pair 2 known players, use [this endpoint](#tag/bulk-pairings/GET/api/bulk-pairing) instead. tags: - Challenges security: [] diff --git a/doc/specs/tags/challenges/api-challenge-username.yaml b/doc/specs/tags/challenges/api-challenge-username.yaml index 24f14054..0c0186f4 100644 --- a/doc/specs/tags/challenges/api-challenge-username.yaml +++ b/doc/specs/tags/challenges/api-challenge-username.yaml @@ -3,7 +3,7 @@ post: summary: Create a challenge description: | Challenge someone to play. The targeted player can choose to accept or decline. - If the challenge is accepted, you will be notified on the [event stream](#tag/board/get/apiboardgamestreamgameid) + If the challenge is accepted, you will be notified on the [event stream](#tag/board/GET/api/board/game/stream/{gameId}) that a new game has started. The game ID will be the same as the challenge ID. Challenges for realtime games (not correspondence) expire after 20s if not accepted. To prevent that, use the `keepAliveStream` flag described below. diff --git a/doc/specs/tags/externalengine/api-external-engine-work.yaml b/doc/specs/tags/externalengine/api-external-engine-work.yaml index 7a6e897b..aad01469 100644 --- a/doc/specs/tags/externalengine/api-external-engine-work.yaml +++ b/doc/specs/tags/externalengine/api-external-engine-work.yaml @@ -12,7 +12,7 @@ post: have been registered with the given `secret`. Uses long polling. After acquiring a request, the provider should immediately - [start streaming the results](#tag/External-engine/operation/apiExternalEngineSubmit). + [start streaming the results](#tag/external-engine/POST/api/external-engine/workid). requestBody: description: Provider credentials. required: true diff --git a/doc/specs/tags/games/api-import.yaml b/doc/specs/tags/games/api-import.yaml index 1aee61b1..956e0e98 100644 --- a/doc/specs/tags/games/api-import.yaml +++ b/doc/specs/tags/games/api-import.yaml @@ -4,7 +4,7 @@ post: description: | Import a game from PGN. See . Rate limiting: 200 games per hour for OAuth requests, 100 games per hour for anonymous requests. - To broadcast ongoing games, consider [pushing to a broadcast instead](#tag/broadcasts/post/apibroadcastroundbroadcastroundidpush). + To broadcast ongoing games, consider [pushing to a broadcast instead](#tag/broadcasts/POST/api/broadcast/round/{broadcastRoundId}/push). To analyse a position or a line, just construct an analysis board URL (most standard tags supported if URL-encoded): [https://lichess.org/analysis/pgn/e4_e5_Nf3_Nc6_Bc4_Bc5_Bxf7+](https://lichess.org/analysis/pgn/e4_e5_Nf3_Nc6_Bc4_Bc5_Bxf7+) tags: diff --git a/doc/specs/tags/games/api-stream-games-streamId-add.yaml b/doc/specs/tags/games/api-stream-games-streamId-add.yaml index 7041618d..cca242df 100644 --- a/doc/specs/tags/games/api-stream-games-streamId-add.yaml +++ b/doc/specs/tags/games/api-stream-games-streamId-add.yaml @@ -2,7 +2,7 @@ post: operationId: gamesByIdsAdd summary: Add game IDs to stream description: | - Add new game IDs for [an existing stream](#tag/games/post/apistreamgamesstreamid) to watch. + Add new game IDs for [an existing stream](#tag/games/POST/api/stream/games/{streamId}) to watch. The stream will immediately outputs the games that already exists, then emit an event each time a game is started or finished. tags: - Games @@ -12,7 +12,7 @@ post: name: streamId schema: type: string - description: The stream ID you used to [create the stream](#tag/games/post/apistreamgamesstreamid). + description: The stream ID you used to [create the stream](#tag/games/POST/api/stream/games/{streamId}). example: "myAppName-someRandomId" required: true requestBody: diff --git a/doc/specs/tags/games/api-stream-games-streamId.yaml b/doc/specs/tags/games/api-stream-games-streamId.yaml index 6b1c0070..6afbf152 100644 --- a/doc/specs/tags/games/api-stream-games-streamId.yaml +++ b/doc/specs/tags/games/api-stream-games-streamId.yaml @@ -6,7 +6,7 @@ post: The stream first outputs the games that already exists, then emits an event each time a game is started or finished. Games are streamed as [ndjson](#description/streaming-with-nd-json). Maximum number of games: 500 for anonymous requests, or 1000 for [OAuth2 authenticated](/#description/authentication) requests. - While the stream is open, it is possible to [add new game IDs to watch](#tag/games/post/apistreamgamesstreamidAdd). + While the stream is open, it is possible to [add new game IDs to watch](#tag/games/POST/api/stream/games/{streamId}/add). tags: - Games security: [] diff --git a/doc/specs/tags/oauth/oauth.yaml b/doc/specs/tags/oauth/oauth.yaml index ceee8cee..2685f534 100644 --- a/doc/specs/tags/oauth/oauth.yaml +++ b/doc/specs/tags/oauth/oauth.yaml @@ -38,7 +38,7 @@ get: returned `state` matches the `state` you originally generated. Finally, continue by using the authorization code to - [obtain an access token](#tag/oauth/post/apitoken). + [obtain an access token](#tag/oauth/POST/api/token). parameters: - in: query name: response_type diff --git a/doc/specs/tags/puzzles/api-puzzle-batch-angle.yaml b/doc/specs/tags/puzzles/api-puzzle-batch-angle.yaml index 9f2131a5..d04ecca2 100644 --- a/doc/specs/tags/puzzles/api-puzzle-batch-angle.yaml +++ b/doc/specs/tags/puzzles/api-puzzle-batch-angle.yaml @@ -97,7 +97,7 @@ post: description: | When > 0, the response includes a new puzzle batch with that many puzzles. - This is equivalent to calling [/api/puzzle/batch/{angle}](#tag/Puzzles/operation/apiPuzzleBatchSelect), + This is equivalent to calling [/api/puzzle/batch/{angle}](#tag/puzzles/GET/api/puzzle/batch/{angle}), and can sometimes save a request. schema: type: integer diff --git a/doc/specs/tags/swisstournaments/api-swiss-id-edit.yaml b/doc/specs/tags/swisstournaments/api-swiss-id-edit.yaml index b0f148ad..3487ebdc 100644 --- a/doc/specs/tags/swisstournaments/api-swiss-id-edit.yaml +++ b/doc/specs/tags/swisstournaments/api-swiss-id-edit.yaml @@ -89,7 +89,7 @@ post: type: integer description: | How long to wait between each round, in seconds. - Set to 99999999 to manually schedule each round from the tournament UI, or [with the API](#tag/Swiss-tournaments/operation/apiSwissScheduleNextRound). + Set to 99999999 to manually schedule each round from the tournament UI, or [with the API](#tag/tournaments-swiss/POST/api/swiss/{id}/schedule-next-round). If empty or -1, a sensible value is picked automatically. enum: - -1