Class Query

Hierarchy

  • Query

Query Methods

  • Build a query using query language syntax or by specifying a saved query ID

    Returns

    Returns Promise object that represents a list of Objects

    Parameters

    • query: string | number

      Query to run (specify syntax or queryID)

    • options: {
          Page?: number;
          PageSize?: number;
          SortDescending?: boolean;
          SortField?: string;
          Variables?: DynamicVariableMap;
      } = {}

      Other options. See: /{subdirectory}/apidocs/#/service-info/General/Query

      • Optional Page?: number
      • Optional PageSize?: number
      • Optional SortDescending?: boolean
      • Optional SortField?: string
      • Optional Variables?: DynamicVariableMap
    • Optional domainId: number

      The domain ID of the domain to search, defaut is authenticated user's current domain

    Returns Promise<unknown>

  • Get a list of the saved queries the current user can access.

    Returns

    Returns Promise object that represents a collection of SavedQueries

    Parameters

    • queryTypes: string[] = []

      Get the saved queries for a particular type, default is all types

    • createdOnly: boolean = false

      Get only queries created by the current user, default is get all queries current user can access

    • includeQuery: boolean = true

      Restrict GIS searches to specified entity types

    • Optional visibleToMobile: boolean

      Filter visibility to mobile. Default ignore visibility to mobile.

    • Optional domainId: number

      The domain ID of the domain to search, defaut is authenticated user's current domain

    Returns Promise<unknown>

  • Get schema for specified query type

    Returns

    Returns Promise object that represents a list of Objects

    Parameters

    • queryType: string

      Specify Query Type

    • Optional domainId: number

      The domain ID of the domain to search, defaut is authenticated user's current domain. Used to determine query field configuration for the schema fields.

    Returns Promise<unknown>

  • Get available query types

    Returns

    Returns Promise object that represents a list of Objects

    Returns Promise<unknown>

  • Get info about query types

    Returns

    Returns Promise object that represents a list of Objects

    Parameters

    • includeDefaultSchemasInclude: boolean = true

      Include schemas (Work Order, Service Request, etc), default is true.

    • includeGisSchemas: boolean = true

      Include gis schemas, ddefault is true.

    • Optional domainId: number

      The domain ID of the domain to search, defaut is authenticated user's current domain

    Returns Promise<unknown>

  • Run a query using query language syntax

    Returns

    Returns Promise object that represents a list of Objects

    Parameters

    • query: string

      Query syntax string or saved query ID to run. If you want to append addt'l query items to a saved query, add QueryValue in the options

    • options: {
          Page?: number;
          PageSize?: number;
          QueryValue?: string;
          ResponseFields?: any;
          SortDescending?: boolean;
          SortField?: string;
          Variables?: DynamicVariableMap;
      } = {}

      Other options. See: /{subdirectory}/apidocs/#/service-info/General/Query

      • Optional Page?: number
      • Optional PageSize?: number
      • Optional QueryValue?: string
      • Optional ResponseFields?: any
      • Optional SortDescending?: boolean
      • Optional SortField?: string
      • Optional Variables?: DynamicVariableMap

    Returns Promise<unknown>

  • Validate a query string

    Returns

    Returns Promise object that represents a list of Objects

    Parameters

    • query: string

      The query to validate

    • variables: DynamicVariableMap

      Required if the query includes variables

    • Optional domainId: number

      The domain ID of the domain to search, defaut is authenticated user's current domain

    Returns Promise<unknown>

  • Validate a query response definition

    Returns

    Returns Promise object that represents a list of Objects

    Parameters

    • queryType: string

      The query to validate

    • responseDefinition: DynamicResponseDefinition

      Required if the query includes variables

    • Optional domainId: number

      The domain ID of the domain to search, defaut is authenticated user's current domain

    Returns Promise<unknown>