Upgrading from Finite State Legacy REST API to Finite State GraphQL API

Finite State's Legacy REST API is being deprecated in favor of the new GraphQL API. This document will help you migrate from the v1 API to the GraphQL API.

Get Organizations

In the Finite State Legacy REST API, a client could have multiple Organizations. In the GraphQL API, each customer has a single Organization, but can have multiple Business Units. Business Units are referred to as "Groups" in the GraphQL API.

To get the Business Units for the Organization, you can make the following GraphQL query:

Business Units can be found in the application under Accounts > Business Units.

NOTE: Business Units are referred to as Groups in the GraphQL API.

Use the id field of the returned objects to query for data from a specific Business Unit.

query GetBusinessUnits {
  allGroups {
    id
    name
  }
}

Get Issues for a Firmware

This query is similar to the query in Get Firmwares for a Product but adds a filter to get the Findings for a specific AssetVersion.

query GetFindingsForAnAssetVersion (
  $filter: FindingFilter
) {
  allFindings(filter: $filter) {
    title
    vulnIdFromTool
    description
    severity
    riskScore
    affects {
      name
      version
    }
  }
}

Get Software Components for a Firmware

Similar to the examples above, a "Firmware" is actually represented by an AssetVersion.

To get the Software Components for an AssetVersion, query allSoftwareComponentInstances and filter on the assetVersionRefId.

query GetSoftwareComponentsForAnAssetVersion (
  $filter: SoftwareComponentInstanceFilter
) {
  allSoftwareComponentInstances(filter: $filter) {
    name
    version
  }
}

Get Number of Findings and Their Severity for a Firmware

Get the number (count) of Findings of each severity for an AssetVersion.

NOTE: There is currently a limitation* in the GraphQL API on multiple aliased fields with the same name, so this will currently require four queries to get Critical, High, Medium, and Low. Valid values for the "severity" field are "CRITICAL", "HIGH", "MEDIUM", and "LOW".

*Finite State will be updating the API to support multiple aliased fields with the same name in the future.

query GetFindingSeverityForAnAssetVersion (
  $filter: FindingFilter
) {
	_allFindingsMeta(
    filter: $filter
  ) {
    count
  }
}

Get Findings Created After a Specific Date

To get the Findings for any entity above, add a createdAt_gt filter. Note you can use multiple filters, and also add additional parameters to the filter (e.g. use both the severity and createdAt_gt in the same filter).

query GetFindingsCreatedAfterForAnAssetVersion (
  $filter: FindingFilter
) {
  allFindings(filter: $filter) {
    id
    title
    severity
    createdAt
  }
}

Get Tags for A Product

The Tags on Products and other entities feature is in development and is not yet available.