Search code examples
jsonwordpressopenshift

Wordpress JsonAPI - /wp-json/ was not found on this server


I am using the following plugin Json Rest API.

To test the plugin the documentation states that I should just use:

$ curl -i http://testpress-maxximus.rhcloud.com/wp-json/
HTTP/1.1 404 Not Found
Date: Sat, 24 May 2014 07:01:21 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 303
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /wp-json/ was not found on this server.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at testpress-maxximus.rhcloud.com Port 8
0</address>
</body></html>

As you can see nothing is found by the URL. Any recommendations if there is a problem with the API or wordpress?

I appreciate your reply


Solution

  • The current version of REST api for sites with pretty permalinks not enabled, the url

        yoursite.com/?rest_route=/ 
    

    will work .