Reference: Filter syntax
Filter query requests to constrain records returned in a response, or mutation requests to constrain a created group's endpoint membership, or a created action's targeted groups.
Filters compare a field value or group membership, passed in the request, to the corresponding field value or group membership on a record. If the record matches the filter, the record is added to the collection.
Filters generally evaluate one of the following comparisons:
-
path and value - a record field and the associated value
-
sensor and value - a sensor evaluation and associated result value, compared to the record
-
memberOf - endpoint group membership
Filters that compare values use relational operators, enumerated in the op field. If a filter does not define op, the default is EQ . For more information on available relational operators, see FieldFilterOp in the Documentation Explorer pane of the query explorer.
The following relational operators are available for filters, subject to restrictions:
-
CONTAINS - for string data type fields, the record field value contains the filter value
-
ENDS_WITH - for string data type fields, the record field value ends with the filter value
-
EQ - the record field value equals the filter value
-
GT - for data types that can be compared, the record field value is greater than the filter value
-
GTE - for data types that can be compared, the record field value is greater than or equal to the filter value
-
LT - for data types that can be compared, the record field value is less than the filter value
-
LTE - for data types that can be compared, the record field value is less than or equal to the filter value
-
MATCHES - for string data type fields, the record field value matches the filter value; the filter value is evaluated as a Perl syntax regular expression
-
READ_AFTER - for certain data sources, the record field value is read after the filter date and time value
-
STARTS_WITH - for string data type fields, the record field value starts with the filter value
-
UPDATED_AFTER - for certain data sources, the record field value is updated after the filter date and time value
Filters also use logical operators to evaluate whether a filter or combination of filters is true or false.
-
negated (
NOToperator) - If a filter contains negated: true, records that do not match a filter statement are included in a collection. If a filter contains negated: false, records that match a filter statement are included in a collection. The default is negated: false (matching records belong to the collection). -
any (
AND,ORoperators) - If a filter includes multiple filter statements and contains any: false, a record must match every field filter to be included in the collection. If a filter includes multiple filter statements and contains any: true, a record belongs to the collection if it matches one or more of the field filters. The default is any: false (a record must match every field filter).
Actions query filter syntax
Actions queries (query.actions) support the path and value filter fields.
For more information on syntax, see FieldFilter in the Documentation Explorer pane of the query explorer.
Single filter field
You can filter on a single field value. Unless otherwise specified, define a filter object using the syntax:
{path: "field-path", negated: "boolean", op: "operator", value: "filter-value"}
For example, the following request filters and returns only actions whose name does not contain production:
query getActionsFiltered($path: String, $negated: Boolean!, $op: FieldFilterOp!, $value: String) {
actions(
filter: {path: $path, negated: $negated, op: $op, value: $value}
) {
edges {
node {
approver {
persona {
id
name
}
user {
id
name
}
}
comment
creationTime
creator {
persona {
id
name
}
user {
id
name
}
}
distributeSeconds
expirationTime
expireSeconds
id
name
package {
id
name
params
sensorSourcedParams {
name
value
}
}
results {
completed
downloading
expired
failed
failedVerification
id
pendingVerification
running
verified
waiting
waitingToRetry
}
scheduledAction {
approved
comment
distributeSeconds
endTime
expireSeconds
id
issueCount
issueSeconds
lastAction {
id
}
lastStartTime
name
nextStartTime
package {
id
}
startTime
status
}
startTime
status
stopped
stoppedFlag
}
}
}
}
Include the filter-related variables in the Variables panel:
{
"path": "name",
"negated": true,
"op": "CONTAINS",
"value": "production"
}
Multiple filter fields
You can filter on multiple field values. Define a filter object using the syntax:
{any: boolean,
filters: [
{path: "field-path-1", negated: "boolean-1", op: "operator-1", value: "filter-value-1"},
{path: "field-path-2", negated: "boolean-2", op: "operator-2", value: "filter-value-2"},
{path: "field-path-n", negated: "boolean-n", op: "operator-n", value: "filter-value-n"}
]
For example, the following request filters and returns only scheduled actions whose name does not contain production, and whose comment contains test:
query actionsMultipleFilter($path1: String, $negated1: Boolean!, $op1: FieldFilterOp!, $value1: String, $path2: String, $negated2: Boolean!, $op2: FieldFilterOp!, $value2: String) {
actions(
filter: {any: false, filters: [{path: $path1, negated: $negated1, op: $op1, value: $value1}, {path: $path2, negated: $negated2, op: $op2, value: $value2}]}
) {
edges {
node {
approver {
persona {
id
name
}
user {
id
name
}
}
comment
creationTime
creator {
persona {
id
name
}
user {
id
name
}
}
distributeSeconds
expirationTime
expireSeconds
id
name
package {
id
name
params
sensorSourcedParams {
name
value
}
}
results {
completed
downloading
expired
failed
failedVerification
id
pendingVerification
running
verified
waiting
waitingToRetry
}
scheduledAction {
approved
comment
distributeSeconds
endTime
expireSeconds
id
issueCount
issueSeconds
lastAction {
id
}
lastStartTime
name
nextStartTime
package {
id
}
startTime
status
}
startTime
status
stopped
stoppedFlag
}
}
}
}
Include the filter-related variables in the Variables panel:
{
"path1": "name",
"negated1": true,
"op1": "CONTAINS",
"value1": "production",
"path2": "comment",
"negated2": false,
"op2": "CONTAINS",
"value2": "test"
}
Asset query filter syntax
Filter Asset queries when retrieving Asset products (query.assetProducts) or endpoints (query.assetProductEndpoints).
Asset product queries (assetProducts) support the following filter fields:
-
search
-
states
-
vendors
For more information on syntax, see assetProductsFilter in the Documentation Explorer pane of the query explorer.
Endpoint queries using assetProductEndpoints support the following filter fields:
-
name
-
vendor
-
version
-
usage
For more information on syntax, see assetProductEndpointsFilter in the Documentation Explorer pane of the query explorer.
Asset products
You can retrieve Asset products and filter based on product metadata. Define a filter object using the syntax:
filter {
vendors: [
"vendor-name-1",
"vendor-name-2",
"vendor-name-n..."
],
search: "search-string",
states: [Cataloged | Ignored | Tracked]
}
For example, the following request retrieves only Asset products with a vendor name of Example vendor, an Asset state of Cataloged, and the search string Product in either the vendor name or product name:
query exampleGetAssetProductsFiltered($first: Int, $vendor: String!, $search: String, $states: AssetProductState!) {
assetProducts(
first: $first, filter: {
vendors: [$vendor],
search: $search,
states: [$states]
}
) {
edges {
node {
vendor
name
installation {
installedCount
usedCount
unusedCount
pendingUsage
}
usage {
usageNotDetected
notInstalled
baselining
limited
normal
high
}
tracking {
state
reportingPeriodDays
normalMinutesUsedPerDay
highMinutesUsedPerDay
baselinePeriodDays
}
versions {
version
installs
}
}
}
}
}
Include the filter variables in the Variables panel:
{
"first": 2,
"vendor": "Example vendor",
"search": "Product",
"states": "Cataloged"
}
Endpoints based on Asset products
You can retrieve endpoints and filter the returned endpoints based on Asset product information. Define a filter object using the syntax:
filter {
vendors: [
"vendor-name-1",
"vendor-name-2",
"vendor-name-n..."
],
name: "name-string",
version: "version-string"
}
For example, the following request retrieves only endpoints that have installed the Example name product, with a vendor of Example vendor and version of 1.2.3:
query exampleGetEndpointsAssetProduct($first: Int, $vendor: String, $name: String, $version: String) {
assetProductEndpoints(
first: $first
filter: {vendor: $vendor, name: $name, version: $version, usage: Normal}
) {
edges {
node {
id
eid
computerName
computerId
serialNumber
osPlatform
operatingSystem
servicePack
manufacturer
ipAddress
userName
createdAt
updatedAt
}
}
}
}
Include the filter variables in the Variables panel:
{
"first": 2,
"vendor": "Example vendor",
"name": "Example name",
"version": "1.2.3"
}
Automate query filter syntax
Automate queries that request playbook information (query.playbooks) support the following filter fields:
-
authorUserIDs
-
contentSets
-
createdAfterTime
-
createdBeforeTime
-
hasDisabledSchedules
-
ids
-
isScheduled
-
name
Automate queries that request playbook information support sorting the response on the following filter fields in ascending (asc) or descending (desc) order:
-
activeRunsCount based on number count
-
name based on alphabetical order
-
schedulesCount based on number count
If you do not define a sort order, the query defaults to sorting on name in asc order.
Automate queries that request playbook run information (query.playbookRuns) support the following filter fields:
-
createdAfterTime
-
createdBeforeTime
-
hasErrors
-
startReason.startTypes
-
playbookIDs
-
playbookName
-
runAsUserIDs
-
statuses
Automate queries that request playbook run information support sorting the response on the following filter fields in ascending (asc) or descending (desc) order:
-
endTime based on chronological order
-
name based on alphabetical order
-
scheduleStartTime based on chronological order
-
startTime based on chronological order
-
status based on playbook run lifecycle order, from creation to completion
If you do not define a sort order, the query defaults to sorting on status in asc order.
Automate queries that request playbook schedule information (query.playbookSchedules) support the following filter fields:
-
excludedScheduledByIDs
-
isEnabled
-
playbookIDs
-
scheduledByIDs
The playbooks, playbookRuns, and playbookSchedules queries require the Automate Playbook read permission.
For more information on filter syntax, see PlaybookFieldFilter and PlaybookRunFieldFilter in the Documentation Explorer pane of the query explorer. For more information on sort syntax, see PlaybookFieldSort, PlaybookSortField, PlaybookRunFieldSort, and PlaybookRunSortField in the Documentation Explorer pane of the query explorer.
Playbooks belonging to a content set
You can retrieve playbooks belonging to a content set by content set ID or name. Define a filter object using the following syntax to filter by content set ID:
filter {
contentSets:
[
{id: content-set-id-value-1},
{id: content-set-id-value-2},
{id: content-set-id-value-n}
]
}
Define a filter object using the following syntax to filter by content set name:
filter {
contentSets:
[
{name: content-set-name-value-1},
{name: content-set-name-value-2},
{name: content-set-name-value-n}
]
}
For example, the following query retrieves the first two playbooks belonging to the content set with the ID 123:
query exampleGetPlaybooksContentSetID($first: Int, $contentSetID: ID) {
playbooks(first: $first, filter: {contentSets: [{id: $contentSetID}]}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"first": 2,
"contentSetID": "123"
}
The following query retrieves the first two playbooks belonging to the content set with the name Example content set:
query exampleGetPlaybooksContentSetName($first: Int, $contentSetName: String) {
playbooks(first: $first, filter: {contentSets: [{name: $contentSetName}]}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"first": 2,
"contentSetName": "Example content set"
}
Playbooks or playbook runs created after a time
You can retrieve playbooks and playbook runs created after a date. If you retrieve a playbook, you can also retrieve associated playbook runs created after a date. Define a filter object using the following syntax:
filter {
createdAfterTime: time-value
}
For example, the following query retrieves the first two playbooks created after June 1, 2023:
query exampleGetPlaybooksAfter($first: Int, $create: Time) {
playbooks(first: $first, filter: {createdAfterTime: $create}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"create": "2023-06-01T01:02:03Z"
}
The following query retrieves the first two playbook runs created after June 1, 2023:
query exampleGetPlaybookRunsAfter($first: Int, $create: Time) {
playbookRuns(first: $first, filter: {createdAfterTime: $create}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"create": "2023-06-01T01:02:03Z"
}
Playbooks or playbook runs created before a time
You can retrieve playbooks and playbook runs created before a date. If you retrieve a playbook, you can also retrieve associated playbook runs created before a date. Define a filter object using the following syntax:
filter {
createdBeforeTime: time-value
}
For example, the following query retrieves the first two playbooks created before June 1, 2023:
query exampleGetPlaybooksBefore($first: Int, $create: Time) {
playbooks(first: $first, filter: {createdBeforeTime: $create}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"create": "2023-06-01T00:00:00Z"
}
The following query retrieves the first two playbook runs created before June 1, 2023:
query exampleGetPlaybookRunsBefore($first: Int, $create: Time) {
playbookRuns(first: $first, filter: {createdBeforeTime: $create}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"create": "2023-06-01T00:00:00Z"
}
Playbooks configured with a playbook schedule
You can retrieve playbooks associated with at least one configured playbook schedule. Define a filter object using the following syntax:
filter {
isScheduled: boolean-value
}
For example, the following query retrieves the first two playbooks with a configured schedule:
query exampleGetPlaybooksScheduled($first: Int, $isScheduled: Boolean) {
playbooks(first: $first, filter: {isScheduled: $isScheduled}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"isScheduled": true
}
Playbooks configured with at least one disabled playbook schedule
You can retrieve playbooks associated with at least one configured playbook schedule that is also disabled. Define a filter object using the following syntax:
filter {
hasDisabledSchedules: boolean-value
}
For example, the following query retrieves the first two playbooks with at least one configured schedule that is also disabled:
query exampleGetPlaybooksScheduleDisabled($first: Int, $hasDisabledSchedules: Boolean) {
playbooks(first: $first, filter: {hasDisabledSchedules: $hasDisabledSchedules}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"hasDisabledSchedules": true
}
Playbooks with a referenced name
You can retrieve playbooks configured with a given name. Define a filter object using the following syntax:
filter {
name: name-value
}
For example, the following query retrieves playbooks with the name Example playbook:
query exampleGetPlaybooksNamed($name: String) {
playbooks(filter: {name: $name}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"name": "Example playbook"
}
Playbooks with a referenced author ID
You can retrieve playbooks created by a given user ID. Define a filter object using the following syntax:
filter {
authorUserIDs: [user-id-value-1,user-id-value-2,user-id-value-n]
}
For example, the following query retrieves the first two playbooks created by user ID 123:
query exampleGetPlaybooksAuthor($first: Int, $authorUserIDs: [ID!]) {
playbooks(first: $first, filter: {authorUserIDs: $authorUserIDs}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"first": 2,
"authorUserIDs": ["123"]
}
Playbooks with a referenced ID
You can retrieve playbooks with a given ID. Define a filter object using the following syntax:
filter {
ids: [
playbook-id-value-1,
playbook-id-value-2,
playbook-id-value-n
]
}
For example, the following query retrieves the playbooks with the IDs 12345678-90ab-cdef-1234-567890abcdef and fedcba09-8765-4321-fedc-ba0987654321:
query exampleGetPlaybooksByID($playbookID1: ID!, $playbookID2: ID!) {
playbooks(filter: {ids: [$playbookID1, $playbookID2]}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"playbookID1": "12345678-90ab-cdef-1234-567890abcdef",
"playbookID2": "fedcba09-8765-4321-fedc-ba0987654321"
}
Playbook runs and playbook schedules associated with a playbook ID
You can retrieve playbook runs and playbook schedules associated with a playbook, based on the playbook's ID. Define a filter object using the following syntax:
filter {
playbookIDs: [
playbook-id-1,
playbook-id-2,
playbook-id-n
]
}
The following query retrieves the first two playbook runs associated with the playbook ID 12345678-90ab-cdef-1234-567890abcdef:
query exampleGetPlaybookRunsPlaybookID($first: Int, $playbookID: ID!) {
playbookRuns(first: $first, filter: {playbookIDs: [$playbookID]}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"playbookID": "12345678-90ab-cdef-1234-567890abcdef"
}
Playbook runs associated with a named playbook
You can retrieve playbook runs associated with a playbook, based on the playbook's name. This matches either the full playbook name or a string within the playbook name. For example, if you filter on example playbook in the playbook name, the playbook names example playbook and testing example playbook step both match. Define a filter object using the following syntax:
filter {
playbookName: playbook-name
}
The following query retrieves the first two playbook runs associated with the playbook named Example named playbook:
query exampleGetPlaybookRunsPlaybookName($first: Int, $playbookName: String) {
playbookRuns(first: $first, filter: {playbookName: $playbookName}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"playbookName": "Example named playbook"
}
Playbook runs associated with a runAs user ID
You can retrieve playbook runs whose runAs user matches the filter. If you retrieve a playbook, you can also retrieve associated playbook runs whose runAs user matches the filter. Define a filter object using the following syntax:
filter {
runAsUserIDs: [
user-ID-value-1,
user-ID-value-2,
user-ID-value-n..
]
}
The following query retrieves the first two playbook runs associated with the runAs user 1234:
query exampleGetPlaybookRunsUser($first: Int, $runAsUserID: ID!) {
playbookRuns(first: $first, filter: {runAsUserIDs: [$runAsUserID]}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"runAsUserID": "1234"
}
Playbook runs by status
You can retrieve playbook runs based on their current status. If you retrieve a playbook, you can also retrieve associated playbook runs based on current status. Define a filter object using the following syntax:
filter {
statuses: [
enumerated-status-value-1,
enumerated-status-value-2,
enumerated-status-value-n
]
}
For information on playbook run status values, see PlaybookRunStatus in the Documentation Explorer pane of the query explorer.
The following query retrieves the first two playbook runs that are in progress:
query exampleGetPlaybookRunsStatus($first: Int, $status: [PlaybookRunStatus!]) {
playbookRuns(first: $first, filter: {statuses: $status}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"status": "IN_PROGRESS"
}
Playbook runs initiated from a playbook schedule
You can retrieve playbook runs that were started due to a configured playbook schedule. Define a filter object using the following syntax:
filter {
startReason: {startTypes: [SCHEDULE]}
}
The following query retrieves the first two playbook runs that started due to a configured playbook schedule:
query exampleGetPlaybookRunsStartedBySchedule($first: Int) {
playbookRuns(first: $first, filter: {startReason: {startTypes: [SCHEDULE]}}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2
}
Playbook runs initiated by a user or trigger
You can retrieve playbook runs started due to a user action or from a trigger. Define a filter object using the following syntax:
filter {
startReason: {startTypes: [USER, TRIGGER]}
}
The following query retrieves the first two playbook runs that started due to either a user action or a trigger:
query exampleGetPlaybookRunsStartedByUserOrTrigger($first: Int) {
playbookRuns(first: $first, filter: {startReason: {startTypes: [USER, TRIGGER]}}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2
}
Playbook runs that generated errors
You can retrieve playbook runs that generated an error while running. If you retrieve a playbook, you can also retrieve associated playbook runs that generated an error. Define a filter object using the following syntax:
filter {
hasErrors: boolean-value
}
The following query retrieves the first two playbook runs that generated an error while evaluating steps:
query exampleGetPlaybookRunsError($first: Int, $hasErrors: Boolean) {
playbookRuns(first: $first, filter: {hasErrors: $hasErrors}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"hasErrors": true
}
Playbook schedules that are enabled
You can retrieve playbook schedules that are enabled. Define a filter object using the following syntax:
filter {
isEnabled: boolean-value
}
The following query retrieves the first two enabled playbook schedules:
query exampleGetEnabledPlaybookSchedules($first: Int, $isEnabled: Boolean) {
playbookSchedules(first: $first, filter: {isEnabled: $isEnabled}) {
edges {
node {
createdTime
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"isEnabled": true
}
Playbook schedules that are created by a referenced user ID
You can retrieve playbook schedules that are created by a user based on user ID. Define a filter object using the following syntax:
filter {
scheduledByIDs: [
user-id-1,
user-id-2,
user-id-n
]
}
The following query retrieves the first two playbook schedules created by a user with the ID 123:
query exampleGetPlaybookScheduleUserID($first: Int, $scheduledByID: ID!) {
playbookSchedules(first: $first, filter: {scheduledByIDs: [$scheduledByID]}) {
edges {
node {
createdTime
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"scheduledByID": "123"
}
Playbook schedules that are not created by a referenced user ID
You can retrieve playbook schedules that are not created by a user based on user ID. Define a filter object using the following syntax:
filter {
excludedScheduledByIDs: [
user-id-1,
user-id-2,
user-id-n
]
}
The following query retrieves the first two playbook schedules that are not created by a user with the ID 123:
query exampleGetPlaybookScheduleNotUserID($first: Int, $excludedScheduledByID: ID!) {
playbookSchedules(first: $first, filter: {excludedScheduledByIDs: [$excludedScheduledByID]}) {
edges {
node {
createdTime
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"first": 2,
"excludedScheduledByID": "123"
}
Playbooks or playbook runs results sorting
You can sort playbooks and playbook runs results. If you retrieve a playbook, you can also sort associated playbook runs. Define a sort object using the following syntax:
sort {
field: field-name
order: sort-order
}
For example, the following query sorts playbook results in descending order based on active run count:
query exampleGetPlaybooksSort($field: PlaybookSortField!, $order: SortOrder!) {
playbooks(sort: {field: $field, order: $order}) {
edges {
node {
createdTime
description
id
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"field": "activeRunsCount",
"order": "desc"
}
The following query sorts playbook run results in ascending order based on playbook run end time:
query exampleGetPlaybookRunsSort($field: PlaybookRunSortField!, $order: SortOrder!) {
playbookRuns(sort: {field: $field, order: $order}) {
edges {
node {
createdTime
endTime
events {
createdTime
initiator {
persona {
id
}
user {
id
}
}
name
}
id
playbook {
activeRunsCount
author {
id
}
createdTime
description
id
lastModifiedBy {
displayName
id
username
}
name
revision
steps {
description
name
taskArgument {
__typename
}
}
updatedTime
}
runAs {
persona {
id
}
user {
id
}
}
scheduleStartTime
startTime
status
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"field": "endTime",
"order": "asc"
}
Comply query filter syntax
Endpoint queries that request Comply-related information using complianceFindings or cveFindings support the path and value filter fields.
For more information on syntax, see FieldFilter in the Documentation Explorer pane of the query explorer.
Single column
You can filter on field values. Define a filter object using one of the following syntaxes:
complianceFindings(filter:
{
path: "field-path",
op: "operator-value",
value: "field-value"
}
)
cveFindings(filter:
{
path: "field-path",
op: "operator-value",
value: "field-value"
}
)
Use dot notation for sub-fields not at the root level. You can filter the endpoints returned and filter the endpoints based on Comply information in a single request.
For example, the following query retrieves the first endpoint with a compliance findings category of Error and returns that endpoint's associated compliance findings:
query exampleFilterComplianceFindings($first: Int) {
endpoints(first: $first) {
edges {
node {
name
ipAddress
compliance {
complianceFindings(filter: {
path: "category"
value: "Error"
}) {
category
id
profile
profileVersion
rule
ruleId
standard
standardVersion
state
}
}
}
}
pageInfo {
startCursor
endCursor
hasPreviousPage
hasNextPage
}
}
}
Include the cursor variable in the Variables panel or in your variables dictionary:
{
"first": 1
}
Multiple columns
You can filter on multiple Comply-related columns. Define a filter object using one of the following syntaxes:
complianceFindings(filter:
{any: boolean,
filters: [
{path: "field-path-1", op: "operator-1", value: "filter-value-1"},
{path: "field-path-2", op: "operator-2", value: "filter-value-2"},
{path: "field-path-n", op: "operator-n", value: "filter-value-n"}
]
}
)
cveFindings(filter:
{any: boolean,
filters: [
{path: "field-path-1", op: "operator-1", value: "filter-value-1"},
{path: "field-path-2", op: "operator-2", value: "filter-value-2"},
{path: "field-path-n", op: "operator-n", value: "filter-value-n"}
]
}
)
Use dot notation for sub-fields not at the root level. You can filter the endpoints returned and filter the endpoints based on Comply information in a single request.
For example, the following query retrieves the first endpoint that is a member of the All Mac computer group, with a vulnerability findings cveYear of 2020 and cvssScore value of 5, and returns that endpoint's associated vulnerability findings:
query exampleFilterMacOSEndpointVulnerability($first: Int!) {
endpoints(first: $first, filter: {memberOf: {name: "All Mac"}}) {
edges {
node {
name
ipAddress
compliance {
cveFindings(
filter: {any: false, filters: [{path: "cveYear", value: "2020"}, {path: "cvssScore", value: "5"}]}
) {
cveId
cveYear
cvssScoreV3
firstFound
lastFound
severityV3
summary
}
}
}
}
pageInfo {
startCursor
endCursor
hasPreviousPage
hasNextPage
}
}
}
Include the cursor variable in the Variables panel or in your variables dictionary:
{
"first": 1
}
Computer group creation filter syntax
Filter computer groups when creating actions or scheduled actions, to target certain computer groups, or when constraining endpoint membership in a created computer group.
Computer group creation and action creation mutations support the following filter fields:
-
memberOf
-
sensor and value
For more information on syntax, see computerGroupFilter in the Documentation Explorer pane of the query explorer.
Computer group membership
You can define computer group membership based on named computer groups. Define a filter object using the syntax:
{memberOf: {name: "computer-group-name"}}
For example, the following request creates a computer group whose members are endpoints that are members of the All Linux computer group:
mutation createComputerGroup($name: String!, $filterGroup: String, $mrEnabled: Boolean!) {
computerGroupCreate(
input: {name: $name, filter: {memberOf: {name: $filterGroup}}, managementRightsEnabled: $mrEnabled}
) {
group {
id
}
error {
message
}
}
}
Include the computer group name variable in the Variables panel:
{
"name": "Example computer group",
"filterGroup": "All Linux",
"mrEnabled": false
}
The following request creates an action that targets endpoints that are members of the All Linux computer group:
mutation createAction($comment: String, $distributeSeconds: Int, $expirationTime: Time, $expireSeconds: Int, $name: String, $packageID: ID, $cgName: String) {
actionCreate(
input: {comment: $comment, distributeSeconds: $distributeSeconds, expirationTime: $expirationTime, expireSeconds: $expireSeconds, name: $name, package: {id: $packageID}, targets: {targetGroup: {filter: {memberOf: {name: $cgName}}}}}
) {
action {
id
}
error {
message
}
}
}
Include the computer group name variable in the Variables panel:
{
"comment": "Example created action",
"distributeSeconds": 60,
"expirationTime": "2023-01-01T00:00:00+00:00",
"expireSeconds": 120,
"name": "Example created action",
"packageID": 12345,
"cgName": "All Linux"
}
Sensors
You can define computer group membership based on readings of arbitrary named sensors. Define a filter object using the syntax:
{sensor: {name: "sensor-name", negated: "boolean", op: "operator", value: "filter-value"}}
Only the name and value arguments are required. If you do not define the negated argument, the default value is false. If you do not define the op argument, the default value is EQ (equals).
For example, the following request creates a group based on the Is Virtual sensor returning a value of false for endpoints, and returns only those endpoints:
mutation createComputerGroupVirtual($name: String!, $sensor: String, $negated: Boolean!, $op: FieldFilterOp!, $value: String, $mrEnabled: Boolean!) {
computerGroupCreate(
input: {name: $name, filter: {sensor: {name: $sensor}, negated: $negated, op: $op, value: $value}, managementRightsEnabled: $mrEnabled}
) {
group {
id
}
error {
message
}
}
}
Include the sensor name and value variables in the Variables panel:
{
"name": "Example computer group",
"sensor": "Is Virtual",
"negated": false,
"op": "EQ",
"value": "false",
"mrEnabled": false
}
The following request creates an action that targets endpoints based on the Is Virtual sensor returning a value of false for endpoints, targeting only those endpoints:
mutation createActionVirtualEndpoints($comment: String, $distributeSeconds: Int, $expirationTime: Time, $expireSeconds: Int, $name: String, $packageID: ID, $sensor: String, $negated: Boolean!, $op: FieldFilterOp!, $value: String) {
actionCreate(
input: {comment: $comment, distributeSeconds: $distributeSeconds, expirationTime: $expirationTime, expireSeconds: $expireSeconds, name: $name, package: {id: $packageID}, targets: {targetGroup: {filter: {sensor: {name: $sensor}, negated: $negated, op: $op, value: $value}}}}
) {
action {
id
}
error {
message
}
}
}
Include the sensor name and value variables in the Variables panel:
{
"comment": "Example created action",
"distributeSeconds": 60,
"expirationTime": "2023-01-01T00:00:00+00:00",
"expireSeconds": 120,
"name": "Example created action",
"packageID": 12345,
"sensor": "Is Virtual",
"negated": false,
"op": "EQ",
"value": "false"
}
Parameterized sensors
You can create a computer group based on parameterized sensors. Define a filter object using the syntax:
{sensor:
{name: "sensor-name",
params:[
{name: "parameter-1-name", value: "parameter-1-value"},
{name: "parameter-2-name", value: "parameter-2-value"},
{name: "parameter-n-name", value: "parameter-n-value"}
]
},
value: "filter-value"
}
Add a params name/value object for every parameter.
For example, the following request creates a computer group whose membership is based on the Custom Tag Exists sensor. Only endpoints tagged with the custom tag the-tag are returned by the sensor, and are members of this computer group:
mutation createComputerGroupTag($name: String!, $sensorName: String, $paramName: String!, $paramValue: String!, $sensorValue: String, $mrEnabled: Boolean!) {
computerGroupCreate(
input: {name: $name, filter: {sensor: {name: $sensorName, params: [{name: $paramName, value: $paramValue}]}, value: $sensorValue}, managementRightsEnabled: $mrEnabled}
) {
group {
id
}
error {
message
}
}
}
Include the sensor name, value, and parameter variables in the Variables panel:
{
"name": "Example tagged endpoints group",
"sensorName": "Custom Tag Exists",
"sensorValue": "true",
"paramName": "tag",
"paramValue": "the-tag",
"mrEnabled": false
}
The following request creates an action that targets a computer group whose membership is based on the Custom Tag Exists sensor. Only endpoints tagged with the custom tag the-tag are returned by the sensor, and are members of this targeted computer group:
mutation createActionTargetTags($comment: String, $distributeSeconds: Int, $expirationTime: Time, $expireSeconds: Int, $name: String, $packageID: ID, $sensorName: String, $paramName: String!, $paramValue: String!, $sensorValue: String) {
actionCreate(
input: {comment: $comment, distributeSeconds: $distributeSeconds, expirationTime: $expirationTime, expireSeconds: $expireSeconds, name: $name, package: {id: $packageID}, targets: {targetGroup: {filter: {sensor: {name: $sensorName, params: [{name: $paramName, value: $paramValue}]}, value: $sensorValue}}}}
) {
action {
id
}
error {
message
}
}
}
Include the sensor name, value, and parameter variables in the Variables panel:
{
"comment": "Example action tagged endpoints",
"distributeSeconds": 60,
"expirationTime": "2023-01-01T00:00:00+00:00",
"expireSeconds": 120,
"name": "Example action tagged endpoints",
"packageID": 12345,
"sensorName": "Custom Tag Exists",
"sensorValue": "true",
"paramName": "tag",
"paramValue": "the-tag"
}
Single column from multi-column sensors
You can create a computer group based on a single column from multi-column sensors by specifying the column name. Define a filter object using the syntax:
{sensor: {
name: "sensor-name",
column: "sensor-column-name"},
value: "filter-value"}
}
For example, the following request creates a computer group based on the CPU Details sensor returning endpoints with an Intel CPU. Those endpoints are members of the computer group:
mutation createComputerGroupIntel($name: String!, $sensorName: String, $sensorColumn: String, $sensorValue: String, $mrEnabled: Boolean!) {
computerGroupCreate(
input: {name: $name, filter: {sensor: {name: $sensorName, column: $sensorColumn}, value: $sensorValue}, managementRightsEnabled: $mrEnabled}
) {
group {
id
}
error {
message
}
}
}
Include the sensor name, column, and value variables in the Variables panel:
{
"name": "Example computer group Intel",
"sensorName": "CPU Details",
"sensorColumn": "CPU",
"sensorValue": "Intel",
"mrEnabled": false
}
The following request creates an action that targets endpoints based on the CPU Details sensor returning endpoints with an Intel CPU. Those endpoints are members of the computer group and targeted by this action:
mutation createActionTargetIntel($comment: String, $distributeSeconds: Int, $expirationTime: Time, $expireSeconds: Int, $name: String, $packageID: ID, $sensorName: String, $sensorColumn: String, $sensorValue: String) {
actionCreate(
input: {comment: $comment, distributeSeconds: $distributeSeconds, expirationTime: $expirationTime, expireSeconds: $expireSeconds, name: $name, package: {id: $packageID}, targets: {targetGroup: {filter: {sensor: {name: $sensorName, column: $sensorColumn}, value: $sensorValue}}}}
) {
action {
id
}
error {
message
}
}
}
Include the sensor name, column, and value variables in the Variables panel:
{
"comment": "Example action Intel endpoints",
"distributeSeconds": 60,
"expirationTime": "2023-01-01T00:00:00+00:00",
"expireSeconds": 120,
"name": "Example action Intel endpoints",
"packageID": 12345,
"sensorName": "CPU Details",
"sensorColumn": "CPU",
"sensorValue": "Intel"
}
Multiple columns from multi-column sensors
If you want to create a computer group based on multiple columns of each row of a multi-column sensor, define a filter.filters list, then define a list element for each column filter, using the following syntax:
filters: [
{sensor: {column: "column-1-name"}, value: "column-1-value"},
{sensor: {column: "column-2-name"}, value: "column-2-value"},
{sensor: {column: "column-n-name"}, value: "column-n-value"}
]
You can only use a single level of child filters, and can only use the default EQ operator.
For example, the following request creates a computer group based on the CPU Details sensor returning endpoints with 4 total cores and an Intel CPU:
mutation createComputerGroup4CoreIntel($name: String!, $sensorName: String, $sensorColumn1: String, $sensorValue1: String, $sensorColumn2: String, $sensorValue2: String, $mrEnabled: Boolean!) {
computerGroupCreate(
input: {name: $name, filter: {sensor: {name: $sensorName}, filters: [{sensor: {column: $sensorColumn1}, value: $sensorValue1}, {sensor: {column: $sensorColumn2}, value: $sensorValue2}]}, managementRightsEnabled: $mrEnabled}
) {
group {
id
}
error {
message
}
}
}
Include the sensor name, column, and value variables in the Variables panel:
{
"name": "Example computer group 4 core Intel",
"sensorName": "CPU Details",
"sensorColumn1": "CPU",
"sensorValue1": "Intel",
"sensorColumn2": "Total Cores",
"sensorValue2": "4",
"mrEnabled": false
}
In this form, the sensor is identified in the top filter and the columns are identified in the child filters. You can only use a single level of child filters, and can only use the default EQ operator.
The following request creates an action that targets endpoints based on the CPU Details sensor returning endpoints with 4 total cores and an Intel CPU:
mutation createActionTarget4CoreIntel($comment: String, $distributeSeconds: Int, $expirationTime: Time, $expireSeconds: Int, $name: String, $packageID: ID, $sensorName: String, $sensorColumn1: String, $sensorValue1: String, $sensorColumn2: String, $sensorValue2: String) {
actionCreate(
input: {comment: $comment, distributeSeconds: $distributeSeconds, expirationTime: $expirationTime, expireSeconds: $expireSeconds, name: $name, package: {id: $packageID}, targets: {targetGroup: {filter: {sensor: {name: $sensorName}, filters: [{sensor: {column: $sensorColumn1}, value: $sensorValue1}, {sensor: {column: $sensorColumn2}, value: $sensorValue2}]}}}}
) {
action {
id
}
error {
message
}
}
}
Include the sensor name, column, and value variables in the Variables panel:
{
"comment": "Example action 4 core Intel endpoints",
"distributeSeconds": 60,
"expirationTime": "2023-01-01T00:00:00+00:00",
"expireSeconds": 120,
"name": "Example action Intel endpoints",
"packageID": 12345,
"sensorName": "CPU Details",
"sensorColumn1": "CPU",
"sensorValue1": "Intel",
"sensorColumn2": "Total Cores",
"sensorValue2": "4"
}
Computer group query filter syntax
Computer group queries support the following filter fields:
-
filterEnabled
-
managementRightsEnabled
-
type
For more information on syntax, see computerGroupsFilter in the Documentation Explorer pane of the query explorer.
Manual or standard computer group
You can filter based on whether the computer group is standard (membership is based on the results of a sensor filter expression) or manual (membership is based on a manually entered list of computer names or fully qualified domain names (FQDNs)). To retrieve standard computer groups, define a filter object using the syntax:
{type: STANDARD}
To retrieve manual computer groups, define a filter object using the syntax:
{type: MANUAL}
For example, the following request filters and returns computer groups based on type, with the specific type defined in the variable definition:
query getGroupsByType($type: ComputerGroupType) {
computerGroups(filter: {type: $type}) {
edges {
node {
id
name
contentSet {
id
name
}
expression
type
filterEnabled
managementRightsEnabled
}
}
}
}
To retrieve manual computer groups, include the following type variable in the Variables panel or in your variables dictionary:
{
"type": "MANUAL"
}
To retrieve standard computer groups, include the following type variable in the Variables panel or in your variables dictionary:
{
"type": "STANDARD"
}
Filter group
You can filter based on whether the computer group is a filter group. To retrieve filter computer groups, define a filter object using the syntax:
{filterEnabled: true}
For example, the following request filters and returns filter groups:
query getFilterGroups($filterEnabled: Boolean) {
computerGroups(filter: {filterEnabled: $filterEnabled}) {
edges {
node {
id
name
contentSet {
id
name
}
expression
type
filterEnabled
managementRightsEnabled
}
}
}
}
Include the filter enabled variable in the Variables panel or in your variables dictionary:
{
"filterEnabled": true
}
Management rights group
You can filter based on whether the computer group is a management rights group. To retrieve management rights computer groups, define a filter object using the syntax:
{managementRightsEnabled: true}
For example, the following request filters and returns management rights groups:
query getMRGroups($mrEnabled: Boolean) {
computerGroups(filter: {managementRightsEnabled: $mrEnabled}) {
edges {
node {
id
name
contentSet {
id
name
}
expression
type
filterEnabled
managementRightsEnabled
}
}
}
}
Include the filter enabled variable in the Variables panel or in your variables dictionary:
{
"mrEnabled": true
}
Discover query filter syntax
Discover queries that request labels or interfaces using discoverLabels or discoverInterfaces support the path and value filter fields.
For more information on syntax, see FieldFilter in the Documentation Explorer pane of the query explorer.
Single column
You can filter on field values. Define a filter object using one of the following syntaxes:
discoverInterfaces(filter:
{
path: "field-path",
op: "operator-value",
value: "field-value"
}
)
discoverLabels(filter:
{
path: "field-path",
op: "operator-value",
value: "field-value"
}
)
Use dot notation for sub-fields not at the root level.
For example, the following query retrieves labels with a createdTime value greater than 2023-01-01 and returns the labels:
query exampleGetLabels {
discoverLabels(filter: {path: "createdTime", op: GT, value: "2023-01-01"}) {
edges {
node {
name
type
createdTime
modifiedTime
}
}
}
}
Multiple columns
You can filter on multiple Discover-related columns. Define a filter object using one of the following syntaxes:
discoverInterfaces(filter:
{any: boolean,
filters: [
{path: "field-path-1", op: "operator-1", value: "filter-value-1"},
{path: "field-path-2", op: "operator-2", value: "filter-value-2"},
{path: "field-path-n", op: "operator-n", value: "filter-value-n"}
]
}
)
discoverLabels(filter:
{any: boolean,
filters: [
{path: "field-path-1", op: "operator-1", value: "filter-value-1"},
{path: "field-path-2", op: "operator-2", value: "filter-value-2"},
{path: "field-path-n", op: "operator-n", value: "filter-value-n"}
]
}
)
Use dot notation for sub-fields not at the root level.
For example, the following query retrieves interfaces associated with the label Example_label and an osPlatform of Linux, and returns matching interfaces:
query exampleGetInterfaces {
discoverInterfaces(
filter: {any: false, filters: [{path: "labels.name", op: EQ, value: "Example_label"}, {path: "osPlatform", op: EQ, value: "Linux"}]}
) {
edges {
node {
id
labels
osPlatform
}
}
}
}
Endpoint query filter syntax
Endpoint queries support the following filter fields:
-
memberOf
-
path and value
-
sensor and value
Endpoint queries with sensorReadings support the column and value filter fields to filter based on sensor results.
For more information on syntax, see endpointFieldFilter and SensorValueFilter in the Documentation Explorer pane of the query explorer.
Fields associated with a sensor (path and value)
For endpoint queries, you can filter on field values for fields associated with a sensor in the Gateway schema. Unless otherwise specified, define a filter object using the syntax:
{path: "field-path", op: "EndpointFieldFilter-value", value: "field-value"}
Note the following:
-
If you define a field not associated with a sensor, the request returns an error.
-
Use dot notation for sub-fields not at the root level. For example, to filter on service names, define path: "services.name".
-
The UPDATED_AFTER and READ_AFTER operators apply only to fields associated with sensors, such as any of the services child fields.
-
All other operators apply to fields associated with a single-column sensor, or a single column of a multi-column sensor.
For example, the following request filters and returns only endpoints whose primary user email address is user@example.com:
query getEndpointsByEmail ($path:String, $value:String){
endpoints(filter: {path: $path, value: $value}) {
edges {
node {
id
primaryUser {
email
}
}
}
}
}
Include the path and value variables in the Variables panel:
{
"path": "primaryUser.email",
"value": "user@example.com"
}
Computer group membership
You can filter on membership in named computer groups, referencing computer group name or ID. To filter by computer group name, define a filter object using the syntax:
{memberOf: {name: "computer-group-name"}}
To filter by computer group ID, define a filter object using the syntax:
{memberOf: {id: "computer-group-id"}}
For example, the following request filters and returns only endpoints that are members of the All Linux computer group, based on name:
query getLinuxEndpoints ($cgname: String){
endpoints(filter: {memberOf: {name: $cgname}}) {
edges {
node {
id
}
}
}
}
Include the computer group name variable in the Variables panel:
{
"cgname": "All Linux"
}
The following request filters and returns only endpoints that are members of the computer group with the ID of 123:
query filterEndpointsComputerGroupID ($id: ID){
endpoints(filter: {memberOf: {id: $id}}) {
edges {
node {
computerID
name
ipAddress
}
}
}
}
Include the computer group ID variable in the Variables panel:
{
"id": 123
}
Endpoint IPv4 addresses within a range
Endpoint queries can filter based on the IPv4 address falling within a range of IPv4 addresses. Define a filter object using the syntax:
{
filters: [
{path: "ipAddress", op: GTE, value: lower-ipv4-address},
{path: "ipAddress", op: LTE, value: upper-ipv4-address}
]
}
For example, the following request filters based on IPv4 addresses between 192.0.2.0 and 192.0.2.255:
query endpointsInIpRange($ipv4RangeStart: String!, $ipv4RangeEnd: String!) {
endpoints(
filter: {filters: [{path: "ipAddress", op: GTE, value: $ipv4RangeStart}, {path: "ipAddress", op: LTE, value: $ipv4RangeEnd}]}
) {
edges {
node {
id
name
ipAddress
}
}
}
}
Include the IPv4 address variables in the Variables panel:
{
"ipv4RangeStart": "192.0.2.0",
"ipv4RangeEnd": "192.0.2.255"
}
Endpoints first seen or last seen
Endpoint queries can filter on endpoint IDs, then return the first seen or last seen time. To filter based on the endpoint ID value, define a filter object using the syntax:
{path: "id", value: "endpoint-id", op: "FieldFilterOp-value"}
For ID fields, you can use the EQ, LT, LTE, GT, or GTE values for the op argument.
In the request, define the query.endpoints.edges.node.eidLastSeen or query.endpoints.edges.node.eidFirstSeen field to determine the time the endpoint was last seen or first seen, respectively.
For example, the following request filters based on endpoint ID 123, and returns the eidLastSeen value in the response:
query getEndpointsLastSeen ($path:String, $value:String, $op: FieldFilterOp!){
endpoints(filter: {path: $path, value: $value, op: $op}) {
edges {
node {
id
eidLastSeen
}
}
}
}
Include the pagination variable in the Variables panel:
{
"path": "id",
"value": "123",
"op": "EQ"
}
Endpoint queries can also filter on the time an endpoint was first seen or last seen. To filter based on the eidFirstSeen value, define a filter object using the syntax:
{path: "eidFirstSeen", value: "time-value", op: "FieldFilterOp-value"}
To filter based on the eidLastSeen value, define a filter object using the syntax:
{path: "eidLastSeen", value: "time-value", op: "FieldFilterOp-value"}
For time fields, you can use the EQ, LT, LTE, GT, GTE, UPDATED_AFTER, or READ_AFTER values for the op argument.
For example, the following request filters based on endpoints last seen after January 1, 2022:
query getEndpointsLastSeen ($path:String, $value:String, $op: FieldFilterOp!){
endpoints(filter: {path: $path, value: $value, op: $op}) {
edges {
node {
id
eidLastSeen
}
}
}
}
Include the pagination variable in the Variables panel:
{
"path": "eidLastSeen",
"value": "2022-01-01T00:00:00.000Z",
"op": "GT"
}
Sensors
Endpoint queries can filter on readings of arbitrary named sensors. Define a filter object using the syntax:
{sensor: {name: "sensor-name", value: "filter-value"}}
For example, the following request filters based on the Total Memory sensor returning a value of 16384 MB for endpoints, and returns only those endpoints:
query get16GBMemEndpoints($sensor: String, $value: String) {
endpoints(filter: {sensor: {name: $sensor}, value: $value}) {
edges {
node {
id
}
}
}
}
Include the sensor name and value variables in the Variables panel:
{
"sensor": "Total Memory",
"value": "16384 MB"
}
Sensor values updated after a given date
Endpoint queries can filter on sensor values updated after a given date. Define a filter object using the syntax:
{sensor: {name: "sensor-name", op: UPDATED_AFTER, value: "rfc-3339-timestamp"}}
For example, the following request filters based on whether any endpoints had their Total Memory sensor value updated after January 1, 2022:
query get16GBMemEndpoints($sensor: String, $value: String) {
endpoints(filter: {sensor: {name: $sensor}, op: UPDATED_AFTER, value: $value}) {
edges {
node {
id
}
}
}
}
Include the pagination variable in the Variables panel:
{
"sensor": "Total Memory",
"value": "2022-01-01T00:00:00.000Z"
}
Sensor maximum age
Endpoint queries that filter using sensor values can override the sensor Max Sensor Age setting, and force sensor reevaluations if the cached sensor results are older than this setting. Define a filter object using the syntax:
{sensor: {name: "sensor-name", op: operator-value, value: "column-value"}, maxAge: integer-seconds}
For example, the following request filters based on endpoints with 8000 MB of total memory, and forces sensor script reexecution if the cached results are older than 300 seconds:
query exampleGet8GBMaxAgeEndpoints($sensor: String, $value: String, $maxAge: Int) {
endpoints(
source: {ts: {stableWaitTime: 10}}
filter: {sensor: {name: $sensor}, op: EQ, value: $value, maxAge: $maxAge}
) {
edges {
node {
id
}
}
}
}
Include the filter variables in the Variables panel:
{
"sensor": "Total Memory",
"value": "8000 MB",
"maxAge": 300
}
Parameterized sensors
You can also filter on parameterized sensors. Define a filter object using the syntax:
{sensor:
{name: "sensor-name",
params:[
{name: "parameter-1-name", value: "parameter-1-value"},
{name: "parameter-2-name", value: "parameter-2-value"},
{name: "parameter-n-name", value: "parameter-n-value"}
]
},
value: "filter-value"
}
Add a params name/value object for every parameter.
For example, the following request filters based on the Custom Tag Exists sensor, returning endpoints tagged with the custom tag the-tag, and returns only those endpoints:
query getEndpointsWithCustomTag($sensorName: String, $sensorValue: String, $paramName: String!, $paramValue: String!) {
endpoints(
filter: {sensor: {name: $sensorName, params: [{name: $paramName, value: $paramValue}]}, value: $sensorValue}
) {
edges {
node {
id
}
}
}
}
Include the sensor name, value, and parameter variables in the Variables panel:
{
"sensorName": "Custom Tag Exists",
"sensorValue": "true",
"paramName": "tag",
"paramValue": "the-tag"
}
Parameterized sensor in the root filter
You can also filter on parameterized sensors in the root filter. Use the same parameters in the root filter and in sensorReadings for that sensor.
For example, the following request returns endpoints where File Exists matches the regex for that file path. Use the same file parameter in the root filter and in sensorReadings:
query exampleParameterFilterRoot($fileParameter: String!) {
endpoints(
source: {tds: {excludeNoResults: true, excludeErrors: true}}
filter: {any: false, filters: [{sensor: {name: "File Exists", params: [{name: "file", value: $fileParameter}]}, value: ".*File Exists.*", op: MATCHES, negated: false}]}
first: 500
) {
totalRecords
pageInfo {
hasNextPage
endCursor
}
edges {
node {
name
sensorReadings(
sensors: [{name: "Short Hostname"}, {name: "File Exists", params: [{name: "file", value: $fileParameter}]}]
) {
columns {
name
values
}
}
}
}
}
}
Include the file name variable in the Variables panel:
{
"fileParameter": "C:\\nobackup\\example.txt"
}
Field path
You can filter endpoints by a field path. For example the following query filters to show only endpoints whose os.generation contains Windows:
query exampleWindowsFilter($parameterPath: String, $parameterPathValue: String) {
endpoints(
first: 20
filter: {path: $parameterPath, op: CONTAINS, value: $parameterPathValue}
) {
totalRecords
edges {
node {
name
os {
generation
}
}
}
}
}
Include the path and value variable in the Variables panel:
{
"parameterPath": "os.generation",
"parameterPathValue": "Windows"
}
Sensor readings
You can filter endpoints by sensor readings. For example, the following query returns endpoints whose CPU Details has Total Cores greater than or equal to 2, and also retrieves CPU Speed:
query exampleEndpointsSensorReadings($sensorName: String!, $column1: String!, $column1Value: String, $column2: String!) {
endpoints(first: 50, source: {tds: {}}) {
edges {
node {
name
sensorReadings(
sensors: [{name: $sensorName, columns: [$column1, $column2], filter: {column: $column1, op: GTE, value: $column1Value, any: false}}]
) {
columns {
name
values
}
}
}
}
}
}
Include the sensor and column variables in the Variables panel:
{
"sensorName": "CPU Details",
"column1": "Total Cores",
"column1Value": "2",
"column2": "CPU Speed"
}
Root filter sensor row match
Many times, the match value is a row key such as Application Name|Version. You can build this query from a prior sensorReadings query for Installed Applications on a known endpoint.
For example, the following query returns endpoints where Installed Applications contains a specific sensor name and value:
query exampleRootFilter($sensorName: String, $sensorValue: String) {
endpoints(
first: 20
source: {tds: {excludeNoResults: true, excludeErrors: true}}
filter: {sensor: {name: $sensorName}, op: CONTAINS, value: $sensorValue}
) {
totalRecords
edges {
node {
name
}
}
}
}
Include the sensor variables in the Variables panel:
{
"sensorName": "Installed Applications",
"sensorValue": "Google Chrome|145.0.7632.160"
}
Single column from multi-column sensors
You can filter a column from multi-column sensors by specifying the column name. Define a filter object using the syntax:
{sensor: {
name: "sensor-name",
column: "sensor-column-name"},
value: "filter-value"}
}
For example, the following request filters based on the CPU Details sensor returning endpoints with an Intel CPU, and returns only those endpoints:
query getIntelCPUEndpoints($sensorName: String, $sensorColumn: String, $sensorValue: String) {
endpoints(
filter: {sensor: {name: $sensorName, column: $sensorColumn}, value: $sensorValue}
) {
edges {
node {
id
}
}
}
}
Include the sensor name, column, and value variables in the Variables panel:
{
"sensorName": "CPU Details",
"sensorColumn": "CPU",
"sensorValue": "Intel"
}
Multiple columns from multi-column sensors
If you want to select across multiple columns of each row of a multi-column sensor, define a filter.filters list, then define a list element for each column filter, using the following syntax:
filters: [
{sensor: {column: "column-1-name"}, value: "column-1-value"},
{sensor: {column: "column-2-name"}, value: "column-2-value"},
{sensor: {column: "column-n-name"}, value: "column-n-value"}
]
You can only use a single level of child filters, and can only use the default EQ operator.
For example, the following request filters based on the CPU Details sensor returning endpoints with 4 total cores and an Intel CPU, and returns only those endpoints:
query get4CoreIntelCPUEndpoints($sensorName: String, $sensorColumn1: String, $sensorValue1: String, $sensorColumn2: String, $sensorValue2: String) {
endpoints(
filter: {sensor: {name: $sensorName}, filters: [{sensor: {column: $sensorColumn1}, value: $sensorValue1}, {sensor: {column: $sensorColumn2}, value: $sensorValue2}]}
) {
edges {
node {
id
}
}
}
}
Include the sensor name, column, and value variables in the Variables panel:
{
"sensorName": "CPU Details",
"sensorColumn1": "CPU",
"sensorValue1": "Intel",
"sensorColumn2": "Total Cores",
"sensorValue2": "4"
}
In this form, the sensor is identified in the top filter and the columns are identified in the child filters. You can only use a single level of child filters, and can only use the default EQ operator.
Sensor readings from one or multiple sensors
After you filter endpoints, you can filter your results to return data from additional sensors. As a child of the node object, define the sensor reading filter using the following syntax:
sensorReadings
(sensors: [{name: "sensor-name"}], includeHiddenColumns: boolean) {
columns {
sensor {
name
}
name
values
}
For example, the following request first filters endpoints and only returns endpoints with Firefox as an installed application, then for each endpoint, returns the results of the Is Linux sensor:
query GetLinuxFirefoxEndpoints($sensorName1: String, $sensorColumn1: String, $sensorOp1: FieldFilterOp!, $sensorValue1: String, $sensorName2: String!) {
endpoints(
filter: {sensor: {name: $sensorName1, column: $sensorColumn1}, op: $sensorOp1, value: $sensorValue1}
) {
edges {
node {
name
ipAddress
sensorReadings(sensors: [{name: $sensorName2}]) {
columns {
sensor {
name
}
name
values
}
}
}
}
}
}
Include the sensor name, column, operator, and value variables in the Variables panel:
{
"sensorName1": "Installed Applications",
"sensorColumn1": "Name",
"sensorOp1": "CONTAINS",
"sensorValue1": "Firefox",
"sensorName2": "Is Linux"
}
Single column from multi-column sensor readings
You can filter a column from sensor readings for multi-column sensors by specifying the column name. Define a filter object using the syntax:
sensorReadings
(sensors: [{name: "sensor-name", filter: {column: "column-name", op: "operator-value", value: "column-value", restrictOwner: "boolean-value"}}}], includeHiddenColumns: boolean) {
columns {
sensor {
name
}
name
values
}
}
You can filter the set of endpoints returned and filter based on the sensor readings in a single request.
For example, the following request retrieves endpoints, then filters based on the Installed Applications sensor returning endpoints with the tar application installed, and is limited to the returned field values, then returns only those endpoints:
query getEndpointsInstalledTar ($first: Int) {
endpoints (first: $first){
edges {
node {
computerID
sensorReadings(
sensors: [{name: "Installed Applications", filter: {column: "Name", op: EQ, value: "tar", restrictOwner: false}}]
) {
columns {
name
values
sensor {
name
}
}
}
}
}
}
}
Include the pagination variable in the Variables panel or in your variables dictionary:
{
"first": 2
}
Multiple columns from multi-column sensor readings
If you want to select across multiple columns of each row of multi-column sensor readings, define a filter.filters list, then define a list element for each column filter, using the following syntax:
sensorReadings(
sensors: [
{
name: "sensor-name",
filter: {
restrictOwner: "boolean-value",
filters: [
{column: "column-name-1", op: "operator-value-1", value: "column-value-1"},
{column: "column-name-2", op: "operator-value-2", value: "column-value-2"},
{column: "column-name-n", op: "operator-value-n", value: "column-value-n"}]
}
}
], includeHiddenColumns: boolean
) {
columns {
sensor {
name
}
name
values
}
}
You can only use a single level of child filters. You can filter the set of endpoints returned and filter based on the sensor readings in a single request.
For example, the following query retrieves the first 2 endpoints that are members of the All Linux computer group, and returns the application Name and Version columns for only the endpoints that have the tar application version 1.30 installed, based on the results from the Installed Applications sensor.
query getLinuxEndpointsInstalledTar130 ($first: Int){
endpoints(first: $first, filter: {memberOf: {name: "All Linux"}}) {
edges {
node {
computerID
sensorReadings(
sensors: [{name: "Installed Applications",
filter: {
restrictOwner: false,
filters: [
{column: "Name", op: EQ, value: "Tar"},
{column: "Version" op: EQ, value: "1.30"}]
}
}]
) {
columns {
name
values
sensor {
name
}
}
}
}
}
}
}
Include the pagination variable in the Variables panel or in your variables dictionary:
{
"first": 2
}
You can also define a delimited list of values for filtering. Define a filter object using the syntax:
{
sensor: {
name: "sensor-name",
},
op: "MATCHES",
value: "column-value-1|column-value-2|column-value-n..."
}
Define the value field value as multiple column values, with each value separated by the sensor delimiter, such as an escaped vertical line (\|). The delimited list of values does not need to start with the first sensor column. If you want to match on any column value for a column, define a wildcard (.*).
The following request filters based on the Client Extensions - Status sensor, returning only endpoints with the sensor column values of version and 1.2.345:
query exampleFilterDelimitedValues($maxWaitTime: Int!, $filter: EndpointFieldFilter) {
endpoints(
source: {ts: {maxWaitTime: $maxWaitTime}}
filter: $filter
) {
totalRecords
collectionInfo {
contributedTotal
respondedTotal
}
edges {
node {
name
id
}
}
}
}
Include the pagination, wait time, and filter variables in the Variables panel:
{
"maxWaitTime": 30,
"filter": {
"sensor": {
"name": "Client Extensions - Status"
},
"op": "MATCHES",
"value": ".*\\|version\\|1\\.2\\.345",
"negated": false,
"any": false
}
}
(1.2 - Experimental (Release Candidate)) Sensor reading for one sensor, converted data type
After you filter endpoints, you can filter your results to return data from an additional sensor, and convert the sensor result data type in the response. For example, if a sensor with a string return type returns an integer ID, you can convert the data type to integer in the response. As a child of the node object, define the sensor reading filter using the following syntax:
sensorReading
(sensor: {
columns: ["column-name"],
filter: {column: "filter-column-name", op: "operator-value", value: "column-value", restrictOwner: "boolean-value"},
maxAge: "maximum-data-age-seconds",
name: "sensor-name",
params: [name: "param-name", value: "param-value"]
}
)
For example, the following request first filters endpoints and only returns endpoints with Firefox as an installed application, then for each endpoint, returns the results of the Is Linux sensor:
query GetLinuxFirefoxEndpoints($sensorName1: String, $sensorColumn1: String, $sensorOp1: FieldFilterOp!, $sensorValue1: String, $sensorName2: String!, $sensorColumn2: String!) {
endpoints(
filter: {sensor: {name: $sensorName1, column: $sensorColumn1}, op: $sensorOp1, value: $sensorValue1}
) {
edges {
node {
name
ipAddress
sensorReading(sensor: {name: $sensorName2, columns: [$sensorColumn2]}) {
columns {
sensor {
name
}
name
values
}
}
}
}
}
}
Include the sensor name, column, operator, and value variables in the Variables panel:
{
"sensorName1": "Installed Applications",
"sensorColumn1": "Name",
"sensorOp1": "CONTAINS",
"sensorValue1": "Firefox",
"sensorName2": "Is Linux",
"sensorColumn2": "Is Linux"
}
You can define one sensor and sensor column for each instance of sensorReading. Use aliases in your request to request information for multiple sensors, and convert the data type as needed. For example, the following request returns values from the Custom Tags sensor, without converting the data type, and the Total Cores numeric value from the CPU Details sensor, converted to float values:
query endpointWithSensorReading {
endpoints {
edges {
node {
id
customTags: sensorReading(sensor: {name: "Custom Tags"}) {
values
}
totalCpuCores: sensorReading(
sensor: {name: "CPU Details", columns: ["Total Cores"]}
) {
floatValues
}
}
}
}
}
Package spec query filter syntax
Package spec queries support the path and value filter fields.
For more information on syntax, see FieldFilter in the Documentation Explorer pane of the query explorer.
Single filter field
You can filter on a single field value. Unless otherwise specified, define a filter object using the syntax:
{path: "field-path", negated: "boolean", op: "operator", value: "filter-value"}
For example, the following request filters and returns only package spec objects whose name does not contain production:
query getPackageSpecsFiltered($path: String, $negated: Boolean!, $op: FieldFilterOp!, $value: String) {
packageSpecs(filter: {path: $path, negated: $negated, op: $op, value: $value}) {
edges {
node {
id
name
contentSetName
command
commandTimeoutSeconds
expireSeconds
params {
key
label
defaultValue
}
sensorSourcedParams {
name
}
}
}
}
}
Include the filter-related variables in the Variables panel:
{
"path": "name",
"negated": true,
"op": "CONTAINS",
"value": "production"
}
Multiple filter fields
You can filter on multiple field values. Define a filter object using the syntax:
{any: boolean,
filters: [
{path: "field-path-1", negated: "boolean-1", op: "operator-1", value: "filter-value-1"},
{path: "field-path-2", negated: "boolean-2", op: "operator-2", value: "filter-value-2"},
{path: "field-path-n", negated: "boolean-n", op: "operator-n", value: "filter-value-n"}
]
For example, the following request filters and returns only package spec objects whose name does not contain production, and whose content set name contains test:
query packageSpecsMultipleFilters($path1: String, $negated1: Boolean!, $op1: FieldFilterOp!, $value1: String, $path2: String, $negated2: Boolean!, $op2: FieldFilterOp!, $value2: String) {
packageSpecs(
filter: {any: false, filters: [{path: $path1, negated: $negated1, op: $op1, value: $value1}, {path: $path2, negated: $negated2, op: $op2, value: $value2}]}
) {
edges {
node {
id
name
contentSetName
command
commandTimeoutSeconds
expireSeconds
params {
key
label
defaultValue
}
sensorSourcedParams {
name
}
}
}
}
}
Include the filter-related variables in the Variables panel:
{
"path1": "name",
"negated1": true,
"op1": "CONTAINS",
"value1": "production",
"path2": "contentSetName",
"negated2": false,
"op2": "CONTAINS",
"value2": "test"
}
Patch query filter syntax
Patch queries to retrieve patch definitions support the following filter field:
-
cveIds
-
classification
-
hasCve
-
isSuperseded
-
platform
-
product
-
releasedOnOrBeforeDate
-
releasedOnOrAfterDate
-
severity
For more information on syntax, see patchDefinitionFieldFilter in the Documentation Explorer pane of the query explorer.
CVE ID
You can filter patch definitions based on an associated CVE ID. Define a filter object using the syntax:
{cveIds: [cve-id]}
For example, the following request filters and returns only patch definitions with a CVE ID of CVE-2014-123456:
query exampleGetPatchDefinitions($first: Int, $filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(first: $first, filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"first": 1,
"filter": {
"cveIds": [
"CVE-2014-123456"
]
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Classification
You can filter patch definitions based on a patch definition classification. Define a filter object using the syntax:
{classification: classification-type}
For example, the following request filters and returns only patch definitions with a classification of Security Updates:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"classification": [
"Security Updates"
]
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Has association with any CVE
You can filter patch definitions based on whether the patch definition is associated with any CVE. Define a filter object using the syntax:
{hasCve: boolean-value}
For example, the following request filters and returns only patch definitions associated with any CVE:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"hasCve": true
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Is superseded by another patch definition
You can filter patch definitions based on whether the patch definition is superseded by another patch definition. Define a filter object using the syntax:
{isSuperseded: boolean-value}
For example, the following request filters and returns only patch definitions superseded by another patch definition:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"isSuperseded": true
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Operating System platform
You can filter patch definitions based on whether the patch definition applies to an operating system. Define a filter object using the syntax:
{platform: PatchEndpointPlatform-enum-value}
Supported values include MACOS, LINUX, and WINDOWS.
For example, the following request filters and returns only patch definitions that apply to Linux operating systems:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"platform": "LINUX"
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Product
You can filter patch definitions based on the product to which the patch definition applies to an operating system. Define a filter object using the syntax:
{product: product-name}
For example, the following request filters and returns only patch definitions for Windows Server 2019:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"product": "Windows Server 2019"
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Released on or before a date
You can filter patch definitions based on the patch definition release date occurring prior to or equal to a date in ISO 8601 format. Define a filter object using the syntax:
{releasedOnOrBeforeDate: iso-8601-date}
For example, the following request filters and returns only patch definitions released before or on December 31, 2020:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"releasedOnOrBeforeDate": "2020-12-31"
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Released on or after a date
You can filter patch definitions based on the patch definition release date occurring on or after a date in ISO 8601 format. Define a filter object using the syntax:
{releasedOnOrAfterDate: iso-8601-date}
For example, the following request filters and returns only patch definitions released on or after December 31, 2023:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"releasedOnOrAfterDate": "2023-12-31"
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Severity
You can filter patch definitions based on the patch definition severity. Define a filter object using the syntax:
{severity: severity-value}
The filter comparison is case-insensitive. Supported severity values include critical, important, low, medium, moderate, and none
For example, the following request filters and returns only patch definitions assigned a medium severity:
query exampleGetPatchDefinitions($filter: PatchDefinitionFieldFilter, $sort: PatchDefinitionFieldSort) {
patchDefinitions(filter: $filter, sort: $sort) {
edges {
node {
id
createdDate
classification
cveIds
isSuperseded
platform
releaseDate
severity
sizeInBytes
title
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the pagination and filter variables in the Variables panel or in your variables dictionary:
{
"filter": {
"severity": "medium"
},
"sort": {
"field": "releaseDate",
"order": "desc"
}
}
Provision query filter syntax
Provision queries that request retirement action information (query.provisionRetirementActions) support the following filter fields:
-
computerName
-
manufacturer
-
model
-
serialNumber
-
status
Provision queries that request retirement action information support sorting the response on the following filter fields in ascending (asc) or descending (desc) order:
-
computerName based on alphabetical order
-
createdAt based on chronological order
-
manufacturer based on alphabetical order
-
model based on alphabetical order
-
retirementActionDefinition based on alphabetical order
-
serialNumber based on alphanumerical order
-
status based on alphabetical order
-
updatedAt based on chronological order
If you do not define a sort order, the query defaults to sorting on updatedAt in asc order.
For more information on filter syntax, see ProvisionFieldFilter and ProvisionFilterField in the Documentation Explorer pane of the query explorer. For more information on sort syntax, see ProvisionRetirementActionFieldSort and ProvisionRetirementActionSortField in the Documentation Explorer pane of the query explorer.
Retirement actions targeting a manufacturer
You can retrieve retirement actions that target a manufacturer, including partial matches. Define a filter object with the following syntax:
{
filterField: manufacturer,
value: filter-value
}
For example, the following query retrieves retirement actions that target manufacturers that contain example:
query exampleGetMultipleProvisionRetirementActions($filter: [ProvisionFieldFilter!]) {
provisionRetirementActions(filter: $filter) {
edges {
cursor
node {
id
definitionID
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"filter": {
"filterField": "manufacturer",
"value": "example"
}
}
Retirement actions targeting a hardware model
You can retrieve retirement actions that target a hardware model, including partial matches. Define a filter object with the following syntax:
{
filterField: model,
value: filter-value
}
For example, the following query retrieves retirement actions that target hardware models that contain example:
query exampleGetMultipleProvisionRetirementActions($filter: [ProvisionFieldFilter!]) {
provisionRetirementActions(filter: $filter) {
edges {
cursor
node {
id
definitionID
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"filter": {
"filterField": "model",
"value": "example"
}
}
Retirement actions targeting an endpoint serial number
You can retrieve retirement actions that target an endpoint serial number, including partial matches. Define a filter object with the following syntax:
{
filterField: serialNumber,
value: filter-value
}
For example, the following query retrieves retirement actions that target endpoint serial numbers that contain example:
query exampleGetMultipleProvisionRetirementActions($filter: [ProvisionFieldFilter!]) {
provisionRetirementActions(filter: $filter) {
edges {
cursor
node {
id
definitionID
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"filter": {
"filterField": "serialNumber",
"value": "example"
}
}
Retirement actions that are at a specific lifecycle status
You can retrieve retirement actions that target a specific lifecycle status, including partial matches. Retirement action statuses include pending, issued, information, in progress, canceled, and completed. Define a filter object with the following syntax:
{
filterField: status,
value: filter-value
}
For example, the following query retrieves retirement actions at a status of pending:
query exampleGetMultipleProvisionRetirementActions($filter: [ProvisionFieldFilter!]) {
provisionRetirementActions(filter: $filter) {
edges {
cursor
node {
id
definitionID
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the variable in the Variables panel or in your variables dictionary:
{
"filter": {
"filterField": "status",
"value": "pending"
}
}
Retirement action results sorting
You can sort retirement action results. Define a sort object with the following syntax:
sort: {
field: field-name,
order: sort-order
}
For example, the following query sorts retirement actions in descending order based on computer name:
query exampleGetMultipleProvisionRetirementActions($sort: ProvisionRetirementActionFieldSort!) {
provisionRetirementActions(sort: $sort) {
edges {
cursor
node {
id
definitionID
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include the variables in the Variables panel or in your variables dictionary:
{
"sort": {
"field": "computerName",
"order": "desc"
}
}
Reporting query filter syntax
Reporting queries support the following filter fields:
-
authorNames
-
contentSetNames
-
createdAfter
-
createdBefore
-
labels
-
moduleNames
-
text
For more information on syntax, see reportFieldFilter in the Documentation Explorer pane of the query explorer.
Report author
You can filter reports based on the author name. Define a filter object using the syntax:
{authorNames: [name-1, name-2, name-...n]}
For example, the following request filters and returns only report definitions whose author is either testadmin-1 or testadmin-2:
query exampleGetReportsByAuthor($author1: String!, $author2: String!) {
reports(filter: {authorNames: [$author1, $author2]}) {
edges {
node {
id
}
}
}
}
Include the count and time variables in the Variables panel or in your variables dictionary:
{
"author1": "testadmin-1",
"author2": "testadmin-2"
}
Content set membership
You can filter reports based on the report content set membership. Define a filter object using the syntax:
{contentSetNames: [content-set-name-1, content-set-name-2, content-set-name-...n]}
If you define multiple solutions, a report only needs to match one of the content sets to pass the filter.
For example, the following request filters and returns only report definitions belonging to the Base or Default content sets:
query exampleGetReportsByContentSet($contentSet1: String!, $contentSet2: String!) {
reports(filter: {contentSetNames: [$contentSet1, $contentSet2]}) {
edges {
node {
id
}
}
}
}
Include the content set variables in the Variables panel or in your variables dictionary:
{
"contentSet1": "Base",
"contentSet2": "Default"
}
Creation time
You can filter reports based on the report creation time, either before or after a specified time. To filter reports created before a specified time, define a filter object using the syntax:
{createdBefore: rfc-3339-time}
For example, the following request filters and returns only report definitions created before 2022-01-01T00:00:00Z:
query exampleGetReportsBefore($timeBefore: Time) {
reports(filter: {createdBefore: $timeBefore}) {
edges {
node {
id
}
}
}
}
Include the timestamp variable in the Variables panel or in your variables dictionary:
{
"timeBefore": "2022-01-01T00:00:00Z"
}
To filter reports created after a specified time, define a filter object using the syntax:
{createdAfter: rfc-3339-time}
For example, the following request filters and returns only report definitions created after 2022-01-01T00:00:00Z:
query exampleGetReportsAfter($timeAfter: Time) {
reports(filter: {createdAfter: $timeAfter}) {
edges {
node {
id
}
}
}
}
Include the timestamp variable in the Variables panel or in your variables dictionary:
{
"timeAfter": "2022-01-01T00:00:00Z"
}
Report labels
You can filter reports based on the associated labels. Define a filter object using the syntax:
{labels: [label-1, label-2, label-...n]}
If you define multiple labels, a report only needs to match one of the labels to pass the filter.
For example, the following request filters and returns only report definitions with a label of testlabel-1 or testlabel-2:
query exampleGetReportsByLabel($label1: String!, $label2: String!) {
reports(filter: {labels: [$label1, $label2]}) {
edges {
node {
id
}
}
}
}
Include the label variables in the Variables panel or in your variables dictionary:
{
"label1": "testlabel-1",
"label2": "testlabel-2"
}
Associated Tanium solution
You can filter reports based on the associated Tanium solution. Define a filter object using the syntax:
{moduleNames: [solution-1, solution-2, solution-...n]}
If you define multiple solutions, a report only needs to match one of the solutions to pass the filter.
For example, the following request filters and returns only report definitions associated with Tanium Interact or Tanium Asset:
query exampleGetReportsBySolution($solution1: String!, $solution2: String!) {
reports(filter: {moduleNames: [$solution1, $solution2]}) {
edges {
node {
id
}
}
}
}
Include the solution name variables in the Variables panel or in your variables dictionary:
{
"solution1": "Tanium Interact",
"solution2": "Tanium Asset"
}
Name or description text
You can filter reports based on text in the report name or report description. Define a filter object using the syntax:
{text: text-string}
For example, the following request filters and returns only report definitions that have test-string either in the name or the definition:
query exampleGetReportsByText($text: String) {
reports(filter: {text: $text}) {
edges {
node {
id
}
}
}
}
Include the text variable in the Variables panel or in your variables dictionary:
{
"text": "test-string"
}
Scheduled actions query filter syntax
Scheduled actions queries (query.scheduledActions) support the path and value filter fields.
For more information on syntax, see FieldFilter in the Documentation Explorer pane of the query explorer.
Single filter field
You can filter on a single field value. Unless otherwise specified, define a filter object using the syntax:
{path: "field-path", negated: "boolean", op: "operator", value: "filter-value"}
For example, the following request filters and returns only scheduled actions whose name does not contain production:
query getScheduledActionsFiltered($path: String, $negated: Boolean!, $op: FieldFilterOp!, $value: String) {
scheduledActions(
filter: {path: $path, negated: $negated, op: $op, value: $value}
) {
edges {
node {
comment
id
name
nextStartTime
package {
id
name
params
sensorSourcedParams {
name
value
}
}
targets {
actionGroup {
id
name
}
targetGroup {
id
name
}
}
}
}
}
}
Include the filter-related variables in the Variables panel:
{
"path": "name",
"negated": true,
"op": "CONTAINS",
"value": "production"
}
Multiple filter fields
You can filter on multiple field values. Define a filter object using the syntax:
{any: boolean,
filters: [
{path: "field-path-1", negated: "boolean-1", op: "operator-1", value: "filter-value-1"},
{path: "field-path-2", negated: "boolean-2", op: "operator-2", value: "filter-value-2"},
{path: "field-path-n", negated: "boolean-n", op: "operator-n", value: "filter-value-n"}
]
For example, the following request filters and returns only scheduled actions whose name does not contain production, and whose comment contains test:
query scheduledActionsMultipleFilter($path1: String, $negated1: Boolean!, $op1: FieldFilterOp!, $value1: String, $path2: String, $negated2: Boolean!, $op2: FieldFilterOp!, $value2: String) {
scheduledActions(
filter: {any: false, filters: [{path: $path1, negated: $negated1, op: $op1, value: $value1}, {path: $path2, negated: $negated2, op: $op2, value: $value2}]}
) {
edges {
node {
comment
id
name
nextStartTime
package {
id
name
params
sensorSourcedParams {
name
value
}
}
targets {
actionGroup {
id
name
}
targetGroup {
id
name
}
}
}
}
}
}
Include the filter-related variables in the Variables panel:
{
"path1": "name",
"negated1": true,
"op1": "CONTAINS",
"value1": "production",
"path2": "comment",
"negated2": false,
"op2": "CONTAINS",
"value2": "test"
}
Sensor query filter syntax
Sensor queries support the includeHidden, path, and value filter fields.
For more information on syntax, see FieldFilter in the Documentation Explorer pane of the query explorer.