Developer:API

From myExperiment

Jump to: navigation, search

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. You can also see the current and planned API coverage.

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.

Informa

Contents


Index requests

announcements index

URI: http://www.myexperiment.org/announcements.xml

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<announcements>
  <announcement uri='http://www.myexperiment.org/announcement.xml?id=1' resource='http://www.myexperiment.org/announcements/1'>New announcements feature!</announcement>
  <announcement uri='http://www.myexperiment.org/announcement.xml?id=2' resource='http://www.myexperiment.org/announcements/2'>New reviews feature!</announcement>
  <announcement uri='http://www.myexperiment.org/announcement.xml?id=3' resource='http://www.myexperiment.org/announcements/3'>New updates and additions</announcement>
  <announcement uri='http://www.myexperiment.org/announcement.xml?id=4' resource='http://www.myexperiment.org/announcements/4'>Updated Group sharing!</announcement>
  <announcement uri='http://www.myexperiment.org/announcement.xml?id=5' resource='http://www.myexperiment.org/announcements/5'>myExperiment mentioned in Nature magazine!</announcement>
  ...
</announcements>

files index

URI: http://www.myexperiment.org/files.xml

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<files>
  <file uri='http://www.myexperiment.org/file.xml?id=5' resource='http://www.myexperiment.org/files/5'>Viking boat</file>
  <file uri='http://www.myexperiment.org/file.xml?id=6' resource='http://www.myexperiment.org/files/6'/>
  <file uri='http://www.myexperiment.org/file.xml?id=7' resource='http://www.myexperiment.org/files/7'/>
  <file uri='http://www.myexperiment.org/file.xml?id=10' resource='http://www.myexperiment.org/files/10'>sample</file>
  <file uri='http://www.myexperiment.org/file.xml?id=11' resource='http://www.myexperiment.org/files/11'>pdf file test</file>
  ...
</files>

groups index

URI: http://www.myexperiment.org/groups.xml

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<groups>
  <group uri='http://www.myexperiment.org/group.xml?id=1' resource='http://www.myexperiment.org/groups/1'>GNU</group>
  <group uri='http://www.myexperiment.org/group.xml?id=3' resource='http://www.myexperiment.org/groups/3'>experimental project</group>
  <group uri='http://www.myexperiment.org/group.xml?id=4' resource='http://www.myexperiment.org/groups/4'>Rooting unrooted trees</group>
  ...
</groups>

packs index

URI: http://www.myexperiment.org/packs.xml

Example output:

<?xml version="1.0" encoding="UTF-8"?>
<packs>
  <pack resource="http://localhost:8080/packs/1" uri="http://localhost:8080/pack.xml?id=1">Microarray data analysis using R</pack>
  <pack resource="http://localhost:8080/packs/2" uri="http://localhost:8080/pack.xml?id=2">web services info</pack>
  <pack resource="http://localhost:8080/packs/3" uri="http://localhost:8080/pack.xml?id=3">Everything You Need To Know About myExperiment...</pack>
  <pack resource="http://localhost:8080/packs/6" uri="http://localhost:8080/pack.xml?id=6">EBI Web Services</pack>
  ...
</packs>

tags index

URI: http://www.myexperiment.org/tags.xml

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<tags>
  <tag uri='http://www.myexperiment.org/tag.xml?id=1' resource='http://www.myexperiment.org/tags/1'>3D structure</tag>
  <tag uri='http://www.myexperiment.org/tag.xml?id=2' resource='http://www.myexperiment.org/tags/2'>additive genetic effects</tag>
  <tag uri='http://www.myexperiment.org/tag.xml?id=3' resource='http://www.myexperiment.org/tags/3'>adenine</tag>
  <tag uri='http://www.myexperiment.org/tag.xml?id=5' resource='http://www.myexperiment.org/tags/5'>AIDA</tag>
  <tag uri='http://www.myexperiment.org/tag.xml?id=6' resource='http://www.myexperiment.org/tags/6'>algorithm</tag>
  ...
</tags>

users index

URI: http://www.myexperiment.org/users.xml

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<users>
  <user uri='http://www.myexperiment.org/user.xml?id=1' resource='http://www.myexperiment.org/users/1'>Matt Lee</user>
  <user uri='http://www.myexperiment.org/user.xml?id=2' resource='http://www.myexperiment.org/users/2'>David Withers</user>
  <user uri='http://www.myexperiment.org/user.xml?id=3' resource='http://www.myexperiment.org/users/3'>Rob Myers</user>
  <user uri='http://www.myexperiment.org/user.xml?id=4' resource='http://www.myexperiment.org/users/4'>Wm. John Sullivan</user>
  <user uri='http://www.myexperiment.org/user.xml?id=5' resource='http://www.myexperiment.org/users/5'>Stian Soiland-Reyes</user>
  <user uri='http://www.myexperiment.org/user.xml?id=6' resource='http://www.myexperiment.org/users/6'>Duncan Hull</user>
  ...
</users>

workflows index

