Problem
MediaWiki's Action API. Does not allow complex queries beyond the parameters that are provided. For instance, you cannot query by other fields, nor can you change the order, or do aggregation queries. This limitation can create a huge number of issues when clients must request data in inefficient ways or implement a work around.
Examples:
T180153: API:Usercontribs should allow clients to order by timestamp
T180080: MediaWiki API does not support parallel pagination
T180156: Interaction Timeline should make simpler requests to determine if pages have been edited
Example Queries
- A Paginated response of all revisions (as well as deleted revisions that the requesting user has access to) that are from pages that User:Apples and User:Bananas have ever edited.
Solution
Implement an API specification like SPARQL (spec) or GraphQL (spec, implementations) that allow for complex data queries. This would also resolve T180096.
Work Around
The work-around is to Create Your Own API™ on Toolforge that queries the Replicas. This is an anti-pattern because it forces tools to be created simply because the API is not flexible enough for the use-case. It also forces duplicate work as multiple tools may create similar APIs for similar requests.
If you need data that is not available in the Replicas (i.e. data that requires authentication) then there is no work-around to this issue.
Examples:
T184146: Sub-epic ⚡️ : Create an API service for InteractionTimeline