edit finding
curl --request PATCH \
--url https://api.example.com/security/findings/{finding_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"name": "<string>",
"explanation": "<string>",
"recommendation": "<string>",
"reference": "<string>",
"source": "<string>"
}
'import requests
url = "https://api.example.com/security/findings/{finding_id}"
payload = {
"type": "<string>",
"name": "<string>",
"explanation": "<string>",
"recommendation": "<string>",
"reference": "<string>",
"source": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
name: '<string>',
explanation: '<string>',
recommendation: '<string>',
reference: '<string>',
source: '<string>'
})
};
fetch('https://api.example.com/security/findings/{finding_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/findings/{finding_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'name' => '<string>',
'explanation' => '<string>',
'recommendation' => '<string>',
'reference' => '<string>',
'source' => '<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/findings/{finding_id}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"explanation\": \"<string>\",\n \"recommendation\": \"<string>\",\n \"reference\": \"<string>\",\n \"source\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/security/findings/{finding_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"explanation\": \"<string>\",\n \"recommendation\": \"<string>\",\n \"reference\": \"<string>\",\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/security/findings/{finding_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"explanation\": \"<string>\",\n \"recommendation\": \"<string>\",\n \"reference\": \"<string>\",\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"version": {
"id": "<string>",
"analysis_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"origin_finding_id": "<string>",
"is_acknowledged": true,
"type": "<string>",
"level": "critical",
"name": "<string>",
"explanation": "<string>",
"source": "<string>",
"id": "<string>",
"node_id": "<string>",
"is_borrowed": true,
"created_by_user": {
"id": "<string>",
"is_self": true,
"created_at": "2023-11-07T05:31:56Z",
"username": "<string>"
},
"project_id": "<string>",
"project_slug": "<string>",
"code_version_id": "<string>",
"actions": {
"can_edit": true,
"can_revert": true,
"can_delete": true
},
"recommendation": "<string>",
"reference": "<string>",
"location_id": "<string>",
"operation": "add"
}{
"code": "auth.session_expired",
"message": "<string>"
}finding
edit finding
stage an edit to a finding. Changes are not applied until the version is committed.
PATCH
/
security
/
findings
/
{finding_id}
edit finding
curl --request PATCH \
--url https://api.example.com/security/findings/{finding_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"name": "<string>",
"explanation": "<string>",
"recommendation": "<string>",
"reference": "<string>",
"source": "<string>"
}
'import requests
url = "https://api.example.com/security/findings/{finding_id}"
payload = {
"type": "<string>",
"name": "<string>",
"explanation": "<string>",
"recommendation": "<string>",
"reference": "<string>",
"source": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
name: '<string>',
explanation: '<string>',
recommendation: '<string>',
reference: '<string>',
source: '<string>'
})
};
fetch('https://api.example.com/security/findings/{finding_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/findings/{finding_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'name' => '<string>',
'explanation' => '<string>',
'recommendation' => '<string>',
'reference' => '<string>',
'source' => '<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/findings/{finding_id}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"explanation\": \"<string>\",\n \"recommendation\": \"<string>\",\n \"reference\": \"<string>\",\n \"source\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/security/findings/{finding_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"explanation\": \"<string>\",\n \"recommendation\": \"<string>\",\n \"reference\": \"<string>\",\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/security/findings/{finding_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"explanation\": \"<string>\",\n \"recommendation\": \"<string>\",\n \"reference\": \"<string>\",\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"version": {
"id": "<string>",
"analysis_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"origin_finding_id": "<string>",
"is_acknowledged": true,
"type": "<string>",
"level": "critical",
"name": "<string>",
"explanation": "<string>",
"source": "<string>",
"id": "<string>",
"node_id": "<string>",
"is_borrowed": true,
"created_by_user": {
"id": "<string>",
"is_self": true,
"created_at": "2023-11-07T05:31:56Z",
"username": "<string>"
},
"project_id": "<string>",
"project_slug": "<string>",
"code_version_id": "<string>",
"actions": {
"can_edit": true,
"can_revert": true,
"can_delete": true
},
"recommendation": "<string>",
"reference": "<string>",
"location_id": "<string>",
"operation": "add"
}{
"code": "auth.session_expired",
"message": "<string>"
}Authorizations
API key in Bearer token format
Path Parameters
Body
application/json
Response
Successful Response
Show child attributes
Show child attributes
Available options:
critical, high, medium, low Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
add, update, delete ⌘I