URI: http://www.myexperiment.org/workflows.xml

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<workflows>
  <workflow uri='http://www.myexperiment.org/workflow.xml?id=4' resource='http://www.myexperiment.org/workflows/4'>EBI InterProScan</workflow>
  <workflow uri='http://www.myexperiment.org/workflow.xml?id=5' resource='http://www.myexperiment.org/workflows/5'>DOI2PMID</workflow>
  <workflow uri='http://www.myexperiment.org/workflow.xml?id=6' resource='http://www.myexperiment.org/workflows/6'>Genome annotation pipeline demonstrator workflow for Nucleic Acids Research</workflow>
  <workflow uri='http://www.myexperiment.org/workflow.xml?id=7' resource='http://www.myexperiment.org/workflows/7'>Fetch Dragon images from BioMoby v2</workflow>
  <workflow uri='http://www.myexperiment.org/workflow.xml?id=10' resource='http://www.myexperiment.org/workflows/10'>HUMAN Microarray CEL file to candidate pathways</workflow>
  ...
</workflows>

REST requests

GET announcement

Example URL: http://www.myexperiment.org/announcement.xml?id=6

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<announcement uri='http://www.myexperiment.org/announcement.xml?id=6' resource='http://www.myexperiment.org/announcements/6'>
  <author uri='http://www.myexperiment.org/user.xml?id=16' resource='http://www.myexperiment.org/users/16'>David De Roure</author>
  <title>myExperiment in IEEE Intelligent Systems</title>
  <text>&lt;p&gt;myExperiment is discussed by Jim Hendler in his article &lt;i&gt;Reinventing Academic Publishing, Part 3 &lt;/i&gt;in IEEE Intelligent Systems January/February 2008, page 2-3.&lt;/p&gt;</text>
  <created-at>Sat Mar 08 10:56:15 +0000 2008</created-at>
</announcement>

Full output (you can use the elements query option to select response elements):

<?xml version='1.0' encoding='UTF-8'?>
<announcement uri='http://www.myexperiment.org/announcement.xml?id=6' resource='http://www.myexperiment.org/announcements/6'>
  <id>6</id>
  <author uri='http://www.myexperiment.org/user.xml?id=16' resource='http://www.myexperiment.org/users/16'>David De Roure</author>
  <title>myExperiment in IEEE Intelligent Systems</title>
  <text>&lt;p&gt;myExperiment is discussed by Jim Hendler in his article &lt;i&gt;Reinventing Academic Publishing, Part 3 &lt;/i&gt;in IEEE Intelligent Systems January/February 2008, page 2-3.&lt;/p&gt;</text>
  <created-at>Sat Mar 08 10:56:15 +0000 2008</created-at>
  <updated-at>Sat Mar 08 10:56:15 +0000 2008</updated-at>
</announcement>

GET citation

Example URL: http://www.myexperiment.org/citation.xml?id=5

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<citation uri='http://www.myexperiment.org/citation.xml?id=5' resource='http://www.myexperiment.org/workflows/79/citations/5'>
  <authors>Peter Li, Tom Oinn, Stian Soiland and Douglas B. Kell</authors>
  <created-at>Thu Nov 29 12:28:42 +0000 2007</created-at>
  <isbn></isbn>
  <issn></issn>
  <publication>Bioinformatics (In press)</publication>
  <published-at>Thu Nov 29 00:00:00 +0000 2007</published-at>
  <title>Automated manipulation of systems biology models using libSBML within Taverna workflows</title>
  <uri>http://www.mcisb.org/software/taverna/libsbml/index.html</uri>
  <annotator uri='http://www.myexperiment.org/user.xml?id=221' resource='http://www.myexperiment.org/users/221'>Peter Li</annotator>
  <workflow uri='http://www.myexperiment.org/workflow.xml?id=79' resource='http://www.myexperiment.org/workflows/79'>Mapping microarray data onto metabolic pathways</workflow>
</citation>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<citation uri="http://www.myexperiment.org/citation.xml?id=5" resource="http://www.myexperiment.org/workflows/79/citations/5">
  <accessed-at/> 
  <authors>Peter Li, Tom Oinn, Stian Soiland and Douglas B. Kell</authors> 
  <created-at>Thu Nov 29 12:28:42 +0000 2007</created-at> 
  <id>5</id> 
  <isbn/> 
  <issn/> 
  <publication>Bioinformatics (In press)</publication> 
  <published-at>Thu Nov 29 00:00:00 +0000 2007</published-at> 
  <title>Automated manipulation of systems biology models using libSBML within Taverna workflows</title> 
  <updated-at>Thu Nov 29 12:29:47 +0000 2007</updated-at> 
  <uri>http://www.mcisb.org/software/taverna/libsbml/index.html</uri> 
  <annotator uri="http://www.myexperiment.org/user.xml?id=221" resource="http://www.myexperiment.org/users/221">Peter Li</annotator> 
  <workflow uri="http://www.myexperiment.org/workflow.xml?id=79" resource="http://www.myexperiment.org/workflows/79">Mapping microarray data onto metabolic pathways</workflow> 
