Skip to content →

PBWiki gets an API

The guys at PBWiki have just launched their API – with outputs in json, xml and ‘php’ (presumably phpArray) format.

The API calls one can make include:

Wiki Access

The following functions will be used to retrieve information from the wiki.

GetPage – retrieves a given page on the wiki
GetPageHistory – retrieves a page’s revision history
GetAllPages – retrieves a list of all pages on the wiki
GetRecentChanges – retrieves a list of recent changes made to the wiki
GetSiteInfo – retrieves site-wide information, such as the title, skin, language, and description for the wiki
GetSiteStats – retrieves statistics associated with the wiki
GetComments – fetches comments attached to the wiki
DiffPage – returns the difference between two page revisions

Wiki Modification

These functions will be used to update information on the wiki.

AddPage – adds a new page to the wiki. It fails if the page already exists.
AppendPage – appends information to an existing wiki page. If the page does not exist, it is created
PrependPage – prepends information to an existing wiki page. If the page does not exist, it is created
ChangePage – changes an existing page to the page content posted. It fails if the page is locked for editing by a human
SetPageInfo – updates meta-information about a page, such as whether or not it is adminlocked (requires admin access)
SetSiteInfo – updates site-wide information, such as the title, skin, language, and description for the wiki (requires admin access)
RenamePage – renames a page (requires admin access)
DeletePage – deletes a page and all its revisions (requires admin access)
RevertPage – reverts a page to a prior revision

File Manipulation

These functions manipulate files attached to the wiki.

SaveFile – saves passed data as a file in the upload directory (may require admin access)
DeleteFile – deletes a file (requires admin access)
RenameFile – renames a file (requires admin access)
GetAllFiles – retrieves the list of all files uploaded

Wiki Alerting

These functions will let you be alerted on updates to your wiki.

RegisterCallback – this function registers a URL to be called on all wiki updates

(The PBWiki site says some of these functions may not yet be available)

Check out the complete page or the developer forums for more information.

Published in Links News

2 Comments

  1. Let’s hope that MediaWiki can do the same thing sometime soon too.

  2. Hello! Good Site! Thanks you! xrwmyuwyti

Comments are closed.