RunQueryParams: {
    AuditLogDescription?: string;
    CacheLocal?: boolean;
    CacheLocalTTL?: number;
    CategoryID?: string;
    CategoryPath?: string;
    ForceAuditLog?: boolean;
    MaxRows?: number;
    Parameters?: Record<string, any>;
    QueryID?: string;
    QueryName?: string;
    StartRow?: number;
}

Parameters for running a query, must provide either QueryID or QueryName. If both are provided QueryName is ignored. QueryName and CategoryPath together uniquely identify a Query, just as QueryID does. CategoryPath supports hierarchical paths (e.g., "/MJ/AI/Agents/") for navigation through nested categories.

Type declaration

  • Optional AuditLogDescription?: string

    optional - if provided and either ForceAuditLog is set, or the query's property settings for logging query runs are set to true, this will be used as the Audit Log Description.

  • Optional CacheLocal?: boolean

    When set to true, the RunQuery will first check the LocalCacheManager for cached results. If cached results exist and are still valid (based on smart cache fingerprinting), they will be returned immediately without hitting the server. This is useful for frequently-accessed, relatively-static query results.

    Note: The LocalCacheManager must be initialized before this can work. For queries with CacheValidationSQL configured, the server will validate cache freshness using fingerprint comparison (maxUpdatedAt + rowCount) before returning fresh data.

    Default

    false
    
  • Optional CacheLocalTTL?: number

    Optional TTL (time-to-live) in milliseconds for cached results when CacheLocal is true. After this time, cached results will be considered stale and fresh data will be fetched. If not specified:

    1. The Query's CacheTTLMinutes property will be used if configured
    2. Otherwise the LocalCacheManager's default TTL will be used (typically 5 minutes)
  • Optional CategoryID?: string

    Optional, if provided, the query to be run will be selected to match the specified CategoryID

  • Optional CategoryPath?: string

    Optional, if provided, the query to be run will be selected to match the specified Category by hierarchical path (e.g., "/MJ/AI/Agents/") or simple category name for backward compatibility

  • Optional ForceAuditLog?: boolean

    optional - if set to true, the query run will ALWAYS be logged to the Audit Log, regardless of the query's property settings for logging query runs.

  • Optional MaxRows?: number

    Optional maximum number of rows to return from the query. If not provided, all rows will be returned.

  • Optional Parameters?: Record<string, any>

    Optional parameters to pass to parameterized queries that use Nunjucks templates. Key-value pairs where keys match parameter names defined in QueryParameter metadata. Values will be validated and type-converted based on parameter definitions.

  • Optional QueryID?: string

    Provide either QueryID or QueryName. If both are provided QueryName is ignored

  • Optional QueryName?: string

    Provide either QueryID or QueryName. If both are provided QueryName is ignored

  • Optional StartRow?: number

    Optional - if provided, this value will be used to offset the rows returned. Used for pagination in conjunction with MaxRows.