Feature
Component description
One Feature consists of a compound id an optional conformer id and the value for a specific feature definition.
REST operations
Description | Method | URI | Parameters | Result | Status codes |
get the value for a specific feature | GET | /feature/compound/{cid}/feature_definition/{f_def_id} | text/xml -> xml representation of feature; text/plain -> text value of the feature | 200,404,503 | |
get the values for all features | GET | /feature/compound/{cid} | - |
xml representation of all features | 200,400,404,503 |
get the value for all feature values for a given feature definition in a dataset | GET | /feature/dataset/{did}/feature_definition/{f_def_id} | - | xml representation of all features | 200,404,503 |
get the value for all feature values for a given feature definition | GET | /feature/feature_definition/{f_def_id} | - | xml representation of all features | 200,404,503 |
update the value for a specific feature | PUT | /feature/compound/{cid}/feature_definition/{f_def_id} | value | - | 200,400,404,503 |
update the value for a specific feature | PUT | /feature/compound/{cid}/conformer/{cid}/feature_definition/{f_def_id} | value | - | 200,400,404,503 |
save a new feature per compound | POST | /feature/compound/{cid}/feature_definition/{f_def_id} | value | URI of feature representation | 200,404,503 |
save a new feature per conformer | POST | /feature/compound/{cid}/conformer/{cid}/feature_definition/{f_def_id} | value | URI of feature representation | 200,404,503 |
save a new feature per conformer TO BE DISCUSSED: Adding a value for a new feature definition; needs to extend the Feature definition schema to incorporate full definition of Reference |
POST | /feature/compound/{cid}/conformer/{cid} | value, xml representation of feature def? | URI of feature representation | 200,404,503 |
delete a feature | DELETE | /feature/compound/{cid}/feature_definition/{f_def_id} | - | - | 200,404,503 |
TO BE DISCUSSED:Delete all instances from table features with feature_definition_id f_def_id and delete f_def_id in feature_definition | DELETE | /feature/feature_definition/{f_def_id} | - | - | 200,404,503 |
HTTP status codes
Interpretation | Nr | Name |
Success | 200 | OK |
Feature for specific id not found | 404 | Not Found |
Incorrect feature type | 400 | Bad request |
Service not available | 503 | service unavailable |
Feature XML representation
See XML schema definition for Feature object
Feature definition
Component description
A Feature definition is the description of a Feature. It contains the type of the feature from the Feature Ontology.
REST operations
Description | Method | URI | Parameters | Result | Status codes |
get description of a specific feature definition (includes reference_id) | GET | /feature_definition/{id} | - | xml representation of feature definition | 200,404,503 |
create a new feature definition | POST | /feature_definition | name: String, reference_id: String, type: String | URI of new feature definition | 200,400,404,503 |
delete a feature definition | DELETE | /feature_definition/{id} | - |
- |
200,400,404,503 |
TO BE DISCUSSED: get a list of all available feature definitions |
GET |
/feature_definition |
- |
URI list of all available feature definitions |
200,404,503 |
TO BE DISCUSSED: get a list of all available feature definitions for a specific compound |
GET |
/feature_definition/compound/{cid} |
- |
URI list of all available feature definitions for the given compound |
200,404,503 |
TO BE DISCUSSED: It might not make sense to retrieve a list of all feature definitions on GET, because the number of results might be very large
TO BE DISCUSSED: when creating a new feature
definition , we might allow to create the reference on the fly and
specify reference name instead of id
HTTP status codes
Interpretation | Nr | Name |
Success | 200 | OK |
No feature definition found, or specific feature definition not found | 404 | Not Found |
Incorrect parameters | 400 | Bad request |
Service not available | 503 | service unavailable |
Feature definition XML representation
See XML scheme for Feature Definition object
Feature service
Component description
Service for mapping Feature values to compounds or conformers and feature definitions.
REST operations
Description | Method | URI | Parameters | Result | Status codes |
Retrieve a specific feature for a compound using the default conformer | GET | /feature_service/compound/{compound_id}/featuredefinition/{feature_definition_id} | - | URI of the requested feature | 200,404,503 |
Retrieve a specific feature for a compound for a specific conformer | GET | /feature_service/compound/{compound_id}/conformer/{conformer_id}/featuredefinition/{feature_definition_id} | - | URI of the requested feature | 200,404,503 |
As the Feature service is not a "real" object only the GET method with the compound id (or specific conformer id) and the feature definition id in the URI makes sense here.
TO BE DISCUSSED: Could this be merged with compound & conformer objects with dropping the "/feature_service" part of the URI ?
HTTP status codes
Interpretation | Nr | Name |
Success | 200 | OK |
No feature found | 404 | Not Found |
Service not available | 503 | service unavailable |
Reference
Component description
Each feature definition has exactly one Reference. The Reference gives additional information on how the Features for this definition are created (experimental protocol or algorithm parameters).
REST operations
Description | Method | URI | Parameters | Result | Status codes |
read information on a specific reference | GET | /reference/{id} | - | xml representation of the reference | 200,404,503 |
update information on a specific reference | PUT | /reference/{id} | name:String, algorithm_id:String, parameters:String, experimental_protocol:String | - | 200,400,404,503 |
create a new reference | POST | /reference | name:String, algorithm_id:String, parameters:String, experimental_protocol:String | URI of new reference | 200,400,404,503 |
HTTP status codes
Interpretation | Nr | Name |
Success | 200 | OK |
Incorrect parameters | 400 | Bad request |
No reference found | 404 | Not Found |
Service not available | 503 | service unavailable |