Project
m |
m |
||
Line 8: | Line 8: | ||
== REST Operations == | == REST Operations == | ||
− | === GET === | + | === GET: Retrieve all projects === |
{{REST Operations | {{REST Operations | ||
|REST_op_description=Retrieves available projects | |REST_op_description=Retrieves available projects | ||
|REST_resource=Project | |REST_resource=Project | ||
|REST_op_method=GET | |REST_op_method=GET | ||
− | |REST_op_uri=/project | + | |REST_op_uri=/project |
|REST_op_params=none, or ?search=name | |REST_op_params=none, or ?search=name | ||
|REST_header_param=subjectid:SECURITY-TOKEN | |REST_header_param=subjectid:SECURITY-TOKEN | ||
Line 27: | Line 27: | ||
curl -X GET -H 'Accept:application/rdf+xml' -H 'subjectid:TOKEN' http://toxbanktest1.opentox.org:8080/toxbank/project?search=Tox | curl -X GET -H 'Accept:application/rdf+xml' -H 'subjectid:TOKEN' http://toxbanktest1.opentox.org:8080/toxbank/project?search=Tox | ||
− | ===POST === | + | === GET: Retrieve a single project === |
+ | {{REST Operations | ||
+ | |REST_op_description=Retrieves a single project | ||
+ | |REST_resource=Project | ||
+ | |REST_op_method=GET | ||
+ | |REST_op_uri=/project/{id} | ||
+ | |REST_op_params=none, or ?search=name | ||
+ | |REST_header_param=subjectid:SECURITY-TOKEN | ||
+ | |REST_op_mime_input=none | ||
+ | |REST_op_result=The project representation in supported media type | ||
+ | |REST_op_mime_output=application/rdf+xml;text/n3;text/uri-list | ||
+ | |REST_op_status=200,400,401,402,403 | ||
+ | }} | ||
+ | Example: [http://toxbanktest1.opentox.org:8080/toxbank/project/G1 http://toxbanktest1.opentox.org:8080/toxbank/project/G1] | ||
+ | |||
+ | curl -X GET -H 'Accept:application/rdf+xml' -H 'subjectid:TOKEN' http://toxbanktest1.opentox.org:8080/toxbank/project/G1 | ||
+ | |||
+ | ===POST: Create a project === | ||
{{REST Operations | {{REST Operations | ||
|REST_op_description=Creates a project | |REST_op_description=Creates a project | ||
Line 45: | Line 62: | ||
-d 'title=MANDATORY_VALUE' -d 'ldapgroup=OPTIONAL_VALUE' http://toxbanktest1.opentox.org:8080/toxbank/project | -d 'title=MANDATORY_VALUE' -d 'ldapgroup=OPTIONAL_VALUE' http://toxbanktest1.opentox.org:8080/toxbank/project | ||
+ | ===PUT: Update a project === | ||
{{REST Operations | {{REST Operations | ||
|REST_op_description=Updates the project metadata | |REST_op_description=Updates the project metadata | ||
Line 62: | Line 80: | ||
-d 'title=MANDATORY_VALUE' -d 'ldapgroup=OPTIONAL_VALUE' http://toxbanktest1.opentox.org:8080/toxbank/project/G3 | -d 'title=MANDATORY_VALUE' -d 'ldapgroup=OPTIONAL_VALUE' http://toxbanktest1.opentox.org:8080/toxbank/project/G3 | ||
+ | ===DELETE: Delete a project === | ||
{{REST Operations | {{REST Operations | ||
|REST_op_description=Removes an existing project | |REST_op_description=Removes an existing project |
Revision as of 12:27, 14 December 2011
Project |
---|
A project is a REST resource,representing projects from SEURAT cluster, or external projects. A project is identified by its URI,
has a name and may be assigned an LDAP group. The LDAP group should be one of the existing ToxBank LDAP groups and accessible via ToxBank OpenAM. External projects may or may not be assigned an LDAP group.
A Protocol is always associated with a project,and the protocol representation includes a link to a Project.
Contents |
REST Operations
GET: Retrieve all projects
Description | Retrieves available projects |
---|---|
Resource | Project |
Method | GET |
URI | /project |
Parameters | none, or ?search=name |
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | none |
Results | The project representation in supported media type |
Media Type (output) | application/rdf+xml;text/n3;text/uri-list |
Status code | 200,400,401,402,403 |
Example: http://toxbanktest1.opentox.org:8080/toxbank/project
curl -X GET -H 'Accept:text/uri-list' -H 'subjectid:TOKEN' http://toxbanktest1.opentox.org:8080/toxbank/project
curl -X GET -H 'Accept:application/rdf+xml' -H 'subjectid:TOKEN' http://toxbanktest1.opentox.org:8080/toxbank/project?search=Tox
GET: Retrieve a single project
Description | Retrieves a single project |
---|---|
Resource | Project |
Method | GET |
URI | /project/{id} |
Parameters | none, or ?search=name |
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | none |
Results | The project representation in supported media type |
Media Type (output) | application/rdf+xml;text/n3;text/uri-list |
Status code | 200,400,401,402,403 |
Example: http://toxbanktest1.opentox.org:8080/toxbank/project/G1
curl -X GET -H 'Accept:application/rdf+xml' -H 'subjectid:TOKEN' http://toxbanktest1.opentox.org:8080/toxbank/project/G1
POST: Create a project
Description | Creates a project |
---|---|
Resource | Project |
Method | POST |
URI | /project |
Parameters | Any combination of name,ldapgroup |
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | application/x-www-form-urlencoded |
Results | Task representation in supported MIME formats |
Media Type (output) | application/rdf+xml;text/n3;text/uri-list |
Status code | 200,202,400,401,402,403,500 |
Example: http://toxbanktest1.opentox.org:8080/toxbank/project
curl -X POST -H 'subjectid:TOKEN' -H 'Content-Type:application/x-www-form-urlencoded' \ -d 'title=MANDATORY_VALUE' -d 'ldapgroup=OPTIONAL_VALUE' http://toxbanktest1.opentox.org:8080/toxbank/project
PUT: Update a project
Description | Updates the project metadata |
---|---|
Resource | [[]] |
Method | PUT |
URI | /project/{id} |
Parameters | Any combination of name,ldapgroup |
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | application/x-www-form-urlencoded |
Results | Task representation in supported MIME formats |
Media Type (output) | application/rdf+xml;text/n3;text/uri-list |
Status code | 200,202,400,401,402,403,500 |
Example:
curl -X PUT -H 'subjectid:TOKEN' -H 'Content-Type:application/x-www-form-urlencoded' \ -d 'title=MANDATORY_VALUE' -d 'ldapgroup=OPTIONAL_VALUE' http://toxbanktest1.opentox.org:8080/toxbank/project/G3
DELETE: Delete a project
Description | Removes an existing project |
---|---|
Resource | [[]] |
Method | DELETE |
URI | /project/{id} |
Parameters | none |
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | none |
Results | Task representation in supported MIME formats |
Media Type (output) | application/rdf+xml;text/n3;text/uri-list |
Status code | 200,202,400,401,402,403,500 |
Example:
curl -X DELETE -H 'subjectid:TOKEN' http://toxbanktest1.opentox.org:8080/toxbank/project/G3
RDF representation
This RDF representation is automatically generated by the latesr version of the Toxbank Java client library
Acts on | |
Has output media type | application/rdf+xml;text/n3;text/uri-list + |
Has status code | 200,202,400,401,402,403,500 + |