API Stability |
Long-Term
|
The blockedQueries() GraphQL query fetches the list of blocked query patterns.
For more information on blocking queries, see the Blocking Queries documentation page.
Syntax
Below is the syntax for the blockedQueries() query field:
blockedQueries(
clusterWide: boolean,
includeBlockedQueriesForDeletedOrganizations: boolean
): [BlockedQuery!]!
For clusterWide, indicate whether to return all blocked queries within the cluster. This requires the ManageCluster permission. For includeBlockedQueriesForDeletedOrganizations, say whether to include blocked queries for organizations that have been deleted. The default for both of these is false.
Below is an example of this query field with a few values requested:
query {
blockedQueries {
id, type, pattern
}
}
{
"data": {
"blockedQueries": [
{
"id": "z97vfV6EvCVquFIvHtYfULB2",
"type": "REGEX",
"pattern": "#type=humio"
},
{
"id": "zrHTMPHsLgkJnLsUq0nv0TQt",
"type": "REGEX",
"pattern": "#type=testerroo"
}
]
}
}
Notice that the example above requests three values, separated by commas. Since there were two blocked queries, two sets of values were returned, each in square brackets.
Returned Datatypes
The returned datatype BlockedQuery
has
several parameters. Below is a list of them along with a
description of each:
Table: BlockedQuery
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 24, 2024 | |||||
expiresAt | datetime | Long-Term | The date and time in which any matching queries will cease to be blocked. | ||
expiresInMilliseconds | integer | Long-Term | The amount of milliseconds until any matching queries won't be blocked. | ||
id | string | yes | Long-Term | The unique identifier of the blocked query. | |
limitedToOrganization | boolean | yes | Long-Term | Whether the blocked query should be limited to the organization. | |
organization | Organization | Long-Term | The organization associated with the view, if any. See Organization . | ||
pattern | string | yes | Long-Term | The exact or regular expression pattern used to match queries to block. | |
type | BlockedQueryMatcherType | yes | Long-Term | How the pattern should be matched (e.g., as a regular expression). See BlockedQueryMatcherType . | |
unblockAllowed | boolean | yes | Long-Term | Whether the current user is allowed to unblock the query. | |
view | View | Long-Term | The related view, if any. See View . |