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 13 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. 

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

For example:

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

In the above example, the Target Format is GetXML, the Target is DataElement, and the Implicit Criteria are @publicId=62,@version=6. In the Implicit Criteria, one ID is publicID and the corresponding Value is 62, while the other ID is version and the corresponding Value is 6. 

The following table provides more details: 

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, such as DataElement, Form, (full list TBD).

For example,  … 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 Example:  GetXML?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.

For example, [@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.

For example, [@publicId=62,@version=6] 


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

A legacy caDSR (old) example:

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

A caDSR II (new) example:

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

  • No labels