Page History
Include Page | ||||
---|---|---|---|---|
|
This page includes the following topics.
Custom nh | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||
Find Data Element by Public ID and VersionThe following examples find a data element where Public ID = 62 and Version=6, displaying the basic metadata attributes. Results Displayed in XMLThe URL for the results from the caDSR II REST API is
Results Displayed in HTMLThe URL for the results from the caDSR II REST API is
Results Displayed in JSON | |||||||||||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||||||||||
Column | OverviewUsing the API, developers can allow an application to connect to caDSR and search the database. The API is available on the download center. The caDSR HTTP API (XML-HTTP API) and CDE Browser provide access to, and a means of linking to, caDSR metadata through a standard internet browser. caDSR HTTP API results are displayed in XML format and can be displayed in an internet browser or by means of an XSLT stylesheet. The caDSR 4.0 Technical Guide describes the caDSR XML-HTTP API and provides a catalog of the caDSR operations and search criteria. A few simple examples of caDSR operations are provided below. The attached MS Word documents for the examples show sample results and the "http" statements used to produce the results, and provide information about how to interpret the results. ExamplesExample 1Find a Data Element where Public Id = 2178693 and Version=2.1 and display the basic metadata attributes. Either the CDE Browser or the caDSR HTTP API can be used to satisfy this query and results from both are shown below. Example 1 Results Displayed in the CDE BrowserThis method can be used to retrieve Data Elements only when you know both the Public ID and Version number. (If you have trouble with the following link in Firefox, cut and paste it into IE.) Or alternatively http://freestyle.nci.nih.gov/freestyle/do/cdebrowser?publicId=2178693&version=2.1 Sample CDE Browser Output from Example 1 Example 1 Results Displayed in XMLThe URL for the results from the caDSR 4.0 HTTPII REST API is :
Allow Machine-to-machine Retrieval of a Data Element by Public ID and VersionThe 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.)
If you want to create a REST API call from machine to machine or application to application, start your URL as follows:
Find Data Element by Public IDThe 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 HTTPREST API query getting all versions. The URL for the results from the caDSR 4.0 HTTPII REST API is :
Or the query can retrieve only the latest version.
Find Data Element by Public ID, Display All Related ComponentsThe following example finds a data element with Public ID = 62, displaying all the metadata associated with the Data Elementdata element's related components, not just the basic attributes. This is handled in the caDSR HTTPREST API using a parameter that produces expanded ("heavy") XML. The URL for the results from the caDSR 4.0 HTTPII REST API is :
Find DEC Using Public ID, Display All Associated Data ElementsThe following example finds all the data elements associated with the DEC with Public ID = 2178546, displaying the basic metadata of the Data Element ConceptDEC and its Data Elementsdata elements. The URL for the results from the caDSR 4.0 HTTPII REST API is :
FindonlyData Elements Associated with a Particular DEC Public ID and VersionThe following example finds only data elements associated with VERSIONVersion 2.1 of Data Element ConceptDEC with Public IdID = 2178546. The URL for the results from the caDSR 4.0 HTTPII REST API is :
Get Data Elements Using Concept Code or Concept NameThe 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. Find All Data Elements Where Associated Concept is Primary Concept of Data Element's Object ClassThis example shows the use of the Concept Code (C19448). Results are returned in XML. The URL for the results from the caDSR 4.0 HTTPII REST API is :
Find All Data Elements Where Associated Concept is Primary Concept of Data Element's PropertyThe URL for the results from the caDSR 4.0 HTTPII REST API is :
Find All Data Elements Where Associated Concept is Primary Concept of One of Data Element's Value Domain Value MeaningsThe URL for the results from the caDSR 4.0 HTTPII REST API is :
Find All Enumerated Permissible Values for a Data ElementThe 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). You must specify either version or latestVersionIndicator. If you specify latestVersionIndicator=No, the query returns all permissible values across all versions of the CDE. The URL for the results from the caDSR 4.0 HTTPII REST API is :
|