Analysis versions
Python SDK reference for the analysis_versions resource
Warning
The SDKs are in research preview. Their interfaces may change between minor versions until 1.0.
Access this resource from client.analysis_versions. Both async and sync clients expose the same methods.
create_chat
POST /v1/chats
Start a chat about a version.
result = await client.analysis_versions.create_chat(
version_id=version_id,
)Arguments:
version_idstrbodyrequiredReturns: Chat
show properties (7)hide properties (7)
idstringrequiredcreated_atstringrequiredcode_idstringrequiredversion_idOptional[string]titleOptional[string]chat_typeChatTyperequiredtotal_messagesintegerrequiredget
GET /v1/analysis-versions/{version_id}
A version, with the analysis it belongs to.
result = await client.analysis_versions.get(
version_id=version_id,
)Arguments:
version_idstrpathrequiredReturns: AnalysisVersionDirect
show properties (18)hide properties (18)
idstringrequiredcreated_atstringrequiredtriggerAnalysisTriggerrequiredHow this version was created.
n_findingsintegerrequiredFindings on this version, including staged changes.
n_remediationsintegerrequiredFindings from the parent version dropped because their code changed.
is_headbooleanrequiredWhether this is the analysis's HEAD.
n_pipeline_processingintegerrequiredNumber of entrypoints currently being processed by Bevor internal pipeline.
n_pipeline_failedintegerrequiredNumber of entrypoints that have failed the Bevor internal pipeline
n_pipeline_succeededintegerrequiredNumber of entrypoints that have successfully ran the Bevor internal pipeline
code_versionCodeVersionrequiredThe code this version analyzes.
show properties (8)hide properties (8)
idstringrequiredchain_idOptional[integer]The chain the contract is deployed on.
version_methodCodeVersionMethodrequiredHow the code was sourced.
version_fingerprintstringrequiredUniquely identifies this code.
statusCodeVersionStatusrequiredProcessing status of the code.
branchOptional[string]commitOptional[GithubCommit]show properties (4)hide properties (4)
shastringrequiredauthorstringrequiredmessagestringrequiredtimestampstringrequiredrepositoryOptional[GithubRepository]show properties (4)hide properties (4)
idintegerrequirednamestringrequiredis_privatebooleanrequiredaccountGithubAccountrequiredshow properties (4)hide properties (4)
idintegerrequiredloginstringrequiredtypestringrequiredavatar_urlstringrequiredmerged_from_versionOptional[AnalysisVersionRef]The version merged into this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_from_versionOptional[AnalysisVersionRef]The version this one was forked from.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredparent_versionOptional[AnalysisVersionRef]The previous version in this analysis.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredchild_versionsarray of AnalysisVersionRefVersions built on this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredmerged_versionsarray of AnalysisVersionRefVersions this one was merged into.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_versionsarray of AnalysisVersionRefForks of this version.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsAnalysisActionsrequiredshow properties (8)hide properties (8)
forkActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
create_childActionDetailsrequiredAdd a version for new code on top of this one.
show 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.
run_pipelineActionDetailsrequiredRun Bevor internal pipeline. Can be used to retry failures as well.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
merge_toActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
merge_fromActionDetailsrequiredAdd, edit, or delete findings.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
alter_findingsActionDetailsrequiredEdit, add, delete findings.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
set_as_headActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
analysis_metaAnalysisMetadatarequiredThe analysis this version belongs to.
show properties (5)hide properties (5)
idstringrequirednamestringrequiredcreated_atstringrequireduserUserrequiredThe analysis owner.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredis_ownerbooleanrequiredWhether the caller owns this analysis.
list
GET /v1/analysis-versions
Versions across the project.
result = await client.analysis_versions.list()Arguments:
paramsAnalysisVersionListParams | NonequeryNonepageintegerpage_sizeintegeranalysis_idstringuser_idstringis_ownerbooleanforked_from_version_idstringmerged_from_version_idstringparent_version_idstringtriggerAnalysisTriggercode_idstringorder'desc' | 'asc'with_paginationboolqueryFalseReturn type by call:
with_pagination=True→PaginatedResource[AnalysisVersionDirect]with_pagination=False→Pagination[AnalysisVersionDirect]
show properties (6)hide properties (6)
resultsarray of AnalysisVersionDirectshow properties (18)hide properties (18)
idstringrequiredcreated_atstringrequiredtriggerAnalysisTriggerrequiredHow this version was created.
n_findingsintegerrequiredFindings on this version, including staged changes.
n_remediationsintegerrequiredFindings from the parent version dropped because their code changed.
is_headbooleanrequiredWhether this is the analysis's HEAD.
n_pipeline_processingintegerrequiredNumber of entrypoints currently being processed by Bevor internal pipeline.
n_pipeline_failedintegerrequiredNumber of entrypoints that have failed the Bevor internal pipeline
n_pipeline_succeededintegerrequiredNumber of entrypoints that have successfully ran the Bevor internal pipeline
code_versionCodeVersionrequiredThe code this version analyzes.
show properties (8)hide properties (8)
idstringrequiredchain_idOptional[integer]The chain the contract is deployed on.
version_methodCodeVersionMethodrequiredHow the code was sourced.
version_fingerprintstringrequiredUniquely identifies this code.
statusCodeVersionStatusrequiredProcessing status of the code.
branchOptional[string]commitOptional[GithubCommit]show properties (4)hide properties (4)
shastringrequiredauthorstringrequiredmessagestringrequiredtimestampstringrequiredrepositoryOptional[GithubRepository]show properties (4)hide properties (4)
idintegerrequirednamestringrequiredis_privatebooleanrequiredaccountGithubAccountrequiredshow properties (4)hide properties (4)
idintegerrequiredloginstringrequiredtypestringrequiredavatar_urlstringrequiredmerged_from_versionOptional[AnalysisVersionRef]The version merged into this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_from_versionOptional[AnalysisVersionRef]The version this one was forked from.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredparent_versionOptional[AnalysisVersionRef]The previous version in this analysis.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredchild_versionsarray of AnalysisVersionRefVersions built on this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredmerged_versionsarray of AnalysisVersionRefVersions this one was merged into.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_versionsarray of AnalysisVersionRefForks of this version.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsAnalysisActionsrequiredshow properties (8)hide properties (8)
forkActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
create_childActionDetailsrequiredAdd a version for new code on top of this one.
show 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.
run_pipelineActionDetailsrequiredRun Bevor internal pipeline. Can be used to retry failures as well.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
merge_toActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
merge_fromActionDetailsrequiredAdd, edit, or delete findings.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
alter_findingsActionDetailsrequiredEdit, add, delete findings.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
set_as_headActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
analysis_metaAnalysisMetadatarequiredThe analysis this version belongs to.
show properties (5)hide properties (5)
idstringrequirednamestringrequiredcreated_atstringrequireduserUserrequiredThe analysis owner.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredis_ownerbooleanrequiredWhether the caller owns this analysis.
pageintegerrequiredpage_sizeintegerrequiredmorebooleanrequiredWhether more pages follow.
total_observationsintegerrequiredTotal results across all pages.
total_pagesintegerrequireddelete
DELETE /v1/analysis-versions/{version_id}
Delete a version.
result = await client.analysis_versions.delete(
version_id=version_id,
)Arguments:
version_idstrpathrequiredReturns: Analysis
show properties (6)hide properties (6)
idstringrequirednamestringrequiredcreated_atstringrequireduserUserrequiredThe analysis owner.
show properties (4)hide properties (4)
idstringrequiredis_selfbooleanrequiredcreated_atstringrequiredusernamestringrequiredis_ownerbooleanrequiredWhether the caller owns this analysis.
versionAnalysisVersionrequiredThe requested version, HEAD by default.
show properties (17)hide properties (17)
idstringrequiredcreated_atstringrequiredtriggerAnalysisTriggerrequiredHow this version was created.
n_findingsintegerrequiredFindings on this version, including staged changes.
n_remediationsintegerrequiredFindings from the parent version dropped because their code changed.
is_headbooleanrequiredWhether this is the analysis's HEAD.
n_pipeline_processingintegerrequiredNumber of entrypoints currently being processed by Bevor internal pipeline.
n_pipeline_failedintegerrequiredNumber of entrypoints that have failed the Bevor internal pipeline
n_pipeline_succeededintegerrequiredNumber of entrypoints that have successfully ran the Bevor internal pipeline
code_versionCodeVersionrequiredThe code this version analyzes.
show properties (8)hide properties (8)
idstringrequiredchain_idOptional[integer]The chain the contract is deployed on.
version_methodCodeVersionMethodrequiredHow the code was sourced.
version_fingerprintstringrequiredUniquely identifies this code.
statusCodeVersionStatusrequiredProcessing status of the code.
branchOptional[string]commitOptional[GithubCommit]show properties (4)hide properties (4)
shastringrequiredauthorstringrequiredmessagestringrequiredtimestampstringrequiredrepositoryOptional[GithubRepository]show properties (4)hide properties (4)
idintegerrequirednamestringrequiredis_privatebooleanrequiredaccountGithubAccountrequiredshow properties (4)hide properties (4)
idintegerrequiredloginstringrequiredtypestringrequiredavatar_urlstringrequiredmerged_from_versionOptional[AnalysisVersionRef]The version merged into this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_from_versionOptional[AnalysisVersionRef]The version this one was forked from.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredparent_versionOptional[AnalysisVersionRef]The previous version in this analysis.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredchild_versionsarray of AnalysisVersionRefVersions built on this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredmerged_versionsarray of AnalysisVersionRefVersions this one was merged into.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_versionsarray of AnalysisVersionRefForks of this version.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredactionsAnalysisActionsrequiredshow properties (8)hide properties (8)
forkActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
create_childActionDetailsrequiredAdd a version for new code on top of this one.
show 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.
run_pipelineActionDetailsrequiredRun Bevor internal pipeline. Can be used to retry failures as well.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
merge_toActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
merge_fromActionDetailsrequiredAdd, edit, or delete findings.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
alter_findingsActionDetailsrequiredEdit, add, delete findings.
show properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.
set_as_headActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsarray of stringreasons why action is not allowed, if applicable.

