Programatically Querying the EMBRACE Service Registry
The EMBRACE Service Registry Query Web Service
The EMBRACE Service Registry provides a query API that can be accessed in the following ways:
- XML-RPC - http://embraceregistry.net/services/xmlrpc
- REST - http://embraceregistry.net/services/rest
The web service allows you to programatically query the service registry in a number of ways, the following methods are provided:
ws_registry.searchWebServices
This method provides the ability to query the service registry by search phrase. The method will return details of services matching the search criteria.
This method takes the following input parameters:
- search_keys - the search string
- header - whether or not to summarise the data that is returned, TRUE returns summarised data, leave the parameter value empty to return full details.
This method returns an array of service details. If header parameter value is empty then the following data for each service is returned:
- nid (id assigned to the service by the registry)
- title (name of service)
- service_status (current status of the service, 0 = UNKNOWN, 1 = PASSED, 2 = WARNING, and 3 = FAILED)
- link (a link this service within the registry)
If header parameter value is empty the following additional data will be returned:
- created (date of service creation)
- version
- url (supported url)
- wsdl_url
- das_url
- rest_url
Example output data for input parameters: search_keys = "protein sequence"
Array
(
[0] => Array
(
[nid] => 152
[title] => BLASTp at SIB (protein query sequence(s) against protein database)
[service_status] => 0
[link] => http://www.embraceregistry.net/service/blastp-sib-protein-query-sequences-against-protein-database
[created] => 1225793159
[version] => 0.9.8 beta
[support_url] => http://ch.embnet.org/software/aBLAST.html
[wsdl_url] => http://wsembnet.vital-it.ch/soaplab2/services/embnet.blastp?wsdl
[das_url] =>
[rest_url] =>
)
[1] => Array
(
[nid] => 161
[title] => tBLASTn at SIB (protein query sequence(s) against a nucleotide sequence database dynamically translated in all reading frames)
[service_status] => 0
[link] => http://www.embraceregistry.net/service/tblastn-sib-protein-query-sequences-against-nucleotide-sequence-database-dynamically-transla
[created] => 1225796465
[version] => 0.9.8 beta
[support_url] => http://ch.embnet.org/software/aBLAST.html
[wsdl_url] => http://wsembnet.vital-it.ch/soaplab2/services/embnet.tblastn?wsdl
[das_url] =>
[rest_url] =>
)
)
To execute the example REST query click the link below.
Example REST Response for query http://embraceregistry.net/services/rest?method=ws_registry.searchWebServices&search_keys=protein%20sequence <rest generator="xml_writer" version="1.0"> <status>success</status> <response> <item id="0"> <nid>152</nid> <title>BLASTp at SIB (protein query sequence(s) against protein database)</title> <service_status>0</service_status> <link>http://embraceregistry.net/service/blastp-sib-protein-query-sequences-against-protein-database</link> <created>1225793159</created> <version>0.9.8 beta</version> <support_url>http://ch.embnet.org/software/aBLAST.html</support_url> <wsdl_url>http://wsembnet.vital-it.ch/soaplab2/services/embnet.blastp?wsdl</wsdl_url> <das_url/> <rest_url/> </item> <item id="1"> <nid>161</nid> <title>tBLASTn at SIB (protein query sequence(s) against a nucleotide sequence database dynamically translated in all reading frames)</title> <service_status>0</service_status> <link>http://embraceregistry.net/service/tblastn-sib-protein-query-sequences-against-nucleotide-sequence-database-dynamically-transla</link> <created>1225796465</created> <version>0.9.8 beta</version> <support_url>http://ch.embnet.org/software/aBLAST.html</support_url> <wsdl_url>http://wsembnet.vital-it.ch/soaplab2/services/embnet.tblastn?wsdl</wsdl_url> <das_url/> <rest_url/> </item> </response> </rest>
Example clients are attached at the bottom of this page.
ws_registry.checkServiceByID
This method provides the ability to check the status of a service given a service ID.
This method takes the following input parameters:
- id - the service id given by the service registry
This method returns an integer representing the status of the service. The following details are returned:
- service_status (current status of the service, 0 = UNKNOWN, 1 = PASSED, 2 = WARNING, and 3 = FAILED)
Example output data for input parameters: id = 58 1
To execute the example REST query click the link below.
Example REST Response for query http://embraceregistry.net/services/rest?method=ws_registry.checkServiceByID&id=58 <rest generator="xml_writer" version="1.0"> <status>success</status> <response>1</response> </rest>
Example clients are attached at the bottom of this page.
ws_registry.checkServiceByIDSet
This method provides the ability to check the status of a group of services given an array of service ID's.
This method takes the following input parameters:
- idset - an array of service id's given by the service registry
This method returns an integer array representing the status of the specified services. The following details are returned:
- service_status array (current status of the service, 0 = UNKNOWN, 1 = PASSED, 2 = WARNING, and 3 = FAILED)
Example output data for input parameters: idset = 58,101
Array
(
[58] => 1
[101] => 0
)
To execute the example REST query click the link below.
Example REST Response for query http://embraceregistry.net/services/rest?method=ws_registry.checkServiceByIDSet&idset=58,101 <rest generator="xml_writer" version="1.0"> <status>success</status> <response> <item id="58">1</item> <item id="101">0</item> </response> </rest>
Example clients are attached at the bottom of this page.
ws_registry.getAllServiceHeaders
This method gets summarised details of all the registry services. This enables third party applications to get a full list of services held within the registry.
This method does not take input parameters.
This method returns an array of service headers giving summarised details of each service. The details that are returned are:
- nid (id assigned to the service by the registry)
- title (name of service)
- service_status (current status of the service, 0 = UNKNOWN, 1 = PASSED, 2 = WARNING, and 3 = FAILED)
- link (a link this service within the registry)
Example output data.
Array
(
[0] => Array
(
[nid] => 186
[title] => AffyDEGFinder
[service_status] => 1
[link] => http://embraceregistry.net/node/186
)
[1] => Array
(
[nid] => 62
[title] => AIDA document retrieval service
[service_status] => 0
[link] => http://embraceregistry.net/node/62
)
[2] => Array
(
[nid] => 153
[title] => BioMart MartService
[service_status] => 1
[link] => http://embraceregistry.net/node/153
)
.
.
.
.
)
To execute the example REST query click the link below.
Example REST Response for query http://embraceregistry.net/services/rest?method=ws_registry.getAllServiceHeaders <rest generator="xml_writer" version="1.0"> <status>success</status> <response> <item id="0"> <nid>186</nid> <title>AffyDEGFinder</title> <service_status>1</service_status> <link>http://embraceregistry.net/node/186</link> </item> <item id="1"> <nid>62</nid> <title>AIDA document retrieval service</title> <service_status>0</service_status> <link>http://embraceregistry.net/node/62</link> </item> <item id="2"> <nid>153</nid> <title>BioMart MartService</title> <service_status>1</service_status> <link>http://embraceregistry.net/node/153</link> </item> . . . </response> </rest>
Example clients are attached at the bottom of this page.
ws_registry.getServiceDetails
This method returns the details of a specified service. The method will return either summarised or full details about the service
This method takes the following input parameters:
- id - the service id given by the service registry.
- header - whether or not to summarise the data that is returned, TRUE returns summarised data, leave the parameter value empty to return full details.
This method returns an array of service details. If header is set to TRUE then following data for each service is returned:
- nid (id assigned to the service by the registry)
- title (name of service)
- service_status (current status of the service, 0 = UNKNOWN, 1 = PASSED, 2 = WARNING, and 3 = FAILED)
- link (a link this service within the registry)
If header parameter is empty the following additional data will be returned:
- created (date of service creation)
- version
- url (supported url)
- wsdl_url
- das_url
- rest_url
Example output data for input parameters: id = 152
Array
(
[nid] => 152
[title] => BLASTp at SIB (protein query sequence(s) against protein database)
[service_status] => 0
[link] => http://embraceregistry.net/node/152
[created] => 1225793159
[version] => 0.9.8 beta
[support_url] => http://ch.embnet.org/software/aBLAST.html
[wsdl_url] => http://wsembnet.vital-it.ch/soaplab2/services/embnet.blastp?wsdl
[das_url] =>
[rest_url] =>
)
To execute the example REST query click the link below.
Example REST Response for query http://www.embraceregistry.net/services/rest?method=ws_registry.getServiceDetails&id=152 <rest generator="xml_writer" version="1.0"> <status>success</status> <response> <nid>152</nid> <title>BLASTp at SIB (protein query sequence(s) against protein database)</title> <service_status>0</service_status> <link>http://embraceregistry.net/node/152</link> <created>1225793159</created> <version>0.9.8 beta</version> <support_url>http://ch.embnet.org/software/aBLAST.html</support_url> <wsdl_url>http://wsembnet.vital-it.ch/soaplab2/services/embnet.blastp?wsdl</wsdl_url> <das_url/> <rest_url/> </response> </rest>
| Attachment | Size |
|---|---|
| ExampleRESTClient.php_.zip | 877 bytes |
- Printer-friendly version
- Login to post comments