Skip to content

Latest commit

 

History

History
134 lines (94 loc) · 3.15 KB

endpoints.md

File metadata and controls

134 lines (94 loc) · 3.15 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)

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

Settings

  • GET /settings
  • POST /settings