API Documentation
Threatrix GraphQL API provides fast and efficient queries to access your data.
Graphql
More details about GraphQL are available here: https://graphql.org/learn/queries/
GraphQL API Endpoint
Threatrix cloud graphQL API is available at https://app.threatrix.io/graphql
Hybrid GraphQL API is available at {HYBRID_SERVER}/graphql
Create Organization Account
This mutation allows you to create a user and organization through the API. The response to the mutation will include a temporary JWT token that can be used to request organization or entity data and may also be used to create service tokens for use by your application to access the GraphQL API.
type: mutation
mutation NewAccountMutation($formAccountRequest: FormAccountRequestInput) {
createAccount(formAccountRequest: $formAccountRequest) {
jwt,
user {
username,
enabled,
credentialsNonExpired,
accountNonExpired,
accountNonLocked
}
}
}Typescript example
Create User Account
Create a new user account which will generate a welcome email for this user with a link to login.
Remove User Account
Remove an existing user account
Create Service Token
Service tokens are JWTs that can be used to access to the Threatrix API from external services. They can be configured with a description, expiration date and, if necessary, custom roles to suit the purpose of the token.
Typescript example ApiKey Class
Request Generated Service Key
This query is only necessary if you did not include the apiKey column in the Create Service Token query.
Add Github Personal Access Token
This query adds a Github personal access token to the account which grants Threatrix the appropriate permissions to access Github repositories for scanning and scan setup.
List GitHub accounts
Use this query to retrieve a list of both User and Organization Github accounts for which the user has access rights.
List GitHub User repositories
Use this query to retrieve a list of available repositories for the Github user account
List GitHub Organization Repositories
Use this query to retrieve a list of available repositories for the GitHub organization account to which the user has access rights. The login must be provided
Create GitHub Action workflow for the repository
User this query to create the workflow in GitHub necessary to run scans based on a GitHub workflow event(Pull Request, Push or Manual)
Project List
Get a list of projects for the given entity
Project Summary
This query provides project summary data as displayed at the top of your project as illustrated in the image below

Components
Returns an unpaged list of components for the requested scan ID, limited to 1000 results
Vulnerabilities
Returns an unpaged list of vulnerabilities for the requested scan ID, limited to 1000 results
Licenses
Returns an unpaged list of licenses for the requested scan ID, limited to 1000 results
License Components
Returns a list of components associated with the license
Assets (root)
Returns an unpaged list of project root (no parent folder) scan assets for the requested scan ID, limited to 1000 results
Assets (parent)
Returns an unpaged list of project assets associated with provided parent folder for the requested scan ID, limited to 1000 results
Reports
CodeCertify Reports
CodeCertify SPDX 2.2
Returns an SPDX version 2.2 report for the modules included in the projectIdToScanIdMap
Query
Variables
GraphQL
Variables
entityId here is CodeCertify project ID
projectIdToScanIdMap - map of module id - module scan id (optional)
CodeCertify SPDX 2.3
Returns an SPDX version 2.3 report for the modules included in the projectIdToScanIdMap
Query
Variables
entityId here is CodeCertify project ID
projectIdToScanIdMap - map of module id - module scan id (optional)
CodeCertify CycloneDX SBOM
Returns a CycloneDX report for the modules included in the projectIdToScanIdMap
Query
Variables
CodeCertify PDF report
Returns a a summary report
Note that this report is available only through the following REST endpoint
REST API Query
POST: https://app.threatrix.io/rest/compliance/report/supplychain/pdf
Body (JSON):
CodeCertify License Attribution
Returns a text file with complete license attribution with license text and copyrights.
Query
Variables
Last updated