Findings
Python SDK reference for the findings resource
Warning
The SDKs are in research preview. Their interfaces may change between minor versions until 1.0.
Access this resource from client.findings. Both async and sync clients expose the same methods.
list
GET /v1/findings
Findings across the project.
result = await client.findings.list()Arguments:
paramsFindingListParams | NonequeryNonepageintegerpage_sizeintegerorder_by'created_at' | 'updated_at' | 'level'order'desc' | 'asc'user_idstringis_selfbooleancode_idstringanalysis_idsarray of stringtoolstringtypestringlevelFindingLevelis_acknowledgedbooleancreated_by_user_idstringcreated_by_selfbooleaninclude_deletedbooleanwith_paginationboolqueryFalseReturn type by call:
with_pagination=True→PaginatedResource[Finding]with_pagination=False→Pagination[Finding]
show properties (6)hide properties (6)
resultsarray of Findingshow properties (19)hide properties (19)
idstringrequiredcreated_atstringrequiredorigin_finding_idstringrequiredThe finding's original ID, stable across versions and edits.
is_acknowledgedbooleanrequiredWhether a user acknowledged the finding.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationOptional[string]pocOptional[string]toolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idOptional[string]The source location within the node.
created_by_userUserrequiredWho created the finding.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcode_idstringrequiredThe code version the finding is on.
versionAnalysisVersionRefrequiredThe analysis version the finding belongs to.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsFindingActionsrequiredAvailable actions to take on this finding
show properties (3)hide properties (3)
editActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
last_event_kindOptional[FindingEventKind]pageintegerrequiredpage_sizeintegerrequiredmorebooleanrequiredWhether more pages follow.
total_observationsintegerrequiredTotal results across all pages.
total_pagesintegerrequiredget
GET /v1/findings/{finding_id}
result = await client.findings.get(
finding_id=finding_id,
)Arguments:
finding_idstrpathrequiredReturns: Finding
show properties (19)hide properties (19)
idstringrequiredcreated_atstringrequiredorigin_finding_idstringrequiredThe finding's original ID, stable across versions and edits.
is_acknowledgedbooleanrequiredWhether a user acknowledged the finding.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationOptional[string]pocOptional[string]toolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idOptional[string]The source location within the node.
created_by_userUserrequiredWho created the finding.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcode_idstringrequiredThe code version the finding is on.
versionAnalysisVersionRefrequiredThe analysis version the finding belongs to.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsFindingActionsrequiredAvailable actions to take on this finding
show properties (3)hide properties (3)
editActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
last_event_kindOptional[FindingEventKind]edit_metadata
PATCH /v1/findings/{finding_id}
Edit the metadata of a finding.
result = await client.findings.edit_metadata(
finding_id=finding_id,
body=body,
)Arguments:
finding_idstrpathrequiredbodyFindingEditBodybodyrequiredtypestringlevelFindingLevelnamestringexplanationstringrecommendationOptional[string]pocOptional[string]toolstringReturns: Finding
show properties (19)hide properties (19)
idstringrequiredcreated_atstringrequiredorigin_finding_idstringrequiredThe finding's original ID, stable across versions and edits.
is_acknowledgedbooleanrequiredWhether a user acknowledged the finding.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationOptional[string]pocOptional[string]toolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idOptional[string]The source location within the node.
created_by_userUserrequiredWho created the finding.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcode_idstringrequiredThe code version the finding is on.
versionAnalysisVersionRefrequiredThe analysis version the finding belongs to.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsFindingActionsrequiredAvailable actions to take on this finding
show properties (3)hide properties (3)
editActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
last_event_kindOptional[FindingEventKind]delete
DELETE /v1/findings/{finding_id}
Delete a finding.
result = await client.findings.delete(
finding_id=finding_id,
)Arguments:
finding_idstrpathrequiredReturns: Finding
show properties (19)hide properties (19)
idstringrequiredcreated_atstringrequiredorigin_finding_idstringrequiredThe finding's original ID, stable across versions and edits.
is_acknowledgedbooleanrequiredWhether a user acknowledged the finding.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationOptional[string]pocOptional[string]toolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idOptional[string]The source location within the node.
created_by_userUserrequiredWho created the finding.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcode_idstringrequiredThe code version the finding is on.
versionAnalysisVersionRefrequiredThe analysis version the finding belongs to.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsFindingActionsrequiredAvailable actions to take on this finding
show properties (3)hide properties (3)
editActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
last_event_kindOptional[FindingEventKind]undo
POST /v1/findings/{finding_id}/undo
Undo the most recent change to a finding.
result = await client.findings.undo(
finding_id=finding_id,
)Arguments:
finding_idstrpathrequiredReturns: ExistsResponse[Finding]
show properties (2)hide properties (2)
existsbooleanrequireddataOptional[Finding]show properties (19)hide properties (19)
idstringrequiredcreated_atstringrequiredorigin_finding_idstringrequiredThe finding's original ID, stable across versions and edits.
is_acknowledgedbooleanrequiredWhether a user acknowledged the finding.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationOptional[string]pocOptional[string]toolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idOptional[string]The source location within the node.
created_by_userUserrequiredWho created the finding.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcode_idstringrequiredThe code version the finding is on.
versionAnalysisVersionRefrequiredThe analysis version the finding belongs to.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsFindingActionsrequiredAvailable actions to take on this finding
show properties (3)hide properties (3)
editActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
last_event_kindOptional[FindingEventKind]toggle_acknowledgement
PATCH /v1/findings/{finding_id}/status
Toggle whether a finding is acknowledged.
result = await client.findings.toggle_acknowledgement(
finding_id=finding_id,
)Arguments:
finding_idstrpathrequiredReturns: Finding
show properties (19)hide properties (19)
idstringrequiredcreated_atstringrequiredorigin_finding_idstringrequiredThe finding's original ID, stable across versions and edits.
is_acknowledgedbooleanrequiredWhether a user acknowledged the finding.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationOptional[string]pocOptional[string]toolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idOptional[string]The source location within the node.
created_by_userUserrequiredWho created the finding.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcode_idstringrequiredThe code version the finding is on.
versionAnalysisVersionRefrequiredThe analysis version the finding belongs to.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsFindingActionsrequiredAvailable actions to take on this finding
show properties (3)hide properties (3)
editActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
last_event_kindOptional[FindingEventKind]comments
GET /v1/findings/{finding_id}/comments
result = await client.findings.comments(
finding_id=finding_id,
)Arguments:
finding_idstrpathrequiredReturns: ResultsResponse[FindingComment]
show properties (1)hide properties (1)
resultsarray of FindingCommentshow properties (5)hide properties (5)
idstringrequiredcreated_atstringrequiredmessagestringrequiredrefsarray of InlineRefshow properties (6)hide properties (6)
idstringrequiredtypestringrequiredsourcestringrequiredref_indintegernameOptional[string]is_stalebooleanuserUserrequiredshow properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcomment
POST /v1/findings/{finding_id}/comments
result = await client.findings.comment(
finding_id=finding_id,
message=message,
)Arguments:
finding_idstrpathrequiredmessagestrbodyrequiredReturns: FindingComment
show properties (5)hide properties (5)
idstringrequiredcreated_atstringrequiredmessagestringrequiredrefsarray of InlineRefshow properties (6)hide properties (6)
idstringrequiredtypestringrequiredsourcestringrequiredref_indintegernameOptional[string]is_stalebooleanuserUserrequiredshow properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequired
