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:
    REST
    http://api.health2api.com/rest/topics.json?auth_token=[:user_token]
    SOAP
    http://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=12
    name a single topic name (case sensitive) string name=Sport
    keywords comma separated list of keywords, browsing the topic names (OR-conditional) string keywords=genome,genomics
  • Return specific topic and its sub-topics:
    REST
    http://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:
    REST
    http://api.health2api.com/rest/types.json?auth_token=[:user_token]
    SOAP
    http://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=5
    name a single type name (case sensitive) string name=Text%20Mining
    keywords comma separated list of keywords, browsing the type names (OR-conditional) string keywords=tagging,annotation
  • Return specific type and its sub-types:
    REST
    http://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:
    REST
    http://api.health2api.com/rest/protocols.json?auth_token=[:user_token]
    SOAP
    http://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=2
    name a single protocol name (case sensitive) string name=REST
    keywords comma separated list of keywords, browsing the protocol names (OR-conditional) string keywords=soap
  • Return specific protocol:
    REST
    http://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:
    REST
    http://api.health2api.com/rest/features.json?auth_token=[:user_token]
    SOAP
    http://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=3
    name a single feature name (case sensitive) string name=commercial
    keywords comma separated list of keywords, browsing the feature names (OR-conditional) string keywords=open
  • Return specific feature:
    REST
    http://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:
    REST
    http://api.health2api.com/rest/tags.json?auth_token=[:user_token]
    SOAP
    http://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=586
    name a single tag name (case sensitive) string name=Organ
    keywords comma separated list of keywords, browsing the tag names (OR-conditional) string keywords=search
  • Return specific tag:
    REST
    http://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

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