Page MenuHomePhabricator

Create REST API example extension
Open, NormalPublic1 Story Points

Description

It would be helpful to have sample code for an extension that supports our new REST API. This would be useful not only to extension developers, but for internal documentation and discussion.

Create an example extension that exposes example REST API endpoints.

Event Timeline

BPirkle created this task.Tue, Sep 10, 5:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptTue, Sep 10, 5:37 PM
BPirkle triaged this task as Normal priority.Tue, Sep 10, 5:41 PM
BPirkle set the point value for this task to 1.

Could this be part of the Example extension? (However also see T156568)

@Aklapper , good idea, quite possibly it eventually should be. However, the REST API is still experimental and formative. For example, T232485 could still affect all routes. So I'd rather wait until it is a little more solid.

For now, I've posted a first cut on my personal github: https://github.com/bpirkle/RestApiExample

I'd like to add a few more endpoints to demonstrate things like query parameters, POSTs, etc. But this is at least a start and will hopefully be helpful to @apaskulin for writing documentation.

(Once this has happened it should probably also be added as an item in T225761: Document the REST API on mediawiki.org.)