Reference: API Gateway examples for Deploy
For additional API Gateway example syntax, see Tanium API Gateway User Guide: Reference: Filter syntax and Tanium API Gateway User Guide: Reference: API Gateway examples.
Deploy examples
The following queries and mutation require Deploy, retrieve information about software packages deployed in your environment, and allow you to deploy a software package to endpoints.
Deploy a package to all endpoints (mutation.manageSoftware)
Deploy package to endpoints
The following mutation deploys a package to All Computers.
1
2
3
4
5
6
7
8
9
10
11
12
mutation deployPackage ($group:String){
manageSoftware(
operation: INSTALL
softwarePackageID: 2
start: "2021-10-27T00:00:00Z"
end: "2021-11-03T00:00:00Z"
target: {targetGroup: $group}
) {
ID
name
}
}
Include the computer group variable in the QUERY VARIABLES panel or in your variables dictionary:
1
2
3
{
"group": "All Computers"
}
Example response:
1
2
3
4
5
6
7
8
{
"data": {
"manageSoftware": {
"ID": "2",
"name": "Install Tanium Standard Utilities (Linux)"
}
}
}
Get package details (query.packages)
Get details of all packages
The following query retrieves multiple fields for all packages.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
query PackagesQuery {
packages {
items {
id
name
displayName
command
commandTimeout
expireSeconds
contentSet {
id
name
}
processGroupFlag
skipLockFlag
metadata {
adminFlag
name
value
}
sourceHash
sourceHashChangedFlag
sourceID
sourceName
parameters {
key
value
}
rawParameterDefinition
parameterDefinition {
parameterType
model
parameters {
model
parameterType
key
label
helpString
defaultValue
validationExpressions {
model
parameterType
expression
helpString
}
promptText
heightInLines
maxChars
values
restrict
allowEmptyList
minimum
maximum
stepSize
snapInterval
dropdownOptions {
model
parameterType
name
value
}
componentType
startDateRestriction {
model
parameterType
type
interval
intervalCount
unixTimeStamp
}
endDateRestriction {
model
parameterType
type
interval
intervalCount
unixTimeStamp
}
startTimeRestriction {
model
parameterType
type
interval
intervalCount
unixTimeStamp
}
endTimeRestriction {
model
parameterType
type
interval
intervalCount
unixTimeStamp
}
allowDisableEnd
defaultRangeStart {
model
parameterType
type
interval
intervalCount
unixTimeStamp
}
defaultRangeEnd {
model
parameterType
type
interval
intervalCount
unixTimeStamp
}
separatorText
}
}
verifyExpireSeconds
}
}
}
Example response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"data": {
"packages": {
"items": [
{
"id": "1",
"name": "Distribute Tanium Standard Utilities",
"displayName": "Distribute Tanium Standard Utilities",
"command": "cmd.exe /c cscript.exe //E:VBScript install-standard-utils.vbs \"Tools\\StdUtils\"",
"commandTimeout": 2700,
"expireSeconds": 3300,
"contentSet": {
"id": "5",
"name": "Client Management"
},
"processGroupFlag": true,
"skipLockFlag": false,
"metadata": [],
"sourceHash": "60b3e906f92929da67341792db9675d5cd91686546f01b57857686c8c6d84fa8",
"sourceHashChangedFlag": false,
"sourceID": 0,
"sourceName": "",
"parameters": [],
"rawParameterDefinition": null,
"parameterDefinition": null,
"verifyExpireSeconds": 600
},
{
"id": "2",
"name": "Distribute Tanium Standard Utilities (Linux)",
"displayName": "Distribute Tanium Standard Utilities (Linux)",
"command": "/bin/bash distribute-tools.sh STRICT",
"commandTimeout": 120,
"expireSeconds": 720,
"contentSet": {
"id": "5",
"name": "Client Management"
},
"processGroupFlag": true,
"skipLockFlag": false,
"metadata": [],
"sourceHash": "4ed7a30a1ca6c81be5a71b892dfadcdb489122cc641fa4b644f53255134215c9",
"sourceHashChangedFlag": false,
"sourceID": 0,
"sourceName": "",
"parameters": [],
"rawParameterDefinition": null,
"parameterDefinition": null,
"verifyExpireSeconds": 600
}
]
}
}
}
Get Deploy packages (query.softwarePackages)
Get all deploy packages
The following query retrieves all Deploy packages.
1
2
3
4
5
6
7
8
9
10
11
12
query getDeployPackages{
softwarePackages {
edges {
node {
id
productName
productVendor
productVersion
}
}
}
}
Example response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"data": {
"softwarePackages": {
"edges": [
{
"node": {
"id": "19",
"productName": "Firefox (x64 en-US)",
"productVendor": "Mozilla",
"productVersion": "98.0"
}
},
{
"node": {
"id": "30",
"productName": "Power BI Desktop (x64)",
"productVendor": "Microsoft",
"productVersion": "2.102.845.0"
}
},
{
"node": {
"id": "43",
"productName": "VLC media player (64-bit)",
"productVendor": "VideoLAN",
"productVersion": "3.0.16.0"
}
},
{
"node": {
"id": "46",
"productName": "Visual Studio Code (x64 en-us)",
"productVendor": "Microsoft",
"productVersion": "1.65.2"
}
}
]
}
}
}
Get software deployment status (query.softwareDeployment)
Get status of software deployment
The following query retrieves the deployment status of all Deploy packages.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
query getSoftwareDeploymentStatus {
softwareDeployment {
ID
name
status {
completeCount
downloadCompleteWaitingCount
downloadingCount
failedCount
notApplicableCount
runningCount
waitingCount
}
errors {
error
count
}
}
}
Example response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"data": {
"softwareDeployment": [
{
"ID": "5",
"name": "Install Tanium Standard Utilities",
"status": {
"completeCount": 1,
"downloadCompleteWaitingCount": 0,
"downloadingCount": 0,
"failedCount": 0,
"notApplicableCount": 0,
"runningCount": 0,
"waitingCount": 0
},
"errors": null
},
{
"ID": "6",
"name": "Install Tanium Standard Utilities (Linux)",
"status": {
"completeCount": 0,
"downloadCompleteWaitingCount": 0,
"downloadingCount": 1,
"failedCount": 0,
"notApplicableCount": 0,
"runningCount": 0,
"waitingCount": 0
},
"errors": null
}
]
}
}
Last updated: 5/31/2023 3:11 PM | Feedback