Carlos José (@carlosxjm)
Mobile applications
Simple page applications
"This plugin provides an easy to use REST API, available via HTTP. Grab your site’s data in simple JSON format, including users, posts, taxonomies and more. Retrieving or updating data is as simple as sending a HTTP request."
- V1.0 deprecated
- V2.0 beta plugin (WP 4.4+)
- "The REST API is included in WP 4.7 (DEZ.2016)"
- /wp-json/wp/v2/posts
- /wp-json/wp/v2/posts/1
- GET
- POST
- PUT
- DELETE
- GET -> /wp-api/wp/posts
- POST ->/wp-api/wp/posts {data} --> Auth
- PUT -> /wp-api/wp/posts/1 {data} --> Auth
- DELETE -> /wp-api/wp/posts/1 --> Auth
- GET -> /wp-api/wp/posts --> WP_Query
- GET -> /wp-api/wp/posts/1 --> get_post()
- POST ->/wp-api/wp/posts {data} --> wp_insert_post()
- PUT -> /wp-api/wp/posts/1 {data} --> wp_update_post()
- DELETE -> /wp-api/wp/posts/1 --> wp_delete_post()
- In header: X-WP-Total, X-WP-TotalPages;
- Max 100 results;
- Cookie
- OAuth
Text
Text
- Use JSON Schema;
- http://json-schema.org/
- https://spacetelescope.github.io/understanding-json-schema/index.html
goo.gl/fYIJM8