BuddyPress 5.0 Introduces BP REST API, Paving the Way for Blocks

BuddyPress 5.0.0 “Le Gusto” was released this week with the long-awaited BP REST API, a new Invitations API, and BuddyPress info on the Site Health screen. The release was named for a favorite pizza restaurant in Fortaleza, Brazil, where BP REST API contributor and core committer Renato Alves resides.

The new REST API is fully documented and includes endpoints for members, groups, activities, private messages, screen notifications and extended profiles.

The first feature powered by the new API is an improved interface for managing group members. It enables administrators to quickly search for specific members to promote, demote, ban, or remove.

BuddyPress 5.0 also includes a new BP Invitations API to help developers better manage group invites and membership requests.

BuddyPress site administrators may notice a new panel in the Site Health Info screen, containing plugin-specific debug information that may be useful when seeking help in the forums.

This release updates the BP Nouveau template pack to use the same password control as the one used in WordPress core. It provides a more consistent interface for users when setting their passwords on the registration page and on the user’s general settings page.

Blocks Are Coming to BuddyPress

The BP REST API offers a myriad of opportunities for developers to create new interactive features and front-end experiences, as well as improve performance by replacing AJAX calls. It also opens up the world of block creation. BP core contributors and community developers will have a much easier time creating blocks, since Gutenberg mainly uses REST.

In anticipation of BP blocks, 5.0 includes a new panel in the block inserter that allows developers to organize their custom blocks under a BuddyPress category.

BuddyPress 6.0 may include core blocks for specific components and core blocks may ultimately replace the plugin’s existing widgets. Contributors are still discussing which blocks to begin building. They are looking to get community feedback on blocks that will be the most useful, particularly from BuddyPress theme developers. The team plans to discuss 6.0 release priorities during the BP core dev chat on October 2, 2019, at 1900 UTC.

BuddyPress 5.0 to Introduce BP REST API, First Beta Due Mid-August

BuddyPress 5.0 is on track to introduce a new BP REST API, which has been in development as a feature plugin on GitHub since 2016. Contributors plan to merge the API with 14 endpoints for popular components like activity updates, groups, members, private messages, and extended profile fields. Another eight endpoints for blogs, friends, and other features, are planned to ship in BuddyPress 6.0.0.

The first major use of the BP REST API inside BuddyPress is a new group management interface that enables administrators to quickly search for specific members to promote, demote, ban, or remove. BuddyPress contributor Mathieu Viet shared a demo of what users can expect from the new interface on both the frontend and the backend.

Contributors are still discussing how to include the BP REST API into the BuddyPress plugin package, whether they should continue maintaining it on GitHub until all the endpoints are finished and include it during the BuddyPress plugin’s build process, or merge it into BuddyPress core and use Trac. GitHub is more convenient for development but some expressed concerns about fragmenting the history of the API’s development on two platforms.

BuddyPress lead developer Boone Gorges said in a recent dev chat that shipping the BP REST API without documentation is a blocker. Contributors are now working on a new documentation site. Since version 5.0.0 will be more of a developer-oriented release, Viet suggested contributors take the opportunity to set up developer.buddypress.org with similar resources as WordPress has on its DevHub project. He is looking for feedback on his proposal for automatically generating the documents from the REST schemas of the API’s endpoints and further customizing it for integration into the broader developer.buddypress.org site.

BuddyPress contributors are targeting August 15 for releasing 5.0.0 beta 1 and will discuss a date for RC further down the road. Regular dev chat meetings have resumed and are now happening every other Wednesday at 19:00 UTC in the #BuddyPress Slack channel.