This function retrieves the contents of a page of a given revision and in a given format along with meta-information about the page. Note that currently if a page is hidden, it will not be returned by the API.
Why would you need this? Can't you just perform a GET?
The wiki in question might be private. Additionally, the meta information about the page needs to be returned in a structured format for scripts.
page Required
Specifies what page you'd like to retrieve. Note that the front page of a wiki is a page named FrontPage.
rev Optional
Specifies which revision you'd like to retrieve. You can obtain a list of valid revisions from GetPageHistory.
format Optional
Specifies the format you'd like the result in. Currently supported formats are "rendered", "raw", and "none". "rendered" returns the output in HTML, as it would be shown in a web browser. "raw" returns the data as it exists in raw wiki format, as a user would edit it. "none" only retrieves the metadata and does not return a "data" element in the result object. The default is "rendered".
The response will be divided into several portions: the page "meta" information, the array of "tags" associated with the page (if any), the "lastEditor" responsible for the edit that brought the page to the revision returned, and the page "data" itself. Note that "api_ip" in lastEditor, if set, indicates the IP address of the server (or user) who used the API to make the edit. This is given for security purposes since "ip" is overrideable.
REQUEST
RESPONSE
{ "v1": {
"meta": {
"adminLocked": 0,
"editLocked": 1,
"hidden": 0,
"revision": "12345-2839"
},
"tags": [ "sometag", "another tag", "foobar" ],
"lastEditor": {
"email": "someone@example.org",
"name": "Some Guy",
"ip": "127.0.0.1",
"api_ip": "4.3.2.1"
},
"format": "rendered",
"data": "<p>You'll find this to be <b>\"rendered\"</b> page info.</p>"
}}
Page Information
|
Wiki Information
|
Recent PBwiki Blog Posts |