Reference: Gateway examples for Integrity Monitor

The following requests require Integrity Monitor 3.6 or later to create, retrieve, update, deploy, and delete Integrity Monitor monitors and watchlists.

For more information, see Reference: Filter syntax and Reference: Integrity Monitor examples.

Create Integrity Monitor monitor

mutation.integrityMonitorMonitorCreate

The integrityMonitorMonitorCreate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Monitors write permission.

The following mutation creates a monitor.

JSON
mutation exampleCreateIMMonitor($input: IntegrityMonitorMonitorCreateInput!) {
  integrityMonitorMonitorCreate(input: $input) {
    monitor {
      id
      collectProcessInformation
      computerGroups {
        edges {
          node {
            id
            contentSetV2 {
              id
              name
              description
            }
            expression
            filterEnabled
            managementRightsEnabled
            modifiedTime
            name
            type
          }
        }
      }
      databaseMaximumSizeMegabytes
      deploymentStatus
      description
      indexFirstScanDistributeOverTime {
        nanoseconds
        seconds
      }
      indexScanFrequency {
        nanoseconds
        seconds
      }
      monitorPruningAge {
        nanoseconds
        seconds
      }
      name
      priority
      revision
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "collectProcessInformation": true,
    "computerGroups": {
      "id": "123"
    },
    "databaseMaximumSizeMegabytes": 512,
    "description": "example monitor",
    "indexFirstScanDistributeOverTime": {
      "nanoseconds": 0,
      "seconds": 14400
    },
    "indexScanFrequency": {
      "nanoseconds": 0,
      "seconds": 43200
    },
    "monitorPruningAge": {
      "nanoseconds": 0,
      "seconds": 86400
    },
    "name": "Example monitor",
    "priority": 1
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorMonitorCreate": {
      "monitor": {
        "id": "123",
        "collectProcessInformation": true,
        "computerGroups": {
          "edges": [
            {
              "node": {
                "id": "123",
                "contentSetV2": {
                  "id": "3",
                  "name": "Default Filter Groups",
                  "description": null
                },
                "expression": " Operating System Generation equals Windows 10",
                "filterEnabled": true,
                "managementRightsEnabled": true,
                "modifiedTime": null,
                "name": "All Windows 10",
                "type": "STANDARD"
              }
            }
          ]
        },
        "databaseMaximumSizeMegabytes": 512,
        "deploymentStatus": "PendingDeployment",
        "description": "example monitor",
        "indexFirstScanDistributeOverTime": {
          "nanoseconds": 0,
          "seconds": 14400
        },
        "indexScanFrequency": {
          "nanoseconds": 0,
          "seconds": 43200
        },
        "monitorPruningAge": {
          "nanoseconds": 0,
          "seconds": 86400
        },
        "name": "Example monitor",
        "priority": 1,
        "revision": 1
      },
      "error": null
    }
  }
}

Create Integrity Monitor watchlist

mutation.integrityMonitorWatchlistCreate

The integrityMonitorWatchlistCreate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation creates a Windows-style watchlist. Associated watchlist paths use backslashes (\).

JSON
mutation exampleCreateIMWatchlist($input: IntegrityMonitorWatchlistCreateInput!) {
  integrityMonitorWatchlistCreate(input: $input) {
    watchlist {
      id
      name
      computerGroups {
        edges {
          node {
            id
            name
            managementRightsEnabled
            filterEnabled
            contentSetV2 {
              id
              name
              description
            }
            type
            expression
          }
        }
      }
      deploymentStatus
      description
      paths {
        edges {
          node {
            path
            watchlistPathType
            includeFilePermissionChanges
            inclusions {
              edges {
                cursor
                node
              }
            }
            exclusions {
              edges {
                cursor
                node
              }
            }
          }
        }
      }
      pathStyle
      revision
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "computerGroups": [
      {
        "name": "All Computers"
      },
      {
        "id": "123"
      }
    ],
    "description": "example watchlist",
    "name": "Example watchlist",
    "pathStyle": "Windows"
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistCreate": {
      "watchlist": {
        "id": "123",
        "name": "Example watchlist",
        "computerGroups": {
          "edges": [
            {
              "node": {
                "id": "345",
                "name": "All Computers",
                "managementRightsEnabled": true,
                "filterEnabled": true,
                "contentSetV2": {
                  "id": "1",
                  "name": "Reserved",
                  "description": "Built in sensors which can not be edited or removed."
                },
                "type": "STANDARD",
                "expression": " any Computer Name not matches .*"
              }
            }
          ]
        },
        "deploymentStatus": "PendingDeployment",
        "description": "example watchlist",
        "paths": {
          "edges": []
        },
        "pathStyle": "Windows",
        "revision": 1
      },
      "error": null
    }
  }
}

The following mutation creates a Unix-style watchlist. Associated watchlist paths use forward slashes (/).

