KnowledgeVolution Application Programming Interface (API)

KnowledgeVolution provides Application Programming Interface (API) for developers to create applications that interact with the sites running KnowledgeVolution. This document describes the API in details.

RESTful Resources

We try to make KnowledgeVolution comply with the design principles of Representational State Transfer (REST) as much as possible. As an application converted from using Rails 1.0 to Rails 2.0, it will take a while until we can make them all validly RESTful.

Authentication

KnowledgeVolution currently supports HTTP Basic Authentication as provided by Ruby on Rails. Other means of authentication will be added once Rails includes them. (In other words, we are too lazy to implement them ourselves.)

Journal API

Journal is the first service that we implement API for communicating with external applications. Journal pretty much conforms with REST. If not, email us.

Post a new Journal Entry

An application can post a new journal entry by submitting the following variables via the HTTP POST method to http://site.org/journals/:username/entries.

  • journal_entry[content] contains the content of the entry. The content may be coded in the HTML format.
  • journal_entry[visibility] defines the visibility of the entry. This is an integer variable: 2 means everyone can read it; 3 shows to only registered users; and 4 locks it for your private eyes. This variable is optional, and 2 is the default.

If the submission went wrong, KnowledgeVolution returns HTTP Status 400 (Bad Request). Other returning values imply success. Don't forget that an application needs to authenticate a user using HTTP Basic Authentication before it can post an entry.

Other Tasks

If you want another Journal API, please email us.

Bindings

Python binding to the API is available here trunk/extras/api/kvlib.py.