run analysis pipeline
curl --request POST \
--url https://api.example.com/security/versions/{version_id}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scopes": [
"<string>"
]
}
'import requests
url = "https://api.example.com/security/versions/{version_id}/run"
payload = { "scopes": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scopes: ['<string>']})
};
fetch('https://api.example.com/security/versions/{version_id}/run', 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}/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scopes' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/security/versions/{version_id}/run"
payload := strings.NewReader("{\n \"scopes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/security/versions/{version_id}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/security/versions/{version_id}/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scopes\": [\n \"<string>\"\n ]\n}"
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
run analysis pipeline
queue the security pipeline for the entrypoints in scope on this version
POST
/
security
/
versions
/
{version_id}
/
run
run analysis pipeline
curl --request POST \
--url https://api.example.com/security/versions/{version_id}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scopes": [
"<string>"
]
}
'import requests
url = "https://api.example.com/security/versions/{version_id}/run"
payload = { "scopes": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scopes: ['<string>']})
};
fetch('https://api.example.com/security/versions/{version_id}/run', 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}/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scopes' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/security/versions/{version_id}/run"
payload := strings.NewReader("{\n \"scopes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/security/versions/{version_id}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/security/versions/{version_id}/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scopes\": [\n \"<string>\"\n ]\n}"
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
