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
Accessing all of your site data via the REST API is as simple as composing a URL. For any WordPress site running at least version 4.7, add the following string to the end of your site's url: /wp-json/wp/v2 (e.g., http://example.com/wp-json/wp/v2 ). Put that URL in your browser, and see what comes up.
What Is The WordPress JSON REST API (WP API) & How Does It Work? JSON, which stands for JavaScript Object Notation, is a lightweight data-interchange format based on a subset of the JavaScript code language. It's easy for humans to read and write and easy for machines to parse and generate.
Download the WordPress REST API Basic Auth plugin. Log in to your WordPress Dashboard and go to Plugins -> Add New. Click on the Upload Plugin button and select the plugin's zip file. Go to the Installed Plugins menu and activate the plugin from there.
Is the WordPress REST API enabled? The best way to check is to visit this URL: https://yoursite.com/wp-json. If you see some information which seems related to your WordPress REST API, it works. If you see something, it means that, at least, your WordPress REST API is enabled.
The current version of REST api for sites with pretty permalinks not enabled, the url
yoursite.com/?rest_route=/
will work .
The WordPress JSON API depends on pretty permalinks, make sure you have them enabled for the site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With