REpresentational State Transfer (REST) is a resource-oriented architectural style commonly used on the World Wide Web.

RESTful manipulation of resources in Callimachus requires some caveats. Readers may think of some kinds of content as "file" oriented, such as a HTML or plain text file, a JPEG image or a Javascript document, and other types of more conceptual content as "data" or "metadata", such as a user, group, menu definition or concept. Callimachus' REST API makes similar distinctions between Binary Large Object (BLOB) content and RDF content; however, the distinctions are not always as you might expect. How should we treat an RDF document that is uploaded to Callimachus, represented as a "file" in Callimachus' folder interface and yet whose contents are stored in an RDF database? Appendices B: BLOB Resource Types and C: RDF Resource Types list the various content types in Callimachus and associates them with the appropriate segments of the API. Please read carefully :)

Examples are provided that use a fictitious Callimachus authority (http://example.com:8080), fictitious URL paths, and fictitious parameters. This is intentional to encourage you to discover the correct URLs in accordance with this documentation. Any specific URL patterns we might otherwise document would be subject to change in future releases. Keep in mind that the service URLs may be on different hosts than the requested URI. You will thus not be able to copy-and-paste the examples directly into your browser; you will need to change the examples to match your environment. Examples requiring authentication show a username of "john"; your name may be different, so you will need to modify them as appropriate for your Callimachus username.

Examples show HTTP requests and responses, including relevant headers. Examples are also given that use the curl command-line utility, which is available for all major operating systems. See http://curl.haxx.se/ for details on curl.

NB: Callimachus includes (as of version 0.15) a script to clear its server-side cache. It is possible under some circumstances (e.g. removing triples from blank resources using the sparql endpoint) for the server-side cache to become stale. A systems administrator may run the command <installation directory>/bin/callimachus-reset.sh (or .bat) if server-side caching problems are suspected.

Authentication

Some functionality may only be accessed by authenticated users. Which functionality is restricted may be controlled by Callimachus' permissions system. However, by default the SPARQL endpoint and Create/Update/Delete functions are so restricted.

Callimachus uses HTTP Digest access authentication curl commands for authenticated commands require the --digest and --user parameters:

curl --digest --user john …

Correct URL Discovery

The URLs in the examples below are completely fictitious. HTTP does not transmit fragment identifiers, so the use of "#rel=..." in the examples below is mainly intended as a identifier of where the correct URL can be found or should be put. The correct URL itself can be discovered using an HTTP OPTIONS request or from an earlier response.