</citation>

GET comment

Example URL: http://www.myexperiment.org/comment.xml?id=2

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<comment uri='http://www.myexperiment.org/comment.xml?id=2' resource='http://www.myexperiment.org/workflows/7/comments/2'>
  <author uri='http://www.myexperiment.org/user.xml?id=1' resource='http://www.myexperiment.org/users/1'>Matt Lee</author>
  <comment>Great workflow.</comment>
  <created-at>Wed Oct 03 18:36:31 +0100 2007</created-at>
</comment>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<comment uri="http://www.myexperiment.org/comment.xml?id=2" resource="http://www.myexperiment.org/workflows/7/comments/2">
  <id>2</id> 
  <author uri="http://www.myexperiment.org/user.xml?id=1" resource="http://www.myexperiment.org/users/1">Matt Lee</author> 
  <comment>Great workflow.</comment> 
  <created-at>Wed Oct 03 18:36:31 +0100 2007</created-at> 
</comment>

POST comment

Example URL: http://www.myexperiment.org/comment.xml

Example input:

<?xml version="1.0" encoding="UTF-8" ?> 
<comment>
  <subject resource="http://www.myexperiment.org/workflows/173"/>
  <comment>This is my comment.</comment>
</comment>

Example output:

<?xml version="1.0" encoding="UTF-8"?>
<comment uri="http://www.myexperiment.org/comment.xml?id=188" resource="htt
p://www.myexperiment.org/workflows/20/comments/188">
  <author uri="http://www.myexperiment.org/user.xml?id=22" resource="http:/
/www.myexperiment.org/users/22">Don Cruickshank</author>
  <comment>This is a comment!</comment>
  <created-at>Mon Mar 23 23:56:08 +0000 2009</created-at>
</comment>


GET external

Example URL: http://www.myexperiment.org/external.xml?id=6

Example output:

<external uri="http://localhost:3000/external.xml?id=6" resource="http://wiki.myexperiment.org">
  <id>6</id>
  <owner uri="http://localhost:3000/user.xml?id=70" resource="http://localhost:3000/users/70">Jiten Bhagat</owner>
  <pack>Everything You Need To Know About myExperiment...</pack>
  <title>The Project Wiki</title>
  <uri>http://wiki.myexperiment.org</uri>
  <alternate-uri/>
  <comment>Check this out for more information about the myExperiment project</comment>
  <created-at>Wed Jul 02 22:31:56 +0100 2008</created-at>
  <updated-at>Wed Jul 02 23:12:37 +0100 2008</updated-at>
</external>

GET file

Example URL: http://www.myexperiment.org/file.xml?id=5

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<file uri='http://www.myexperiment.org/file.xml?id=5' resource='http://www.myexperiment.org/files/5'>
  <title>Viking boat</title>
  <description>&lt;p&gt;This boat is alongside the largest remaining section of Southampton&apos;s city wall, next to the Grand Harbour hotel. The sand and blue coloured stone sections on the ground represent the original beach and waterline before the land was reclaimed.&lt;/p&gt;</description>
  <uploader uri='http://www.myexperiment.org/user.xml?id=22' resource='http://www.myexperiment.org/users/22'>Don Cruickshank</uploader>
  <content-type>image/pjpeg
</content-type>
  <created-at>Wed Nov 07 11:46:06 +0000 2007</created-at>
  <license-type>by-nd</license-type>
</file>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<file uri="http://www.myexperiment.org/file.xml?id=5" resource="http://www.myexperiment.org/files/5">
  <id>5</id> 
  <title>Viking boat</title> 
  <description>&lt;p&gt;This boat is alongside the largest remaining section of Southampton's city wall, next to the Grand Harbour hotel. The sand and blue coloured stone sections on the ground represent the original beach and waterline before the land was reclaimed.&lt;/p&gt;</description> 
  <uploader uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</uploader> 
  <content-type>image/pjpeg</content-type> 
  <content encoding="base64" type="binary">
    /9j/4AAQSkZJRgABAQAAAQABAAD//gAoCgoKMTIvMDMvMjAwNgoxNjoxOTo0
    MgpNb2RlPTEKMC4xCjMuMAr/2wBDAA4KCw0LCQ4NDA0QDw4RFiQXFhQUFiwg
    IRokNC43NjMuMjI6QVNGOj1OPjIySGJJTlZYXV5dOEVmbWVabFNbXVn/2wBD
    AQ8QEBYTFioXFypZOzI7WVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZ
    WVlZWVlZWVlZWVlZWVlZWVlZWVn/wAARCAHgAoADASIAAhEBAxEB/8QAHwAA 
    ....
  </content> 
  <created-at>Wed Nov 07 11:46:06 +0000 2007</created-at> 
  <updated-at>Wed Feb 06 12:02:05 +0000 2008</updated-at> 
  <license-type>by-nd</license-type> 
  <credits>
    <user uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</user> 
  </credits>
  <attributions/> 
