ARCHIVED: KB web services: Using REST
On this page:
Prerequisites
You will need a username and password to gain access to the
Knowledge Base web services. To request a username and password, send
mail to kbmisc@indiana.edu
.
Getting set up
KB REST services are protected by basic HTTP authentication. To access them, you will need to authenticate to the server using your REST username and password. Aside from authentication, the KB REST interface works like any other; simply make the appropriate HTTP requests to obtain the information you need.
Testing
To test your access to the KB REST server, attempt to GET the following URL:
http://remote.kb.iu.edu/REST/v0.2/document/menu.xml
You should receive the Knowledge Base main menu, in XML format.
Example code
The Knowledge Management System team has written a small set of Perl scripts to demonstrate use of KB web services with REST. These scripts use many of the features of the service, and are written to be as clear as possible. You can refer to these to learn the basics and get ideas about how to use the KB web services in your own code.
Errors
When the server encounters an error that can by fixed or handled by the client (such as requesting a document that does not exist), you will receive a small bit of XML explaining the problem. The message follows this format:
<kberror> <exception>ExceptionName</exception> <message>problem description</message> </kberror>
The exception
tag contains a string indicating what
type of error occurred. The message
tag contains a string
indicating what part of the request was problematic, or providing a
human-readable explanation of the problem. The rest of the web
services documentation explains errors like this alongside the request
that generates them.
This is document aqof in the Knowledge Base.
Last modified on 2023-02-08 14:27:17.