-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add block data to REST API (post) response data #4763
Comments
Noting that we want to be very clear about what is and is not capable of being parsed by the server currently. Namely, the PHP implementation of the post grammar for blocks only returns serialized block attributes, and does not return any other
|
Does this need to require authentication? |
This should also probably be opt in somehow. Also, I think we should look at extending |
If anyone is looking for this right now. I'm putting a PoC extension plugin together here: It adds both some endpoints to grab block data directly without any of the other data for the post, and adds in a new field to default |
Closing in favor of #8352. The decision on whether or not to do this will be handled on that issue. |
Issue Overview
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: #2649
The text was updated successfully, but these errors were encountered: