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 | Nonequery
default:None
pageinteger
page_sizeinteger
order_by'created_at' | 'updated_at' | 'level'
order'desc' | 'asc'
user_idstring
is_selfboolean
code_idstring
analysis_idsarray of string
toolstring
typestring
levelFindingLevel
is_acknowledgedboolean
created_by_user_idstring
created_by_selfboolean
include_deletedboolean
with_paginationboolquery
default:False

Return type by call:

  • with_pagination=True → PaginatedResource[Finding]
  • with_pagination=False → Pagination[Finding]
show properties (6)hide properties (6)
resultsarray of Finding
show properties (19)hide properties (19)
idstringrequired
created_atstringrequired
origin_finding_idstringrequired

The finding's original ID, stable across versions and edits.

is_acknowledgedbooleanrequired

Whether a user acknowledged the finding.

typestringrequired
levelFindingLevelrequired
namestringrequired
explanationstringrequired
recommendationOptional[string]
pocOptional[string]
toolstringrequired

What produced the finding.

node_idstringrequired

The code graph node the finding is on.

is_borrowedbooleanrequired

Whether the finding was carried over from an earlier version.

location_idOptional[string]

The source location within the node.

created_by_userUserrequired

Who created the finding.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
code_idstringrequired

The code version the finding is on.

versionAnalysisVersionRefrequired

The analysis version the finding belongs to.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsFindingActionsrequired

Available actions to take on this finding

show properties (3)hide properties (3)
editActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

undoActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

last_event_kindOptional[FindingEventKind]
pageintegerrequired
page_sizeintegerrequired
morebooleanrequired

Whether more pages follow.

total_observationsintegerrequired

Total results across all pages.

total_pagesintegerrequired

get

GET /v1/findings/{finding_id}

result = await client.findings.get(
    finding_id=finding_id,
)

Arguments:

finding_idstrpathrequired

Returns: Finding

show properties (19)hide properties (19)
idstringrequired
created_atstringrequired
origin_finding_idstringrequired

The finding's original ID, stable across versions and edits.

is_acknowledgedbooleanrequired

Whether a user acknowledged the finding.

typestringrequired
levelFindingLevelrequired
namestringrequired
explanationstringrequired
recommendationOptional[string]
pocOptional[string]
toolstringrequired

What produced the finding.

node_idstringrequired

The code graph node the finding is on.

is_borrowedbooleanrequired

Whether the finding was carried over from an earlier version.

location_idOptional[string]

The source location within the node.

created_by_userUserrequired

Who created the finding.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
code_idstringrequired

The code version the finding is on.

versionAnalysisVersionRefrequired

The analysis version the finding belongs to.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsFindingActionsrequired

Available actions to take on this finding

show properties (3)hide properties (3)
editActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

undoActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons 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_idstrpathrequired
bodyFindingEditBodybodyrequired
typestring
levelFindingLevel
namestring
explanationstring
recommendationOptional[string]
pocOptional[string]
toolstring

Returns: Finding

show properties (19)hide properties (19)
idstringrequired
created_atstringrequired
origin_finding_idstringrequired

The finding's original ID, stable across versions and edits.

is_acknowledgedbooleanrequired

Whether a user acknowledged the finding.

typestringrequired
levelFindingLevelrequired
namestringrequired
explanationstringrequired
recommendationOptional[string]
pocOptional[string]
toolstringrequired

What produced the finding.

node_idstringrequired

The code graph node the finding is on.

is_borrowedbooleanrequired

Whether the finding was carried over from an earlier version.

location_idOptional[string]

The source location within the node.

created_by_userUserrequired

Who created the finding.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
code_idstringrequired

The code version the finding is on.

versionAnalysisVersionRefrequired

The analysis version the finding belongs to.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsFindingActionsrequired

Available actions to take on this finding

show properties (3)hide properties (3)
editActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

undoActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons 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_idstrpathrequired

Returns: Finding

show properties (19)hide properties (19)
idstringrequired
created_atstringrequired
origin_finding_idstringrequired

The finding's original ID, stable across versions and edits.

is_acknowledgedbooleanrequired

Whether a user acknowledged the finding.

typestringrequired
levelFindingLevelrequired
namestringrequired
explanationstringrequired
recommendationOptional[string]
pocOptional[string]
toolstringrequired

What produced the finding.

node_idstringrequired

The code graph node the finding is on.

is_borrowedbooleanrequired

Whether the finding was carried over from an earlier version.

location_idOptional[string]

The source location within the node.

created_by_userUserrequired

Who created the finding.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
code_idstringrequired

The code version the finding is on.

versionAnalysisVersionRefrequired

The analysis version the finding belongs to.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsFindingActionsrequired

Available actions to take on this finding

show properties (3)hide properties (3)
editActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

undoActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons 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_idstrpathrequired

Returns: ExistsResponse[Finding]

show properties (2)hide properties (2)
existsbooleanrequired
dataOptional[Finding]
show properties (19)hide properties (19)
idstringrequired
created_atstringrequired
origin_finding_idstringrequired

The finding's original ID, stable across versions and edits.

is_acknowledgedbooleanrequired

Whether a user acknowledged the finding.

typestringrequired
levelFindingLevelrequired
namestringrequired
explanationstringrequired
recommendationOptional[string]
pocOptional[string]
toolstringrequired

What produced the finding.

node_idstringrequired

The code graph node the finding is on.

is_borrowedbooleanrequired

Whether the finding was carried over from an earlier version.

location_idOptional[string]

The source location within the node.

created_by_userUserrequired

Who created the finding.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
code_idstringrequired

The code version the finding is on.

versionAnalysisVersionRefrequired

The analysis version the finding belongs to.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsFindingActionsrequired

Available actions to take on this finding

show properties (3)hide properties (3)
editActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

undoActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons 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_idstrpathrequired

Returns: Finding

show properties (19)hide properties (19)
idstringrequired
created_atstringrequired
origin_finding_idstringrequired

The finding's original ID, stable across versions and edits.

is_acknowledgedbooleanrequired

Whether a user acknowledged the finding.

typestringrequired
levelFindingLevelrequired
namestringrequired
explanationstringrequired
recommendationOptional[string]
pocOptional[string]
toolstringrequired

What produced the finding.

node_idstringrequired

The code graph node the finding is on.

is_borrowedbooleanrequired

Whether the finding was carried over from an earlier version.

location_idOptional[string]

The source location within the node.

created_by_userUserrequired

Who created the finding.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
code_idstringrequired

The code version the finding is on.

versionAnalysisVersionRefrequired

The analysis version the finding belongs to.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsFindingActionsrequired

Available actions to take on this finding

show properties (3)hide properties (3)
editActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

undoActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons 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_idstrpathrequired

Returns: ResultsResponse[FindingComment]

show properties (1)hide properties (1)
resultsarray of FindingComment
show properties (5)hide properties (5)
idstringrequired
created_atstringrequired
messagestringrequired
refsarray of InlineRef
show properties (6)hide properties (6)
idstringrequired
typestringrequired
sourcestringrequired
ref_indinteger
nameOptional[string]
is_staleboolean
userUserrequired
show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired

comment

POST /v1/findings/{finding_id}/comments

result = await client.findings.comment(
    finding_id=finding_id,
    message=message,
)

Arguments:

finding_idstrpathrequired
messagestrbodyrequired

Returns: FindingComment

show properties (5)hide properties (5)
idstringrequired
created_atstringrequired
messagestringrequired
refsarray of InlineRef
show properties (6)hide properties (6)
idstringrequired
typestringrequired
sourcestringrequired
ref_indinteger
nameOptional[string]
is_staleboolean
userUserrequired
show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired

On this page