</file>

GET group

Example URL: http://www.myexperiment.org/group.xml?id=4

Example output:

<?xml version='1.0' encoding='UTF-8'?>
<group uri='http://www.myexperiment.org/group.xml?id=4' resource='http://www.myexperiment.org/groups/4'>
  <auto-accept>false</auto-accept>
  <created-at>Fri Jul 20 17:44:36 +0100 2007</created-at>
  <description>Assuming the following is true: In the absence of a good outgroup the root may be positioned by assuming approximately equal evolutionary rates over all the branches. In this way the root is put at the midpoint of the longest pathway between two OTUs. This way of rooting is called mid-point rooting. I am trying to implement a way of rooting an unrooted tree using ruby. Having been to BOSC2007 in Vienna I have found that tree objects have been implemented in bioruby to some extent. I will try to adapt my code to be able to added to the bioruby code base.</description>
  <title>Rooting unrooted trees</title>
  <owner uri='http://www.myexperiment.org/user.xml?id=8' resource='http://www.myexperiment.org/users/8'>Anthony Underwood</owner>
</group>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<group uri="http://www.myexperiment.org/group.xml?id=4" resource="http://www.myexperiment.org/groups/4">
  <id>4</id> 
  <auto-accept>false</auto-accept> 
  <created-at>Fri Jul 20 17:44:36 +0100 2007</created-at> 
  <description>Assuming the following is true: In the absence of a good outgroup the root may be positioned by assuming approximately equal evolutionary rates over all the branches. In this way the root is put at the midpoint of the longest pathway between two OTUs. This way of rooting is called mid-point rooting. I am trying to implement a way of rooting an unrooted tree using ruby. Having been to BOSC2007 in Vienna I have found that tree objects have been implemented in bioruby to some extent. I will try to adapt my code to be able to added to the bioruby code base.</description> 
  <title>Rooting unrooted trees</title> 
  <updated-at>Wed Oct 03 18:35:43 +0100 2007</updated-at> 
  <owner uri="http://www.myexperiment.org/user.xml?id=8" resource="http://www.myexperiment.org/users/8">Anthony Underwood</owner> 
  <members>
    <member uri="http://www.myexperiment.org/user.xml?id=8" resource="http://www.myexperiment.org/users/8">Anthony Underwood</member> 
  </members>
  <shared-items /> 
</group>


GET message

Example URL: http://www.myexperiment.org/message.xml?id=26

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<message uri="http://www.myexperiment.org/message.xml?id=26" resource="http://www.myexperiment.org/messages/26">
  <body>The 5th of November</body> 
  <created-at>Mon Nov 05 20:38:01 +0000 2007</created-at> 
  <from uri="http://www.myexperiment.org/user.xml?id=16" resource="http://www.myexperiment.org/users/16">David De Roure</from> 
  <to uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</to> 
  <read-at>Tue Dec 11 18:01:14 +0000 2007</read-at> 
  <reply-id/> 
  <subject>remember remember</subject> 
</message>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<message uri="http://www.myexperiment.org/message.xml?id=26" resource="http://www.myexperiment.org/messages/26">
  <id>26</id> 
  <body>The 5th of November</body> 
  <created-at>Mon Nov 05 20:38:01 +0000 2007</created-at> 
  <from uri="http://www.myexperiment.org/user.xml?id=16" resource="http://www.myexperiment.org/users/16">David De Roure</from> 
  <to uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</to> 
  <read-at>Tue Dec 11 18:01:14 +0000 2007</read-at> 
  <reply-id /> 
  <subject>remember remember</subject> 
</message>

GET pack

Example URL: http://www.myexperiment.org/pack.xml?id=3

Example output:

<?xml version="1.0" encoding="UTF-8"?>
<pack uri="http://localhost:3000/pack.xml?id=3" resource="http://localhost:3000/packs/3">
  <id>3</id>
  <title>Everything You Need To Know About myExperiment...</title>
  <description><p>... but were afraid to ask.</p>
<p>This is the pack to go to for all information about myExperiment and the people involved in this project!</p></description>
  <owner uri="http://localhost:3000/user.xml?id=70" resource="http://localhost:3000/users/70">Jiten Bhagat</owner>
  <created-at>Wed Jul 02 22:31:12 +0100 2008</created-at>
  <updated-at>Wed Jul 02 23:11:22 +0100 2008</updated-at>
  <items>
    <file resource="http://localhost:3000/files/28" uri="http://localhost:3000/file.xml?id=28">From biologist to web service to Taverna to myExperiment to biologist</file>
  </items>
  <externals>
    <external resource="http://www.myexperiment.org/users/70" uri="http://localhost:3000/external.xml?id=12">Jiten Bhagat</external>
    <external resource="http://users.ecs.soton.ac.uk/dgc/" uri="http://localhost:3000/external.xml?id=11">Don Cruickshank</external>
    <external resource="http://taverna.sourceforge.net/" uri="http://localhost:3000/external.xml?id=10">Taverna</external>
    <external resource="http://www.mygrid.org.uk/" uri="http://localhost:3000/external.xml?id=9">myGrid</external>
    <external resource="http://www.cs.man.ac.uk/~carole/" uri="http://localhost:3000/external.xml?id=8">Carole Goble</external>
    <external resource="http://www.soton.ac.uk/~dder/" uri="http://localhost:3000/external.xml?id=7">David De Roure</external>
    <external resource="http://wiki.myexperiment.org" uri="http://localhost:3000/external.xml?id=6">The Project Wiki</external>
    <external resource="http://www.myexperiment.org" uri="http://localhost:3000/external.xml?id=5">The Mothership</external>
  </externals>
