Example GraphQL Queries

Follow these examples for common GraphQL API queries, or use the Python SDK to get started quickly.

Get all Business Units

Get all the Business Units in your Organization. This is typically used before creating any entities such as Products or AssetVersions, which require a Business Unit ID.

query GetBusinessUnits {
  allGroups {
    id
    name
  }
}

Get all Users with ID and Email Address

Get all the Users in your Organization. This is typically used before creating any entities such as Products or AssetVersions, which require a User ID.

query GetUsers {
  allUsers {
    id
    email
  }
}

Get all Vendors

Get all the Vendors in your Organization. This is typically used before creating any entities such as Products or AssetVersions, which require a Vendor ID if you want to specify an existing vendor.

query GetVendors {
  allVendors {
    id
    name
  }
}

Quickly Counting Entities

Get the count of all the Findings in your Organization.

In this example, we use the _allFindingsMeta field to retrive metadata about "AllFindings."

query AllFindings {
  _allFindingsMeta {
    count
  }
}

Get Findings created after a specific date

To get all Findings created after a specific date, use the filter parameter. In this example, we use the createdAt_gt filter to get all Findings with a createdAt date greater-than the specified date.

query AllFindings(
  $filter: FindingFilter!
  $orderBy: [FindingOrderBy!]
) {
  allFindings(
    filter: $filter
    orderBy: $orderBy
    after: $after
    skip: $skip
    first: $first
  ) {
    title
    id
    date
    createdAt
  }
}

Products w/ Software Component

To get all Products that have a specific Software Component, use the filter parameter. In this example, we use the name_like filter to get all Software Components with a name that contains the specified string.

query GetProductsContainingSWComp($filter: SoftwareComponentInstanceFilter!) {
  allSoftwareComponentInstances(filter: $filter) {
    id
    name
    version
    assetVersion {
      products {
        id
        name
      }
    }
  }
}

Products w/ Component Version

To get all Products that have a specific Software Component and Version, use the filter parameter. In this example, we use the name_like and version_like filters to get all Software Components with a name that contains the specified string and a version that contains the specified string.

query GetProductsContainingSWComp($filter: SoftwareComponentInstanceFilter!) {
  allSoftwareComponentInstances(filter: $filter) {
    id
    name
    version
    assetVersion {
      products {
        id
        name
      }
    }
  }
}

Findings Exploited by a Threat Actor

Coming Soon

Critical and High Severity Findings that have been open for 30 days or more

Coming Soon