NIH | National Cancer Institute | NCI Wiki  

You can try the caDSR APIs to search for caDSR data by entering a URL in the address bar of a browser and passing parameters in that URL. This page provides examples to get you started, in legacy and caDSR II format: 
  • A URL in legacy REST-like (XML-HTTP) format returns only HTML or XML. The Legacy caDSR Domain Class Browser page is a web browser interface that allows you to test the legacy caDSR API. This page also has links to the Legacy Java Docs. 
  • A URL in caDSR II format returns HTML, XML, or JSON. Using the API, you can allow an application to connect to caDSR and search the database. The caDSR II Domain Class Browser page is a web browser interface that allows you to test the caDSR II API.

You can display any of these formats (HTML, XML, or JSON) in an Internet browser by changing the parameter (GetHTML, GetXML, or GetJSON). 

Multiple AND IN Note

You cannot enter multiple "and" or "in" values for search criteria when using the REST (XML-HTTP) API.

If you have trouble using any URL on this page in your Internet browser, copy and paste it into another browser. (The caDSR team tests functionality in Chrome.)

Headings on this page marked with two asterisks (**) reflect functionality available in caDSR II but not in legacy caDSR. 

This page includes the following topics.

Contents of This Page

1.1. Find Data Element by Public ID and Version

The following examples find a data element where Public ID = 62 and Version=6, displaying the basic metadata attributes. 

1.1.1. Legacy: Results Displayed in XML

The URL for the results from the caDSR 4.1.x REST API is

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

1.1.2. caDSR II: Results Displayed in XML

The URL for the results from the caDSR II REST API is

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

1.1.3. caDSR II: Results Displayed in HTML

The URL for the results from the caDSR II REST API is

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

1.1.4. caDSR II: Results Displayed in JSON

The URL for the results from the caDSR II REST API is

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

1.2. **Allow Machine-to-machine Retrieval of a Data Element by Public ID and Version

The following caDSR II example allows machine-to-machine retrieval of a data element by public ID and version. (You can test this URL only in a machine-to-machine scenario, not in a browser.)

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

If you want to create a REST API call from machine to machine or application to application, start your URL as follows: 

https://cadsrapi.cancer.gov/rad/caDSR.restapi:GetXML_rad/

1.3. Find Data Element by Public ID

The following example finds a data element with Public ID = 62, displaying the basic metadata attributes. Since the version is not known, this query can only be handled via a caDSR REST API query getting all versions.

1.3.1. Legacy

The URL for the results from the caDSR 4.1.x REST API is

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


Or the query can retrieve only the latest version.

https://cadsrapi.nci.nih.gov/cadsrapi4/GetHTML?query=DataElement[@publicId=62][@latestVersionIndicator=Yes]

1.3.2. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetHTML?query=DataElement[@publicId=62]

Or the query can retrieve only the latest version.

https://cadsrapi.cancer.gov/invoke/caDSR/GetHTML?query=DataElement[@publicId=62,@latestVersionIndicator=yes]

1.4. Find Data Element by Public ID, Display All Related Components

The following example finds a data element with Public ID = 62, displaying all the metadata associated with the data element's related components, not just the basic attributes. This is handled in the caDSR REST API using a parameter that produces expanded ("heavy") XML.

1.4.1. Legacy

The URL for the results from the caDSR 4.1.x REST API is

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement&DataElement[@publicId=62]&returnHeavyXML=true

1.4.2. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement[@publicId=62]&returnHeavyXML=true

1.5. Find DEC Using Public ID, Display All Associated Data Elements

Find all the data elements associated with the DEC with Public ID = 2178546, displaying the basic metadata of the DEC and its data elements.

1.5.1. Legacy

The URL for the results from the caDSR 4.0 REST API is

https://cadsrapi.nci.nih.gov/cadsrapi4/GetHTML?query=DataElement&DataElementConcept[@publicId=2178546]

1.5.2. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetHTML?query=DataElement&DataElementConcept[@publicId=2178546]

1.6. Find Data Elements Associated with a Particular DEC Public ID and Version

The following example finds only data elements associated with Version 2.1 of DEC with Public ID = 2178546.

1.6.1. Legacy

The URL for the results from the caDSR 4.1.x REST API is

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement&DataElementConcept[@publicId=2178546][@version=2.1]

1.6.2. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement&DataElementConcept[@publicId=2178546,@version=2.1]

1.7. Get Data Elements Using Concept Code or Concept Name

The following examples show how to retrieve data elements using either the concept code or the concept name where the concept is the Primary concept of the related caDSR item. In these examples, results are returned in XML. 

1.7.1. Legacy: Find All Data Elements Where Associated Concept is Primary Concept of Data Element's Object Class

This example shows the use of either the Concept Code (C19448) or the Concept Name "Blood and Blood Products". Results are identical from these two calls, both are returned in XML.

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,DataElementConcept,ObjectClass,ConceptDerivationRule&ComponentConcept[Concept[@preferredName=C19448]][@primaryFlag=Yes]

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,DataElementConcept,ObjectClass,ConceptDerivationRule&ComponentConcept[Concept[@longName=Blood and Blood Products]][@primaryFlag=Yes]

1.7.2. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement,DataElementConcept,ObjectClass&ComponentConcept[Concept[@preferredName=C19448],@primaryFlag=Yes]

1.7.3. Legacy: Find All Data Elements Where Associated Concept is Primary Concept of Data Element's Property

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@preferredName=C42775]][@primaryFlag=Yes]

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@longName=E-mail%20Address]][@primaryFlag=Yes]

1.7.4. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement,DataElementConcept,Property&ComponentConcept[Concept[@preferredName=C42775],@primaryFlag=Yes]

1.7.5. Legacy: Find All Data Elements Where Associated Concept is Primary Concept of One of Data Element's Value Domain Value Meanings

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,EnumeratedValueDomain,ValueDomainPermissibleValue,PermissibleValue,ValueMeaning,ConceptDerivationRule&ComponentConcept[Concept[@preferredName=C19448]][@primaryFlag=Yes]

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,EnumeratedValueDomain,ValueDomainPermissibleValue,PermissibleValue,ValueMeaning,ConceptDerivationRule&ComponentConcept[Concept[@longName=Blood and Blood Products]][@primaryFlag=Yes]

1.7.6. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement,ValueDomain,ValueDomainPermissibleValue,PermissibleValue,ValueMeaning&ComponentConcept[Concept[@preferredName=C19448],@primaryFlag=Yes]

1.8. Find All Enumerated Permissible Values for a Data Element

The following examples find all enumerated permissible values for a data element using the data element's public ID and version or the data element's public ID (and getting latest version).

1.8.1. Legacy

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=PermissibleValue,ValueDomainPermissibleValue,EnumeratedValueDomain,ValueDomain&DataElement[@publicId=106][@version=5.1]

https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=PermissibleValue,ValueDomainPermissibleValue,EnumeratedValueDomain,ValueDomain&DataElement[@publicId=106][@latestVersionIndicator=Yes]

1.8.2. caDSR II

The URL for the results from the caDSR II REST API is

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=PermissibleValue,ValueDomainPermissibleValue,ValueDomain&DataElement[@publicId=106,@version=5.1]
  • No labels