JSON
mutation exampleCreateIMWatchlist($input: IntegrityMonitorWatchlistCreateInput!) {
  integrityMonitorWatchlistCreate(input: $input) {
    watchlist {
      id
      name
      computerGroups {
        edges {
          node {
            id
            name
            managementRightsEnabled
            filterEnabled
            contentSetV2 {
              id
              name
              description
            }
            type
            expression
          }
        }
      }
      deploymentStatus
      description
      paths {
        edges {
          node {
            path
            watchlistPathType
            includeFilePermissionChanges
            inclusions {
              edges {
                node
              }
            }
            exclusions {
              edges {
                node
              }
            }
          }
        }
      }
      pathStyle
      revision
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "computerGroups": [
      {
        "name": "All Computers"
      },
      {
        "id": "123"
      }
    ],
    "description": "example watchlist",
    "name": "Example watchlist Unix",
    "pathStyle": "Unix"
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistCreate": {
      "watchlist": {
        "id": "234",
        "name": "Example watchlist Unix",
        "computerGroups": {
          "edges": [
            {
              "node": {
                "id": "345",
                "name": "All Computers",
                "managementRightsEnabled": true,
                "filterEnabled": true,
                "contentSetV2": {
                  "id": "1",
                  "name": "Reserved",
                  "description": "Built in sensors which can not be edited or removed."
                },
                "type": "STANDARD",
                "expression": " any Computer Name not matches .*"
              }
            }
          ]
        },
        "deploymentStatus": "PendingDeployment",
        "description": "example watchlist",
        "paths": {
          "edges": []
        },
        "pathStyle": "Unix",
        "revision": 1
      },
      "error": null
    }
  }
}

Create Integrity Monitor watchlist Unix path

mutation.integrityMonitorWatchlistUnixPathCreate

The integrityMonitorWatchlistUnixPathCreate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation creates a Unix-style watchlist path that uses forward slashes (/). This path is associated with the watchlist that matches the ID 123.

Note: The response returns an error if no watchlist matches the input ID, if the watchlist does not use Unix-style paths, or if the path is not unique in the watchlist.
JSON
mutation exampleCreateIMUnixPath($input: IntegrityMonitorWatchlistUnixPathCreateInput!) {
  integrityMonitorWatchlistUnixPathCreate(input: $input) {
    watchlistPath {
      id
      exclusions {
        edges {
          node
        }
      }
      inclusions {
        edges {
          node
        }
      }
      path
      watchlistPathType
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "watchlistID": "123",
    "path": "/a/b*/c",
    "inclusions": [
      ".ssh/\\*\\*"
    ],
    "exclusions": [
      "\\*\\*.log",
      "\\*\\*.db"
    ]
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistUnixPathCreate": {
      "watchlistPath": {
        "id": "123",
        "exclusions": {
          "edges": [
            {
              "node": "\\*\\*.db"
            },
            {
              "node": "\\*\\*.log"
            }
          ]
        },
        "inclusions": {
          "edges": [
            {
              "node": ".ssh/\\*\\*"
            }
          ]
        },
        "path": "/a/b*/c",
        "watchlistPathType": "File"
      },
      "error": null
    }
  }
}

Create Integrity Monitor watchlist Windows file path

mutation.integrityMonitorWatchlistWindowsFilePathCreate

The integrityMonitorWatchlistWindowsFilePathCreate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation creates a Windows-style watchlist file path that uses backslashes (\). This path is associated with the watchlist that matches the ID 123.

Note: The response returns an error if no watchlist matches the input ID, if the watchlist does not use Windows-style paths, or if the path is not unique in the watchlist.
JSON
mutation exampleCreateIMWinFilePath($input: IntegrityMonitorWatchlistWindowsFilePathCreateInput!) {
  integrityMonitorWatchlistWindowsFilePathCreate(input: $input) {
    watchlistPath {
      id
      exclusions {
        edges {
          node
        }
      }
      includeFilePermissionChanges
      inclusions {
        edges {
          node
        }
      }
      path
      watchlistPathType
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "watchlistID": "123",
    "path": "C:\\Program Files",
    "inclusions": [
      "**.pem"
    ],
    "exclusions": [
      "**.log",
      "**.db"
    ],
    "includeFilePermissionChanges": true
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistWindowsFilePathCreate": {
      "watchlistPath": {
        "id": "2345",
        "exclusions": {
          "edges": [
            {
              "node": "**.db"
            },
            {
              "node": "**.log"
            }
          ]
        },
        "includeFilePermissionChanges": true,
        "inclusions": {
          "edges": [
            {
              "node": "**.pem"
            }
          ]
        },
        "path": "C:\\Program Files",
        "watchlistPathType": "File"
      },
      "error": null
    }
  }
}

Create Integrity Monitor watchlist Windows registry path

mutation.integrityMonitorWatchlistWindowsRegistryPathCreate

