[wp-trac] [WordPress Trac] #38131: REST API: Provide interface to include or exclude specific fields from response JSON

WordPress Trac noreply at wordpress.org
Wed Apr 26 21:53:56 UTC 2017


#38131: REST API: Provide interface to include or exclude specific fields from
response JSON
-------------------------+-----------------------------
 Reporter:  kadamwhite   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  REST API     |     Version:  4.4
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  performance
-------------------------+-----------------------------

Comment (by adamsilverstein):

 [attachment:38131.2.diff] is a refresh of .1 against trunk with the
 following changes:
 * trim the parameters so whitespace is ignored
 * bail early if the parameter passes no fields (`?fields=`)
 * slight docs update

 @kadamwhite I agree we should support all request types. Also, I think
 should exclude `_links` when `_fields` are passed.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38131#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list