Skip to main content

pages/{pageid}/subpages (GET)


Retrieve list of sub-pages

  • 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 title

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)
redirects int? If zero, do not follow page redirects.
offset int? Number of items to skip. Must be a positive number or 0 to not skip any. (default: 0)
limit string? Maximum number of items to retrieve. Must be a positive number or 'all' to retrieve all items. (default: 100)

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


<subpages href="{uri}">
    <page.subpage id="{int}" href="{uri}">

Implementation Notes

Redirect and archived pages are not included in the output.

C# Code Sample: Retrieve Page Subpages

The following code example retrieves the subpages for 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", "subpages").Get();

Sample Response from executing Code

Sample response indicating that there is one subpage:

<subpages href="http://deki-hayes/@api/deki/pages/29/subpages">
    <page.subpage id="31" href="http://deki-hayes/@api/deki/pages/31">
        <title>Page Title</title> 

Curl Code Sample: Retrieve Page Subpages

The following command retrieves a list of page "foo"'s subpages.

Sample Code

curl -u username:password -i http://mindtouch.address/@api/deki/pages/=foo/subpages

Sample Response from executing Code

Example response from a page with 2 subpages. Note that only subpages within one level are returned.

<subpages totalcount="2" count="2" href="">
  <page.subpage id="600" href="" terminal="false" subpages="true">
  <page.subpage id="602" href="" terminal="true" subpages="false">

Implementation notes 

curl flags

Provides external user authentication. Note that if anonymous access is available and authentication is not forced, this flag may be omitted.
Outputs the HTTP response headers. Useful for debugging.


To view a list of all pages, follow the instructions here.
  • Was this article helpful?