The integrityMonitorWatchlistWindowsRegistryPathCreate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation creates a Windows-style watchlist registry path that uses backslashes (\). This path is associated with the watchlist that matches the ID 123.

Note: The response returns an error if no watchlist matches the input ID, if the watchlist does not use Windows-style paths, or if the path is not unique in the watchlist.
JSON
mutation exampleCreateIMWinRegPath($input: IntegrityMonitorWatchlistWindowsRegistryPathCreateInput!) {
  integrityMonitorWatchlistWindowsRegistryPathCreate(input: $input) {
    watchlistPath {
      id
      exclusions {
        edges {
          node
        }
      }
      inclusions {
        edges {
          node
        }
      }
      path
      watchlistPathType
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "watchlistID": "123",
    "path": "HKEY_LOCAL_MACHINE\\a\\b*\\c",
    "inclusions": [
      "Classes\\*\\ShellEx\\*\\*"
    ],
    "exclusions": [
      ".NETFramework\\*\\NGenService\\**",
      "Cryptography\\CertificateTemplateCache\\*"
    ]
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistWindowsRegistryPathCreate": {
      "watchlistPath": {
        "id": "12345",
        "exclusions": {
          "edges": [
            {
              "node": "Cryptography\\CertificateTemplateCache\\*"
            },
            {
              "node": ".NETFramework\\*\\NGenService\\**"
            }
          ]
        },
        "inclusions": {
          "edges": [
            {
              "node": "Classes\\*\\ShellEx\\*\\*"
            }
          ]
        },
        "path": "HKEY_LOCAL_MACHINE\\a\\b*\\c",
        "watchlistPathType": "Registry"
      },
      "error": null
    }
  }
}

Delete Integrity Monitor watchlist path

mutation.integrityMonitorWatchlistPathDelete

The integrityMonitorWatchlistPathDelete mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation deletes a watchlist path that matches the ID 123.

JSON
mutation exampleDeleteIMPath($ref: IdRefInput!) {
  integrityMonitorWatchlistPathDelete(input: $ref) {
    pathID
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "ref": {
    "id": "123"
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistPathDelete": {
      "pathID": "123",
      "error": null
    }
  }
}

Deploy Integrity Monitor monitors

mutation.integrityMonitorStartMonitorDeployment

The integrityMonitorStartMonitorDeployment mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Deploy Monitors permission.

The following mutation deploys all monitors. Monitors marked for deletion are deleted during this deployment.

CODE
mutation exampleStartMonitorDeployment {
  integrityMonitorStartMonitorDeployment {
    error {
      message
      retryable
      timedOut
    }
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorStartMonitorDeployment": {
      "error": null
    }
  }
}

Deploy Integrity Monitor watchlists

mutation.integrityMonitorStartWatchlistDeployment

The integrityMonitorStartWatchlistDeployment mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Deploy Watchlists permission.

The following mutation deploys all watchlists. Watchlists marked for deletion are deleted during this deployment.

CODE
mutation exampleStartWatchlistDeployment {
  integrityMonitorStartWatchlistDeployment {
    error {
      message
      retryable
      timedOut
    }
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorStartWatchlistDeployment": {
      "error": null
    }
  }
}

Get Integrity Monitor monitor by ID

query.integrityMonitorMonitor

The integrityMonitorMonitor query requires Integrity Monitor 3.6 or later and the Integrity Monitor Monitor read permission.

The following query retrieves the monitor that matches the ID.

JSON
query exampleGetIMMonitorByID($id: ID!) {
  integrityMonitorMonitor(ref: {id: $id}) {
    id
    collectProcessInformation
    computerGroups {
      edges {
        node {
          id
          contentSetV2 {
            id
            name
            description
          }
          expression
          filterEnabled
          managementRightsEnabled
          modifiedTime
          name
          type
        }
      }
    }
    databaseMaximumSizeMegabytes
    deploymentStatus
    description
    indexFirstScanDistributeOverTime {
      seconds
      nanoseconds
    }
    indexScanFrequency {
      seconds
      nanoseconds
    }
    monitorPruningAge {
      seconds
      nanoseconds
    }
    name
    priority
    revision
  }
}

Include the ID variable in the Variables panel or in your variables dictionary:

JSON
{
  "id": "123"
}

Example response:

JSON
{
  "data": {
    "integrityMonitorMonitor": {
      "id": "123",
      "collectProcessInformation": true,
      "computerGroups": {
        "edges": [
          {
            "node": {
              "id": "75",
              "contentSetV2": {
                "id": "3",
                "name": "Default Filter Groups",
                "description": null
              },
              "expression": " Is Linux equals True",
              "filterEnabled": true,
              "managementRightsEnabled": true,
              "modifiedTime": null,
              "name": "All Linux",
              "type": "STANDARD"
            }
          }
        ]
      },
      "databaseMaximumSizeMegabytes": null,
      "deploymentStatus": "PendingDeployment",
      "description": "",
      "indexFirstScanDistributeOverTime": {
        "seconds": 14400,
        "nanoseconds": 0
      },
      "indexScanFrequency": {
        "seconds": 43200,
        "nanoseconds": 0
      },
      "monitorPruningAge": {
        "seconds": 2592000,
        "nanoseconds": 0
      },
      "name": "Linux Monitor",
      "priority": 3,
      "revision": 5
    }
  }
}

