What is /wp-json?

I know about the REST API and I know what JSON is. My understanding is that to properly use the REST API right now it requires that the official plugin be installed. However when I hit the above directory even on sites that do not have the plugin installed I get data back.

What is generating this? Is this relatively new or has this been in place for a while?

1
1

That’s the root URL for the REST API. All WordPress installs have it, but in 4.6 very few endpoints exist, mostly oembed and plugins. The core infrastructure for the REST API has been available since 4.5, with functions such as register_rest_route being available.

/wp-json itself is generating discovery data, listing the various available endpoints. You may notice a large number of endpoints if you have for example Jetpack

It’s the content endpoints that require the WP API plugin, these are slated to be merged in with the 4.7 release

Leave a Comment