[DRAFT: this is not complete yet, and may change.]
As well as using PerformDB as a site on the Web directly, you can also talk to it from other software. We provide several ways in which you can retrieve information from the site, and also post new information to the site.
…
The PerformDB system provides
We follow the REpresentational State Transfer (REST) style for Web Services…
Each URI on the site names a particular resource, which will respond with a suitable representation of the information held by that resource depending on what you ask for, using HTTP's features for preferring particular representations.
A common pattern throughout the site, and thus this API, is that particular URIs let you negotiate the format of the information you recieve. You do this by sending an 'Accept' header specifying the MIME type you prefer, and the response.
Alternatively, you can directly ask for a particular response type, as we always strive to publish a distinct URI for each type as well. When you recieve a negotiated response, it will include a Location header giving the URI from which you may retrieve the same form in future, without using any content negotiation. These alternate locations are specified below. For example, a model which lives at /models/server/ can return an HTML Web page, or if you prefer an RDF XML file or a basic XML file. These two alternate versions are available from /models/server/rdf and /models/server/meta respectively.
Make a GET request to /find/*search*text*/. The text is a slash-separated list of terms, each term is either a string to look for within the given item, or a specialised keyword.
For example, /find/server/type:pepa/kind:models/ would return all the PEPA models which mention 'server'. type uses the names of the model (or measure) types from /models/types/? (respectively /measures/types/). kind may be 'models', 'measures', 'results', 'keywords' or …
An individual model has a URL, like /models/sensorbot/? which will always give a summary of the model's whole history, and in particular a representation of the latest version of the model. Each version of a model is available from it's own URL, which can be made by inserting ':x', for version number x, after the model's short name. So, the original version of the sensorbot model is at /models/sensorbot:1/, and the subsequent versions at /models/sensorbot:2/ and so forth.
You can also request more structured representations of the information about a model.
Make a POST request to /models/add/ with the following fields:
short_name::
The response will be:
You add a measure by posting the relevant information to /measures/add/