Accessing NPD content via web services

The current version of the NPD offers both REST and SOAP web service access methods.

REST

The REST access method operates via the URLs that point to the data content of search results. Therefore, if you search for a protein, for example, ATRX and view the results, you will see a collection of tables. This result set will be referenced at the URL ../user/1NP00017, which shows that you are using the user interface and are viewing Gene 1NP00017. You can view just one table of results for that gene by appending the result table name to the URL, for example ../user/1NP00017/names will show just the names information about the gene ATRX.

Different content types are available by appending .csv or .xml to the URL. Also, the REST content can be accessed via a dedicated REST URL, which will default to XML output. For example, the URL for 1NP00017 could be entered either as ../user/1NP00017.xml, or you could use the rest URL directly, such as ../rest/1NP00017.

It is also possible to retrieve the details about a gene using the gene name instead of the Gene ID, but this will only work if you enter a correct and unique gene name. So the above example would work using ../user/atrx or ../rest/atrx.

Using these REST URLs it is possible to query the database directly from within a script or other sort of software tool, just by referencing the valid URL.

SOAP

A SOAP WSDL is also available for use with software platforms that can utilise them. The current WSDL is available at ../soap/npd.wsdl. Simply use this URL in your preferred software solution, and you will have access to all the functionality that has been implemented in the WSDL to date:

geneID(string GeneName) - output string GeneID

e.g. provide gene name ATRX, receive output 1NP00017

search(string GeneName) - output array GeneIDs

e.g. provide gene name ATRX, receive output 1NP00017 but provide partial gene name PRP receive 33 partial match GeneID outputs (1NP00001, etc)

SQLquery(string SQLquery) - output array results

e.g. provide:
select GeneName,RecordID from mytsummeta where GeneID like '1NP00017'
and receive an array of the values in the select field, so in this case receive ATRX and the record ID

queryBuilder(array(select,table,field,value)) - return array results

builds a query for you e.g. provide :
select - GeneName,RecordID
table - mytsummeta
field - GeneID
value - 1NP00017

builds the query:
SELECT select FROM table WHERE field LIKE value

and returns result array - only tested on really simple query so far such as select GeneName, table mytsummeta, field GeneID, value 1NP00017

links(string GeneID) - output array links

e.g. provide GeneID 1NP00017, receive an array of all the internet links attached to that gene - so links to papers in PubMed, Entrez Protein details, and so on.

schema(string database) - output the database schema

provide database name as as input, get schema back (though there is only one NPD database available at present)

Unfortunately the output of this function is presently just a string representation of an XML schema, so the tags are not properly printed.

tables(string database) - output list of available tables in the given database

provide database name as input, get table list back (though there is only one NPD database available at present)

fields(string table) - output fields on a given table

provide a table name, such as mytsummeta, and receive a list of the fields in that table

rest(string geneID,string subsection) - return the subsection of information about that gene

Reflects the functionality implemented by the REST access method. Giving a gene ID and a subsection, as defined in the REST functionality, returns the details in that subsection about that protein.

e.g. provide 1NP00017 and Keywords, and the output will be the list of available keywords