Developer API Documentation
If you wish to experiment with the API using test data, please use http://sandbox.myexperiment.org/ instead of the main site. If you require any support or requests with regards to the myExperiment sandbox, please contact Don Cruickshank.
The interactive HTTP request builder at http://sandbox.myexperiment.org/mashup/api is a great place to try out REST requests.
myExperiment supports secure requests using OAuth. See OAuth for how to set up your own client applications to make secure HTTP requests to the API using OAuth. Though not as secure, you may also use a session cookie to obtain access to a particular myExperiment account. This process is described in Simple cookie authentication.
The API for finding, creating and organizing Taverna components is described here: Developer:Components
The API search facility uses the same search engine as the main website. It is available from the following URL:
Particular types can be specified by the type query option:
You can specify multiple types to search over, e.g.:
Currently supported search types are:
The results can be paged through by using the num and page options:
The elements within each REST response can be tailored to include only the parts of the response of interest. This saves bandwidth and response time!
A listing of elements that can be returned for a particular resource can be found by clicking on the appropriate link in the Elements column of the table above.
All elements can be returned to see which elements can be selected:
Please do not use all_elements in your code! We may restrict access to this feature once sufficient documentation exists for all the different elements.
For objects that have versions (e.g. Workflows), you may specify the specific version to be worked on by including version in the URI query. For example:
Index requests can be sorted. By default, these results are sorted by ascending creation order but sorting by creation time (created), update time (updated), title (title) and name (name) is also possible. In addition, the results can be returned in reverse order.
For the index requests, a default maximum of 25 results is shown. This can be raised to 100 by using adding num to the query. A particular page of results can be selected by adding page to the query.
Some resources can be made private or shared only with a subset of myExperiment. For these resources, the privileges element is used to manage them. See API permissions for further details.
There are two API requests that can be made that will return a redirect (HTTP 307 status) to the requested REST access URI.
"Who am I?"
This request will require authentication with the REST API. Once successful authentication has taken place, a redirect is returned that refers to the REST access URI of the authenticated user.
The above URL along with Don Cruickshank's credentials will redirect to:
REST Access URI
This request takes the URL of a myExperiment resource, e.g. a workflow, and will then redirect to the REST access URL for that resource.
will redirect to:
Index filtered by tag
For indices of taggable items, the index can be filtered on a particular tag.
The version of the REST API that the server uses can be requested by including api_version in the query.
The general format of an error response from the REST API is an XML document with an error element. The code attribute contains a number that determines the class of error. The message attribute of the error element contains a human readable message describing the error.
Example error response:
<?xml version="1.0" encoding="UTF-8"?> <error message="Resource not found" code="404"/>
|Resource not found||404|
|Resource not versioned||400|
|Resource version not found||404|