WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#47620 new feature request

REST API: Expose blocks registered on the server

Reported by: gziolo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.0
Component: REST API Keywords:
Focuses: rest-api Cc:
PR Number:

Description (last modified by gziolo)

Related post:

https://make.wordpress.org/core/2019/05/27/the-block-registration-api-status-update/

Related GitHub issue:

https://github.com/WordPress/gutenberg/issues/2751

Related Block Registration API technical proposal with all the necessary details is available at:

https://github.com/WordPress/gutenberg/blob/master/docs/rfc/block-registration.md

The long term vision for the block discovery in WordPress includes:

  • Fetching the available block types through REST APIs.
  • Fetching block objects from posts through REST APIs.

There is no immediate need to start working on new block type related API endpoints. However, it would be great to have it included on the roadmap. Ideally, they should stay as close as possible to the WordPress.org API and the final shape of the endpoint for searching for blocks. This is going to be introduced as part of the Block Directory project.

Change History (4)

#1 @gziolo
4 months ago

  • Description modified (diff)

#2 @SergeyBiryukov
4 months ago

  • Component changed from General to Editor

#3 @spacedmonkey
4 months ago

  • Component changed from Editor to REST API
  • Version set to 5.0

Thanks for the ticket @gziolo .

I have some questions.

  • What fields should be exposed in the api?
  • What permissions should be required to access this fields?
  • What filter is required? Filter by namespace? Filter by full name? Is search required?

Can someone loop someone from the mobile team into this ticket to give feedback.

CC @aduth

Note: See TracTickets for help on using tickets.