Get Integrity Monitor service status

query.integrityMonitorStatus

The integrityMonitorStatus query requires Integrity Monitor 3.6 or later and the following permissions:

  • Integrity Monitor Monitors read and Integrity Monitor Watchlists read permissions to submit the query request

  • Integrity Monitor Deploy Monitors permission to get monitor deployment status (isDeployingMonitors)

  • Integrity Monitor Deploy Watchlists permission to get watchlist deployment status( isDeployingWatchlists)

The following query retrieves the Integrity Monitor service status.

CODE
query exampleGetIMServiceStatus {
  integrityMonitorStatus {
    isDeployingMonitors
    isDeployingWatchlists
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorStatus": {
      "isDeployingMonitors": true,
      "isDeployingWatchlists": true
    }
  }
}

Get Integrity Monitor watchlist by ID

query.integrityMonitorWatchlist

The integrityMonitorWatchlist query requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists read permission.

The following query retrieves the watchlist that matches the ID.

JSON
query exampleGetIMWatchlistByID($id: ID!) {
  integrityMonitorWatchlist(ref: {id: $id}) {
    id
    name
    computerGroups {
      edges {
        node {
          id
          name
          managementRightsEnabled
          filterEnabled
          contentSetV2 {
            id
            name
            description
          }
          type
          expression
        }
      }
    }
    deploymentStatus
    description
    paths {
      edges {
        node {
          path
          watchlistPathType
          includeFilePermissionChanges
          inclusions {
            edges {
              node
            }
          }
          exclusions {
            edges {
              node
            }
          }
        }
      }
    }
    pathStyle
    revision
  }
}

Include the ID variable in the Variables panel or in your variables dictionary:

JSON
{
  "id": "123"
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlist": {
      "id": "123",
      "name": "Example watchlist update",
      "computerGroups": {
        "edges": [
          {
            "node": {
              "id": "1",
              "name": "All Computers",
              "managementRightsEnabled": true,
              "filterEnabled": true,
              "contentSetV2": {
                "id": "1",
                "name": "Reserved",
                "description": "Built in sensors which can not be edited or removed."
              },
              "type": "STANDARD",
              "expression": " All Computers"
            }
          },
          {
            "node": {
              "id": "123",
              "name": "All Debian 9",
              "managementRightsEnabled": true,
              "filterEnabled": true,
              "contentSetV2": {
                "id": "3",
                "name": "Default Filter Groups",
                "description": null
              },
              "type": "STANDARD",
              "expression": " Operating System Generation equals Debian 9"
            }
          }
        ]
      },
      "deploymentStatus": "PendingDeployment",
      "description": "example watchlist update",
      "paths": {
        "edges": [
          {
            "node": {
              "path": "/a/b*/c",
              "watchlistPathType": "File",
              "includeFilePermissionChanges": true,
              "inclusions": {
                "edges": [
                  {
                    "node": ".ssh/\\*\\*"
                  }
                ]
              },
              "exclusions": {
                "edges": []
              }
            }
          }
        ]
      },
      "pathStyle": "Unix",
      "revision": 3
    }
  }
}

Get multiple Integrity Monitor monitors

query.integrityMonitorMonitors

The integrityMonitorMonitors query requires Integrity Monitor 3.6 or later and the Integrity Monitor Monitor read permission.

The following query retrieves the first 2 monitors.

JSON
query exampleGetMultipleIMMonitors($first: Int) {
  integrityMonitorMonitors(first: $first) {
    edges {
      node {
        id
        collectProcessInformation
        computerGroups {
          edges {
            node {
              id
              contentSetV2 {
                id
                name
                description
              }
              expression
              filterEnabled
              managementRightsEnabled
              modifiedTime
              name
              type
            }
          }
        }
        databaseMaximumSizeMegabytes
        deploymentStatus
        description
        indexFirstScanDistributeOverTime {
          seconds
          nanoseconds
        }
        indexScanFrequency {
          seconds
          nanoseconds
        }
        monitorPruningAge {
          seconds
          nanoseconds
        }
        name
        priority
        revision
      }
    }
  }
}

Include the pagination variable in the Variables panel or in your variables dictionary:

JSON
{
  "first": 2
}

Example response:

