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

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

Description

NOTE: Although this endpoint is deprecated, it is still being called. We therefore need to create a REST implementation for it, including the deprecated "id" value in the response

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

  • endpoint implemented
  • tests created
  • tests pass

Endpoint summary:
Create a new list entry.

Endpoint description:
Creates a new list entry in the given list. On conflict, does nothing and returns the data of an existing list.
The list must belong to the current user and the request must be authenticated with a MediaWiki session cookie.
Stability: unstable
This endpoint is deprecated and might be removed without warning. Use the batch version instead.

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

Associated Action API code
ApiReadingListsCreateEntry
ApiReadingListsCreateEntryTest

Parameters:

name source required type example default possible values description
id path yes integer 42 N/A N/A
csrf_token query yes string f63c343876da566045e6b59c4532450559c828d3+\\ N/A N/A The CRSF edit token provided by the MediaWiki API

Request Body:
list_entry_write

Error Response

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

Success Response

value type description
id integer List entry ID. Deprecated, will be removed. Use the full entry object instead.
entry object of list_entry_read

Response Headers

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

headers:
  content-type: application/json; charset=utf-8

Event Timeline

Restricted Application added a subscriber: Aklapper . · View Herald Transcript
BPirkle renamed this task from Reading List REST Interface: create lists/{id}/entries POST endpoint to Reading List REST Interface: POST 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)