Web-service interface
The web-service interface provides endpoints for REST and SOAP communication with the Health 2.0 API directory. It enables to integrate the directory's data into third-party scripts, apps and mashups.
Currently, the interface is under development and might change. If you find something that can be improved, please feel free to contact us.
REST- and SOAP-APIs
The directory provides a REST and a SOAP interface to communicate with. The REST endpoint is http://api.health2api.com/rest/ that returns information in JSON format. The SOAP endpoint is http://api.health2api.com/soap/services/health2api/; its functionality is described in WSDL.
To get started you need to sign-up and get your personal user token for authentication. Then the interface can be used as followed.
Query for topics
- Return topic taxonomy:
RESThttp://api.health2api.com/rest/topics.json?auth_token=[:user_token]
SOAPhttp://api.health2api.com/soap/services/health2api/topics?auth_token=[:user_token]
where [:user_token] is the personal authentication token and a combination of the following parameters can be appended to define a filter (AND-conditional):
Parameter Description Value Example Parameter Description Value Example id a single topic id string id=12name a single topic name (case sensitive) string name=Sportkeywords comma separated list of keywords, browsing the topic names (OR-conditional) string keywords=genome,genomics - Return specific topic and its sub-topics:
RESThttp://api.health2api.com/rest/topics/[:id].json?auth_token=[:user_token]
where [:id] is the id of the specific topic and [:user_token] is the personal authentication token
Query for types
- Return type taxonomy:
RESThttp://api.health2api.com/rest/types.json?auth_token=[:user_token]
SOAPhttp://api.health2api.com/soap/services/health2api/types?auth_token=[:user_token]
where [:user_token] is the personal authentication token and a combination of the following parameters can be appended to define a filter (AND-conditional):
Parameter Description Value Example Parameter Description Value Example id a single type id string id=5name a single type name (case sensitive) string name=Text%20Miningkeywords comma separated list of keywords, browsing the type names (OR-conditional) string keywords=tagging,annotation - Return specific type and its sub-types:
RESThttp://api.health2api.com/rest/types/[:id].json?auth_token=[:user_token]
where [:id] is the id of the specific type and [:user_token] is the personal authentication token
Query for protocols
- Return list of protocols:
RESThttp://api.health2api.com/rest/protocols.json?auth_token=[:user_token]
SOAPhttp://api.health2api.com/soap/services/health2api/protocols?auth_token=[:user_token]
where [:user_token] is the personal authentication token and a combination of the following parameters can be appended to define a filter (AND-conditional):
Parameter Description Value Example Parameter Description Value Example id a single protocol id string id=2name a single protocol name (case sensitive) string name=RESTkeywords comma separated list of keywords, browsing the protocol names (OR-conditional) string keywords=soap - Return specific protocol:
RESThttp://api.health2api.com/rest/protocols/[:id].json?auth_token=[:user_token]
where [:id] is the id of the specific protocol and [:user_token] is the personal authentication token
Query for features
- Return list of features:
RESThttp://api.health2api.com/rest/features.json?auth_token=[:user_token]
SOAPhttp://api.health2api.com/soap/services/health2api/features?auth_token=[:user_token]
where [:user_token] is the personal authentication token and a combination of the following parameters can be appended to define a filter (AND-conditional):
Parameter Description Value Example Parameter Description Value Example id a single feature id string id=3name a single feature name (case sensitive) string name=commercialkeywords comma separated list of keywords, browsing the feature names (OR-conditional) string keywords=open - Return specific feature:
RESThttp://api.health2api.com/rest/features/[:id].json?auth_token=[:user_token]
where [:id] is the id of the specific feature and [:user_token] is the personal authentication token
Query for tags
- Return list of tags:
RESThttp://api.health2api.com/rest/tags.json?auth_token=[:user_token]
SOAPhttp://api.health2api.com/soap/services/health2api/tags?auth_token=[:user_token]
where [:user_token] is the personal authentication token and a combination of the following parameters can be appended to define a filter (AND-conditional):
Parameter Description Value Example Parameter Description Value Example id a single tag id string id=586name a single tag name (case sensitive) string name=Organkeywords comma separated list of keywords, browsing the tag names (OR-conditional) string keywords=search - Return specific tag:
RESThttp://api.health2api.com/rest/tags/[:id].json?auth_token=[:user_token]
where [:id] is the id of the specific tag and [:user_token] is the personal authentication token
Query for APIs
- Return list of APIs:
RESThttp://api.health2api.com/rest/apis.json?auth_token=[:user_token]
SOAPhttp://api.health2api.com/soap/services/health2api/apis?auth_token=[:user_token]
where [:user_token] is the personal authentication token and a combination of the following parameters can be appended to define a filter (AND-conditional):
Parameter Description Value Example Parameter Description Value Example id a single api id string id=10189name a single api name (case sensitive) string name=acrominetopics comma separated list of topic ids (OR-conditional);
sub-topics are ignored and should be set specificallystring topics=12,23types comma separated list of type ids (OR-conditional);
sub-types are ignored and should be set specificallystring types=5,7protocols comma separated list of protocol ids (OR-conditional) string protocols=1,2features comma separated list of feature ids (OR-conditional) string features=1,3tags comma separated list of tag ids (OR-conditional) string tags=582,586keywords comma separated list of keywords (OR-conditional), browsing the API name and description string keywords=blood,pressure -
Examples:
RESThttp://api.health2api.com/rest/apis.json?protocols=1&keywords=blood,pressure&auth_token=user_token
SOAPhttp://api.health2api.com/soap/services/health2api/apis?protocols=1&keywords=blood,pressure&auth_token=user_token
Changelog
- v0.2 – 12th March 2012:
- name and keywords fields added to query-strings
- parent_id field added to topics and types taxonomies
- user authentication added to SOAP services
- new SOAP services to query for protocols, tags, and features
- unified the REST and SOAP interfaces
- improvements in database access efficiency
- v0.1 – 17th February 2012 – initial release


