The runningQueries() GraphQL query is used to get a list of running queries.

For more information on saved queries, see the User Functions (Saved Searches) reference page where saved queries are discussed. Also, look at the Searching Data documentation page as it relates to recent queries and saving queries.

Syntax

Below is the syntax for the runningQueries() query field:

graphql
runningQueries(
      searchTerm: string
      sortField: SortField
      sortOrder: SortOrder
   ): RunningQueries!

Given Datatypes

For the given datatype, SortField, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: SortField

ParameterTypeRequired[a]DefaultDescription
InitiatedBybooleanyes Whether to sort by which user or entity initiated.
Viewbooleanyes Whether to sort by view.
Agebooleanyes Whether to sort by age of events.
Statusbooleanyes Whether to sort by event status.
DeltaTotalMemoryAllocationbooleanyes Whether to sort by change in total memory allocation.
TotalMemoryAllocationbooleanyes Whether to sort by total memory allocation.
DeltaLiveCPUbooleanyes Whether to sort by change of live CPU.
TotalLiveCPUbooleanyes Whether to sort by total live CPU.
DeltaStaticCPUbooleanyes Whether to sort by change of static CPU.
TotalStaticCPUbooleanyes Whether to sort by total static CPU.
DeltaStaticCostbooleanyes Whether to sort by change of static cost.
DeltaLiveCostbooleanyes Whether to sort by change of live cost.
DeltaTotalCostbooleanyes Whether to sort by change of total cost.
StaticCostbooleanyes Whether to sort by change of total cost.
LiveCostbooleanyes Whether to sort by live cost.
TotalCostbooleanyes Whether to sort by total cost.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


The given datatype, SortOrder is also an enumerated list, but with only two choices: Ascending, or Descending.

Returned Datatypes

The returned datatype runningQueries() has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: RunningQueries

ParameterTypeRequired[a]DefaultDescription
updateAvailableInlongyes Number of milliseconds until next update is available.
totalNumberOfQueriesintegeryes Total number of queries being executed.
totalNumberOfLiveQueriesintegeryes Total number of live queries being executed.
totalNumberOfClientsintegeryes Total number of clients querying.
totalSkippedByteslongyes Total size of skipped bytes for all queries being executed.
totalIncludedByteslongyes Total size of included bytes for all queries being executed.
totalQueuedByteslongyes Total size of remaining bytes to be processed for all queries being executed.
queries[RunningQuery]yes Queries being executed, at most 1000 queries are returned (see RunningQuery Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.