</pack>

GET picture

Example URL: http://www.myexperiment.org/picture.xml?id=38

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<picture uri="http://www.myexperiment.org/picture.xml?id=38" resource="http://www.myexperiment.org/users/22/pictures/38">
  <data encoding="base64" type="binary">
    /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEB
    AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/
    2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
    AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAHgAeADASIAAhEBAxEB/8QA
    HwAAAAYDAQEBAAAAAAAAAAAABAUGBwgJAAMKAgEL/8QAWRAAAQMCBAQCBQkE
  </data> 
</picture>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<picture uri="http://www.myexperiment.org/picture.xml?id=38" resource="http://www.myexperiment.org/users/22/pictures/38">
  <data encoding="base64" type="binary">
    /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEB
    AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/
    2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
    AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAHgAeADASIAAhEBAxEB/8QA
    HwAAAAYDAQEBAAAAAAAAAAAABAUGBwgJAAMKAgEL/8QAWRAAAQMCBAQCBQkE
    ...
  </data> 
  <id>38</id> 
</picture>

GET rating

Example URL: http://www.myexperiment.org/rating.xml?id=1

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<rating uri="http://www.myexperiment.org/rating.xml?id=1" resource="http://www.myexperiment.org/workflows/6/ratings/1">
  <owner uri="http://www.myexperiment.org/user.xml?id=2" resource="http://www.myexperiment.org/users/2">David Withers</owner> 
  <rating>4</rating> 
  <created-at>Wed Oct 03 18:36:31 +0100 2007</created-at> 
</rating>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<rating uri="http://www.myexperiment.org/rating.xml?id=1" resource="http://www.myexperiment.org/workflows/6/ratings/1">
  <id>1</id> 
  <owner uri="http://www.myexperiment.org/user.xml?id=2" resource="http://www.myexperiment.org/users/2">David Withers</owner> 
  <rating>4</rating> 
  <created-at>Wed Oct 03 18:36:31 +0100 2007</created-at> 
  </rating>

GET review

Example URL: http://www.myexperiment.org/review.xml?id=2

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<review uri="http://www.myexperiment.org/review.xml?id=2" resource="http://www.myexperiment.org/workflows/171/reviews/2">
  <title/> 
  <review><p>This is a great workflow.</p></review> 
  <author uri="http://www.myexperiment.org/user.xml?id=664" resource="http://www.myexperiment.org/users/664">Hubert</author> 
  <created-at>Fri Mar 07 12:35:22 +0000 2008</created-at> 
</review>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<review uri="http://www.myexperiment.org/review.xml?id=2" resource="http://www.myexperiment.org/workflows/171/reviews/2">
  <id>2</id> 
  <title /> 
  <review>&lt;p&gt;This is a great workflow.&lt;/p&gt;</review> 
  <author uri="http://www.myexperiment.org/user.xml?id=664" resource="http://www.myexperiment.org/users/664">Hubert</author> 
  <created-at>Fri Mar 07 12:35:22 +0000 2008</created-at> 
  <updated-at>Fri Mar 07 12:35:22 +0000 2008</updated-at> 
</review>


GET tag

Example URL: http://www.myexperiment.org/tag.xml?id=38

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<tag uri="http://www.myexperiment.org/tag.xml?id=38" resource="http://www.myexperiment.org/tags/38">
  <name>BioAID</name> 
  <count>20</count> 
