[wp-trac] [WordPress Trac] #53603: Expose block data directly through REST API endpoints

WordPress Trac noreply at wordpress.org
Tue Jul 6 10:05:57 UTC 2021


#53603: Expose block data directly through REST API endpoints
-------------------------+-----------------------------
 Reporter:  gziolo       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Part of "PHP APIs Overview" in Gutenberg:
 https://github.com/WordPress/gutenberg/issues/8352.

 Originally reported in https://github.com/WordPress/gutenberg/issues/4763
 by @adamsilverstein.

 > Consider adding Gutenberg block data to the post endpoints - so when
 retrieving a post via the REST API you could get the block data as part of
 the content object.
 >
 > This provides a way to get the data/content of each block of a
 Gutenberg-built page from the front end. This would be very useful for
 building component based front ends, because the components could map one-
 to-one with gutenberg blocks. With these endpoints, an App could easily
 get the data it needs to render each component. This might also provide a
 patch for a standard component library matching Gutenberg blocks.
 >
 > POC PR for this: https://github.com/WordPress/gutenberg/pull/2649

 Related ticket with changes proposed to `get_posts` function: #53602.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53603>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list