[wp-meta] [Making WordPress.org] #2112: Review API endpoints

Making WordPress.org noreply at wordpress.org
Thu Oct 6 00:19:29 UTC 2016


#2112: Review API endpoints
------------------------------+--------------------------------------
 Reporter:  tellyworth        |      Owner:
     Type:  task              |     Status:  new
 Priority:  normal            |  Milestone:  Plugin Directory v3 - M8
Component:  Plugin Directory  |   Keywords:
------------------------------+--------------------------------------
 Copied from https://meta.trac.wordpress.org/ticket/1579#comment:13 -

 We need

 * A stand alone PHP script which reads the WordPress postmeta table to
 perform updates
 * (ideally) A stand alone PHP script which can handle the
 plugin_information requests & /hello-dolly.json requests. I'd probably
 suggest we should just cache a full response from the REST API (/wp-
 json/plugins/v1/plugin/hello-dolly/) and handle the fields and conditional
 wp_version checks, as well as the output format (PHP serialized, XML, and
 JSON) in that handler
 * A REST API Endpoint which can be used for the hot_tags endpoint
 * A REST API Endpoint which can be used for the query_plugins endpoints,
 this mostly wraps WP_Query but has a lot of random and weird logic burried
 in it

 Loading WordPress for all these requests isn't going to be viable, but for
 some we'll have little choice.

 * The update handler should most definitely not load WordPress at all.
 * The hot_tags handler could just cache the result of the WordPress
 endpoint, so it doesn't require * loading WordPress often.
 * The plugin_information handler would be a good one to cache, and not hit
 WordPress on, as it's requested often enough and accounts for a
 significant amount of the api traffic.
 * The plugin_information handler via hello-dolly.json should be made
 cacheable, that means it should only use the data contained within the URL
 for the response, fetching the WordPress version from the user_agent isn't
 viable

 Task - review above, and create tickets for anything missing or broken.
 Those tickets probably belong in Milestone 8.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2112>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list