Breaking Changes in Lemmy 1.0

The major breaking changes for version 1.0 are already implemented. However it will still take a lot of work to implement the new features in lemmy-ui, and publish the final release. So this is a good time for developers of Lemmy clients to start adapting the new API, and suggest changes before it gets finalized.

If you use any apps, frontends or bots for Lemmy, please help us out by notifying the developers about this post.

With the new version there is all new documentation based on OpenAPI, thanks to @dessalines and @MV-GH. You can also test the new API on voyager.lemmy.ml, and with Lemmy version 1.0.0-alpha.0. Note that this server still uses lemmy-ui 0.19.8 with API v3, because lemmy-ui is not updated for the new backend version yet.

Unfortunately there is no good way to see all the API changes between 0.19 and 1.0, but you can try viewing the diff in lemmy-js-client, or see the pull requests listed below.

If you have any questions about these changes, feel free to post in !lemmy_support@lemmy.ml or in the Development Chat on Matrix. If you have suggestions for breaking API changes before the new version is finalized, open an issue.

Here are the major API changes in detail. As this is an alpha version there may be further breaking changes before the final release, but nothing major.

Rename account endpoints

Various endpoints have been renamed, especially those under /api/v3/user have been moved to /api/v4/account/auth. These changes are fully compatible as the endpoints can still be called under /api/v3.

  • /api/v3/user/register to /api/v4/account/auth/register
  • /api/v3/user/login to /api/v4/account/auth/login
  • /api/v3/user/logout to /api/v4/account/auth/logout
  • /api/v4/site doesn’t have my_user anymore, this is now available at GET /api/v4/account

https://github.com/LemmyNet/lemmy/pull/5216

Combined endpoints

There are various places in the UI where different types of data are shown together, for example posts and comments in the user profile. Until 0.19 these were queried separately, to display the (last 20 posts) and (last 20 comments). For 1.0 Dessalines implemented combined queries, so that the new endpoint /api/v4/person/content returns the last 20 (posts and comments). See the issue and linked pull requests for more details.

The combined endpoints are:

Note that the endpoints for modlog, report list and search also return combined data in API v3 on Lemmy 0.19, because making them backwards compatible would require an unreasonable amount of work.

Image endpoints

Uploading or deleting avatars, icons and banners is done through separate endpoints now. With this change it is possible to disable image uploads, while still allowing changes to avatars etc.

The endpoints for image upload and proxying have been moved to GET /api/v4/image/{filename} and GET /api/v4/image/proxy respectively.

https://github.com/LemmyNet/lemmy/pull/5260

Other Breaking Changes

This list is likely incomplete.

New Features (not breaking)

This list is definitely incomplete, and more features will be added before the final release.