Returning scan-related information
The following article shows how you can use the Qwiet API to view information about your applications, their scan results, and any vulnerabilities, secrets, or insights identified by Qwiet. The API is an alternative to viewing similar information in the Dashboard.
Prerequisites
Before proceeding, you should have:
Submitted an app to Qwiet for analysis
Have the following information available:
Your access token and org ID (both are available in the Qwiet Dashboard)
Your app ID (e.g., if you submitted your app via the CLI and named it
HelloShiftLeft, this value would also be your app ID)
For all of these examples, you can use the command-line interface on your machine, though a tool like Postman would be helpful. You can use our Postman Collection specifically for these examples.
API authentication
The Qwiet API uses bearer authentication, which means that you must pass in a bearer token before you make calls to any of the endpoints. More specifically, you must provide your Qwiet access token in the HTTP Authorization request header before proceeding.
Example 1: List findings for the latest scan of the app
Endpoint to use: List App Findings
This endpoint requires you to pass your org ID and app ID in the URL to obtain the findings for the latest scan of your app:
curl \
--request GET 'https://app.shiftleft.io/api/v4/orgs/{orgID}/apps/{appID}/findings' \
--header 'Authorization: Bearer {yourAccessToken}'You should receive a response whose beginning looks similar to the following:
Example 2: Get details for a specific finding
Endpoint to use: Read App Finding
Once you've returned the complete list of findings for your application, you can look at specific findings. To do so, you'll need (in addition to the app ID and the org ID) the finding ID. This can be obtained from the results of the call you executed in Example 1.f
You should receive a response whose beginning looks similar to the following:
Example 3: Get the packages used in an application
Endpoint to use: List App Findings
When listing the findings for a specific application, you can add a (query) parameter to your API call to get the OSS packages that are used in the application: ?type=package
You should receive a response whose beginning looks similar to the following:
Example 4: Get a list of apps that your org has scanned
Endpoint to use: List Apps
In addition to detailed information like scans and their findings, you can get higher-level data points, such as the list of applications that your org has submitted to Qwiet for analysis.
You should receive a response that looks similar to the following:
Last updated
Was this helpful?