[wp-trac] [WordPress Trac] #63928: Add additional fields to the `/wp-json/wp/v2/comments` endpoints

WordPress Trac noreply at wordpress.org
Wed Sep 10 22:24:28 UTC 2025


#63928: Add additional fields to the `/wp-json/wp/v2/comments` endpoints
--------------------------------------+------------------------------
 Reporter:  hannahtinkler             |       Owner:  hannahtinkler
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  REST API                  |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+------------------------------

Comment (by crazytonyli):

 > The up link contains the parent post, so setting ?_embed (or
 ?_embed[]=up) will bring the post's details in too

 That's a nice solution. I was not aware of the `_embed` query. However, in
 practice, using that query would dramatically increase the response body
 size: 2x for short posts, and it could be worse for relatively long posts.
 That probably won't be the first solution that I'd choose for the mobile
 app.

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


More information about the wp-trac mailing list