Analysis versions
TypeScript SDK reference for the analysisVersions resource
Warning
The SDKs are in research preview. Their interfaces may change between minor versions until 1.0.
Access this resource from client.analysisVersions.
createChat
POST /v1/chats
Start a chat about a version.
const result = await client.analysisVersions.createChat(versionId);Arguments:
versionIdstringbodyrequiredReturns: Chat
show properties (7)hide properties (7)
idstringrequiredcreated_atstringrequiredcode_idstringrequiredversion_idstring | nullrequiredtitlestring | nullrequiredchat_typeChatTyperequiredtotal_messagesnumberrequiredget
GET /v1/analysis-versions/{version_id}
A version, with the analysis it belongs to.
const result = await client.analysisVersions.get(versionId);Arguments:
versionIdstringpathrequiredReturns: AnalysisVersion
show properties (17)hide properties (17)
idstringrequiredcreated_atstringrequiredtriggerAnalysisTriggerrequiredHow this version was created.
n_findingsnumberrequiredFindings on this version, including staged changes.
n_remediationsnumberrequiredFindings from the parent version dropped because their code changed.
is_headbooleanrequiredWhether this is the analysis's HEAD.
n_pipeline_processingnumberrequiredNumber of entrypoints currently being processed by Bevor internal pipeline.
n_pipeline_failednumberrequiredNumber of entrypoints that have failed the Bevor internal pipeline
n_pipeline_succeedednumberrequiredNumber of entrypoints that have successfully ran the Bevor internal pipeline
code_versionCodeVersionrequiredThe code this version analyzes.
show properties (8)hide properties (8)
idstringrequiredchain_idnumber | nullrequiredThe chain the contract is deployed on.
version_methodCodeVersionMethodrequiredHow the code was sourced.
version_fingerprintstringrequiredUniquely identifies this code.
statusCodeVersionStatusrequiredProcessing status of the code.
branchstring | nullrequiredcommitGithubCommit | nullrequiredshow properties (4)hide properties (4)
shastringrequiredauthorstringrequiredmessagestringrequiredtimestampstringrequiredrepositoryGithubRepository | nullrequiredshow properties (6)hide properties (6)
idnumberrequirednamestringrequiredis_privatebooleanrequiredaccountGithubAccountrequiredshow properties (4)hide properties (4)
idnumberrequiredloginstringrequiredtypestringrequiredavatar_urlstringrequiredfull_namestringrequiredFull repository name: owner/repo-name
urlstringrequiredGitHub repository URL
merged_from_versionAnalysisVersionRef | nullrequiredThe version merged into this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_from_versionAnalysisVersionRef | nullrequiredThe version this one was forked from.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredparent_versionAnalysisVersionRef | nullrequiredThe previous version in this analysis.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredchild_versionsAnalysisVersionRef[]requiredVersions built on this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredmerged_versionsAnalysisVersionRef[]requiredVersions this one was merged into.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_versionsAnalysisVersionRef[]requiredForks 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.
reasonsstring[]requiredreasons 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.
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.
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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
merge_toActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons 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.
reasonsstring[]requiredreasons 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
set_as_headActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
list
GET /v1/analysis-versions
Versions across the project.
const result = await client.analysisVersions.list();Arguments:
queryAnalysisVersionListParamsquerypagenumberpage_sizenumberanalysis_idstringuser_idstringis_ownerbooleanforked_from_version_idstringmerged_from_version_idstringparent_version_idstringtriggerAnalysisTriggercode_idstringorder"desc" | "asc"Return type by call:
withPagination: true→PaginatedResource<AnalysisVersion>withPagination: false→Pagination<AnalysisVersion>
show properties (6)hide properties (6)
resultsAnalysisVersion[]requiredshow properties (17)hide properties (17)
idstringrequiredcreated_atstringrequiredtriggerAnalysisTriggerrequiredHow this version was created.
n_findingsnumberrequiredFindings on this version, including staged changes.
n_remediationsnumberrequiredFindings from the parent version dropped because their code changed.
is_headbooleanrequiredWhether this is the analysis's HEAD.
n_pipeline_processingnumberrequiredNumber of entrypoints currently being processed by Bevor internal pipeline.
n_pipeline_failednumberrequiredNumber of entrypoints that have failed the Bevor internal pipeline
n_pipeline_succeedednumberrequiredNumber of entrypoints that have successfully ran the Bevor internal pipeline
code_versionCodeVersionrequiredThe code this version analyzes.
show properties (8)hide properties (8)
idstringrequiredchain_idnumber | nullrequiredThe chain the contract is deployed on.
version_methodCodeVersionMethodrequiredHow the code was sourced.
version_fingerprintstringrequiredUniquely identifies this code.
statusCodeVersionStatusrequiredProcessing status of the code.
branchstring | nullrequiredcommitGithubCommit | nullrequiredshow properties (4)hide properties (4)
shastringrequiredauthorstringrequiredmessagestringrequiredtimestampstringrequiredrepositoryGithubRepository | nullrequiredshow properties (6)hide properties (6)
idnumberrequirednamestringrequiredis_privatebooleanrequiredaccountGithubAccountrequiredshow properties (4)hide properties (4)
idnumberrequiredloginstringrequiredtypestringrequiredavatar_urlstringrequiredfull_namestringrequiredFull repository name: owner/repo-name
urlstringrequiredGitHub repository URL
merged_from_versionAnalysisVersionRef | nullrequiredThe version merged into this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_from_versionAnalysisVersionRef | nullrequiredThe version this one was forked from.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredparent_versionAnalysisVersionRef | nullrequiredThe previous version in this analysis.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredchild_versionsAnalysisVersionRef[]requiredVersions built on this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredmerged_versionsAnalysisVersionRef[]requiredVersions this one was merged into.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_versionsAnalysisVersionRef[]requiredForks 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.
reasonsstring[]requiredreasons 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.
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.
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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
merge_toActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons 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.
reasonsstring[]requiredreasons 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
set_as_headActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
pagenumberrequiredpage_sizenumberrequiredmorebooleanrequiredWhether more pages follow.
total_observationsnumberrequiredTotal results across all pages.
total_pagesnumberrequireddelete
DELETE /v1/analysis-versions/{version_id}
Delete a version.
const result = await client.analysisVersions.delete(versionId);Arguments:
versionIdstringpathrequiredReturns: 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_findingsnumberrequiredFindings on this version, including staged changes.
n_remediationsnumberrequiredFindings from the parent version dropped because their code changed.
is_headbooleanrequiredWhether this is the analysis's HEAD.
n_pipeline_processingnumberrequiredNumber of entrypoints currently being processed by Bevor internal pipeline.
n_pipeline_failednumberrequiredNumber of entrypoints that have failed the Bevor internal pipeline
n_pipeline_succeedednumberrequiredNumber of entrypoints that have successfully ran the Bevor internal pipeline
code_versionCodeVersionrequiredThe code this version analyzes.
show properties (8)hide properties (8)
idstringrequiredchain_idnumber | nullrequiredThe chain the contract is deployed on.
version_methodCodeVersionMethodrequiredHow the code was sourced.
version_fingerprintstringrequiredUniquely identifies this code.
statusCodeVersionStatusrequiredProcessing status of the code.
branchstring | nullrequiredcommitGithubCommit | nullrequiredshow properties (4)hide properties (4)
shastringrequiredauthorstringrequiredmessagestringrequiredtimestampstringrequiredrepositoryGithubRepository | nullrequiredshow properties (6)hide properties (6)
idnumberrequirednamestringrequiredis_privatebooleanrequiredaccountGithubAccountrequiredshow properties (4)hide properties (4)
idnumberrequiredloginstringrequiredtypestringrequiredavatar_urlstringrequiredfull_namestringrequiredFull repository name: owner/repo-name
urlstringrequiredGitHub repository URL
merged_from_versionAnalysisVersionRef | nullrequiredThe version merged into this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_from_versionAnalysisVersionRef | nullrequiredThe version this one was forked from.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredparent_versionAnalysisVersionRef | nullrequiredThe previous version in this analysis.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredchild_versionsAnalysisVersionRef[]requiredVersions built on this one.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredmerged_versionsAnalysisVersionRef[]requiredVersions this one was merged into.
show properties (2)hide properties (2)
idstringrequiredanalysis_idstringrequiredforked_versionsAnalysisVersionRef[]requiredForks 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.
reasonsstring[]requiredreasons 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.
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.
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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
merge_toActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons 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.
reasonsstring[]requiredreasons 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.
reasonsstring[]requiredreasons why action is not allowed, if applicable.
set_as_headActionDetailsrequiredshow properties (2)hide properties (2)
is_allowedbooleanrequiredWhether the caller can perform the action.
reasonsstring[]requiredreasons why action is not allowed, if applicable.