JSON
{
  "data": {
    "integrityMonitorMonitors": {
      "edges": [
        {
          "node": {
            "id": "123",
            "collectProcessInformation": true,
            "computerGroups": {
              "edges": []
            },
            "databaseMaximumSizeMegabytes": null,
            "deploymentStatus": "PendingDeployment",
            "description": "",
            "indexFirstScanDistributeOverTime": {
              "seconds": 0,
              "nanoseconds": 0
            },
            "indexScanFrequency": {
              "seconds": 600,
              "nanoseconds": 0
            },
            "monitorPruningAge": {
              "seconds": 2592000,
              "nanoseconds": 0
            },
            "name": "example monitor",
            "priority": 1,
            "revision": 6
          }
        },
        {
          "node": {
            "id": "234",
            "collectProcessInformation": true,
            "computerGroups": {
              "edges": [
                {
                  "node": {
                    "id": "234",
                    "contentSetV2": {
                      "id": "3",
                      "name": "Default Filter Groups",
                      "description": null
                    },
                    "expression": " Operating System Generation equals Windows Server 2008 R2",
                    "filterEnabled": true,
                    "managementRightsEnabled": true,
                    "modifiedTime": null,
                    "name": "All Windows Server 2008 R2",
                    "type": "STANDARD"
                  }
                },
                {
                  "node": {
                    "id": "345",
                    "contentSetV2": {
                      "id": "3",
                      "name": "Default Filter Groups",
                      "description": null
                    },
                    "expression": " Operating System Generation equals Windows Server 2016",
                    "filterEnabled": true,
                    "managementRightsEnabled": true,
                    "modifiedTime": null,
                    "name": "All Windows Server 2016",
                    "type": "STANDARD"
                  }
                },
                {
                  "node": {
                    "id": "456",
                    "contentSetV2": {
                      "id": "3",
                      "name": "Default Filter Groups",
                      "description": null
                    },
                    "expression": " Operating System Generation equals Windows Server 2019",
                    "filterEnabled": true,
                    "managementRightsEnabled": true,
                    "modifiedTime": null,
                    "name": "All Windows Server 2019",
                    "type": "STANDARD"
                  }
                },
                {
                  "node": {
                    "id": "567",
                    "contentSetV2": {
                      "id": "3",
                      "name": "Default Filter Groups",
                      "description": null
                    },
                    "expression": " Operating System Generation equals Windows Server 2022",
                    "filterEnabled": true,
                    "managementRightsEnabled": true,
                    "modifiedTime": null,
                    "name": "All Windows Server 2022",
                    "type": "STANDARD"
                  }
                },
                {
                  "node": null
                }
              ]
            },
            "databaseMaximumSizeMegabytes": null,
            "deploymentStatus": "PendingDeployment",
            "description": "",
            "indexFirstScanDistributeOverTime": {
              "seconds": 14400,
              "nanoseconds": 0
            },
            "indexScanFrequency": {
              "seconds": 43200,
              "nanoseconds": 0
            },
            "monitorPruningAge": {
              "seconds": 2592000,
              "nanoseconds": 0
            },
            "name": "Windows Monitor",
            "priority": 2,
            "revision": 6
          }
        }
      ]
    }
  }
}

Get multiple Integrity Monitor watchlists

query.integrityMonitorWatchlists

The integrityMonitorWatchlists query requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists read permission.

The following query retrieves the first 2 watchlists.

JSON
query exampleGetIMWatchlists($first: Int) {
  integrityMonitorWatchlists(first: $first) {
    edges {
      node {
        id
        name
        computerGroups {
          edges {
            node {
              id
              name
              managementRightsEnabled
              filterEnabled
              contentSetV2 {
                id
                name
                description
              }
              type
              expression
            }
          }
        }
        deploymentStatus
        description
        paths {
          edges {
            node {
              path
              watchlistPathType
              includeFilePermissionChanges
              inclusions {
                edges {
                  node
                }
              }
              exclusions {
                edges {
                  node
                }
              }
            }
          }
        }
        pathStyle
        revision
      }
    }
  }
}

Include the pagination variable in the Variables panel or in your variables dictionary:

