Method site.pages() retrieves meta data for all pages in a site or in a site's category, like page title, parent page, when created/edited, and attached tags.


site.pages({'site': 'site-name' <, 'category': 'category-name'> })

where “<>” denote an optional argument.


the name of the site, whose pages to list
category-name (optional)
the name of the category, which pages to list


Page meta data for all the pages in a site or a category is returned as a list of dictionaries with the following keys.

the site's name the page is from
the page's category
the page name (without the category)
equal to 'name' if 'category' is _default, 'category':'name' otherwise
the page title as defined by the user
the page title as displayed, including any autonumbering pattern
the page title ('title') if not empty, the unix name ('name') with first letter capitalized and dashes replaced by blanks otherwise
the page's parent page; None if no parent page has been set
the name of the user who created the page
date and time when the page was created; format YYYY-MM-DDThh:mm:ss+timezone1
the name of the user who last edited the page; None if the page is at revision 0
date and time when the page was last edited; the 'date_created' date/time if the page is at revision 0; format YYYY-MM-DDThh:mm:ss+timezone2
a list of tags the page is tagged with
a string of blank-separated tags the page is tagged with

Note that the returned data is the same data as returned in the 'meta' dictionary item in the list of dictionaries returned by page.get().

The pages are returned in an arbitrary order. To sort the returned list, see the Sort Returned Data snippet.


The example assumes that s is a successfully authenticated ServerProxy object.

What you type … What you get …{'site':'xml-api', 'category': 'doc'})

[{'category': 'doc',
  'user_edited': None,
  'tag_array': [],
  'name': 'methods',
  'title': 'Methods',
  'tag_string': '',
  'title_shown': 'Methods',
  'site': 'xml-api',
  'title_or_unix_name': 'Methods',
  'parent_page': None,
  'full_name': 'doc:methods',
  'user_created': 'ErichSteinboeck',
  'date_created': '2009-04-09T11:25:30+00:00',
  'date_edited': '2009-04-11T19:48:45+00:00'
 {'category': 'doc',
  'user_edited': None,
  'tag_array': [],
  'name': 'serverproxy',
  'title': 'ServerProxy',
  'tag_string': '',
  'title_shown': 'ServerProxy',
  'site': 'xml-api',
  'title_or_unix_name': 'ServerProxy',
  'parent_page': None,
  'full_name': 'doc:serverproxy',
  'user_created': 'ErichSteinboeck',
  'date_created': '2009-04-11T19:16:22+00:00',
  'date_edited': '2009-04-11T19:47:35+00:00'

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License