Page MenuHomePhabricator

Determine whether the "edit registration" and "get registration details" API endpoints should handle organizers
Closed, ResolvedPublic

Description

With the implementation of the multiple organizers feature (T327470), users are able to add/remove organizers via the form on Special:EnableEventRegistration and Special:EditEventRegistration. The same functionality should also be available in the REST API. This brings the question of whether the endpoints for enabling and updating event registrations should allow clients to pass a list of organizers, or whether this should be handled in a separate endpoint. Also, whether the "get details of an event" endpoint should return the list of organizers or not. In particular, note that we already have an endpoint for listing organizers.

I'm not convinced that having the same functionality in more than one endpoint is a good idea, because that could be confusing. Also, the endpoints for editing a registration already require a lot of data, and adding the list of organizer (with their roles, once that part is implemented) might be too much. A possible use case for having a single endpoint is if you need to make a change to the event info AND organizers atomically, but I don't think this will be common in practice. Note that when creating an event, the event creator would still be automatically added as an organizer.

The purpose of this task is to choose one of the following approaches and implement it:

  1. Keep everything separate, so organizers can only be modified and retrieved through dedicated endpoints
  2. Keep everything together, so organizers can only be modified with the "enable registration" and "update registration" endpoints, and can only be retrieved from the "get event details" endpoint
  3. Support both options above at the same time

Event Timeline

I think the best option would be option 1, but I think we should do it in another patch after we merge this epic to master.

Daimona claimed this task.

We discussed this last week in our weekly meeting, and the final decision was to proceed with option 1.