2

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?

0

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

  • Thanks. That's kind of what I thought, but I couldn't find an explanation anywhere. – hcu564 Nov 17 '16 at 13:14
  • I don't think that associating it with REST API is a very good thing as that term is associated with specific end points. It is just a generic end point (doesn't even have to be a json) outside of admin, similar to the xml-rpc one. – Mark Kaplun Nov 17 '16 at 13:20
  • WP API and the content API are WP API and the content API, the REST API is the REST API, /wp-json is the root of the REST API – Tom J Nowell Nov 17 '16 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.