Schema

The schema defines all the fields that exist for a posts-revision object.

author
integer

The id for the author of the object.

Context: view

date
string, datetime (ISO8601)

The date the object was published.

Context: view

date_gmt
string, datetime (ISO8601)

The date the object was published, as GMT.

Context: view

guid
string

GUID for the object, as it exists in the database.

Context: view

id
integer

Unique identifier for the object.

Context: view

modified
string, datetime (ISO8601)

The date the object was last modified.

Context: view

modified_gmt
string, datetime (ISO8601)

The date the object was last modified, as GMT.

Context: view

parent
integer

The id for the parent of the object.

Context: view

slug
string

An alphanumeric identifier for the object unique to its type.

Context: view

title
string

Title for the object, as it exists in the database.

Context: view

content
string

Content for the object, as it exists in the database.

Context: view

excerpt
string

Excerpt for the object, as it exists in the database.

Context: view

Example Request

$ curl -X OPTIONS -i http://demo.wp-api.org/wp-json

List Post Revisions

Arguments

context

Scope under which the request is made; determines fields present in response.

Default: view

One of: view

Definition

GET /wp/v2/posts/<parent_id>/revisions

Example Request

$ curl http://demo.wp-api.org/wp-json/wp/v2/posts/<parent_id>/revisions

Retrieve a Post Revision

Arguments

context

Scope under which the request is made; determines fields present in response.

Default: view

One of: view

Definition

GET /wp/v2/posts/<parent_id>/revisions/<id>

Example Request

$ curl http://demo.wp-api.org/wp-json/wp/v2/posts/<parent_id>/revisions/<id>

Delete a Post Revision

There are no arguments for this enpdoint.

Definition

DELETE /wp/v2/posts/<parent_id>/revisions/<id>

Example Request

$ curl -X DELETE http://demo.wp-api.org/wp-json/wp/v2/posts/<parent_id>/revisions/<id>