JSON
{
  "first": 2
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlists": {
      "edges": [
        {
          "node": {
            "id": "12",
            "name": "Example AIX Watchlist",
            "computerGroups": {
              "edges": [
                {
                  "node": {
                    "id": "33",
                    "name": "All AIX",
                    "managementRightsEnabled": true,
                    "filterEnabled": true,
                    "contentSetV2": {
                      "id": "3",
                      "name": "Default Filter Groups",
                      "description": null
                    },
                    "type": "STANDARD",
                    "expression": " Is AIX equals True"
                  }
                }
              ]
            },
            "deploymentStatus": "Deployed",
            "description": "",
            "paths": {
              "edges": [
                {
                  "node": {
                    "path": "/bin",
                    "watchlistPathType": "File",
                    "includeFilePermissionChanges": true,
                    "inclusions": {
                      "edges": []
                    },
                    "exclusions": {
                      "edges": [
                        {
                          "node": "**.db"
                        },
                        {
                          "node": "**.log"
                        },
                        {
                          "node": "**.state"
                        },
                        {
                          "node": "**.tmp"
                        }
                      ]
                    }
                  }
                },
                {
                  "node": {
                    "path": "/boot",
                    "watchlistPathType": "File",
                    "includeFilePermissionChanges": true,
                    "inclusions": {
                      "edges": [
                        {
                          "node": "efi/**"
                        },
                        {
                          "node": "grub/**"
                        },
                        {
                          "node": "grub2/**"
                        }
                      ]
                    },
                    "exclusions": {
                      "edges": []
                    }
                  }
                },
                {
                  "node": {
                    "path": "/etc/shells",
                    "watchlistPathType": "File",
                    "includeFilePermissionChanges": true,
                    "inclusions": {
                      "edges": []
                    },
                    "exclusions": {
                      "edges": []
                    }
                  }
                }
              ]
            },
            "pathStyle": "Unix",
            "revision": 2
          }
        },
        {
          "node": {
            "id": "23",
            "name": "Example watchlist",
            "computerGroups": {
              "edges": [
                {
                  "node": {
                    "id": "1",
                    "name": "All Computers",
                    "managementRightsEnabled": true,
                    "filterEnabled": true,
                    "contentSetV2": {
                      "id": "1",
                      "name": "Reserved",
                      "description": "Built in sensors which can not be edited or removed."
                    },
                    "type": "STANDARD",
                    "expression": " All Computers"
                  }
                }
              ]
            },
            "deploymentStatus": "Deployed",
            "description": "",
            "paths": {
              "edges": [
                {
                  "node": {
                    "path": "C:\\example",
                    "watchlistPathType": "File",
                    "includeFilePermissionChanges": true,
                    "inclusions": {
                      "edges": []
                    },
                    "exclusions": {
                      "edges": []
                    }
                  }
                },
                {
                  "node": {
                    "path": "HKEY_LOCAL_MACHINE\\SYSTEM\\EXAMPLE",
                    "watchlistPathType": "Registry",
                    "includeFilePermissionChanges": false,
                    "inclusions": {
                      "edges": []
                    },
                    "exclusions": {
                      "edges": []
                    }
                  }
                }
              ]
            },
            "pathStyle": "Windows",
            "revision": 3
          }
        }
      ]
    }
  }
}

Mark Integrity Monitor monitors for deletion

mutation.integrityMonitorMonitorMarkForDeletion

The integrityMonitorMonitorMarkForDeletion mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Monitors write permission.

The following mutation marks the monitor that matches the ID 123 for deletion. Monitors marked for deletion are deleted during the next monitor deployment.

