Skip to content

Latest commit

 

History

History
157 lines (110 loc) · 3.8 KB

endpoints.md

File metadata and controls

157 lines (110 loc) · 3.8 KB

List of WP-API endpoints

List of WP-API REST endpoints and implementation status

Attachments / Media

  • GET /media
  • POST /media
  • GET /media/[id]
  • PUT /media/[id] (Unknown if supported)
  • DELETE /media/[id] (requires define( 'MEDIA_TRASH', true ); in wp_config.php, see: WP-API/WP-API#1493)

Comments

  • GET /comments
  • POST /comments (Implemented but untested)
  • GET /comments/[id]
  • PUT /comments/[id] (Implemented but untested)
  • DELETE /comments/[id] (Implemented but untested)

Meta

  • GET /[parent_base]/[parent_id]/meta
  • POST /[parent_base]/[parent_id]/meta
  • GET /[parent_base]/[parent_id]/meta/[id]
  • PUT /[parent_base]/[parent_id]/meta/[id]
  • DELETE /[parent_base]/[parent_id]/meta/[id]

[parent_base] = "posts" | "pages"

Meta Posts

  • GET /posts/[post_id]/meta
  • POST /posts/[post_id]/meta
  • GET /posts/[post_id]/meta/[id]
  • PUT /posts/[post_id]/meta/[id]
  • DELETE /posts/[post_id]/meta/[id]

Meta Pages

  • GET /pages/[post_id]/meta
  • POST /pages/[post_id]/meta
  • GET /pages/[post_id]/meta/[id]
  • PUT /pages/[post_id]/meta/[id]
  • DELETE /pages/[post_id]/meta/[id]

Post Statuses

  • GET /statuses
  • GET /statuses/[slug]

Post Types

  • GET /types
  • GET /types/[slug]

Posts

  • GET /posts
  • POST /posts
  • GET /posts/[id]
  • PUT /posts/[id]
  • DELETE /posts/[id]

Pages

  • GET /pages
  • POST /pages
  • GET /pages/[id]
  • PUT /pages/[id]
  • DELETE /pages/[id]

Post Terms

  • GET /[post_base]/[post_id]/terms/[tax_base]
  • GET /[post_base]/[post_id]/terms/[tax_base]/[term_id]
  • POST /[post_base]/[post_id]/terms/[tax_base]/[term_id]
  • DELETE /[post_base]/[post_id]/terms/[tax_base]/[term_id]

[post_base] = "posts" [tax_base] = "tag" | "category"

Post Terms Tag

  • GET /posts/[post_id]/terms/tag
  • GET /posts/[post_id]/terms/tag/[term_id]
  • POST /posts/[post_id]/terms/tag/[term_id]
  • DELETE /posts/[post_id]/terms/tag/[term_id]

Post Terms Category

  • GET /posts/[post_id]/terms/category
  • GET /posts/[post_id]/terms/category/[term_id]
  • POST /posts/[post_id]/terms/category/[term_id]
  • DELETE /posts/[post_id]/terms/category/[term_id]

Revisions

  • GET /[parent_base]/[parent_id]/revisions
  • GET /[parent_base]/[parent_id]/revisions/[id]
  • DELETE /[parent_base]/[parent_id]/revisions/[id]

[parent_base] = "posts" | "pages"

Revisions Posts

  • GET /posts/[parent_id]/revisions
  • GET /posts/[parent_id]/revisions/[id]
  • DELETE /posts/[parent_id]/revisions/[id]

Revisions Pages

  • GET /pages/[parent_id]/revisions
  • GET /pages/[parent_id]/revisions/[id]
  • DELETE /pages/[parent_id]/revisions/[id]

Taxonomies

  • GET /taxonomies
  • GET /taxonomies/[slug]

Terms

  • GET /terms/[tax_base]
  • POST /terms/[tax_base]
  • GET /terms/[tax_base]/[id]
  • PUT /terms/[tax_base]/[id]
  • DELETE /terms/[tax_base]/[id]

[tax_base] = "tag" | "category"

Tag Terms

  • GET /terms/tag
  • POST /terms/tag
  • GET /terms/tag/[id]
  • PUT /terms/tag/[id]
  • DELETE /terms/tag/[id]

Category Terms

  • GET /terms/category
  • POST /terms/category
  • GET /terms/category/[id]
  • PUT /terms/category/[id]
  • DELETE /terms/category/[id]

Users

  • GET /users
  • POST /users
  • GET /users/[id]
  • PUT /users/[id]
  • DELETE /users/[id]
  • GET /users/me