NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Deleted mention of legacy API, based on 4/28 reply from Denise.
Excerpt
hiddentrue

Copied content from Word document. 

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-caDSR II API interface, 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.

Panel
borderColorsilver
borderStylesolid

https://cadsrapi.cancer.gov/invoke/caDSR/<Target Format>?query=<Target>[<Criteria>[

...

@<ID>=<ID_VALUE>, ]]

For example:

Panel
borderColorsilver
borderStylesolid
Clipboard
AllowLineWraptrue

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

GetXML,

JSON

GetJSON,

HTML

or GetHTML).

 The Target Format is preceded with

Use the prefix

“Get”

Get followed by the format (one of XML, JSON, or HTML) concatenated as one word

.

:  

  • If your Target Format
=XML:  …
  • is XML, use … /GetXML?query=
  will
  • to return Target in the form XML.
  • If your Target Format
=
  • is JSON
  • , use /GetJSON?query=
will
  • to return Target in the form JSON.
  • If your Target Format
=
  • is HTML
:
  • , use /
GetHTTP
  • GetHTML?query=
will
  • to return Target in the form HTML.

<Target>

Result class name. Use a valid caDSR Class name

.  (One of DataElement, Form, …) e.g.  …

, such as DataElement or Form. For a full list, refer to the caDSR II Domain Class Browser:

https://cadsrapi.cancer.gov/caDSR/domain/browser.dsp

For example, use … query=Form[ ]

  will

to return caDSR Form class information.

<Criteria>

The criteria class that identifies the association to be traversed when retrieving the target/result class.

   The

The Criteria

will

constrain the target/result based on the associated

id/id value

ID and ID_VALUE pair or pairs

provided

that you provide in the

braces

square brackets [ … ].

Note: The Criteria can be nested within the braces

You can nest Criteria in the square brackets [ … ]. If the Criteria

=

is the Target, then

a short hand can be used and the Criteria is assumed

you can use a shorthand and the system assumes the Criteria to be equal to the Target. (

this is referred to as an

This is considered Implicit Criteria.)

.

  • Implicit Example: Use GetXML?query=DataElement[
@publicId
  • @publicId=62]
  Return
  • to return a Data Element with Data Element
Public Id
  • publicId=62 in XML format.
  • Nested and Implicit Example:
 
  • Use GetXML?query=Form[Protocol[
@preferredName
  • @preferredName=C3D ADOPTER TEMPLATES],
@publicId
  • @publicId=2392775]
Returns
  • to return Form with Protocol preferredName=C3D ADOPTER TEMPLATES
AND
  • 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

performs the

“AND”

AND operation for

all id/id value

all ID and ID_VALUE pair parameters you have provided for the Criteria

class

class you have identified.

e.g. [@publicId= …] 
  • For version: Do not use both @version and @latestVersionIndicator together. Specify @publicId=x,@version OR specify @publicId=x,@latestVersionIndicator.
  • Otherwise, one or more ID-criteria pairs may be used.

For example, use [@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 @latestVersionIndicator use =Yes or =No. Yes returns the latest version of the publicId, No returns all versions. 

For example, use

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):

...

to identify a qualified criterion for the class specified in <Target>. 

Include Page
CSS Stylesheet 1
CSS Stylesheet 1