Findings
TypeScript 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.
list
GET /v1/findings
Findings across the project.
const result = await client.findings.list();Arguments:
queryFindingListParamsquerypagenumberpage_sizenumberorder_by"created_at" | "updated_at" | "level"order"desc" | "asc"user_idstringis_selfbooleancode_idstringanalysis_idsstring[]toolstringtypestringlevelFindingLevelis_acknowledgedbooleancreated_by_user_idstringcreated_by_selfbooleaninclude_deletedbooleanReturn type by call:
withPagination: true→PaginatedResource<Finding>withPagination: false→Pagination<Finding>
show properties (6)hide properties (6)
resultsFinding[]requiredshow 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.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationstring | nullrequiredpocstring | nullrequiredtoolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idstring | nullrequiredThe 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
last_event_kindFindingEventKind | nullrequiredpagenumberrequiredpage_sizenumberrequiredmorebooleanrequiredWhether more pages follow.
total_observationsnumberrequiredTotal results across all pages.
total_pagesnumberrequiredget
GET /v1/findings/{finding_id}
const result = await client.findings.get(findingId);Arguments:
findingIdstringpathrequiredReturns: 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.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationstring | nullrequiredpocstring | nullrequiredtoolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idstring | nullrequiredThe 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
last_event_kindFindingEventKind | nullrequirededitMetadata
PATCH /v1/findings/{finding_id}
Edit the metadata of a finding.
const result = await client.findings.editMetadata(findingId, body);Arguments:
findingIdstringpathrequiredbodyFindingEditBodybodyrequiredtypestringlevelFindingLevelnamestringexplanationstringrecommendationstring | nullpocstring | nulltoolstringReturns: 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.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationstring | nullrequiredpocstring | nullrequiredtoolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idstring | nullrequiredThe 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
last_event_kindFindingEventKind | nullrequireddelete
DELETE /v1/findings/{finding_id}
Delete a finding.
const result = await client.findings.delete(findingId);Arguments:
findingIdstringpathrequiredReturns: 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.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationstring | nullrequiredpocstring | nullrequiredtoolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idstring | nullrequiredThe 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
last_event_kindFindingEventKind | nullrequiredundo
POST /v1/findings/{finding_id}/undo
Undo the most recent change to a finding.
const result = await client.findings.undo(findingId);Arguments:
findingIdstringpathrequiredReturns: ExistsResponse<Finding>
show properties (2)hide properties (2)
existsbooleanrequireddataFinding | nullrequiredshow 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.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationstring | nullrequiredpocstring | nullrequiredtoolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idstring | nullrequiredThe 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
last_event_kindFindingEventKind | nullrequiredtoggleAcknowledgement
PATCH /v1/findings/{finding_id}/status
Toggle whether a finding is acknowledged.
const result = await client.findings.toggleAcknowledgement(findingId);Arguments:
findingIdstringpathrequiredReturns: 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.
typestringrequiredlevelFindingLevelrequirednamestringrequiredexplanationstringrequiredrecommendationstring | nullrequiredpocstring | nullrequiredtoolstringrequiredWhat produced the finding.
node_idstringrequiredThe code graph node the finding is on.
is_borrowedbooleanrequiredWhether the finding was carried over from an earlier version.
location_idstring | nullrequiredThe 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
undoActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
deleteActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
last_event_kindFindingEventKind | nullrequiredcomments
GET /v1/findings/{finding_id}/comments
const result = await client.findings.comments(findingId);Arguments:
findingIdstringpathrequiredReturns: ResultsResponse<FindingComment>
show properties (1)hide properties (1)
resultsFindingComment[]requiredshow properties (5)hide properties (5)
idstringrequiredcreated_atstringrequiredmessagestringrequiredrefsInlineRef[]requiredshow properties (6)hide properties (6)
idstringrequiredtypestringrequiredsourcestringrequiredref_indnumberrequirednamestring | nullrequiredis_stalebooleanrequireduserUserrequiredshow properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredcomment
POST /v1/findings/{finding_id}/comments
const result = await client.findings.comment(findingId, message);Arguments:
findingIdstringpathrequiredmessagestringbodyrequiredReturns: FindingComment
show properties (5)hide properties (5)
idstringrequiredcreated_atstringrequiredmessagestringrequiredrefsInlineRef[]requiredshow properties (6)hide properties (6)
idstringrequiredtypestringrequiredsourcestringrequiredref_indnumberrequirednamestring | nullrequiredis_stalebooleanrequireduserUserrequiredshow properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredScoped access
client.findings.with(findingId) returns these methods with findingId already bound.

