Page MenuHomePhabricator

Write an API for accessing the Community configuration
Closed, ResolvedPublic3 Estimated Story Points

Description

To make it possible for non-MediaWiki software (such as the Wikipedia mobile apps) to work with (and/or respect) Community configuration 2.0, there needs to be an API that supports reading the available configuration.

This API can then be used by mobile apps, gadget authors and similar to customize their behavior based on Community configuration. The API should also be as stable as possible (without being impacted by config schema changes). It should also ensure the returned configuration is valid.

Acceptance Criteria
  • An API that exposes the currently available configuration

Event Timeline

Urbanecm_WMF set the point value for this task to 3.Feb 22 2024, 11:22 AM
Sgs lowered the priority of this task from High to Medium.Mar 14 2024, 6:32 PM

Change #1027132 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/CommunityConfiguration@master] Add ApiQueryRead for reading the configuration

https://gerrit.wikimedia.org/r/1027132

Change #1027158 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/CommunityConfiguration@master] Support dynamic defaults

https://gerrit.wikimedia.org/r/1027158

Urbanecm_WMF raised the priority of this task from Medium to High.May 5 2024, 4:06 PM
Urbanecm_WMF added a subscriber: Dogu.

Change #1027132 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Add ApiQueryRead for reading the configuration

https://gerrit.wikimedia.org/r/1027132

Etonkovidova subscribed.

Checked on beta - works as expected, e.g. https://es.wikipedia.beta.wmflabs.org/wiki/Especial:Zona_de_pruebas_de_la_API#action=query&format=json&prop=&list=&meta=communityconfiguration&formatversion=2&ccrprovider=HelpPanel
displays:

{
    "batchcomplete": true,
    "communityconfiguration": {
        "data": {
            "GEHelpPanelAskMentor": "mentor-talk-page",
            "GEHelpPanelExcludedNamespaces": [],
            "GEHelpPanelHelpDeskPostOnTop": "top",
            "GEHelpPanelHelpDeskTitle": "",
            "GEHelpPanelLinks": [],
            "GEHelpPanelReadingModeNamespaces": [],
            "GEHelpPanelSearchNamespaces": [],
            "GEHelpPanelViewMoreTitle": ""
        }
    }
}