diff options
author | Christoph Helma <helma@in-silico.de> | 2009-08-14 09:22:26 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2009-08-14 09:22:26 +0200 |
commit | 26f689641023f4587bfe2af7975ee8d97af4a1df (patch) | |
tree | 61c4ed15a16a6d1d98912a0339f7bbc5f6a12ae3 | |
parent | b9bf1e5054244fe9040f14846fe937242a135c03 (diff) |
api key protection temporarily removed
-rw-r--r-- | README | 46 | ||||
-rw-r--r-- | application.rb | 8 |
2 files changed, 25 insertions, 29 deletions
@@ -2,50 +2,46 @@ OpenTox Datasets ================= * An OpenTox REST Webservice - * Stores associations between compounds and features in datasets - -* PUT and POST requests are protected by an api key - * Implements a subset of the OpenTox dataset API (http://opentox.org/wiki/opentox/Dataset). REST API -Description Method URI Parameters Result Status codes +Description Method URI Parameters Result Status codes -Get a list of all GET / List of URIs 200, 500 +Get a list of all GET / List of URIs 200, 500 datasets -Get a XML representation GET /{id} XML representation 200, 404, 500 -of a dataset of a dataset +Get a XML representation GET /{id} XML representation 200, 404, 500 +of a dataset of a dataset -Get the dataset name GET /{id}/name Dataset name 200, 404, 500 +Get the dataset name GET /{id}/name Dataset name 200, 404, 500 -Get all compound URIs GET /{id}/compounds List of compound 200, 404, 500 -from a dataset URIs +Get all compound URIs GET /{id}/compounds List of compound 200, 404, 500 +from a dataset URIs -Get all feature URIs GET /{id}/features List of features 200, 404, 500 +Get all feature URIs GET /{id}/features List of features 200, 404, 500 -Get all features with GET /{id}/features/compounds XML with features 200, 404, 500 -corresponding compounds and compounds +Get all features with GET /{id}/features/compounds XML with features 200, 404, 500 +corresponding compounds and compounds -Get all compounds and GET /{id}/compounds/features XML with compounds 200, 404, 500 -their features and featues +Get all compounds and GET /{id}/compounds/features XML with compounds 200, 404, 500 +their features and featues -Get all features for a GET /{id}/compound/{compound_uri}/features List of feature URIs 200, 404, 500 -compound URI +Get all features for a GET /{id}/compound/ List of feature URIs 200, 404, 500 +compound URI {compound_uri}/features -Get all features for a GET /{id}/feature/{feature_uri}/compounds List of compound URIs 200, 404, 500 -feature URI +Get all features for a GET /{id}/feature/ List of compound URIs 200, 404, 500 +feature URI {feature_uri}/compounds -Create a new dataset POST / name Dataset URI 200, 500 +Create a new dataset POST / name Dataset URI 200, 500 -Add a new association to POST /{id} compound_uri, Dataset URI 200, 404, 500 -a dataset feature_uri +Add a new association to POST /{id} compound_uri, Dataset URI 200, 404, 500 +a dataset feature_uri -Delete a dataset DELETE /{id} 200, 404, 500 +Delete a dataset DELETE /{id} 200, 404, 500 -Clear the content of a DELETE /{id}/associations 200, 404, 500 +Clear the content of a DELETE /{id}/associations 200, 404, 500 dataset INSTALLATION diff --git a/application.rb b/application.rb index 54ced27..670f277 100644 --- a/application.rb +++ b/application.rb @@ -187,13 +187,13 @@ get '/:id/feature/*/compounds' do end post '/' do - protected! + #protected! dataset = Dataset.find_or_create :name => params[:name] url_for("/", :full) + dataset.id.to_s end post '/:id' do - protected! + #protected! begin dataset = Dataset.get params[:id] rescue @@ -208,7 +208,7 @@ end delete '/:id' do # dangerous, because other datasets might refer to it - protected! + #protected! begin dataset = Dataset.get params[:id] rescue @@ -221,7 +221,7 @@ delete '/:id' do end delete '/:id/associations' do - protected! + #protected! begin dataset = Dataset.get params[:id] rescue |