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:

versionIdstringbodyrequired

Returns: Chat

show properties (7)hide properties (7)
idstringrequired
created_atstringrequired
code_idstringrequired
version_idstring | nullrequired
titlestring | nullrequired
chat_typeChatTyperequired
total_messagesnumberrequired

get

GET /v1/analysis-versions/{version_id}

A version, with the analysis it belongs to.

const result = await client.analysisVersions.get(versionId);

Arguments:

versionIdstringpathrequired

Returns: AnalysisVersion

show properties (17)hide properties (17)
idstringrequired
created_atstringrequired
triggerAnalysisTriggerrequired

How this version was created.

n_findingsnumberrequired

Findings on this version, including staged changes.

n_remediationsnumberrequired

Findings from the parent version dropped because their code changed.

is_headbooleanrequired

Whether this is the analysis's HEAD.

n_pipeline_processingnumberrequired

Number of entrypoints currently being processed by Bevor internal pipeline.

n_pipeline_failednumberrequired

Number of entrypoints that have failed the Bevor internal pipeline

n_pipeline_succeedednumberrequired

Number of entrypoints that have successfully ran the Bevor internal pipeline

code_versionCodeVersionrequired

The code this version analyzes.

show properties (8)hide properties (8)
idstringrequired
chain_idnumber | nullrequired

The chain the contract is deployed on.

version_methodCodeVersionMethodrequired

How the code was sourced.

version_fingerprintstringrequired

Uniquely identifies this code.

statusCodeVersionStatusrequired

Processing status of the code.

branchstring | nullrequired
commitGithubCommit | nullrequired
show properties (4)hide properties (4)
shastringrequired
authorstringrequired
messagestringrequired
timestampstringrequired
repositoryGithubRepository | nullrequired
show properties (6)hide properties (6)
idnumberrequired
namestringrequired
is_privatebooleanrequired
accountGithubAccountrequired
show properties (4)hide properties (4)
idnumberrequired
loginstringrequired
typestringrequired
avatar_urlstringrequired
full_namestringrequired

Full repository name: owner/repo-name

urlstringrequired

GitHub repository URL

merged_from_versionAnalysisVersionRef | nullrequired

The version merged into this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_from_versionAnalysisVersionRef | nullrequired

The version this one was forked from.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
parent_versionAnalysisVersionRef | nullrequired

The previous version in this analysis.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
child_versionsAnalysisVersionRef[]required

Versions built on this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
merged_versionsAnalysisVersionRef[]required

Versions this one was merged into.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_versionsAnalysisVersionRef[]required

Forks of this version.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsAnalysisActionsrequired
show properties (8)hide properties (8)
forkActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

create_childActionDetailsrequired

Add a version for new code on top of this one.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

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

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

run_pipelineActionDetailsrequired

Run Bevor internal pipeline. Can be used to retry failures as well.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

merge_toActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

merge_fromActionDetailsrequired

Add, edit, or delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

alter_findingsActionDetailsrequired

Edit, add, delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

set_as_headActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

list

GET /v1/analysis-versions

Versions across the project.

const result = await client.analysisVersions.list();

Arguments:

queryAnalysisVersionListParamsquery
pagenumber
page_sizenumber
analysis_idstring
user_idstring
is_ownerboolean
forked_from_version_idstring
merged_from_version_idstring
parent_version_idstring
triggerAnalysisTrigger
code_idstring
order"desc" | "asc"

Return type by call:

  • withPagination: true → PaginatedResource<AnalysisVersion>
  • withPagination: false → Pagination<AnalysisVersion>
show properties (6)hide properties (6)
resultsAnalysisVersion[]required
show properties (17)hide properties (17)
idstringrequired
created_atstringrequired
triggerAnalysisTriggerrequired

How this version was created.

n_findingsnumberrequired

Findings on this version, including staged changes.

n_remediationsnumberrequired

Findings from the parent version dropped because their code changed.

is_headbooleanrequired

Whether this is the analysis's HEAD.

n_pipeline_processingnumberrequired

Number of entrypoints currently being processed by Bevor internal pipeline.

n_pipeline_failednumberrequired

Number of entrypoints that have failed the Bevor internal pipeline

n_pipeline_succeedednumberrequired

Number of entrypoints that have successfully ran the Bevor internal pipeline

code_versionCodeVersionrequired

The code this version analyzes.

show properties (8)hide properties (8)
idstringrequired
chain_idnumber | nullrequired

The chain the contract is deployed on.

version_methodCodeVersionMethodrequired

How the code was sourced.

version_fingerprintstringrequired

Uniquely identifies this code.

statusCodeVersionStatusrequired

Processing status of the code.

