Class: Search

Search(jsXnat)

Search related API

Constructor

Constructor

.

Constructor

Parameters:
Name Type Description
jsXnat JsXnat
Source:

Methods

createStoredSearch(xml, cb)

Create A Stored Search

.

Create A Stored Search

Parameters:
Name Type Description
xml string

The XML structure of the stored search you want to create. Refer to https://wiki.xnat.org/display/XNAT17/Share+Custom+Data+Tables+as+Stored+Searches+for+Project+Reporting for notes on formatting.

cb function

optional callback function

Source:

getAvailableElements(format, cb)

Get A List Of Available Data Elements

.

Get A List Of Available Data Elements

Parameters:
Name Type Description
format string

Optional. Set the format of the response. Format value can be json, html, xml, or csv. If not specified, default is JSON

cb function

optional callback function

Source:
Returns:

none

getQueriableFields(xsiType, format)

Delete (Or Unshare) An Image Assessor

.

Delete (Or Unshare) An Image Assessor

Parameters:
Name Type Description
xsiType string

xsiType e.g., xnat:mrSessionData

format string

Optional. Set the format of the response. Format value can be json, html, xml, or csv. If not specified, default is JSON* @param {function} cb optional callback function

Source:
Returns:

none

getSearchReportVersionsFor(xsiType, format, cb)

Get A List Of Search Report Versions For A Data Type

.

Get A List Of Search Report Versions For A Data Type

Parameters:
Name Type Description
xsiType string

xsiType e.g., xnat:mrSessionData

format string

Optional. Set the format of the response. Format value can be json, html, xml, or csv. If not specified, default is JSON

cb function

optional callback function

Source:

getStoredSearch(id, cb)

Get List of Stored Searches

.

Get List of Stored Searches

Parameters:
Name Type Description
id string

search id

cb function

optional callback function

Source:

getStoredSearches(format, cb)

Get List of Stored Searches

.

Get List of Stored Searches

Parameters:
Name Type Description
format string

Optional. Set the format of the response. Format value can be json, html, xml, or csv. If not specified, default is JSON

cb function

optional callback function

Source:

getStoredSearchResult(id, guiStyle, xml, cb)

Create A Stored Search

.

Create A Stored Search

Parameters:
Name Type Default Description
id string

The unique ID of the stored search

guiStyle boolean false

If this query parameter is set to true, the information returned will be run through the same formatting that information in the GUI is normally run through. This means that the results of the REST call will have the same columns and column headings as the table displayed in the GUI when the saved search is executed.

xml string

The XML structure of the stored search you want to create. Refer to https://wiki.xnat.org/display/XNAT17/Share+Custom+Data+Tables+as+Stored+Searches+for+Project+Reporting for notes on formatting.

cb function

optional callback function

Source:

searchWithXml(xml, format, cb)

Post A Search To The XNAT Search Engine

.

Post A Search To The XNAT Search Engine

Parameters:
Name Type Description
xml string

search xml

format string

Optional. Set the format of the response. Format value can be json, html, xml, or csv. If not specified, default is JSON

cb function

optional callback function

Source:
Returns:

a list of matched entities

updateStoredSearch(id, xml, cb)

Update A Stored Search

.

Update A Stored Search

Parameters:
Name Type Description
id string

The unique ID of the stored search

xml string

The XML structure of the stored search you want to create. Refer to https://wiki.xnat.org/display/XNAT17/Share+Custom+Data+Tables+as+Stored+Searches+for+Project+Reporting for notes on formatting.

cb function

optional callback function

Source: