[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 Oct 4 18:30:40 UTC 2017


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

Comment (by joehoyle):

 38131.4.diff looks good to me. Questions I asked @kadamwhite just for a
 log:

 - Does this work with `_envelope`? Yes, it does.
 - Is there an issue if you pass a field that doesn't exist? No.
 - Should we include `_links` regardless of requested data? Given this is
 opt-in behavior we want to allow people to get super tiny responses,
 `_links` can be bigger than the actual response.

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


More information about the wp-trac mailing list