NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Deleted section based on reply from Brad Biggers.

...

Info
titleMultiple AND IN Note

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

Setting Result Set and Page Size for REST-like API

For a caDSR REST-like API:

  • You can expand or limit the result set using the resultCounter parameter. By default, the result set for a REST-like call is limited to 1,000 records, with the set number of records appearing per page, either as the default or as a specified page size.
  • To change the maximum number of results returned for a query, add the resultCounter=## parameter to the call. 
  • If your total results are less than the page size, the first page of results contain all the returned items.
  • The resultCounter and pageSize capabilities are available for use in REST-like API calls.
  • For REST-like (XML-HTTPS) calls, page size information is cached, so that if you make a call that identifies a particular page size, subsequent calls will also use that same page size, even without the parameter.
  • To change the number of results appearing on each page, include a different pageSize parameter in a call, or clear the cache to return to the default.

The following example is how to set the result set and page size.

Code Block
titleResult Set and Page Size
https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=gov.nih.nci.cadsr.domain.Form&gov.nih.nci.cadsr.domain.Form[@workflowStatusName=RELEASED]&startIndex=0&pageSize=30&resultCounter=300 

You can also add the startIndex parameter to indicate which record should be the first on the page. This means you can alter a query to return the second or third page of results. Generally speaking, however, the startIndex parameter is "zero based" - you start at zero and subsequent pages begin with a startIndex of the next result page. Using the above query as an example, the second page of the results would show startIndex=31, because the page size is 30.

Info
titlePage Size Note

Page size information is cached, so that if you make a call that identifies a particular page size, subsequent calls will also use that same page size, even without the parameter. To change the number of results appearing on each page, include a different size parameter in a call, or clear the cache to return to the default.

Retrieving the Corresponding EVS Concept Codes for the Value Domain

...