REST API: Decision on Introducing a dashboard namespace

In Introduce a dashboard namespace the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) team proposed introducing a dashboard namespace to house dashboard specific endpoints like Site Health and the CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.. Based on the feedback received on the post, as well as in the #core-restapi slackSlack Slack is a Collaborative Group Chat Platform The WordPress community has its own Slack Channel at channel, the REST API team has decided on giving major features their own namespace. For example, wp-site-health and wp-customize.

Many contributors felt that relegating these endpoints to a dashboard namespace did a disservice to the features and made them harder to discover. Additionally, it may suggest to third-party developers that these endpoints are strictly internal, even though the endpoints would be useful outside of WP-Adminadmin (and super admin).

The wp/$FEATURE/v1 pattern was suggested a number of times. However, using a wp-$FEATURE prefix allows us to maintain the recommended pattern of <prefix>/v<version>.

Namespaces are prefixed with wp so that pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the Plugin Directory or can be cost-based plugin from a third-party developers don’t have to worry that any namespace they pick could eventually be reappropriated by WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..

For any future smaller endpoints that don’t need their own dedicated namespace, for instance Community Events, they’ll use the dashboard/v1 pattern.