NIH | National Cancer Institute | NCI Wiki  

caDSR API Guide | 2 - caDSR API REST-like Examples

This chapter contains basic overview information about the caDSR API.

The following topics are included in this page.

Overview

The caDSR Application Programming Interface (API) includes the following services.

ServiceDescription

RESTlike Services for caDSR

caDSR API provides a JAVA API, a REST-like (XML-HTTP) API.

Freestyle Search API 

Merged into the caDSR API, the Freestyle Search API performs "fuzzy" searches. Freestyle Search functions are the same, but there is a common repository for related API calls.

URL Note

If you access the previous Freestyle Search URL, https://freestyle.nci.nih.gov, you will be directed to the caDSR API Freestyle Search user interface.

Domain Packages

The gov.nih.nci.cadsr.domain package provides access to caDSR database tables, including one for each type of administered item, with the exception of the following lookup tables:

  • Datatype
  • Format
  • UOM
  • Designation Type
  • Document Type
  • Classification Scheme Type
  • Classification Scheme Item
  • Workflow Status and Registration Status names/definitions
  • Language Types
  • Origins LOV

The gov.nih.nci.cadsr.umlproject.domain package provides access to a view of the caDSR database tables that correlates to a UML Model. The classes in this package are:

  • Project
  • AttributeTypeMetadata
  • SemanticMetadata
  • SubProject
  • TypeEnumerationMetadata
  • UMLAssociationMetadata
  • UMLClassMetadata
  • UMLAttributeMetadata
  • UMLPackageMetadata
  • UMLGeneralizationMetadata

Pre-requisites for Using the caDSR API

The following are pre-requisites needed before using the caDSR API.

  • Install Java 8.
  • Install Apache ANT version 1.9.x.
  • Configure the ant command in your environment.

Creating the Zip File

Download the entire caDSR API 4.1 Client build as a zip file:

A caDSR API Client example is provided at the following project GIT location:

Running from the Command Line

To run the caDSR API from the command line

  1. Unzip the file caDsrClient.zip.
  2. Change the directory to directory caDsrClient
  3. Run the following command:

    Command Line
    >ant -f projectBuilder.xml

Running from Eclipse

To run from Eclipse (Eclipse Marc and up configured with Java 8)

  1. Create a new Eclipse workspace folder, cadsrworkspace.
  2. Unzip caDsrClient.zip in this newly-created Eclipse workspace folder, cadsrworkspace/caDsrClient.
  3. Open Eclipse in the workspace folder, cadsrworkspace.
  4. Go to Eclipse File->Import menu, and import an existing java project, "caDsrClient" in your workspace.
  5. Check JRE library settings in your project environment by selecting Project->Properties->Java Build Path->Libraries
  6. Run the main class gov.nih.nci.cadsr.client.TestCaDsrApi.

Return to top


  • No labels