Reference: Gateway examples for Patch
Tanium Gateway provides a GraphQL API integration point for Tanium solutions, including Patch. Patch requests create, retrieve, and stop Patch deployments.
For additional Gateway example syntax, see Reference: Filter syntax and Gateway examples.
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"
}
}
Create a Linux patch deployment
(mutation.patchCreateDeployment)
The patchCreateDeployment mutation requires the Patch Deployment write and Patch Deployment execute permissions.
The following mutation creates a new deployment for installing Linux patches on targeted endpoints.
mutation exampleCreateLinuxPatchDeployment($input: PatchCreateDeploymentInput!) {
patchCreateDeployment(input: $input) {
deployment {
id
author {
id
displayName
username
}
contentDeploymentType
contentSet {
id
}
createdTime
description
downloadImmediately
name
notifications {
postDeployment {
body
countdownToDeadline {
nanoseconds
seconds
}
notificationPeriodDuration {
nanoseconds
seconds
}
postponeOptions {
durationOne {
nanoseconds
seconds
}
durationTwo {
nanoseconds
seconds
}
durationThree {
nanoseconds
seconds
}
}
title
translations {
body
languageCode
title
}
}
}
overrideBlocklists
patches {
id
}
patchLists {
id
version
}
platform
restart
schedule {
distributeOver {
nanoseconds
seconds
}
endTime
eussAvailableBeforeStart
eussHideFromActivity
overrideMaintenanceWindows
startTime
timeZone
type
}
status
stoppedTime
targets {
computerGroups {
id
}
}
type
updatedTime
}
error {
message
retryable
timedOut
}
}
}
Include the input variables in the Variables panel or in your variables dictionary:
{
"input": {
"contentDeploymentType": "ALL_UPDATES",
"contentSet": {
"id": "123"
},
"description": "example Patch deployment for Linux",
"downloadImmediately": true,
"name": "example_deployment_linux",
"overrideBlocklists": false,
"patches": null,
"patchLists": [
{
"id": "234",
"version": 1
}
],
"platform": "LINUX",
"restart": false,
"schedule": {
"distributeOver": {
"seconds": 600
},
"endTime": "2025-02-01",
"eussAvailableBeforeStart": false,
"eussHideFromActivity": false,
"overrideMaintenanceWindows": false,
"startTime": "2025-01-01",
"timeZone": "EST",
"type": "SINGLE"
},
"targets": {
"computerGroups": [
{
"id": "123"
}
]
},
"type": "INSTALL"
}
}
Example response:
{
"data": {
"patchCreateDeployment": {
"deployment": {
"id": "123",
"author": {
"id": "1",
"displayName": null,
"username": "Administrator"
},
"contentDeploymentType": "ALL_UPDATES",
"contentSet": {
"id": "123"
},
"createdTime": "2023-10-18T18:48:43.515Z",
"description": "example Patch deployment for Linux",
"downloadImmediately": true,
"name": "example_deployment_linux",
"notifications": null,
"overrideBlocklists": false,
"patches": [],
"patchLists": [
{
"id": "234",
"version": 1
}
],
"platform": "LINUX",
"restart": false,
"schedule": {
"distributeOver": {
"nanoseconds": 0,
"seconds": 600
},
"endTime": "2025-02-01T00:00:00.000Z",
"eussAvailableBeforeStart": false,
"eussHideFromActivity": false,
"overrideMaintenanceWindows": false,
"startTime": "2025-01-01T00:00:00.000Z",
"timeZone": "EST",
"type": "SINGLE"
},
"status": "INACTIVE",
"stoppedTime": null,
"targets": {
"computerGroups": [
{
"id": "123"
}
]
},
"type": "INSTALL",
"updatedTime": "2023-10-18T18:48:43.515Z"
},
"error": null
}
}
}
Create a Windows patch deployment
(mutation.patchCreateDeployment)
The patchCreateDeployment mutation requires the Patch Deployment write and Patch Deployment execute permissions.
The following mutation creates a new deployment for installing Windows patches on targeted endpoints.
mutation exampleCreateWindowsPatchDeployment($input: PatchCreateDeploymentInput!) {
patchCreateDeployment(input: $input) {
deployment {
id
author {
id
displayName
username
}
contentDeploymentType
contentSet {
id
}
createdTime
description
downloadImmediately
name
notifications {
postDeployment {
body
countdownToDeadline {
nanoseconds
seconds
}
notificationPeriodDuration {
nanoseconds
seconds
}
postponeOptions {
durationOne {
nanoseconds
seconds
}
durationTwo {
nanoseconds
seconds
}
durationThree {
nanoseconds
seconds
}
}
title
translations {
body
languageCode
title
}
}
}
overrideBlocklists
patches {
id
}
patchLists {
id
version
}
platform
restart
schedule {
distributeOver {
nanoseconds
seconds
}
endTime
eussAvailableBeforeStart
eussHideFromActivity
overrideMaintenanceWindows
startTime
timeZone
type
}
status
stoppedTime
targets {
computerGroups {
id
}
}
type
updatedTime
}
error {
message
retryable
timedOut
}
}
}
Include the input variables in the Variables panel or in your variables dictionary:
{
"input": {
"contentDeploymentType": "MANUAL_SELECTION",
"contentSet": {
"id": "123"
},
"description": "example Patch deployment for Windows",
"downloadImmediately": true,
"name": "example_deployment_windows",
"notifications": {
"postDeployment": {
"body": "example text display",
"countdownToDeadline": {
"seconds": 15
},
"notificationPeriodDuration": {
"seconds": 1440
},
"postponeOptions": {
"durationOne": {
"seconds": 60
},
"durationTwo": {
"seconds": 120
},
"durationThree": {
"seconds": 240
}
},
"title": "example title",
"translations": [
{
"body": "ejemplo",
"languageCode": "es",
"title": "texto"
}
]
}
},
"overrideBlocklists": false,
"patches": null,
"patchLists": [
{
"id": "234",
"version": 1
}
],
"platform": "WINDOWS",
"restart": true,
"schedule": {
"distributeOver": {
"seconds": 600
},
"endTime": null,
"eussAvailableBeforeStart": false,
"eussHideFromActivity": false,
"overrideMaintenanceWindows": false,
"startTime": "2025-01-01",
"timeZone": "EST",
"type": "ONGOING"
},
"targets": {
"computerGroups": [
{
"id": "345"
}
]
},
"type": "INSTALL"
}
}
Example response:
{
"data": {
"patchCreateDeployment": {
"deployment": {
"id": "123",
"author": {
"id": "1",
"displayName": null,
"username": "admin"
},
"contentDeploymentType": "MANUAL_SELECTION",
"contentSet": {
"id": "123"
},
"createdTime": "2023-10-24T17:59:00.274Z",
"description": "example Patch deployment for Windows",
"downloadImmediately": true,
"name": "example_deployment_windows",
"notifications": {
"postDeployment": {
"body": "example text display",
"countdownToDeadline": {
"nanoseconds": 0,
"seconds": 0
},
"notificationPeriodDuration": {
"nanoseconds": 0,
"seconds": 1440
},
"postponeOptions": {
"durationOne": {
"nanoseconds": 0,
"seconds": 60
},
"durationTwo": {
"nanoseconds": 0,
"seconds": 120
},
"durationThree": {
"nanoseconds": 0,
"seconds": 240
}
},
"title": "example title",
"translations": [
{
"body": "ejemplo",
"languageCode": "es",
"title": "texto"
}
]
}
},
"overrideBlocklists": false,
"patches": [],
"patchLists": [
{
"id": "234",
"version": 1
}
],
"platform": "WINDOWS",
"restart": true,
"schedule": {
"distributeOver": {
"nanoseconds": 0,
"seconds": 600
},
"endTime": null,
"eussAvailableBeforeStart": false,
"eussHideFromActivity": false,
"overrideMaintenanceWindows": false,
"startTime": "2025-01-01T00:00:00.000Z",
"timeZone": "EST",
"type": "ONGOING"
},
"status": "INACTIVE",
"stoppedTime": null,
"targets": {
"computerGroups": [
{
"id": "345"
}
]
},
"type": "INSTALL",
"updatedTime": "2023-10-24T17:59:00.274Z"
},
"error": null
}
}
}
Get multiple patch definitions
(query.patchDefinitions)
The patchDefinition query requires the Patch show permission.
The following query retrieves the first patch definition that matches the specified CVE ID.
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"
}
}
Example response:
{
"data": {
"patchDefinitions": {
"edges": [
{
"node": {
"id": "1234567890abcdef1234567890abcdef",
"createdDate": "2021-04-20",
"cveIds": [
"CVE-2014-123456"
],
"isSuperseded": false,
"platform": "LINUX",
"releaseDate": "2020-01-01",
"severity": "Important",
"sizeInBytes": 12345678,
"title": "example patch definition"
}
}
],
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "eyJpZCI6ImE4OWE0ZGFkZWY2YWU0YTAzZDBjYzY5NGFhZjg4MzMzIiwiY3JlYXRlZERhdGUiOiIyMDIxLTA0LTIwVDA2OjAxOjQ2Ljg1MloiLCJyZWxlYXNlRGF0ZSI6IjIwMTItMDYtMThUMDA6MDA6MDAuMDAwWiJ9",
"endCursor": "eyJpZCI6ImE4OWE0ZGFkZWY2YWU0YTAzZDBjYzY5NGFhZjg4MzMzIiwiY3JlYXRlZERhdGUiOiIyMDIxLTA0LTIwVDA2OjAxOjQ2Ljg1MloiLCJyZWxlYXNlRGF0ZSI6IjIwMTItMDYtMThUMDA6MDA6MDAuMDAwWiJ9"
},
"totalRecords": 1
}
}
}
Get a patch deployment by ID
(query.patchDeployment)
The patchDeployment query requires the Patch Deployment read permission.
The following query retrieves the Patch deployment that matches the specified ID.
query exampleGetPatchDeployment($id: ID!) {
patchDeployment(ref: {id: $id}) {
id
author {
id
displayName
username
}
contentDeploymentType
contentSet {
id
}
createdTime
description
downloadImmediately
name
notifications {
postDeployment {
body
countdownToDeadline {
nanoseconds
seconds
}
notificationPeriodDuration {
nanoseconds
seconds
}
postponeOptions {
durationOne {
nanoseconds
seconds
}
durationTwo {
nanoseconds
seconds
}
durationThree {
nanoseconds
seconds
}
}
title
translations {
body
languageCode
title
}
}
}
overrideBlocklists
patches {
id
}
patchLists {
id
version
}
platform
restart
schedule {
distributeOver {
nanoseconds
seconds
}
endTime
eussAvailableBeforeStart
eussHideFromActivity
overrideMaintenanceWindows
startTime
timeZone
type
}
status
stoppedTime
targets {
computerGroups {
id
}
}
type
updatedTime
}
}
Include the ID variable in the Variables panel or in your variables dictionary:
{
"id": "123"
}
Example response:
{
"data": {
"patchDeployment": {
"id": "123",
"author": {
"id": "1",
"displayName": null,
"username": "Administrator"
},
"contentDeploymentType": "ALL_UPDATES",
"contentSet": {
"id": "123"
},
"createdTime": "2023-10-18T18:48:43.515Z",
"description": "example Patch deployment for Linux",
"downloadImmediately": true,
"name": "example_deployment_linux",
"notifications": null,
"overrideBlocklists": false,
"patches": [],
"patchLists": [
{
"id": "234",
"version": 1
}
],
"platform": "LINUX",
"restart": false,
"schedule": {
"distributeOver": {
"nanoseconds": 0,
"seconds": 600
},
"endTime": "2025-02-01T00:00:00.000Z",
"eussAvailableBeforeStart": false,
"eussHideFromActivity": false,
"overrideMaintenanceWindows": false,
"startTime": "2025-01-01T00:00:00.000Z",
"timeZone": "EST",
"type": "SINGLE"
},
"status": "INACTIVE",
"stoppedTime": null,
"targets": {
"computerGroups": [
{
"id": "1"
}
]
},
"type": "INSTALL",
"updatedTime": "2023-10-18T18:48:44.693Z"
}
}
}
Stop a patch deployment by ID
(mutation.patchStopDeployment)
The patchStopDeployment mutation requires the Patch Deployment write and Patch Deployment execute permissions.
The following mutation updates a deployment that matches the ID 123.
mutation exampleStopPatchDeployment($id: ID!) {
patchStopDeployment(ref: {id: $id}) {
deployment {
id
author {
id
displayName
username
}
contentDeploymentType
contentSet {
id
}
createdTime
description
downloadImmediately
name
notifications {
postDeployment {
body
countdownToDeadline {
nanoseconds
seconds
}
notificationPeriodDuration {
nanoseconds
seconds
}
postponeOptions {
durationOne {
nanoseconds
seconds
}
durationTwo {
nanoseconds
seconds
}
durationThree {
nanoseconds
seconds
}
}
title
translations {
body
languageCode
title
}
}
}
overrideBlocklists
patches {
id
}
patchLists {
id
version
}
platform
restart
schedule {
distributeOver {
nanoseconds
seconds
}
endTime
eussAvailableBeforeStart
eussHideFromActivity
overrideMaintenanceWindows
startTime
timeZone
type
}
status
stoppedTime
targets {
computerGroups {
id
}
}
type
updatedTime
}
error {
message
retryable
timedOut
}
}
}
Include the ID variable in the Variables panel or in your variables dictionary:
{
"id": "123"
}
Example response:
{
"data": {
"patchStopDeployment": {
"deployment": {
"id": "123",
"author": {
"id": "1",
"displayName": null,
"username": "Administrator"
},
"contentDeploymentType": "ALL_UPDATES",
"contentSet": {
"id": "123"
},
"createdTime": "2023-10-18T18:48:43.515Z",
"description": "example Patch deployment for Linux",
"downloadImmediately": true,
"name": "example_deployment_linux",
"notifications": null,
"overrideBlocklists": false,
"patches": null,
"patchLists": [
{
"id": "234",
"version": 1
}
],
"platform": "LINUX",
"restart": false,
"schedule": {
"distributeOver": {
"nanoseconds": 0,
"seconds": 600
},
"endTime": "2025-02-01T00:00:00.000Z",
"eussAvailableBeforeStart": false,
"eussHideFromActivity": false,
"overrideMaintenanceWindows": false,
"startTime": "2025-01-01T00:00:00.000Z",
"timeZone": "EST",
"type": "SINGLE"
},
"status": "STOPPED",
"stoppedTime": "2023-10-18T19:16:28.105Z",
"targets": {
"computerGroups": [
{
"id": "1"
}
]
},
"type": "INSTALL",
"updatedTime": "2023-10-18T19:16:28.123Z"
},
"error": null
}
}
}
Upsert (create or update by ID) a patch list
(mutation.patchListUpsert)
The patchListUpsert mutation requires the Patch Patchlist execute and Patch Patchlist write permissions.
The patchListUpsert mutation either creates a new patch list or updates the existing patch list that matches an ID.
The following mutation creates a new Linux patch list. The list defines two rules:
-
include all patches with "example" in the title
-
include all critical severity patches released in the past seven days
mutation examplePatchListCreate($input: PatchListUpsertInput!) {
patchListUpsert(input: $input) {
patchList {
id
name
author {
id
displayName
username
}
contentSet {
id
description
name
}
createdTime
includeSupersededPatches
isTaniumManaged
patchDefinitionIDs
platform
rules {
name
conditions {
comparisonOperator
fieldName
fieldValue
}
}
updatedTime
version
}
error {
message
retryable
timedOut
}
}
}
Include the input variables in the Variables panel or in your variables dictionary:
{
"input": {
"name": "example_patch_list",
"platform": "LINUX",
"contentSet": {
"id": "234"
},
"patchDefinitionIDs": [],
"includeSupersededPatches": false,
"rules": [
{
"name": "example_rule_1",
"conditions": [
{
"fieldName": "TITLE",
"comparisonOperator": "CONTAINS",
"fieldValue": {
"value": "example"
}
}
]
},
{
"name": "example_rule_2",
"conditions": [
{
"fieldName": "RELEASE_DATE",
"comparisonOperator": "ON_OR_BEFORE_RELATIVE_DAYS",
"fieldValue": {
"releaseDateDaysAgo": 7
}
},
{
"fieldName": "SEVERITY",
"comparisonOperator": "EQUALS",
"fieldValue": {
"severity": "CRITICAL"
}
}
]
}
]
}
}
Example response:
{
"data": {
"patchListUpsert": {
"patchList": {
"id": "123",
"name": "example_patch_list",
"author": {
"id": "1",
"displayName": null,
"username": "admin"
},
"contentSet": {
"id": "53",
"description": "Default container for objects.",
"name": "Patch Content Set"
},
"createdTime": "2025-02-03T14:24:43.327Z",
"includeSupersededPatches": false,
"isTaniumManaged": false,
"patchDefinitionIDs": [],
"platform": "LINUX",
"rules": [
{
"name": "example_rule_1",
"conditions": [
{
"comparisonOperator": "CONTAINS",
"fieldName": "TITLE",
"fieldValue": "example"
}
]
},
{
"name": "example_rule_2",
"conditions": [
{
"comparisonOperator": "ON_OR_BEFORE_RELATIVE_DAYS",
"fieldName": "RELEASE_DATE",
"fieldValue": "7"
},
{
"comparisonOperator": "EQUALS",
"fieldName": "SEVERITY",
"fieldValue": "CRITICAL"
}
]
}
],
"updatedTime": "2025-02-03T14:24:43.370Z",
"version": 1
},
"error": null
}
}
}
The following mutation updates the patch list with the ID 123.
mutation examplePatchListUpdate($input: PatchListUpsertInput!) {
patchListUpsert(input: $input) {
patchList {
id
name
author {
id
displayName
username
}
contentSet {
id
description
name
}
createdTime
includeSupersededPatches
isTaniumManaged
patchDefinitionIDs
platform
rules {
name
conditions {
comparisonOperator
fieldName
fieldValue
}
}
updatedTime
version
}
error {
message
retryable
timedOut
}
}
}
Include the input variables in the Variables panel or in your variables dictionary:
{
"input": {
"id": "123",
"name": "example_patch_list",
"platform": "LINUX",
"contentSet": {
"id": "234"
},
"patchDefinitionIDs": [],
"includeSupersededPatches": false,
"rules": [
{
"name": "example_rule_1",
"conditions": [
{
"fieldName": "TITLE",
"comparisonOperator": "CONTAINS",
"fieldValue": {
"value": "example"
}
}
]
}
]
}
}
Example response:
{
"data": {
"patchListUpsert": {
"patchList": {
"id": "123",
"name": "example_patch_list",
"author": {
"id": "1",
"displayName": null,
"username": "admin"
},
"contentSet": {
"id": "53",
"description": "Default container for objects.",
"name": "Patch Content Set"
},
"createdTime": "2025-02-03T14:24:43.327Z",
"includeSupersededPatches": false,
"isTaniumManaged": false,
"patchDefinitionIDs": [],
"platform": "LINUX",
"rules": [
{
"name": "example_rule_1",
"conditions": [
{
"comparisonOperator": "CONTAINS",
"fieldName": "TITLE",
"fieldValue": "example"
}
]
}
],
"updatedTime": "2025-02-03T14:24:43.370Z",
"version": 1
},
"error": null
}
}
}