REST API Common Deployment Scenarios
Using GET Issues v5 API with False Positive Support
The GET Issues v5 API endpoint provides enhanced functionality over previous versions, including false positive support and improved filtering capabilities. This guide demonstrates how to use the v5 endpoint effectively.
Overview
The v5 issues endpoint (/api/rest/v5/issues) offers several key enhancements:
False Positive Support: Access
fpDescriptionfield for false positive informationEnhanced Metadata: Includes
createdAtandfingerprintHashfieldsVulnerability Tags: Access
vulnerabilityReportIssueTagsarrayImproved Filtering: Filter by
fixReportIdparameter for targeted queries
Step 1: Get Available Fix Reports (GET fix-reports v2)
GET fix-reports v2)First, retrieve all available fix reports to identify the ones you want to query:
curl -X GET "https://api.mobb.ai/api/rest/fix-reports" \
-H "x-mobb-key: YOUR_API_KEY" \
-H "Content-Type: application/json"Sample Response:
{
"getReportsApiV2": {
"fixReport": [
{
"id": "f1fdee4c-9a62-4913-a179-18d07ec11a0e",
"createdOn": "2024-01-10T23:41:53.650049+00:00",
"expirationOn": "2024-01-24T23:41:53.650049+00:00",
"createdByUser": {
"email": "[email protected]",
"id": "1f7ba60a-b4b8-4a08-91b9-d3a8c4af814d"
},
"vulnerabilityReport": {
"vendor": "snyk",
"project": {
"id": "276cd1ed-64b7-496e-ad14-98eb6f55d5e0",
"name": "My first project"
}
},
"repo": {
"name": "mobb-circleci-integration",
"originalUrl": "https://github.com/antonychiu2/mobb-circleci-integration",
"reference": "main"
}
}
]
}
}Step 2: Query Issues with Fix Report ID (GET issues v5)
GET issues v5)Use the fix report ID from Step 1 to get issues with enhanced metadata and false positive information:
Step 3: Understanding the v5 Response
The v5 response includes enhanced fields not available in previous versions:
Key New Fields:
fpDescription: Description when an issue is marked as false positivecreatedAt: Timestamp when the issue was createdfingerprintHash: Unique fingerprint for the issuevulnerabilityReportIssueTags: Array of tags associated with the issue
Sample v5 Response:
Filtering Options
Filter by Specific Issue ID
Filter by Fix Report ID
Common Use Cases
Quality Assurance: Review
fpDescriptionto understand why issues were marked as false positivesIssue Suppression for SAST Scanners: Use false positive descriptions to improve scanning accuracy
Reporting: Generate reports showing false positive rates and reasons
Issue Tracking: Track issue lifecycle with
createdAttimestamps andfingerprintHashfor deduplication
Best Practices for using GET issues v5
GET issues v5Use Fix Report ID Filtering: Always filter by
fixReportIdwhen querying specific fix reports to reduce the response size.Handle Pagination: Check
hasNextPagefield and implement pagination for large result sets. If the result set exceeds 1000 entries, the response will be trucated withhasNextPageset totrue. To obtain the full result set, the user will need to capture the lastissueIdand re-run the same API again by supplying theissueIdto obtain the next 1000 results. Repeat untilhasNextPagereturnsfalse.The issue result sets are chronologically ordered from earliest to latest
Parsing Fix Confidence and Fix Rating from Fix Report Details API
This guide explains how to interpret the response from the GET fix-reports/{fixReportId} API.
How to obtain fix confidence status
The confidence field in the API response allows you to determine if a fix is considered "Stable" or "Adaptive".
"confidence": 90: indicates Stable Fix, which are deterministic fixes"confidence": 50: indicates Adaptive Fix, which are fixes generated using intelligent AI techniques that may require closer review.
For more details on Stable vs Adaptive fixes, see Working with the Fix Report.
Sample Output (Truncated):
How to obtain Fix Rating
The sharedState object contains the fixRatings array, which details user sentiment and feedback on a fix.
Vote Score (
voteScore):1: Thumbs Up-1: Thumbs Down
Fix Rating Tag (
fixRatingTag): Reason for rejection (ifvoteScoreis-1).Values:
BAD_PATTERN,BREAKING_FIX,FALSE_POSITIVE,OTHER,UNRESOLVED_FIX
Comments (
comment): Improved context provided by the user.User Info:
emailandnameof the reviewer.
For more information on how to submit feedback via the UI, see Providing Fix Feedback.
Sample Output (Truncated):
Last updated
Was this helpful?