Developer:InternalsResource

From myExperiment
Jump to: navigation, search

Internals Resource

An internal is a general reference to a resource within myExperiment. Currently, these are only used in packs.

Index of internals

Planned.


Create internal

URL: POST http://www.myexperiment.org/internal-pack-item.xml

Example input:

<?xml version="1.0"?>
<internal-pack-item>
  <pack resource="http://www.myexperiment.org/packs/56"/>
  <item resource="http://www.myexperiment.org/files/206"/>
  <comment/>
</internal-pack-item>


Example output:

<?xml version="1.0"?>
<internal-pack-item uri="http://www.myexperiment.org/internal-pack-item.xml?id=465" resource="http://www.myexperiment.org/files/206">
  <id>465</id>
  <owner uri="http://www.myexperiment.org/user.xml?id=16" resource="http://www.myexperiment.org/users/16">David De Roure</owner>
  <pack uri="http://www.myexperiment.org/pack.xml?id=56" resource="http://www.myexperiment.org/packs/56"/>
  <item>
    <file resource="http://www.myexperiment.org/files/206" uri="http://www.myexperiment.org/file.xml?id=206">PDF of submitted version of myExperiment CCPE  paper</file>
  </item>
  <comment/>
  <created-at>Fri Apr 10 13:42:30 +0100 2009</created-at>
</internal-pack-item>


Read internal

URL: GET http://www.myexperiment.org/internal-pack-item.xml?id=465

Example output:

<?xml version="1.0"?>
<internal-pack-item uri="http://www.myexperiment.org/internal-pack-item.xml?id=465" resource="http://www.myexperiment.org/files/206">
  <id>465</id>
  <owner uri="http://www.myexperiment.org/user.xml?id=16" resource="http://www.myexperiment.org/users/16">David De Roure</owner>
  <pack uri="http://www.myexperiment.org/pack.xml?id=56" resource="http://www.myexperiment.org/packs/56"/>
  <item>
    <file resource="http://www.myexperiment.org/files/206" uri="http://www.myexperiment.org/file.xml?id=206">PDF of submitted version of myExperiment CCPE  paper</file>
  </item>
  <comment/>
  <created-at>Fri Apr 10 13:42:30 +0100 2009</created-at>
</internal-pack-item>


Update internal

URL: PUT http://www.myexperiment.org/internal-pack-item.xml?id=465

Example input:

<?xml version="1.0"?>
<internal-pack-item>
  <pack resource="http://www.myexperiment.org/packs/56"/>
  <item resource="http://www.myexperiment.org/files/206"/>
  <comment>This is the central paper of this pack</comment>
</internal-pack-item>


Example output:

<?xml version="1.0"?>
<internal-pack-item uri="http://www.myexperiment.org/internal-pack-item.xml?id=465" resource="http://www.myexperiment.org/files/206">
  <id>465</id>
  <owner uri="http://www.myexperiment.org/user.xml?id=16" resource="http://www.myexperiment.org/users/16">David De Roure</owner>
  <pack uri="http://www.myexperiment.org/pack.xml?id=56" resource="http://www.myexperiment.org/packs/56"/>
  <item>
    <file resource="http://www.myexperiment.org/files/206" uri="http://www.myexperiment.org/file.xml?id=206">PDF of submitted version of myExperiment CCPE  paper</file>
  </item>
  <comment>This is the central paper of this pack</comment>
  <created-at>Fri Apr 10 13:42:30 +0100 2009</created-at>
</internal-pack-item>


Delete internal

URL: DELETE http://www.myexperiment.org/internal-pack-item.xml?id=465

Example output:

<?xml version="1.0"?>
<internal-pack-item uri="http://www.myexperiment.org/internal-pack-item.xml?id=465" resource="http://www.myexperiment.org/files/206">
  <id>465</id>
  <owner uri="http://www.myexperiment.org/user.xml?id=16" resource="http://www.myexperiment.org/users/16">David De Roure</owner>
  <pack uri="http://www.myexperiment.org/pack.xml?id=56" resource="http://www.myexperiment.org/packs/56"/>
  <item>
    <file resource="http://www.myexperiment.org/files/206" uri="http://www.myexperiment.org/file.xml?id=206">PDF of submitted version of myExperiment CCPE  paper</file>
  </item>
  <comment/>
  <created-at>Fri Apr 10 13:42:30 +0100 2009</created-at>
</internal-pack-item>


Elements for internal

  • id - the id of the internal pack item
  • owner - the user who added the internal resource to the pack
  • pack - the pack that the internal pack item is in
  • item - the internal resource (e.g. workflow, file or another pack) to which the internal pack item refers
  • comment - a comment about internal resource in the context of the pack
  • created-at - the date/time the internal resource was added to the pack
  • updated-at the date/time the details for the internal pack item were last updated