NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A few examples in both XML and HTML 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. See also the REST API FAQs.

Setting Result Set and Page Size for REST-like API

For a caDSR RESTlike API:

  • You can expand or limit the result set using the resultCounter parameter. By default, the result set for a RESTlike 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.  For details and an example, see Setting Result Set and Page Size for REST-like API on the caDSR API REST-like Examples page of this wiki.
  • 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 RESTlike 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.

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

http://cadsrapi.nci.nih.gov/cadsrapi41/GetXML?query=gov.nih.nci.cadsr.domain.Form&gov.nih.nci.cadsr.domain.Form[@workflowStatusName=RELEASED]&startIndex=0&pageSize=30&resultCounter=300

...