</tag>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<tag uri="http://www.myexperiment.org/tag.xml?id=38" resource="http://www.myexperiment.org/tags/38">
  <id>38</id> 
  <name>BioAID</name> 
  <count>20</count> 
  <taggings>
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=30" resource="http://www.myexperiment.org/workflows/30">ProteinSynonymsToQuery</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=33" resource="http://www.myexperiment.org/workflows/33">BioAID_DiseaseDiscovery_fromProtoOntology_RDF</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=75" resource="http://www.myexperiment.org/workflows/75">BioAID_ProteinToDiseases</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=74" resource="http://www.myexperiment.org/workflows/74">BioAID_protein_discovery</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=72" resource="http://www.myexperiment.org/workflows/72">BioAID_DiseaseDiscovery</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=31" resource="http://www.myexperiment.org/workflows/31">DiscoverProteinLink</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=80" resource="http://www.myexperiment.org/workflows/80">Discover_proteins_from_text</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=81" resource="http://www.myexperiment.org/workflows/81">BioAID_Discover_proteins_from_text_plus_synonyms</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=91" resource="http://www.myexperiment.org/workflows/91">BioAID_DiseaseDiscovery_count</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=110" resource="http://www.myexperiment.org/workflows/110">BioAID_DiseaseDiscovery_byHumanUniprot</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=111" resource="http://www.myexperiment.org/workflows/111">Discover_entities</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=112" resource="http://www.myexperiment.org/workflows/112">Discover_proteins</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=113" resource="http://www.myexperiment.org/workflows/113">Extract_proteins</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=115" resource="http://www.myexperiment.org/workflows/115">Link_protein_to_OMIM_disease</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=116" resource="http://www.myexperiment.org/workflows/116">Lucene_bioquery_optimizer_MR1</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=117" resource="http://www.myexperiment.org/workflows/117">Retrieve_bio_documents</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=118" resource="http://www.myexperiment.org/workflows/118">Retrieve_documents_MR1</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=119" resource="http://www.myexperiment.org/workflows/119">Demo_DiseaseDiscovery_byHumanUniprot_scaffold</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=154" resource="http://www.myexperiment.org/workflows/154">BioAID_ProteinDiscovery_filterOnHumanUniprot_perDoc_html</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=247" resource="http://www.myexperiment.org/workflows/247">BioAID_ProteinDiscovery_HomoSapiens</workflow> 
  </taggings>
</tag>

GET user

Example URL: http://www.myexperiment.org/user.xml?id=22

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<user uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">
  <created-at>Mon Jul 23 09:14:48 +0100 2007</created-at> 
  <name>Don Cruickshank</name> 
  <description><p>I am a myExperiment developer.</p></description> 
  <email>dgc@ecs.soton.ac.uk</email> 
  <avatar uri="http://www.myexperiment.org/picture.xml?id=38" resource="http://www.myexperiment.org/users/22/pictures/38"/> 
  <website>http://www.ecs.soton.ac.uk/people/dgc</website> 
</user>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<user uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">
  <id>22</id> 
  <created-at>Mon Jul 23 09:14:48 +0100 2007</created-at> 
  <updated-at>Fri Jul 25 11:24:03 +0100 2008</updated-at> 
  <name>Don Cruickshank</name> 
  <description>&lt;p&gt;I am a myExperiment developer.&lt;/&gt;></description> 
  <email>dgc@ecs.soton.ac.uk</email> 
  <avatar uri="http://www.myexperiment.org/picture.xml?id=38" resource="http://www.myexperiment.org/users/22/pictures/38" /> 
  <website>http://www.ecs.soton.ac.uk/people/dgc</website> 
  <friends>
    <friend uri="http://www.myexperiment.org/user.xml?id=42" resource="http://www.myexperiment.org/users/42">Alex Voss</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=25" resource="http://www.myexperiment.org/users/25">Carole Goble</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=121" resource="http://www.myexperiment.org/users/121">Danius Michaelides</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=16" resource="http://www.myexperiment.org/users/16">David De Roure</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=26" resource="http://www.myexperiment.org/users/26">David R Newman</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=2" resource="http://www.myexperiment.org/users/2">David Withers</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=6" resource="http://www.myexperiment.org/users/6">Duncan Hull</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=70" resource="http://www.myexperiment.org/users/70">Jiten Bhagat</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=18" resource="http://www.myexperiment.org/users/18">Marco Roos</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=10" resource="http://www.myexperiment.org/users/10">Mark Borkum</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=1" resource="http://www.myexperiment.org/users/1">Matt Lee</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=164" resource="http://www.myexperiment.org/users/164">Meik Poschen</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=43" resource="http://www.myexperiment.org/users/43">Paul Fisher</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=15" resource="http://www.myexperiment.org/users/15">Ross Gardler</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=209" resource="http://www.myexperiment.org/users/209">Savas</friend> 
    <friend uri="http://www.myexperiment.org/user.xml?id=162" resource="http://www.myexperiment.org/users/162">Yuwei Lin</friend> 
  </friends>
  <groups>
    <group uri="http://www.myexperiment.org/group.xml?id=7" resource="http://www.myexperiment.org/groups/7">Mark's Project</group> 
    <group uri="http://www.myexperiment.org/group.xml?id=9" resource="http://www.myexperiment.org/groups/9">myExperiment Hackers</group> 
  </groups>
  <workflows>
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=173" resource="http://www.myexperiment.org/workflows/173">Unique tags</workflow> 
  </workflows>
</user>

GET workflow

