View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Swiki RPC v 5.3

Download and Installation (for ComSwiki 1.0, 1.1):

  • swikirpc-19jul.zip
  • unpack, preserving directory structure, into a temporary folder
  • copy contents of the folder (folders "swikirpc", "itr-refs", and "test1") into your "swiki" folder
  • restart the swiki server

New stuff:
  • (v 5.3) uploads
  • (v 5.3) appends (append to individual text fields, only at the end)
  • (v 5.3) modifies (modify individual text fields, unspecified ones remain unchanged)
  • (v 5.2) diffs
  • (v 5.2) fix for recentChanges – now pages list their IDs
  • status codes DTD
    • error, success, plus domain objects
  • rudimentary support for templates (forms)
  • up-n-coming, re: data sharing API
    • new format for Model-It models - each model is now a ZIP or TAR.GZ file, containing: (1) model file proper (.model or some such); (2) snapshot(s) and other extra files; (3) meta.xml (or another name) describing the contents of the archive.
    • posting a model is then merely posting this archive file
    • Swiki could parse it, generate a Swiki page
    • Swiki page template could include those extra files and fields for describing them
    • the model archive file can be downloaded from Swiki – possibly generated on the fly, if the page was edited
    • this way Swiki can be storage for Model-It (Symphony)

DTD (informal)

  • the following XML tags define Swiki objects and may be embedded in other tags, as noted: page, book
  • page
    • attributes: id, name (page title), date & time (of last edit)
    • sub-tags: book (book tuple), settings (list of s-tags, only publicly accessible ones listed), text (either plain-text or list of t-tags)
    • s-tag: <s name="SETTING_NAME" type="TEXT|NUMBER|BOOLEAN">VALUE</s>
    • t-tag: <t name="TEXT_ID">TEXT</t>
    • page tuple = page tag only with attributes (no sub-tags)
  • book
    • attributes: name, size (number of pages), parent (swiki name)
    • sub-tags: description (value of setting 'description'), settings (list of s-tags, only publicly accessible ones listed)
    • s-tag: <s name="SETTING_NAME" type="TEXT|NUMBER|BOOLEAN">VALUE</s>
  • error
    • attributes: code (numeric, close to HTTP error codes), string (a string error code, generic, non-specific, non-descriptive)
    • sub-tags: comment (a human-readable, descriptive, specific to the given situation explanation of the error), domain object (page, etc.)
    • e.g., page already exists: code=403, string=forbidden, comment=Page already exists, page=page-tuple
  • success
    • attributes: code (numeric, close to HTTP error codes), string (a string error code, generic, non-specific, non-descriptive)
    • sub-tags: comment (a human-readable, descriptive, specific to the given situation explanation of the error), domain object (page, etc.)
    • e.g., page created: code=201, string=created, comment=Page created, page=page-tuple

(New 7/19/01) Append, Modify, Files List, and Uploads

  • http://SERVER:PORT/swikirpc/SWIKI/N.append?text=appendage
    • appends the text at the end of the page

  • http://SERVER:PORT/swikirpc/SWIKI/N.append?text2=appendage
    • appends the text at the end of text field #2

  • http://SERVER:PORT/swikirpc/SWIKI/N.modify?text=replacement
    • replaces the text of the page

  • http://SERVER:PORT/swikirpc/SWIKI/N.modify?text2=replacement
    • replaces the text of the text field #2

  • http://SERVER:PORT/swikirpc/SWIKI/N.filesList
    • list of attachments to the page
    • OR list of attachments to the swiki (if no page specified)

  • http://SERVER:PORT/swikirpc/SWIKI/N.upload
    • upload a file to the page (or swiki)
    • this must be a POST, multipart form request, formatted in the usual HTTP way

(New 7/14/01) Diffs

  • http://SERVER:PORT/swikirpc/SWIKI/N.diff?versionId=I&oldVersionId=J
    • returns a diff between versions I and J of page N

Full Swiki RPC API:

(this lists only the implemented functions, more will be added as they are debugged/upgraded from beta 12)

http://shark-nt.cc.gatech.edu:8080/swikirpc
  • list all swiki books
    • content-type: text/xml
    • list of books' xml tuples

http://shark-nt.cc.gatech.edu:8080/swikirpc/test1
  • book information
    • content-type: text/xml
    • attributes (name, size [number of pages], parent)
    • description (textual)

http://shark-nt.cc.gatech.edu/swikirpc/refs/3
  • page information
    • content-type: text/xml
    • attributes (id, versionId, name)
    • book (attributes - where the page belongs)
    • text (raw, xml-safe text)

http://SERVER:PORT/swikirpc/SWIKI/createNewPage?name=PAGENAME&text=TEXT
  • create a new page
    • returns the status: error or success
    • POST and GET both work

http://.../createNewPage?name=PAGENAME&text1=TEXT1&text2=TEXT2&...&template=TEMPLATENAME
  • create a new page with template
    • returns the status: error or success
    • doesn't support itr-file-template yet, but there's a workaround

http://SERVER:PORT/swikirpc/SWIKI/recentChanges
  • pages in reverse chronological order
    • top level doc is book
    • list is <pages>
    • each item is a page XML tuple

http://SERVER:PORT/swikirpc/SWIKI/N/versions
  • versions of the page N, list of pages, XML
    • top level doc is book (with all attributes)
    • list is <pages>
    • each item is a page XML tuple

http://SERVER:PORT/swikirpc/SWIKI/N?versionId=K
  • page N, version K
    • top level doc is page
    • contents of version K, just as for regular page N view
    • NOTE: versionId (GET field name) is case-sensitive

Coming up soon:

uploads
  • upload a file to page/site

templated uploads/edits
  • upload files, post edits to a page with template

Link to this Page

  • Swiki RPC last edited on 20 July 2001 at 1:48 pm by user-vcaug2f.dsl.mindspring.com