L’API REST de WordPress est une interface de programmation d’applications (API) qui permet aux développeurs d’interagir avec un site WordPress de manière programmatique. Cette API utilise le style d’architecture REST (Representational State Transfer) et échange des données au format JSON (JavaScript Object Notation).
L’adresse de la documentation officielle : https://developer.wordpress.org/rest-api/
Root URL for the REST API
{{site}}/wp-json/
Posts
List Posts
{{site}}/wp-json/wp/v2/posts
Retrieve a Post
{{site}}/wp-json/wp/v2/posts/{{postId}}
List Post Revisions
{{site}}/wp/v2/posts/{{postId}}/revisions
Retrieve a Post-Revision
{{site}}/wp/v2/posts/{{parentId}}/revisions/{{revisionId}}
Médias
List Media
{{site}}/wp-json/wp/v2/media
Retrieve a Media item
{{site}}/wp-json/wp/v2/media/{{mediaId}}
Pages
List Pages
{{site}}/wp-json/wp/v2/pages
Retrieve a Page
{{site}}/wp-json/wp/v2/pages/{{pageId}}
Étiquette
List Tags
{{site}}/wp-json/wp/v2/tags
Retrieve a Tag
{{site}}/wp-json/wp/v2/tags/{{tagId}}
Types
List Types
{{site}}/wp-json/wp/v2/types
Retrieve a Type
{{site}}/wp-json/wp/v2/types/{{typeId}}?type={{type}}
Catégories
List Categories
{{site}}/wp-json/wp/v2/categories
Retrieve a Category
{{site}}/wp-json/wp/v2/categories/{{categoriesId}}
Taxonomies
Retrieve Taxonomies
{{site}}/wp-json/wp/v2/taxonomies
Retrieve a Taxonomy
{{site}}/wp-json/wp/v2/taxonomies/{{taxonomy}}
Blocks
List wp_blocks
{{site}}/wp-json/wp/v2/blocks
Retrieve a wp_block
{{site}}/wp-json/wp/v2/blocks/{{blockId}}
Retrieve a wp_block-revision
{{site}}/wp-json/wp/v2/blocks/{{blockId}}/autosaves?parent={{postId}}
Retrieve a wp_block-revision with parent
{{site}}/wp-json/wp/v2/blocks/{{parentId}}/autosaves/{{blockId}}
Retrieve a Rendered-block
{{site}}/wp-json/wp/v2/block-renderer/{{blockName}}
Comments
List Comments
{{site}}/wp-json/wp/v2/comments
Retrieve a Comment
{{site}}/wp-json/wp/v2/comments/{{commentId}}
Users
List Users
{{site}}/wp-json/wp/v2/users
Retrieve a User
{{site}}/wp-json/wp/v2/users/{{userId}}
Settings
{{site}}/wp-json/wp/v2/settings