JSON
mutation exampleMarkIMMonitorForDeletion($ref: IdRefInput!) {
  integrityMonitorMonitorMarkForDeletion(input: $ref) {
    monitor {
      id
      name
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "ref": {
    "id": "123"
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorMonitorMarkForDeletion": {
      "monitor": {
        "id": "123",
        "name": "example monitor"
      },
      "error": null
    }
  }
}

Mark Integrity Monitor watchlists for deletion

mutation.integrityMonitorWatchlistMarkForDeletion

The integrityMonitorWatchlistMarkForDeletion mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation marks the watchlist that matches the ID 123 for deletion. Watchlists marked for deletion are deleted during the next watchlist deployment.

JSON
mutation exampleDeleteWatchlist($ref: IdRefInput!) {
  integrityMonitorWatchlistMarkForDeletion(input: $ref) {
    watchlist {
      id
      name
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "ref": {
    "id": "123"
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistMarkForDeletion": {
      "watchlist": {
        "id": "123",
        "name": "example watchlist"
      },
      "error": null
    }
  }
}

Update Integrity Monitor monitor by ID

mutation.integrityMonitorMonitorUpdate

The integrityMonitorMonitorUpdate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Monitors write permission.

The following mutation updates a monitor that matches the ID. Note the following:

  • The response returns an error if no monitor matches the ID, the name value is an empty string or null, or the name value is updated to a name that matches another monitor.

  • Fields defined with a value overwrite the existing field value with the defined value. Defining an array with at least one value for the computerGroups field overwrites all existing array values with the defined array values.

  • Fields defined with a null value are not updated, if null is allowed.

  • Fields defined with an empty string or empty array replace any existing value with the empty string or empty array, if an empty string or empty array are allowed.

JSON
mutation exampleUpdateIMMonitor($input: IntegrityMonitorMonitorUpdateInput!) {
  integrityMonitorMonitorUpdate(input: $input) {
    monitor {
      id
      collectProcessInformation
      computerGroups {
        edges {
          node {
            id
            contentSetV2 {
              id
              name
              description
            }
            expression
            filterEnabled
            managementRightsEnabled
            modifiedTime
            name
            type
          }
        }
      }
      databaseMaximumSizeMegabytes
      deploymentStatus
      description
      indexFirstScanDistributeOverTime {
        nanoseconds
        seconds
      }
      indexScanFrequency {
        nanoseconds
        seconds
      }
      monitorPruningAge {
        nanoseconds
        seconds
      }
      name
      priority
      revision
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "id": "12",
    "collectProcessInformation": true,
    "computerGroups": {
      "id": "123"
    },
    "databaseMaximumSizeMegabytes": 1024,
    "description": "example monitor",
    "indexFirstScanDistributeOverTime": {
      "seconds": 14400,
      "nanoseconds": 0
    },
    "indexScanFrequency": {
      "seconds": 43200,
      "nanoseconds": 0
    },
    "monitorPruningAge": {
      "seconds": 86400,
      "nanoseconds": 0
    },
    "name": "Example monitor",
    "priority": 1
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorMonitorUpdate": {
      "monitor": {
        "id": "12",
        "collectProcessInformation": true,
        "computerGroups": {
          "edges": [
            {
              "node": {
                "id": "123",
                "contentSetV2": {
                  "id": "3",
                  "name": "Default Filter Groups",
                  "description": null
                },
                "expression": " Operating System Generation equals Windows 10",
                "filterEnabled": true,
                "managementRightsEnabled": true,
                "modifiedTime": null,
                "name": "All Windows 10",
                "type": "STANDARD"
              }
            }
          ]
        },
        "databaseMaximumSizeMegabytes": 1024,
        "deploymentStatus": "PendingDeployment",
        "description": "example monitor",
        "indexFirstScanDistributeOverTime": {
          "nanoseconds": 0,
          "seconds": 14400
        },
        "indexScanFrequency": {
          "nanoseconds": 0,
          "seconds": 43200
        },
        "monitorPruningAge": {
          "nanoseconds": 0,
          "seconds": 86400
        },
        "name": "Example monitor",
        "priority": 1,
        "revision": 2
      },
      "error": null
    }
  }
}

Update Integrity Monitor watchlist

mutation.integrityMonitorWatchlistUpdate

The integrityMonitorWatchlistUpdate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation updates a watchlist that matches the ID. Note the following:

  • The response returns an error if no watchlist matches the ID, the name value is an empty string or null, or the name value is updated to a name that matches another watchlist with the same pathStyle value.

  • Fields defined with a value overwrite the existing field value with the defined value. Defining an array with at least one value for the computerGroups field overwrites all existing array values with the defined array values.

  • Fields defined with a null value are not updated, if null is allowed.

  • Fields defined with an empty string or empty array replace any existing value with the empty string or empty array, if an empty string or empty array are allowed.

  • If you change the pathStyle of a watchlist, all of the watchlist paths are deleted because paths must match the watchlist path style.

JSON
mutation exampleUpdateIMWatchlist($input: IntegrityMonitorWatchlistUpdateInput!) {
  integrityMonitorWatchlistUpdate(input: $input) {
    watchlist {
      id
      name
      computerGroups {
        edges {
          node {
            id
            name
            managementRightsEnabled
            filterEnabled
            contentSetV2 {
              id
              name
              description
            }
            type
            expression
          }
        }
      }
      deploymentStatus
      description
      paths {
        edges {
          node {
            path
            watchlistPathType
            includeFilePermissionChanges
            inclusions {
              edges {
                node
              }
            }
            exclusions {
              edges {
                node
              }
            }
          }
        }
      }
      pathStyle
      revision
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "id": "123",
    "computerGroups": [
      {
        "name": "All Computers"
      },
      {
        "id": "123"
      }
    ],
    "description": "example watchlist update",
    "name": "Example watchlist update",
    "pathStyle": "Windows"
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistUpdate": {
      "watchlist": {
        "id": "123",
        "name": "Example watchlist update",
        "computerGroups": {
          "edges": [
            {
              "node": {
                "id": "1",
                "name": "All Computers",
                "managementRightsEnabled": true,
                "filterEnabled": true,
                "contentSetV2": {
                  "id": "1",
                  "name": "Reserved",
                  "description": "Built in sensors which can not be edited or removed."
                },
                "type": "STANDARD",
                "expression": " All Computers"
              }
            },
            {
              "node": {
                "id": "123",
                "name": "All Windows 8.1",
                "managementRightsEnabled": true,
                "filterEnabled": true,
                "contentSetV2": {
                  "id": "3",
                  "name": "Default Filter Groups",
                  "description": null
                },
                "type": "STANDARD",
                "expression": " Operating System Generation equals Windows 8.1"
              }
            }
          ]
        },
        "deploymentStatus": "PendingDeployment",
        "description": "example watchlist update",
        "paths": {
          "edges": []
        },
        "pathStyle": "Windows",
        "revision": 5
      },
      "error": null
    }
  }
}

Update Integrity Monitor watchlist Unix path

mutation.integrityMonitorWatchlistUnixPathUpdate

The integrityMonitorWatchlistUnixPathUpdate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation updates a Unix-style watchlist path that uses forward slashes (/). This path matches the ID 1234.

Note: The response returns an error if no Unix-style watchlist path matches the input ID.
JSON
mutation exampleUpdateIMUnixPath($input: IntegrityMonitorWatchlistUnixPathUpdateInput!) {
  integrityMonitorWatchlistUnixPathUpdate(input: $input) {
    watchlistPath {
      id
      exclusions {
        edges {
          node
        }
      }
      inclusions {
        edges {
          node
        }
      }
      path
      watchlistPathType
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "id": "1234",
    "path": "/a/b*/c",
    "inclusions": [
      ".ssh/\\*\\*"
    ],
    "exclusions": [
      "\\*\\*.log"
    ]
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistUnixPathUpdate": {
      "watchlistPath": {
        "id": "1234",
        "exclusions": {
          "edges": [
            {
              "node": "\\*\\*.log"
            }
          ]
        },
        "inclusions": {
          "edges": [
            {
              "node": ".ssh/\\*\\*"
            }
          ]
        },
        "path": "/a/b*/c",
        "watchlistPathType": "File"
      },
      "error": null
    }
  }
}

Update Integrity Monitor watchlist Windows file path

mutation.integrityMonitorWatchlistWindowsFilePathUpdate

The integrityMonitorWatchlistWindowsFilePathUpdate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation updates a Windows-style watchlist file path that uses backslashes (\). This path matches the ID 2345.

Note: The response returns an error if no Windows-style watchlist file path matches the input ID.
JSON
mutation exampleUpdateIMWinFilePath($input: IntegrityMonitorWatchlistWindowsFilePathUpdateInput!) {
  integrityMonitorWatchlistWindowsFilePathUpdate(input: $input) {
    watchlistPath {
      id
      exclusions {
        edges {
          node
        }
      }
      includeFilePermissionChanges
      inclusions {
        edges {
          node
        }
      }
      path
      watchlistPathType
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "id": "2345",
    "path": "C:\\Program Files",
    "inclusions": [
      "**.pem",
      "**.log"
    ],
    "exclusions": [
      "**.db"
    ],
    "includeFilePermissionChanges": true
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistWindowsFilePathUpdate": {
      "watchlistPath": {
        "id": "2345",
        "exclusions": {
          "edges": [
            {
              "node": "**.db"
            }
          ]
        },
        "includeFilePermissionChanges": true,
        "inclusions": {
          "edges": [
            {
              "node": "**.log"
            },
            {
              "node": "**.pem"
            }
          ]
        },
        "path": "C:\\Program Files",
        "watchlistPathType": "File"
      },
      "error": null
    }
  }
}

Update Integrity Monitor watchlist Windows registry path

mutation.integrityMonitorWatchlistWindowsRegistryPathUpdate

The integrityMonitorWatchlistWindowsRegistryPathUpdate mutation requires Integrity Monitor 3.6 or later and the Integrity Monitor Watchlists write permission.

The following mutation updates a Windows-style watchlist registry path that uses backslashes (\). This path matches the ID 12345.

Note: The response returns an error if no Windows-style watchlist registry path matches the input ID.
JSON
mutation exampleUpdateIMWinRegPath($input: IntegrityMonitorWatchlistWindowsRegistryPathUpdateInput!) {
  integrityMonitorWatchlistWindowsRegistryPathUpdate(input: $input) {
    watchlistPath {
      id
      exclusions {
        edges {
          node
        }
      }
      inclusions {
        edges {
          node
        }
      }
      path
      watchlistPathType
    }
    error {
      message
      retryable
      timedOut
    }
  }
}

Include the input variables in the Variables panel or in your variables dictionary:

JSON
{
  "input": {
    "id": "12345",
    "path": "HKEY_LOCAL_MACHINE\\a\\b*\\c",
    "inclusions": [
      "Classes\\*\\ShellEx\\*\\*",
      ".NETFramework\\*\\NGenService\\**"
    ],
    "exclusions": [
      "Cryptography\\CertificateTemplateCache\\*"
    ]
  }
}

Example response:

JSON
{
  "data": {
    "integrityMonitorWatchlistWindowsRegistryPathUpdate": {
      "watchlistPath": {
        "id": "12345",
        "exclusions": {
          "edges": [
            {
              "node": "Cryptography\\CertificateTemplateCache\\*"
            }
          ]
        },
        "inclusions": {
          "edges": [
            {
              "node": "Classes\\*\\ShellEx\\*\\*"
            },
            {
              "node": ".NETFramework\\*\\NGenService\\**"
            }
          ]
        },
        "path": "HKEY_LOCAL_MACHINE\\a\\b*\\c",
        "watchlistPathType": "Registry"
      },
      "error": null
    }
  }
}