Post Revisions Edit
Topics
Schema Schema
The schema defines all the fields that exist for a post-revision object.
author integer |
The ID for the author of the object.
Context: |
date string, datetime ([details](https://core.trac.wordpress.org/ticket/41032)) |
The date the object was published, in the site's timezone.
Context: |
date_gmt string, datetime ([details](https://core.trac.wordpress.org/ticket/41032)) |
The date the object was published, as GMT.
Context: |
guid object |
The globally unique identifier for the object.
Read only Context: |
id integer |
Unique identifier for the object.
Context: |
modified string, datetime ([details](https://core.trac.wordpress.org/ticket/41032)) |
The date the object was last modified, in the site's timezone.
Context: |
modified_gmt string, datetime ([details](https://core.trac.wordpress.org/ticket/41032)) |
The date the object was last modified, as GMT.
Context: |
parent integer |
The ID for the parent of the object.
Context: |
slug string |
An alphanumeric identifier for the object unique to its type.
Context: |
title object |
The title for the object.
Context: |
content object |
The content for the object.
Context: |
excerpt object |
The excerpt for the object.
Context: |
Example Request Example Request
$ curl -X OPTIONS -i http://demo.wp-api.org/wp-json/wp/v2/posts/<parent>/revisions
List Post-revisions List Post-revisions
Arguments Arguments
parent
|
The ID for the parent of the object. |
context
|
Scope under which the request is made; determines fields present in response.
Default: One of: |
Definition Definition
GET /wp/v2/posts/<parent>/revisions
Example Request Example Request
$ curl http://demo.wp-api.org/wp-json/wp/v2/posts/<parent>/revisions
Retrieve a Post-revision Retrieve a Post-revision
Arguments Arguments
parent
|
The ID for the parent of the object. |
id
|
Unique identifier for the object. |
context
|
Scope under which the request is made; determines fields present in response.
Default: One of: |
Definition Definition
GET /wp/v2/posts/<parent>/revisions/<id>
Example Request Example Request
$ curl http://demo.wp-api.org/wp-json/wp/v2/posts/<parent>/revisions/<id>
Delete a Post-revision Delete a Post-revision
Arguments Arguments
parent
|
The ID for the parent of the object. |
id
|
Unique identifier for the object. |
force
|
Required to be true, as revisions do not support trashing. |
Definition Definition
DELETE /wp/v2/posts/<parent>/revisions/<id>
Example Request Example Request
$ curl -X DELETE http://demo.wp-api.org/wp-json/wp/v2/posts/<parent>/revisions/<id>