Page MenuHomePhabricator

Create REST API example extension
Closed, ResolvedPublic1 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.Sep 10 2019, 5:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2019, 5:37 PM
BPirkle triaged this task as Normal priority.Sep 10 2019, 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.)

eprodromou closed this task as Resolved.Wed, Oct 23, 9:04 PM

This seems done. If we want to enhance it further, let's do that in separate tickets.