Custom routes under prc-revisions/v1. Source: includes/class-rest-api.php.
Base path: /wp-json/prc-revisions/v1/
Auth summary
| Access | Routes |
|---|---|
| Public | GET /public-revisions/{post_id} |
edit_post | Toggle, fork create, fork-info |
edit_post + delete_post on fork | Discard fork (DELETE) |
Route index
| Method | Path | Description |
|---|---|---|
GET | /public-revisions/{post_id} | Public versions (letter, date, author, URL, orphaned) |
POST | /toggle/{post_id}/{revision_id} | Toggle public; { action, version, url } |
POST | /fork/{post_id} | Create fork draft; 409 if active fork exists |
DELETE | /fork/{post_id} | Trash pending fork (parent or fork ID) |
GET | /fork-info/{post_id} | Role parent / fork / none and related IDs |
Request
POST
/wp-json/prc-revisions/v1/toggle/42/789
HeadersKey: value
X-WP-Nonce {nonce}Content-Type application/json
Response
200 OK
Response headers
Key: value
BodyJSON
{
"action": "added",
"version": "a",
"url": "https://example.org/my-post/version/a"
}