Reference: Gateway examples for Connect
Tanium Gateway provides a GraphQL API integration point for Tanium solutions, including Connect. Connect queries and mutations retrieve information about connections and connection runs, and to start or stop connection runs.
For additional Gateway example syntax, see Reference: Filter syntax and Reference: Connect examples.
Connect REST API replacement
The Connect GraphQL APIs are at stability index 1.2 - Experimental (Release Candidate). For the best results, if a GraphQL API provides functionality, use that instead of the corresponding legacy Connect REST API. Connect REST APIs not listed in the table do not have comparable functionality in Tanium Gateway, or are otherwise not used in favor of other Connect REST APIs.
| Connect v1 REST API endpoint | Gateway GraphQL API replacement | Notes |
|---|---|---|
DELETE v1/connections/:id |
n/a | Delete a connection by ID |
GET v1/connectionruns (legacy) |
query.connectRuns |
Get connection runs |
GET v1/connections (legacy) |
query.connectConnections |
Get connections |
GET v1/connections/:id (legacy) |
query.connectConnection |
Get a connection by ID |
GET v1/connections/:id/runs/:connectionrunid (legacy) |
query.connectRun |
Get a connection run by ID |
GET v1/connections/:id/runs/:connectionrunid/download |
n/a | Get the log data for a connection run |
POST v1/connections/:id/runs (legacy) |
mutation.connectConnectionStart |
Start a connection run |
POST v1/connections/:id/stop (legacy) |
mutation.connectConnectionStop |
Stop an in-progress connection run |
POST v1/import |
n/a | Create or modify a connection |
Get a connection by ID
(query.connectConnection)
The following query retrieves a connection that matches the ID.
query exampleGetSingleConnection($id: ID!) {
connectConnection(ref: {id: $id}) {
id
currentRun {
id
connectionID
status
createdTime
updatedTime
}
description
displayName
isScheduled
lastRunStatus
lastRunTime
pastRuns {
edges {
node {
id
connectionID
status
createdTime
updatedTime
}
}
}
}
}
Include an ID variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"id": "123"
}
Example response:
{
"data": {
"connectConnection": {
"id": "123",
"currentRun": null,
"description": "Example connection description",
"displayName": "Example connection name",
"isScheduled": true,
"lastRunStatus": "Finished",
"lastRunTime": "2026-05-08T17:00:15.737Z",
"pastRuns": {
"edges": [
{
"node": {
"id": "234",
"connectionID": "23",
"status": "Finished",
"createdTime": "2026-05-08T17:00:15.737Z",
"updatedTime": "2026-05-08T17:00:21.276Z"
}
},
{
"node": {
"id": "345",
"connectionID": "23",
"status": "Finished",
"createdTime": "2026-05-08T15:45:00.575Z",
"updatedTime": "2026-05-08T15:45:03.567Z"
}
}
]
}
}
}
}
Get a connection run by ID
(query.connectRun)
The following query retrieves a connection run that matches the ID.
query exampleGetSingleConnectionRun($id: ID!) {
connectRun(ref: {id: $id}) {
id
connectionID
status
createdTime
updatedTime
}
}
Include an ID variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"id": "123"
}
Example response:
{
"data": {
"connectRun": {
"id": "123",
"connectionID": "234",
"status": "Finished",
"createdTime": "2023-08-15T07:01:21.824Z",
"updatedTime": "2023-08-15T07:01:30.912Z"
}
}
}
Get connection runs
(query.connectRuns)
The following query retrieves the first 2 connection runs.
query exampleGetConnectionRuns($first: Int) {
connectRuns(first: $first) {
edges {
node {
id
connectionID
status
createdTime
updatedTime
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
totalRecords
}
}
Include a pagination variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"first": 2
}
Example response:
{
"data": {
"connectRuns": {
"edges": [
{
"node": {
"id": "1",
"connectionID": "123",
"status": "Finished",
"createdTime": "2023-08-15T07:01:21.824Z",
"updatedTime": "2023-08-15T07:01:30.912Z"
}
},
{
"node": {
"id": "2",
"connectionID": "234",
"status": "Finished",
"createdTime": "2023-08-15T07:01:19.678Z",
"updatedTime": "2023-08-15T07:01:23.757Z"
}
}
],
"pageInfo": {
"hasPreviousPage": false,
"hasNextPage": true,
"startCursor": "MA==",
"endCursor": "MQ=="
},
"totalRecords": 504
}
}
}
Get connections
(query.connectConnections)
The following query retrieves the first 2 connections.
query exampleGetConnections($first: Int) {
connectConnections(first: $first) {
edges {
node {
id
currentRun {
id
connectionID
status
createdTime
updatedTime
}
description
displayName
isScheduled
lastRunStatus
lastRunTime
pastRuns {
edges {
node {
id
connectionID
status
createdTime
updatedTime
}
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalRecords
}
}
Include a pagination variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"first": 2
}
Example response:
{
"data": {
"connectConnections": {
"edges": [
{
"node": {
"id": "23",
"currentRun": null,
"description": "Example connection description",
"displayName": "Example connection name",
"isScheduled": true,
"lastRunStatus": "Finished",
"lastRunTime": "2026-05-08T15:36:00.010Z",
"pastRuns": {
"edges": [
{
"node": {
"id": "234",
"connectionID": "23",
"status": "Finished",
"createdTime": "2026-05-08T15:36:00.010Z",
"updatedTime": "2026-05-08T15:46:09.098Z"
}
},
{
"node": {
"id": "345",
"connectionID": "23",
"status": "Finished",
"createdTime": "2026-05-08T12:36:00.012Z",
"updatedTime": "2026-05-08T12:46:06.430Z"
}
}
]
}
}
},
{
"node": {
"id": "13",
"currentRun": null,
"description": "Example connection description 2",
"displayName": "Example connection name 2",
"isScheduled": false,
"lastRunStatus": "Finished",
"lastRunTime": "2026-02-12T21:27:46.686Z",
"pastRuns": {
"edges": []
}
}
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "MA==",
"endCursor": "MQ=="
},
"totalRecords": 23
}
}
}
To sort the results, include a sort argument. The following query retrieves the 3 connections that ran most recently.
query exampleGetConnectionsSorted($first: Int, $sort: ConnectConnectionFieldSort!) {
connectConnections(first: $first, sort: $sort) {
edges {
node {
id
displayName
lastRunTime
lastRunStatus
}
}
pageInfo {
endCursor
hasNextPage
}
totalRecords
}
}
Include a sort variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"first": 3,
"sort": {"field": "lastRunTime", "order": "desc"}
}
Example response:
{
"data": {
"connectConnections": {
"edges": [
{
"node": {
"id": "12",
"displayName": "Endpoint inventory to SIEM",
"lastRunTime": "2026-10-26T14:00:05Z",
"lastRunStatus": "Finished"
}
},
{
"node": {
"id": "7",
"displayName": "Installed applications to SQL Server",
"lastRunTime": "2026-10-26T12:30:11Z",
"lastRunStatus": "Failed"
}
},
{
"node": {
"id": "3",
"displayName": "Audit logs to HTTP",
"lastRunTime": "2026-10-25T23:15:42Z",
"lastRunStatus": "Finished"
}
}
],
"pageInfo": {
"endCursor": "Y29ubmVjdGlvbjoz",
"hasNextPage": true
},
"totalRecords": 9
}
}
}
Get multiple Connect connections by ID
(query.connectConnections)
The following query retrieves the connections that match either ID 1234 or 5678.
query exampleGetMultipleConnectionsByIDs($first_id: ID!, $second_id: ID!) {
connectConnections(filter: {ids: [$first_id, $second_id]}) {
totalRecords
edges {
node {
id
displayName
isScheduled
lastRunTime
lastRunStatus
}
}
}
}
Include the ID variables in the QUERY VARIABLES panel or in your variables dictionary:
{
"first_id": "1234",
"second_id": "5678"
}
Example response:
{
"data": {
"connectConnections": {
"totalRecords": 2,
"edges": [
{
"node": {
"id": "1234",
"displayName": "Example connection 1",
"isScheduled": false,
"lastRunTime": "2026-02-12T21:27:46.686Z",
"lastRunStatus": "Finished"
}
},
{
"node": {
"id": "5678",
"displayName": "Example connection 2",
"isScheduled": false,
"lastRunTime": null,
"lastRunStatus": null
}
}
]
}
}
}
Get multiple Connect connections by description
(query.connectConnections)
The following query retrieves connections that contain Example in the description.
query exampleGetConnectionsByDescription($target_description: String) {
connectConnections(filter: {description: $target_description}) {
totalRecords
edges {
node {
id
displayName
description
isScheduled
lastRunStatus
lastRunTime
}
}
}
}
Include the description variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"target_description": "Example"
}
Example response:
{
"data": {
"connectConnections": {
"totalRecords": 3,
"edges": [
{
"node": {
"id": "1234",
"displayName": "Example connection 1",
"description": "An example description",
"isScheduled": true,
"lastRunStatus": "Finished",
"lastRunTime": "2026-05-08T15:36:00.010Z"
}
},
{
"node": {
"id": "567",
"displayName": "Example connection 2",
"description": "Example description",
"isScheduled": false,
"lastRunStatus": null,
"lastRunTime": null
}
},
{
"node": {
"id": "8901",
"displayName": "Example connection 3",
"description": "A description that contains example",
"isScheduled": false,
"lastRunStatus": null,
"lastRunTime": null
}
}
]
}
}
}
Get Connect connection by ID and displayName
(query.connectConnections)
The following query retrieves the connection that matches ID 1234 and contains Example Connection in the displayName field.
query exampleGetConnectionByIDAndDisplayName($target_id: ID!, $target_display_name: String) {
connectConnections(filter: { ids: [$target_id], displayName: $target_display_name }) {
totalRecords
edges {
node {
id
displayName
}
}
}
}
Include the ID and display name variables in the QUERY VARIABLES panel or in your variables dictionary:
{
"target_id": "1234",
"target_display_name": "Example Connection"
}
Example response:
{
"data": {
"connectConnections": {
"totalRecords": 1,
"edges": [
{
"node": {
"id": "1234",
"displayName": "Example Connection"
}
}
]
}
}
}
Get SQL Server stored procedures
(query.connectSQLServerStoredProcedures)
The following query retrieves the stored procedures defined in one or more schemas within a SQL Server database. For each procedure, the query returns the procedure name, whether the configured user has EXECUTE permission, and the declared parameters with their SQL Server data types.
query exampleGetSQLServerStoredProcedures(
$server: String!
$username: String!
$password: String!
$database: String!
$schemaNames: [String!]!
) {
connectSQLServerStoredProcedures(
input: {
connectionConfiguration: {
server: $server
username: $username
password: $password
encrypt: false
validateServerCertificate: false
connectTimeoutMillis: 5000
requestTimeoutMillis: 30000
cancelTimeoutMillis: 5000
packetSizeBytes: 4096
multiSubnetFailover: false
}
database: $database
schemaNames: $schemaNames
}
) {
schemaName
procedures {
name
hasExecute
parameters {
name
dataType
}
}
}
}
Include variables in the QUERY VARIABLES panel or in your variables dictionary:
{
"server": "sql.example.com",
"username": "reportuser",
"password": "examplepassword",
"database": "Sales",
"schemaNames": [
"dbo",
"reporting"
]
}
Example response:
{
"data": {
"connectSQLServerStoredProcedures": [
{
"schemaName": "dbo",
"procedures": [
{
"name": "sp_onConnectionStart",
"hasExecute": true,
"parameters": [
{
"name": "@connectionName",
"dataType": "nvarchar"
},
{
"name": "@connectionId",
"dataType": "bigint"
},
{
"name": "@connectionRunId",
"dataType": "bigint"
},
{
"name": "@source",
"dataType": "nvarchar"
},
{
"name": "@databaseTable",
"dataType": "nvarchar"
},
{
"name": "@startTime",
"dataType": "datetime"
},
{
"name": "@expectedRowCount",
"dataType": "bigint"
}
]
},
{
"name": "sp_onConnectionFinish",
"hasExecute": true,
"parameters": [
{
"name": "@connectionRunId",
"dataType": "bigint"
},
{
"name": "@runStatus",
"dataType": "nvarchar"
},
{
"name": "@sourceRowCount",
"dataType": "bigint"
},
{
"name": "@destinationRowCount",
"dataType": "bigint"
},
{
"name": "@finishTime",
"dataType": "datetime"
}
]
}
]
},
{
"schemaName": "reporting",
"procedures": []
}
]
}
}
Get SQL Server stored procedures through a satellite
(query.connectSQLServerStoredProcedures)
The following query retrieves the stored procedures defined in one or more schemas within a SQL Server database through a satellite. For each procedure, the query returns the procedure name, whether the configured user has EXECUTE permission, and the declared parameters with their SQL Server data types.
query exampleGetSQLServerStoredProceduresThroughSatellite(
$server: String!,
$username: String!,
$password: String!,
$database: String!,
$satelliteID: ID!,
$schemaNames: [String!]!
) {
connectSQLServerStoredProcedures(
input: {
connectionConfiguration: {
server: $server,
username: $username,
password: $password,
satelliteID: $satelliteID,
encrypt: false,
validateServerCertificate: false,
connectTimeoutMillis: 5000,
requestTimeoutMillis: 30000,
cancelTimeoutMillis: 5000,
packetSizeBytes: 4096,
multiSubnetFailover: false
},
database: $database,
schemaNames: $schemaNames
}
) {
schemaName
procedures {
name
hasExecute
parameters {
name
dataType
}
}
}
}
Include variables in the QUERY VARIABLES panel or in your variables dictionary:
{
"server": "sql.example.com",
"username": "reportuser",
"password": "examplepassword",
"database": "Sales",
"satelliteID": "e66081b7-5900-46bb-97eb-fcbf16d2c24f",
"schemaNames": [
"dbo"
]
}
Start connection run
(mutation.connectConnectionStart)
The following mutation starts a connection run from a connection that matches the connection ID.
mutation exampleStartConnection($connectionID: ID!) {
connectConnectionStart(input: {connectionID: $connectionID}) {
run {
id
connectionID
status
createdTime
updatedTime
}
error {
message
retryable
timedOut
}
}
}
Include an ID variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionID": "123"
}
Example response:
{
"data": {
"connectConnectionStart": {
"run": {
"id": "12345",
"connectionID": "123",
"status": "Starting",
"createdTime": "2023-08-15T18:16:54.509Z",
"updatedTime": "2023-08-15T18:16:54.512Z"
},
"error": null
}
}
}
Stop the active run for a Connect connection
(mutation.connectConnectionStop)
The following mutation stops the active run, if any, for the specified Connect connection. If the connection has no in-progress run, this mutation succeeds with runID set to null. No run is started.
mutation exampleStopConnection($connectionID: ID!) {
connectConnectionStop(input: {connectionID: $connectionID}) {
runID
error {
message
retryable
timedOut
}
}
}
Include an ID variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionID": "234"
}
Example response:
{
"data": {
"connectConnectionStop": {
"runID": "123",
"error": null
}
}
}
Stop a specific connection run
(mutation.connectConnectionRunStop)
The following mutation stops a connection run that is currently in progress. The connection run is identified by ID. This request returns an error if the connection run is not in progress.
mutation exampleStopConnectionRun($runID: ID!) {
connectConnectionRunStop(input: {runID: $runID}) {
run {
id
connectionID
status
createdTime
updatedTime
}
error {
message
retryable
timedOut
}
}
}
Include an ID variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"runID": "123"
}
Example response:
{
"data": {
"connectConnectionRunStop": {
"run": {
"id": "123",
"connectionID": "234",
"status": "Running",
"createdTime": "2023-08-15T18:36:29.739Z",
"updatedTime": "2023-08-15T18:36:32.235Z"
},
"error": null
}
}
}
Start multiple connection runs
(mutation.connectConnectionsBulkStart)
The following mutation starts a run for each connection ID in connectionIDs. Each connection is processed independently, and each failure is recorded in errors with the connection ID, its position in the request list, and a structured error. connectionIDs is limited to 100 IDs per request by default.
mutation exampleBulkStartConnections($connectionIDs: [ID!]!) {
connectConnectionsBulkStart(input: {connectionIDs: $connectionIDs}) {
runs {
id
connectionID
status
createdTime
updatedTime
}
successCount
failureCount
errors {
connectionID
inputIndex
error {
code
message
retryable
}
}
error {
message
retryable
timedOut
}
}
}
Include an ID list variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionIDs": ["123", "456"]
}
Example response with one success and one failure:
{
"data": {
"connectConnectionsBulkStart": {
"runs": [
{
"id": "12345",
"connectionID": "123",
"status": "Starting",
"createdTime": "2026-07-17T18:16:54.509Z",
"updatedTime": "2026-07-17T18:16:54.512Z"
}
],
"successCount": 1,
"failureCount": 1,
"errors": [
{
"connectionID": "456",
"inputIndex": 1,
"error": {
"code": "validation_exists",
"message": "Connection 456 does not exist or is not visible to the caller.",
"retryable": null
}
}
],
"error": null
}
}
}
Stop multiple in-progress connection runs
(mutation.connectConnectionsBulkStop)
The following mutation stops the active run, if any, for each connection ID in connectionIDs. Connections with no run in progress are counted as successes. connectionIDs is limited to 100 IDs per request by default.
mutation exampleBulkStopConnections($connectionIDs: [ID!]!) {
connectConnectionsBulkStop(input: {connectionIDs: $connectionIDs}) {
stoppedRunIDs
successCount
failureCount
errors {
connectionID
inputIndex
error {
code
message
retryable
}
}
error {
message
retryable
timedOut
}
}
}
Include an ID list variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionIDs": ["123", "456"]
}
Example response:
{
"data": {
"connectConnectionsBulkStop": {
"stoppedRunIDs": ["78901"],
"successCount": 2,
"failureCount": 0,
"errors": [],
"error": null
}
}
}
Enable multiple connections
(mutation.connectConnectionsBulkEnable)
The following mutation enables each connection ID in connectionIDs for scheduled runs. Connections are processed independently. connectionIDs is limited to 100 IDs per request by default.
mutation exampleBulkEnableConnections($connectionIDs: [ID!]!) {
connectConnectionsBulkEnable(input: {connectionIDs: $connectionIDs}) {
connections {
id
displayName
}
successCount
failureCount
errors {
connectionID
inputIndex
error {
code
message
retryable
}
}
error {
message
retryable
timedOut
}
}
}
Include an ID list variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionIDs": ["123", "456"]
}
Example response:
{
"data": {
"connectConnectionsBulkEnable": {
"connections": [
{ "id": "123", "displayName": "Trends — Endpoint Inventory" },
{ "id": "456", "displayName": "Comply Findings Export" }
],
"successCount": 2,
"failureCount": 0,
"errors": [],
"error": null
}
}
}
Disable multiple connections
(mutation.connectConnectionsBulkDisable)
The following mutation disables each connection ID in connectionIDs from scheduled runs. Connections are processed independently. connectionIDs is limited to 100 IDs per request by default.
mutation exampleBulkDisableConnections($connectionIDs: [ID!]!) {
connectConnectionsBulkDisable(input: {connectionIDs: $connectionIDs}) {
connections {
id
displayName
}
successCount
failureCount
errors {
connectionID
inputIndex
error {
code
message
retryable
}
}
error {
message
retryable
timedOut
}
}
}
Include an ID list variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionIDs": ["123", "456"]
}
Example response:
{
"data": {
"connectConnectionsBulkDisable": {
"connections": [
{ "id": "123", "displayName": "Trends — Endpoint Inventory" },
{ "id": "456", "displayName": "Comply Findings Export" }
],
"successCount": 2,
"failureCount": 0,
"errors": [],
"error": null
}
}
}
Delete multiple connections
(mutation.connectConnectionsBulkDelete)
The following mutation deletes each connection ID in connectionIDs. Connections are processed independently. Set deleteComponents to false to preserve the source, destination, filter, and format components for reuse by other connections. connectionIDs is limited to 100 IDs per request by default.
mutation exampleBulkDeleteConnections($connectionIDs: [ID!]!, $deleteComponents: Boolean) {
connectConnectionsBulkDelete(input: {connectionIDs: $connectionIDs, deleteComponents: $deleteComponents}) {
deletedIDs
successCount
failureCount
errors {
connectionID
inputIndex
error {
code
message
retryable
}
}
error {
message
retryable
timedOut
}
}
}
Include the ID list and deleteComponents variables in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionIDs": ["123", "456"],
"deleteComponents": true
}
Example response:
{
"data": {
"connectConnectionsBulkDelete": {
"deletedIDs": ["123", "456"],
"successCount": 2,
"failureCount": 0,
"errors": [],
"error": null
}
}
}
Transfer ownership of multiple connections
(mutation.connectConnectionsBulkTransferOwnership)
The following mutation transfers ownership of each connection ID in connectionIDs to the calling user. This mutation cannot transfer ownership to a third party; the calling user always takes ownership. The persona of each connection is reset to the active persona of the calling user. Connections are processed independently. connectionIDs is limited to 100 IDs per request by default.
mutation exampleBulkTransferOwnershipConnections($connectionIDs: [ID!]!) {
connectConnectionsBulkTransferOwnership(input: {connectionIDs: $connectionIDs}) {
connections {
id
displayName
}
successCount
failureCount
errors {
connectionID
inputIndex
error {
code
message
retryable
}
}
error {
message
retryable
timedOut
}
}
}
Include an ID list variable in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionIDs": ["123", "456"]
}
Example response:
{
"data": {
"connectConnectionsBulkTransferOwnership": {
"connections": [
{ "id": "123", "displayName": "Trends — Endpoint Inventory" },
{ "id": "456", "displayName": "Comply Findings Export" }
],
"successCount": 2,
"failureCount": 0,
"errors": [],
"error": null
}
}
}
Change the persona of multiple connections
(mutation.connectConnectionsBulkChangePersona)
The following mutation changes the persona that each connection ID in connectionIDs runs as. The calling user must own every connection in the request. Set targetPersonaID to 0 to use the default persona of the owner at run time, or specify a persona ID available to the calling user. Connections are processed independently. connectionIDs is limited to 100 IDs per request by default.
mutation exampleBulkChangePersonaConnections($connectionIDs: [ID!]!, $targetPersonaID: ID!) {
connectConnectionsBulkChangePersona(input: {connectionIDs: $connectionIDs, targetPersonaID: $targetPersonaID}) {
connections {
id
displayName
}
successCount
failureCount
errors {
connectionID
inputIndex
error {
code
message
retryable
}
}
error {
message
retryable
timedOut
}
}
}
Include the ID list and targetPersonaID variables in the QUERY VARIABLES panel or in your variables dictionary:
{
"connectionIDs": ["123", "456"],
"targetPersonaID": "0"
}
Example response:
{
"data": {
"connectConnectionsBulkChangePersona": {
"connections": [
{ "id": "123", "displayName": "Trends — Endpoint Inventory" },
{ "id": "456", "displayName": "Comply Findings Export" }
],
"successCount": 2,
"failureCount": 0,
"errors": [],
"error": null
}
}
}