WordPress中文开发手册

文章修订

Schema #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 #Example Request

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

Top ↑

List Post Revisions #List Post Revisions

Top ↑

Arguments #Arguments

context Scope under which the request is made; determines fields present in response.
Default: view

One of: view

Top ↑

Definition #Definition

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

Example Request #Example Request

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

Top ↑

Retrieve a Post Revision #Retrieve a Post Revision

Top ↑

Arguments #Arguments

context Scope under which the request is made; determines fields present in response.
Default: view

One of: view

Top ↑

Definition #Definition

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

Example Request #Example Request

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

Top ↑

Delete a Post Revision #Delete a Post Revision

There are no arguments for this enpdoint.

Top ↑

Definition #Definition

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

Example Request #Example Request

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