The Center
for Computer-Assisted Legal Instruction
CALI Help FAQ - Web Services API
What methods are available to the API?
What is the CALI Developer Key?
Are there sample implementations available?
What is this?
The CALI web services API represents an alternative way to access some information in CALI's systems. The API utilizes an XML-RPC server to provide methods that can be called by clients to get information about CALI resources. This information can then be used to provide custom displays of CALI data. The initial release of the API focuses on the Lessons subsystem.
What is XML-RPC?
From www.xmlrpc.com:
- It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.
It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.
In a nutshell, XML-RPC allows a client to request information from a server, and the server answers the request. All data is transfered via HTTP and is encoded as XML.
What methods are available to the API?
The following methods are available to the API:
- Server endpoint: http://www2.cali.org/xmlrpc/server.php
- lessons.getCategories([$devkey])
- takes the optional devkey, CALI Developer Key, as an argument.
- returns struct containing categoryid, categoryname
- lessons.getCategoryTitles($categoryid,[$devkey])
- takes categoryid and the optional devkey, CALI Developer Key, as arguments.
- returns struct containing lid, lessonname
- lessons.getLessonDetails($lid,[$devkey])
- take lid and the optional devkey, CALI Developer Key, as arguments
- returns struct containing lid, lessonname, description, macversion, dosversion, windowsversion, webversion, flashversion, lessonid, version, lessonurl
- element descriptions:
- lid - unique integer associated with lesson
- lessonname - title of the lesson, text string
- description - block of text describing the lesson. May contain HTML
- macversion, dosversion, windowsversion, webversion, flashversion - binary, 1 indicates platform version exists
- lessonid - unique string that indicates lesson place in file system
- version - preferred run/download version, one of flash, web, win, mac
- lessonurl - URL generated by the server that provides a direct link to the lesson
Using these methods you can request a list of current lesson categories, a list of current lesson titles in a given category and information about, a description of, and a link to a given CALI Lesson. The optional $devkey argument allows the inclusion of a developer key which allows CALI to track use of the WebAPI. More information on the developer key is here. All of the information available to the API is public and does not require registration or login to view. Running or downloading a lesson does require registration and login and is limited to CALI member schools.
What is the CALI Developer Key?
The CALI Developer Key is a unique token that you can include in your calls to the API. By using the key you allow CALI to track how often the web services you deploy against the API are used. This is important to us because it allows us to gauge how much use is being made of this service. Use of the key is optional at this time, but we do recommend it. You can obtain your own key here. Registration on the CALI website is required to obtain a key, but there are no other limitations or restrictions associated with the key.
Are there sample implementations available?
Yes, you can download a set of sample implementations of the CALI Web API here. The sample set is a .zip file containg PHP, Python, and Ruby samples implementing the web API. Please check the README file in the archive for details. If you develop a solution in another language, we would be very interested in hearing about, so drop Elmer a note.