Home / Help centre / Integrations & API
Integrations & API
How do I get the new, fixed and regressed findings for a scan through the API?
Call GET /api/scans/:id/diff with the ID of the scan you care about and a token whose owner holds scan:read. The response compares that scan with the target's history and groups findings as new, fixed or regressed.
Steps
- Find the ID of the scan. A CI trigger returns it as
scanId. - Send your Bearer token with the request.
- Call
GET /api/scans/:id/diff. It needsscan:read. - Read the three groups the route is built around: new, fixed and regressed findings.
- Look at regressions first: these are issues that you fixed before and that have come back.
Good to know
The reference describes the route as a diff of findings against the target's history. The Diff tab on the scan detail page shows the same idea in the app, comparing with the previous completed scan of the target. On the very first scan, the tab says "No previous scan to compare against.", so expect little or nothing from the API in that case too.
The lifecycle behind it is simple. Issues persist per target. A later scan that no longer finds one marks it fixed. If it reappears, Cyberlop flags a regression instead of a fresh finding.
| Group | What it means |
|---|---|
| New | Not seen in earlier scans of this target |
| Fixed | Seen before, not found this time |
| Regressed | Fixed earlier, found again now |
This route helps most in pipelines. After a merge, ask for the diff and look only at what is new. That keeps the noise down and puts the focus on the change you just shipped. Field names are not listed on the page, so read the downloaded OpenAPI spec for field names before you parse it.
For the in-app version, read how to compare scans with the Diff tab. To list every finding of a scan instead, see how to pull the findings for one scan.
Related questions
- How do I pull the findings for one scan through the API?
- How do I check a CI-triggered scan's result through the API?
- How do I find findings that came back after being fixed?
- How do I download the API spec?
- How do I get the Dashboard numbers through the API?
How to compare scans in Cyberlop with the Diff tab
Step-by-step, with annotated screenshots.
Updated · Back to the help centre
Wiring it into your pipeline?
Share what you are building and we will help you set up the right token, profile and job.