WordPress Rest API
-
Hallo,
I have understood from https://developer.wordpress.org/rest-api/ that the REST API feature is enabled by default for any WP site. Whenever I try to launch a GET request to https://ledonnevisibili.wordpress.com/wp-json/ (or any other equivalent, like ‘/?rest_route=’ or ‘wp-json/wp/v2’ and so on, I do not receive any JSON response, but just the HTML not found page. If I launch a GET request to https://www.wordpress.org/wp-json/ instead, a JSON response can be obtained correctly.
I have browsed the documentation for WordPress REST API extensively, but there is no mention of the following:
– for what wordpress sites is it supposed to work?
– Will it work just for sites on paid plans?
– Will it work on free wordpress sites, like mine using a subdomain
– In order to use the WordPress REST API, should I enable it somewhere and in case yes, where? On the wp-admin or where?I am looking forward to reading your replies to all my questions.
Cheers,
Anna Costalonga for ledonnevisibili.wordpress.com -
Hi Anna!
REST API you read about at https://developer.wordpress.org/rest-api/ refers to the self-hosted sites created with WordPress.org software.
For WordPress.com the resources are here https://developer.wordpress.com/docs/api/ and the URL structure on WordPress.com is slightly different than for self-hosted sites (see this post for more details https://developer.wordpress.com/2016/11/11/wordpress-rest-api-on-wordpress-com/)
The above links should answer your questions, but you can contact our developer support team directly at https://developer.wordpress.com/contact/
I hope that cleared things up. Come back if you have questions.
- L'argomento ‘WordPress Rest API’ è chiuso a nuove risposte.