한국   대만   중국   일본 
? T351154 Reading List REST Interface: GET lists/{id}/entries endpoint
Page Menu Home Phabricator

Reading List REST Interface: GET lists/{id}/entries endpoint
Closed, Resolved Public

Description

Create a REST handler and any other necessary associated code (extension.json entry, helper classes, etc.) for the GET lists/{id}/entries endpoint.

  • endpoint implemented
  • tests created
  • tests pass

Endpoint summary:
Get all entries of a given list.

Endpoint description:
Returns pages contained by the given list. Might be truncated and include a continuation token.
List must belong to current user and request must be authenticated with a MediaWiki session cookie.
Stability: unstable

Associated RESTBase code
getListEntries (code)
lists.yaml (spec+forwarding)
lists.js (tests)

The RESTBase code appears intended to hydrate the Action API response with summary values. However, these summary values are not used by the Mobile Apps, do not appear in the Open API spec, and don't appear in the actual production responses. They therefore do not need to be included in the reimplementation.

Associated Action API code
ApiQueryReadingListEntries
ApiQueryReadingListEntriesTest

Parameters:

name source required type example default possible values description
id path yes integer 42 N/A N/A
next query no string N/A N/A Continuation parameter from previous request
sort query no string updated name, updated Sort order: name : by page title, ascending; updated : by last modification date, descending.

Error Response

#/components/schemas/problem per API.md and draft-nottingham-http-problem

Success Response

value type description
entries array of list_entry_read
next string Continuation token.

Response Headers

This endpoints has additional response headers specified in the RESTBase code:

headers: {
    'content-type': 'application/json; charset=utf-8;' +
        'profile="https://www.mediawiki.org/wiki/Specs/Lists/0.1"',
    'cache-control': 'max-age=0, s-maxage=0'
},

Event Timeline

Restricted Application added a subscriber: Aklapper . · View Herald Transcript
BPirkle renamed this task from Reading List REST Interface: create lists/{id}/entries GET endpoint to Reading List REST Interface: GET lists/{id}/entries endpoint . Nov 14 2023, 2:58 AM
BPirkle updated the task description. (Show Details)

Change 988736 had a related patch set uploaded (by BPirkle; author: BPirkle):

[mediawiki/extensions/ReadingLists@master] REST Handlers for managing reading lists entries

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

Change 988736 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] REST Handlers for managing reading lists entries

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

BPirkle updated the task description. (Show Details)