NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

For cadsr-II the URL has been updated slightly from the legacy caDSR but returns the data in the same format as legacy caDSR.

To invoke this interface for the cadsr-II, use a URL in the form outlined below.  The items in bold are required and the items in angle brackets < .. > should be replaced with specific information based on the parameters desired.

https://cadsrapi.cancer.gov/invoke/caDSR/ <Target Format>?query=<Target>[<Criteria>[@<ID>=<ID_VALUE>,]]

Parameter

Description

<Target Format>

Result format (XML, JSON, HTML).  The Target Format is preceded with the prefix “Get” followed by the format (one of XML, JSON, HTML) concatenated as one word.  


Target Format=XML:  … /GetXML?query= …   will return Target in the form XML.


Target Format = JSON:  … /GetJSON?query= … will return Target in the form JSON.


Target Format = HTML: … /GetHTTP?query= … will return Target in the form HTML

<Target>

Result class name. Use a valid caDSR Class name.  (One of DataElement, Form, …)


 e.g.  … query=Form[will return caDSR Form class information.

<Criteria>

The criteria class that identifies the association to be traversed when retrieving the target/result class.   The Criteria will constrain the target/result based on the associated id/id value pair or pairs provided in the braces [ … ].


Note: The Criteria can be nested within the braces [ … ]. If the Criteria=Target then a short hand can be used and the Criteria is assumed to be equal to Target (this is referred to as an Implicit Criteria).


Implicit Example: GetXML?query=DataElement[@publicId=62]  Return Data Element with Data Element Public Id=62 in XML format.

Nested and Implicit ExampleGetXML?query=Form[Protocol[@preferredName=C3D ADOPTER TEMPLATES],@publicId=2392775]

Returns Form with Protocol preferredName=C3D ADOPTER TEMPLATES AND Form publicId=2392775



<ID>

Attribute of the Criteria class used to constrain the query.  For more than one attribute use a comma between each attribute.  The query will perform the “AND” operation for all id/id value pair parameters provided for the Criteria class identified.


e.g. [@publicId= …]  combined with the ID_VALUE below will be used to identify the constraints for the result returned.

<ID_VALUE>

A string identifying the qualified criteria class data to be used as a filter on the result set.  1 or more id-criteria pair may be used.


e.g. [@publicId=62,@version=6


A complete example.

For example: https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement[@publicId=62,@version=6]

                                                                                 |                               |          Implicit   |         |         |           |

                                                                 Target Format                   Target     Criteria   ID    Value   ID      Value


Comparing the format of the legacy caDSR to the cadsr-II format:

OLD (legacy caDSR):


https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement[@publicId=62][@version=6]


NEW (cadsr-II):

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement[@publicId=62,@version=6]







  • No labels