WP-API/WP-API — pull request #40 by rmccue (2013-12-16 21:18:28+00:00)
Title: API discovery ala RSD

As a developer of API clients, I'd really love a proper API discovery mechanism for WP-API. The XML-RPC API uses RSD, which allows clients to do an algorithm like:

1. Ask user for their blog URL
2. `GET` that URL and find the `` tag.
3. Extract the `href` from that `` and `GET` it.
4. Parse the RSD file to determine which endpoints are supported and preferred.

Of course, sometimes overzealous theme authors will strip this default `` tag and we have to fallback to blindly checking `/xmlrpc.php?rsd`, but fortunately that's not too common.

My recommendation is that WP-API do (at least) one of the following:

1. Add itself to the existing RSD file. This makes it easy for existing XML-RPC clients to "upgrade" to the JSON API when available, though it still means dealing with XML which is a pain.
2. Add a new `` tag to the blog `

` that clients can look for.
3. Send a new HTTP header on WP page responses with the path to the API
4. ???

Blindly searching for `/wp-json.php` or some rewrite-rule variant should really be avoided if at all possible.