Applications and updates · GraphQL query

softwareUpdatePreferences query

Retrieves an endpoint's SoftwareUpdatePreferences by its graph object id: the operating system update configuration and the updates currently available, including Windows pending updates with KB IDs and MSRC severity, and macOS recommended updates. Each Endpoint has at most one, also reachable through its softwareUpdatePreferences field; find them across endpoints with graphSearch on the SOFTWARE_UPDATE_PREFERENCES object type. Returns a not-found error when no object has the id, and an error when the id belongs to another object type.

Response

Returns a SoftwareUpdatePreferencesPayload!

Arguments

Name Description
id - ID! The SoftwareUpdatePreferences identifier.
mockOptions - MockDataInput

Options for mock data generation. Options supported: key: "PLATFORM", value: OsPlatform

example: "mockOptions": { "options": [ { "key": "PLATFORM", "value": "WINDOWS" } ] }

Example

Query

query softwareUpdatePreferences(
  $id: ID!,
  $mockOptions: MockDataInput
) {
  softwareUpdatePreferences(
    id: $id,
    mockOptions: $mockOptions
  ) {
    node {
      id
      orgId
      seen {
        ...SeenOnlineFragment
      }
      objectType
      objectTypeLabel
      displayName
      firstSeen
      lastSeen
      createdAt
      updatedAt
      snapshotInfo {
        ...GraphObjectSnapshotInfoFragment
      }
      endpoint {
        ...EndpointFragment
      }
      osSpecific {
        ... on SoftwareUpdatePreferencesMacOS {
          ...SoftwareUpdatePreferencesMacOSFragment
        }
        ... on SoftwareUpdatePreferencesWindows {
          ...SoftwareUpdatePreferencesWindowsFragment
        }
      }
      findings {
        ...FindingsPayloadFragment
      }
      issues {
        ...IssuesPayloadFragment
      }
      issuesSummary {
        ...IssuesSummaryFragment
      }
    }
  }
}

Variables

{
  "id": "4",
  "mockOptions": MockDataInput
}

Response

{
  "data": {
    "softwareUpdatePreferences": {
      "node": SoftwareUpdatePreferences
    }
  }
}