Example URL: http://www.myexperiment.org/workflow.xml?id=173

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<workflow uri="http://www.myexperiment.org/workflow.xml?id=173" resource="http://www.myexperiment.org/workflows/173" version="2">
  <title>Unique tags</title> 
  <description>This workflow takes a comma separated list of tags and removes duplicate entries. Tags may have multiple words in them. An example string is "carrots,handbags,carrots,cheese".</description> 
  <uploader uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</uploader> 
  <created-at>Tue Mar 11 16:52:42 +0000 2008</created-at> 
  <preview>http://www.myexperiment.org/workflow/image/173/unique_tags_18054_2.png</preview> 
  <svg>http://www.myexperiment.org/workflow/svg/173/unique_tags_18054_2.svg</svg> 
  <license-type>by-sa</license-type> 
  <content-uri>http://www.myexperiment.org/workflows/173/download/unique_tags_18054.xml</content-uri> 
  <content-type>application/vnd.taverna.scufl+xml</content-type> 
  <tags>
    <tag uri="http://www.myexperiment.org/tag.xml?id=555" resource="http://www.myexperiment.org/tags/555">example</tag> 
    <tag uri="http://www.myexperiment.org/tag.xml?id=450" resource="http://www.myexperiment.org/tags/450">scampi</tag> 
    <tag uri="http://www.myexperiment.org/tag.xml?id=760" resource="http://www.myexperiment.org/tags/760">design pattern</tag> 
  </tags>
</workflow>

Full output (you can use the elements query option to select response elements):

<?xml version="1.0" encoding="UTF-8" ?> 
<workflow uri="http://www.myexperiment.org/workflow.xml?id=173" resource="http://www.myexperiment.org/workflows/173" version="2">
  <id>173</id> 
  <title>Unique tags</title> 
  <description>This workflow takes a comma separated list of tags and removes duplicate entries. Tags may have multiple words in them. An example string is "carrots,handbags,carrots,cheese".</description> 
  <uploader uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</uploader> 
  <created-at>Tue Mar 11 16:52:42 +0000 2008</created-at> 
  <updated-at>Tue Mar 11 16:53:13 +0000 2008</updated-at> 
  <preview>http://www.myexperiment.org/workflow/image/173/unique_tags_18054_2.png</preview> 
  <thumbnail>http://www.myexperiment.org/workflow/image/173/thumb/unique_tags_18054_2.png</thumbnail> 
  <thumbnail-big>http://www.myexperiment.org/workflow/image/173/medium/unique_tags_18054_2.png</thumbnail-big> 
  <svg>http://www.myexperiment.org/workflow/svg/173/unique_tags_18054_2.svg</svg> 
  <license-type>by-sa</license-type> 
  <content-uri>http://www.myexperiment.org/workflows/173/download/unique_tags_18054.xml</content-uri> 
  <content-type>application/vnd.taverna.scufl+xml</content-type> 
  <content encoding="base64" type="binary">
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzOnNj
    dWZsIHhtbG5zOnM9Imh0dHA6Ly9vcmcuZW1ibC5lYmkuZXNjaWVuY2UveHNj
    dWZsLzAuMWFscGhhIiB2ZXJzaW9uPSIwLjIiIGxvZz0iMCI+DQogIDxzOndv
    cmtmbG93ZGVzY3JpcHRpb24gbHNpZD0idXJuOmxzaWQ6bmV0LnNmLnRhdmVy
    bmE6d2ZEZWZpbml0aW9uOmIyYzk5MmQ5LWUxMTktNDRmOS05MTJiLWJiMGRm
    ...
  </content> 
  <tags>
    <tag uri="http://www.myexperiment.org/tag.xml?id=555" resource="http://www.myexperiment.org/tags/555">example</tag> 
    <tag uri="http://www.myexperiment.org/tag.xml?id=450" resource="http://www.myexperiment.org/tags/450">scampi</tag> 
    <tag uri="http://www.myexperiment.org/tag.xml?id=760" resource="http://www.myexperiment.org/tags/760">design pattern</tag> 
  </tags>
  <versions>
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=173&version=1" resource="http://www.myexperiment.org/workflows/173?version=1" version="1">Unique tags</workflow> 
    <workflow uri="http://www.myexperiment.org/workflow.xml?id=173&version=2" resource="http://www.myexperiment.org/workflows/173?version=2" version="2">Unique tags</workflow> 
  </versions>
  <reviews /> 
  <comments /> 
  <ratings>
    <rating uri="http://www.myexperiment.org/rating.xml?id=109" resource="http://www.myexperiment.org/workflows/173/ratings/109">3</rating> 
    <rating uri="http://www.myexperiment.org/rating.xml?id=124" resource="http://www.myexperiment.org/workflows/173/ratings/124">4</rating> 
  </ratings>
  <credits>
    <user uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</user> 
  </credits>
  <attributions>
    <file uri="http://www.myexperiment.org/file.xml?id=5" resource="http://www.myexperiment.org/files/5">Viking boat</file> 
  </attributions>
  <citations /> 
</workflow>

POST workflow

Example URL: http://www.myexperiment.org/workflow.xml

Example input:

