Interface SearchApi

This API relates to SAS Visual Investigator's search functionality.

Accessed from the window at window.sas.vi.search.

window.sas.vi.search.openQueryBuilderDialog("Dialog Title");
interface SearchApi {
    openQueryBuilderDialog(dialogTitle: string, submitButtonText?: string, queryModel?: QueryBuilderModel, enforceObjectType?: string, restrictObjectTypes?: string[]): Promise<QueryBuilderResult>;
}

Hierarchy (view full)

Methods

  • Parameters

    • dialogTitle: string

      {string} Title of the dialog.

    • OptionalsubmitButtonText: string

      {string} Text for the dialog box submit button.

    • OptionalqueryModel: QueryBuilderModel

      {QueryBuilderModel} An existing query model that can be used to initially populate the query builder.

    • OptionalenforceObjectType: string

      {string} If enforceObjectType is set, the user cannot choose which entity to query. It is pre-set to the specified entity.

    • OptionalrestrictObjectTypes: string[]

      {Array} If restrictObjectTypes is set, then the entity dropdown is filtered to show only the entities in this list.

    Returns Promise<QueryBuilderResult>

    A Promise containing the result of the dialog box.

    Opens the query builder dialog box allowing the user to create a new query or edit an existing one passed in via the query model parameter.

    const searchApi: SearchApi = window.sas.vi.search;
    const dialogTitle = 'Intelligence Search'
    const submitButtonText = 'Submit'
    const objectType = 'intel'

    searchApi.openQueryBuilderDialog(dialogTitle, submitButtonText, undefined, objectType).then( (query) => {
    // Perform query action
    })