get analysis version
curl --request GET \
--url https://api.example.com/security/versions/{version_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/security/versions/{version_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/security/versions/{version_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/security/versions/{version_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/security/versions/{version_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/security/versions/{version_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/security/versions/{version_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"trigger": "create",
"n_findings": 123,
"n_remediations": 123,
"is_head": true,
"is_leaf": true,
"is_root": true,
"has_pipeline_processing": true,
"has_pipeline_failed": true,
"analysis_meta": {
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"user": {
"id": "<string>",
"is_self": true,
"created_at": "2023-11-07T05:31:56Z",
"username": "<string>"
},
"project_id": "<string>",
"project_name": "<string>",
"project_slug": "<string>",
"is_owner": true
},
"code_version": {
"id": "<string>",
"version_method": "tag",
"version_fingerprint": "<string>",
"status": "waiting",
"network": "eth",
"name": "<string>",
"branch": "<string>",
"commit": {
"sha": "<string>",
"author": "<string>",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"repository": {
"id": 123,
"name": "<string>",
"is_private": true,
"account": {
"id": 123,
"login": "<string>",
"type": "<string>",
"avatar_url": "<string>"
}
}
},
"actions": {
"can_fork": true,
"can_create_child": true,
"can_commit_changes": true,
"can_delete": true,
"can_run_pipeline": true,
"can_retry_pipeline": true,
"can_merge_to": true,
"can_merge_from": true,
"can_stage_changes": true,
"can_set_as_head": true
},
"merged_from_version": {
"id": "<string>",
"analysis_id": "<string>"
},
"forked_from_version": {
"id": "<string>",
"analysis_id": "<string>"
},
"parent_version": {
"id": "<string>",
"analysis_id": "<string>"
},
"child_versions": [
{
"id": "<string>",
"analysis_id": "<string>"
}
],
"merged_versions": [
{
"id": "<string>",
"analysis_id": "<string>"
}
],
"forked_versions": [
{
"id": "<string>",
"analysis_id": "<string>"
}
]
}{
"code": "auth.session_expired",
"message": "<string>"
}analysis version
get analysis version
retrieve a specific analysis version by ID
GET
/
security
/
versions
/
{version_id}
get analysis version
curl --request GET \
--url https://api.example.com/security/versions/{version_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/security/versions/{version_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/security/versions/{version_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/security/versions/{version_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/security/versions/{version_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/security/versions/{version_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/security/versions/{version_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"trigger": "create",
"n_findings": 123,
"n_remediations": 123,
"is_head": true,
"is_leaf": true,
"is_root": true,
"has_pipeline_processing": true,
"has_pipeline_failed": true,
"analysis_meta": {
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"user": {
"id": "<string>",
"is_self": true,
"created_at": "2023-11-07T05:31:56Z",
"username": "<string>"
},
"project_id": "<string>",
"project_name": "<string>",
"project_slug": "<string>",
"is_owner": true
},
"code_version": {
"id": "<string>",
"version_method": "tag",
"version_fingerprint": "<string>",
"status": "waiting",
"network": "eth",
"name": "<string>",
"branch": "<string>",
"commit": {
"sha": "<string>",
"author": "<string>",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"repository": {
"id": 123,
"name": "<string>",
"is_private": true,
"account": {
"id": 123,
"login": "<string>",
"type": "<string>",
"avatar_url": "<string>"
}
}
},
"actions": {
"can_fork": true,
"can_create_child": true,
"can_commit_changes": true,
"can_delete": true,
"can_run_pipeline": true,
"can_retry_pipeline": true,
"can_merge_to": true,
"can_merge_from": true,
"can_stage_changes": true,
"can_set_as_head": true
},
"merged_from_version": {
"id": "<string>",
"analysis_id": "<string>"
},
"forked_from_version": {
"id": "<string>",
"analysis_id": "<string>"
},
"parent_version": {
"id": "<string>",
"analysis_id": "<string>"
},
"child_versions": [
{
"id": "<string>",
"analysis_id": "<string>"
}
],
"merged_versions": [
{
"id": "<string>",
"analysis_id": "<string>"
}
],
"forked_versions": [
{
"id": "<string>",
"analysis_id": "<string>"
}
]
}{
"code": "auth.session_expired",
"message": "<string>"
}Authorizations
API key in Bearer token format
Path Parameters
Response
Successful Response
Available options:
create, commit, fork, merge, push Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
