Make WordPress Core

Opened 6 years ago

Last modified 3 months ago

#5310 assigned enhancement

XMLRPC interface should expose mechanism for listing and deleting media resources

Reported by: redsweater Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.3.1
Component: XML-RPC Keywords: needs-patch good-first-bug
Focuses: Cc:


Right now the XMLRPC interface supports the "newMediaObject" mechanism that is part of the MetaWeblog API, but lacks any method for inspecting or otherwise manipulating media objects.

I think to support a richer remote client experience, the XLMRPC interface should support at least a method for listing the media objects that have been previously uploaded (similar to what appears in the "Browse" tab of the wp-admin post editor), and for deleting a media asset that is present.

Change History (7)

comment:1 josephscott6 years ago

  • Cc josephscott added

comment:2 Denis-de-Bernardy5 years ago

itching to move this in Media

comment:3 westi4 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.9 to Future Release

Needs a patch.

Moving to Future Release for now.

comment:4 follow-up: johnbillion3 months ago

  • Keywords good-first-bug added

We now have a method for listing items in the media library (wp.getMediaLibrary) but still none for deleting media items.

comment:5 in reply to: ↑ 4 maxcutler3 months ago

Replying to johnbillion:

... but still none for deleting media items.

Actually, since media items are really just a post type, you can use wp.deletePost method to delete them. Likewise, you can use wp.editPost to modify most of the media item fields (except image and alt-text, the latter of which is a protected meta).

It might be nice to have a simple wrapper to make this more obvious to new users, or else add some documentation to the Codex.

comment:6 markoheijnen3 months ago

That was exactly the reason why it wasn't added in 3.4 or 3.5

comment:7 nacin3 months ago

  • Owner josephscott deleted
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.