public. Retrieve revision history of a given title
| Name | Type | Description |
| pageid | string | either an integer page ID, "home", or "=" followed by a double uri-encoded page title |
| Name | Type | Description |
| authenticate | bool? | Force authentication for request (default: false) |
| max | int? | Max number of revisions to includes (default: 50) |
| offset | int? | Skipped revisions (default: 0) |
| redirects | int? | If zero, do not follow page redirects. |
| revision | int? | Page revision to retrieve |
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| Forbidden | 403 | Read access to the page is required |
| NotFound | 404 | Requested page could not be found |
| Ok | 200 | The request completed successfully |
Output:
<pages>
<page id="{int}" revision="{int}" href="{uri}">
<title>{text}</title>
<path>{text}</path>
<date.edited>{date}</date.edited>
<user.author id="{int}" href="{uri}">
<nick>{text}</nick>
<username>{text}</username>
<email>{text}</email>
</user.author>
<description>{text}</description>
<contents type="{contenttype}" href="{uri}" />
</page>
...
</pages>
A new page revision is created whenever the page is modified.
Use GET:pages/{pageid}/contents with the revision parameter to retrieve the contents of a page from a specified revision. It is also possible to compare the contents of two revisions with GET:pages/{pageid}/diff.
The following code example retrieves the revisions of the page called "Page Title":
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("pages", "=Page_Title", "revisions").Get();
Sample response indicating that there is one revision:
<pages>
<page id="31" revision="1" href="http://deki-hayes/@api/deki/pages/31/revisions?revision=1&redirects=0">
<title>Page Title</title>
<path>Page_Title</path>
<date.edited>2007-08-29T23:03:18Z</date.edited>
<user.author id="1" href="http://deki-hayes/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email>admin@mindtouch.com</email>
</user.author>
<description>2 words added</description>
<contents type="application/x.deki0702+xml" href="http://deki-hayes/@api/deki/pages/31/revisions/contents?revision=1&redirects=0" />
</page>
</pages>