Description
When querying the Wikimedia Campaign Events API to retrieve public participants for an event, the response seems to be limited to a maximum of 20 participants, even when there are more than 20 registered.
In MediaWiki Core APIs, parameters like cmlimit and maxlimit allow developers to specify higher limits when retrieving data (e.g., category members). Implementing a similar approach in the Campaign Events API would improve efficiency.
Details
- Endpoint used: https://meta.wikimedia.org/w/rest.php/campaignevents/v0/event_registration/{event_id}/participants?include_private=false
- Event ID used: 1333
- Parameter used: include_private=false
- Expected behavior: Return all public participants or provide a pagination mechanism.
- Current behavior: Only 20 participants are returned, with no pagination information.
Example API response (generic participant data)
(LIMIT 20 PARTICIPANTS)
{
"participant_id": XXXXXX,
"user_id": XXXXXX,
"user_registered_at": "YYYYMMDDHHMMSS",
"user_registered_at_formatted": "HH:MM, DD Month YYYY",
"private": false,
"user_name": "ExampleUser",
"user_page": {
"path": "/w/index.php?title=User:ExampleUser",
"title": "User:ExampleUser",
"classes": "mw-userlink"
}Request for Improvement
Could an optional limit parameter be added to retrieve more than 20 participants per request?
In MediaWiki Core, APIs like categorymembers support cmlimit and maxlimit for flexible pagination. Could a similar parameter be implemented here?
If the 20-participant limit is intentional, could the reasoning be documented?
Are there performance concerns preventing an increased page size?
Proposed Solution
If feasible, allowing a limit parameter (e.g., limit=50) with a defined maxlimit would improve efficiency when handling large participant lists. Otherwise, clarifying the restriction in the API documentation would help developers optimize their queries accordingly.
Thank you for considering this request.