<?xml version="1.0"?>
<workflow>
  <title>Cove NetCDF visualization</title>
  <description>
    The Cove workflow reads oceanographic NetCDF data, does a simple processing
    step, writes the data out, then sends a web service message to the COVE
    visualization tool. It is a four step, sequential workflow.
  </description>
  <license-type>by-sa</license-type>
  <content-type>application/xaml+xml</content-type>
  <content encoding="base64" type="binary">
    PHdmOlNlcXVlbnRpYWxXb3JrZmxvd0FjdGl2aXR5DQogIHhtbG5zPSJodHRw
    Oi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3Jlc2VhcmNoLzIwMDcvU2NpZW50
    aWZpY1dvcmtmbG93Ig0KICB4bWxuczp3Zj0iaHR0cDovL3NjaGVtYXMubWlj
    ...
    eSBCYXkiIExpbms9Int3ZjpBY3Rpdml0eUJpbmQgV3JpdGUsUGF0aD1MaW5r
    fSIgSG9zdE5hbWU9ImxvY2FsaG9zdDoxMTIyMyIvPg0KPC93ZjpTZXF1ZW50
    aWFsV29ya2Zsb3dBY3Rpdml0eT4NCg==
  </content>
  <preview encoding="base64" type="binary">
    iVBORw0KGgoAAAANSUhEUgAAAo8AAADACAIAAADqYx68AACJH0lEQVR4nOyd
    B3gVxdqAZ+vZ089J772QQu9deq9SFBDsKF6xge23XRWvDXtBsQA2QIoiIAhI
    7ySUhJqQ3uup28s/exIQlatiEgyXfTkPz8lmM7s738xXZme+QRRFBn8V5S+f
    ...
    k+u2DMpAiPL8t7/F0YD1/PuY8IBq7R37O6uhVHvNGXmRonhPTbwKr7lUvApv
    uW7RSlvppXhNIWVVTkW07YOotZfcDwjvB10qiLukmikKwsupSr38P/JToTLY
    1NlZAAAAAElFTkSuQmCC
  </preview>
</workflow>

The full example input is over 800 lines long and is shown on a separate page for reference.

Example output:

<?xml version="1.0" encoding="UTF-8"?>
<workflow uri="http://www.myexperiment.org/workflow.xml?id=635" resource="http://www.myexperiment.org/workflows/635" version="1">
  <title>Cove NetCDF visualization</title>
  <description>The Cove workflow reads oceanographic NetCDF data, does a simple processing step, writes the data out, then sends a web service message to the COVE visualization tool. It is a four step, sequential workflow.</description>
  <uploader uri="http://www.myexperiment.org/user.xml?id=22" resource="http://www.myexperiment.org/users/22">Don Cruickshank</uploader>
  <created-at>Wed Jan 21 15:56:19 +0000 2009</created-at>
  <preview>http://www.myexperiment.org/workflow/image/635/preview.png</preview>
  <license-type>by-sa</license-type>
  <content-uri>http://www.myexperiment.org/workflows/635/download/cove_netcdf_visualization_88240</content-uri>
  <content-type>application/xaml+xml</content-type>
  <tags/>
</workflow>

You can also set sharing permissions when uploading workflows via the REST API.

General search

The API search facility uses the same search engine as the main website. It is available from the following URL:

 http://www.myexperiment.org/search.xml?query=bioaid

Particular types can be specified by the type query option:

 http://www.myexperiment.org/search.xml?query=bioaid&type=workflow

You can specify multiple types to search over, e.g.:

 http://www.myexperiment.org/search.xml?query=example&type=workflow,pack

Currently supported search types are:

  • user
  • workflow
  • file
  • group
  • pack

The results can be paged through by using the num and page options:

 http://www.myexperiment.org/search.xml?query=example&type=workflow,pack&num=5&page=2

Element selection

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!

 http://www.myexperiment.org/workflow.xml?id=20&elements=title,description

All elements can be returned too:

 http://www.myexperiment.org/workflow.xml?id=20&all_elements=yes

Versions

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:

 http://www.myexperiment.org/workflow.xml?id=20&version=1

Sorting

Index and search 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.

 http://www.myexperiment.org/workflows.xml?sort=title
 http://www.myexperiment.org/files.xml?sort=title&order=reverse 

Pagination

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.

 http://www.myexperiment.org/workflows.xml?num=50&page=2 

Redirections

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.

For example:

 http://www.myexperiment.org/whoami.xml

The above URL along with Don Cruickshank's credentials will redirect to:

 http://www.myexperiment.org/user.xml?id=22

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.

For example:

 http://www.myexperiment.org/rest-access.xml?resource=http://www.myexperiment.org/users/22

will redirect to:

 http://www.myexperiment.org/user.xml?id=22

Index filtered by tag

For indices of taggable items, the index can be filtered on a particular tag.

 http://www.myexperiment.org/workflows.xml?tag=bioaid

API version

The version of the REST API that the server uses can be requested by including api_version in the query.

 http://www.myexperiment.org/workflows.xml?api_version=yes

Error responses

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"/> 

Error messages:

Message Code
Resource not found 404
Not authorized 403
Resource not versioned 400
Resource version not found 404
Service unavailable 503
Personal tools