Skip to content

Migrate to new Pretalx API #132

@NMertsch

Description

@NMertsch

tl;dr

Pretalx did a major update of their API. Let's migrate to the new version.

Context

Official Pretalx Release Notes

From the Pretalx Release Notes for "Next Release":

API
[Announcement] The pretalx API now supports write operations, and the format of nearly all endpoints has changed to a more consistent interface. However, all existing API tokens have been migrated and will continue to automatically use the legacy API (with some caveats), so for most API users, nothing should change immediately. You have time for one or two releases to migrate your API clients and scripts to the new API. Please refer to the API Changelog and the documentation on Endpoints and resources for further details. We thank the NLNet foundation and their NGI Zero Entrust grant for making the development work possible. (#1598)

From the Pretalx API Changelog for "v1 (2025.1.0)":

Before the API versioning outlined here, the API was read-only, and also inconsistent in many ways. The v1 API released in pretalx v2025.1.0 makes sweeping changes to the API, introduces the new auth tokens, allows organisers to use the writable API. The changes are too numerous to list here – for example, related objects were included in many places by name (e.g. a room name) instead of a reliable and fixed ID. There was no option to expand nested resources, to coerce multi-lingual strings into simple strings, and no versioning at all.

Old API tokens will continue to work and will continue to use the legacy API for the most part. Any write actions (creating and updating objects) will require you to create a new API token or to update your existing token to v1.

The only breaking change knowingly introduced in the v1 release concerns the schedule endpoint, which has changed completely. As it was an undocumented endpoint that we never advertised, the advantages of a rewrite outweighed the maintenance burden of retaining the old endpoint.

Another change to the API is in the pagination mechanism: The legacy API used pagination with a limit and offset parameter, whereas as of API v1, pretalx uses a page parameter (with an optional page_size). However, the old pagination style will continue to work for as long as the legacy API is still active. We have limited the page size to 50 now, though, as the previously unlimited page size was already resource intensive, and even more so with the more capable (but more involved) new API. If you have always used the supplied next and previous URL fields in paginated responses for navigation, this change should not affect you, as these fields are still provided.

Our experience

Our current setup is not working anymore:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions