pages/{pageid}/info (GET)
Overview
Retrieve page information
- REST Method: GET
- Method Access: public
Uri Parameters
Name | Type | Description |
pageid | string | either an integer page ID, "home", or "=" followed by a double uri-encoded page path |
Query Parameters
Name | Type | Description |
authenticate | bool? | Force authentication for request (default: false) |
redirects | int? | If zero, do not follow page redirects. |
exclude | string? | Elements to exclude from response document (choice of "revision"; default: exclude nothing) |
Return Codes
Name | Value | Description |
OK | 200 | The request completed successfully |
Bad Request | 400 | Invalid input parameter or request body |
Forbidden | 403 | Read access to the page is required |
Not Found | 404 | Requested page could not be found |
Message Format
Output:
<page id="{int}" href="{uri}"> <title>{text}</title> <path>{text}</path> </page>
Implementation Notes
The page title is the user-friendly display name of the page. The page path is the full database-encoded page title.
C# Code Sample: Retrieve Page Info
The following code example retrieves page information about the home page:
Sample Code
Plug p = Plug.New("http://deki-hayes/@api/deki"); p.At("users", "authenticate").WithCredentials("admin", "password").Get(); p.At("pages", "home", "info").Get();
Sample Response from executing Code
<page id="29" href="http://deki-hayes/@api/deki/pages/29"> <title>DekiWiki (Hayes)</title> <path /> </page>
Implementation notes
Add notes about requirements or config values
Curl Code Sample: Retrieve Page Info
The following command retrieves basic information about page "foo":
Sample Code
curl -u username:password -i http://mindtouch.address/@api/deki/pages/=foo/info
Sample Response from executing Code
{pageid} = bar
Content-Type: application/xml
<page id="565" href="http://192.168.59.128/@api/deki/pages/565?redirects=0"> <uri.ui>http://192.168.59.128/Bar</uri.ui> <title>Bar</title> <path>Bar</path> <namespace>main</namespace> </page>
Implementation notes
curl flags
- -u
- Provides external user authentication. Note that if anonymous access is available and authentication is not forced, this flag may be omitted.
- -i
- Outputs the HTTP response headers. Useful for debugging.
Pages
- To view a list of all pages, follow the instructions here.