branchstring | nullrequired
commitGithubCommit | nullrequired
show properties (4)hide properties (4)
shastringrequired
authorstringrequired
messagestringrequired
timestampstringrequired
repositoryGithubRepository | nullrequired
show properties (6)hide properties (6)
idnumberrequired
namestringrequired
is_privatebooleanrequired
accountGithubAccountrequired
show properties (4)hide properties (4)
idnumberrequired
loginstringrequired
typestringrequired
avatar_urlstringrequired
full_namestringrequired

Full repository name: owner/repo-name

urlstringrequired

GitHub repository URL

merged_from_versionAnalysisVersionRef | nullrequired

The version merged into this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_from_versionAnalysisVersionRef | nullrequired

The version this one was forked from.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
parent_versionAnalysisVersionRef | nullrequired

The previous version in this analysis.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
child_versionsAnalysisVersionRef[]required

Versions built on this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
merged_versionsAnalysisVersionRef[]required

Versions this one was merged into.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_versionsAnalysisVersionRef[]required

Forks of this version.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsAnalysisActionsrequired
show properties (8)hide properties (8)
forkActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

create_childActionDetailsrequired

Add a version for new code on top of this one.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

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

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

run_pipelineActionDetailsrequired

Run Bevor internal pipeline. Can be used to retry failures as well.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

merge_toActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

merge_fromActionDetailsrequired

Add, edit, or delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

alter_findingsActionDetailsrequired

Edit, add, delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

set_as_headActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

pagenumberrequired
page_sizenumberrequired
morebooleanrequired

Whether more pages follow.

total_observationsnumberrequired

Total results across all pages.

total_pagesnumberrequired

delete

DELETE /v1/analysis-versions/{version_id}

Delete a version.

const result = await client.analysisVersions.delete(versionId);

Arguments:

versionIdstringpathrequired

Returns: Analysis

show properties (6)hide properties (6)
idstringrequired
namestringrequired
created_atstringrequired
userUserrequired

The analysis owner.

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

Whether the caller owns this analysis.

versionAnalysisVersionrequired

The requested version, HEAD by default.

show properties (17)hide properties (17)
idstringrequired
created_atstringrequired
triggerAnalysisTriggerrequired

How this version was created.

n_findingsnumberrequired

Findings on this version, including staged changes.

n_remediationsnumberrequired

Findings from the parent version dropped because their code changed.

is_headbooleanrequired

Whether this is the analysis's HEAD.

n_pipeline_processingnumberrequired

Number of entrypoints currently being processed by Bevor internal pipeline.

n_pipeline_failednumberrequired

Number of entrypoints that have failed the Bevor internal pipeline

n_pipeline_succeedednumberrequired

Number of entrypoints that have successfully ran the Bevor internal pipeline

code_versionCodeVersionrequired

The code this version analyzes.

show properties (8)hide properties (8)
idstringrequired
chain_idnumber | nullrequired

The chain the contract is deployed on.

version_methodCodeVersionMethodrequired

How the code was sourced.

version_fingerprintstringrequired

Uniquely identifies this code.

statusCodeVersionStatusrequired

Processing status of the code.

branchstring | nullrequired
commitGithubCommit | nullrequired
show properties (4)hide properties (4)
shastringrequired
authorstringrequired
messagestringrequired
timestampstringrequired
repositoryGithubRepository | nullrequired
show properties (6)hide properties (6)
idnumberrequired
namestringrequired
is_privatebooleanrequired
accountGithubAccountrequired
show properties (4)hide properties (4)
idnumberrequired
loginstringrequired
typestringrequired
avatar_urlstringrequired
full_namestringrequired

Full repository name: owner/repo-name

urlstringrequired

GitHub repository URL

merged_from_versionAnalysisVersionRef | nullrequired

The version merged into this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_from_versionAnalysisVersionRef | nullrequired

The version this one was forked from.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
parent_versionAnalysisVersionRef | nullrequired

The previous version in this analysis.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
child_versionsAnalysisVersionRef[]required

Versions built on this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
merged_versionsAnalysisVersionRef[]required

Versions this one was merged into.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_versionsAnalysisVersionRef[]required

Forks of this version.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsAnalysisActionsrequired
show properties (8)hide properties (8)
forkActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

create_childActionDetailsrequired

Add a version for new code on top of this one.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

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

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

run_pipelineActionDetailsrequired

Run Bevor internal pipeline. Can be used to retry failures as well.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

merge_toActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

merge_fromActionDetailsrequired

Add, edit, or delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

alter_findingsActionDetailsrequired

Edit, add, delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

set_as_headActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsstring[]required

reasons why action is not allowed, if applicable.

On this page