curl --request PATCH \
--url https://www.corgea.app/api/v1/detections/{issue_id} \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>",
"expiry_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://www.corgea.app/api/v1/detections/{issue_id}"
payload = {
"comment": "<string>",
"expiry_date": "2023-11-07T05:31:56Z"
}
headers = {
"CORGEA-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'CORGEA-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: '<string>', expiry_date: '2023-11-07T05:31:56Z'})
};
fetch('https://www.corgea.app/api/v1/detections/{issue_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://www.corgea.app/api/v1/detections/{issue_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([
'comment' => '<string>',
'expiry_date' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"CORGEA-TOKEN: <api-key>",
"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://www.corgea.app/api/v1/detections/{issue_id}"
payload := strings.NewReader("{\n \"comment\": \"<string>\",\n \"expiry_date\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("CORGEA-TOKEN", "<api-key>")
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://www.corgea.app/api/v1/detections/{issue_id}")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"<string>\",\n \"expiry_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/detections/{issue_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["CORGEA-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"<string>\",\n \"expiry_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"action": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "preview",
"source": "api",
"target_status": "<string>",
"justification": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z",
"rule": {},
"source_metadata": {},
"requires_approval": true,
"requested_by": 123,
"approved_by": 123,
"rejected_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"reviewed_at": "2023-11-07T05:31:56Z",
"applied_at": "2023-11-07T05:31:56Z",
"counts": {
"matched": 123,
"unmatched": 123,
"ambiguous": 123,
"applied": 123,
"conflicts": 123
}
},
"issue": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"status_comment": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z"
}
}{
"status": "ok",
"action": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "preview",
"source": "api",
"target_status": "<string>",
"justification": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z",
"rule": {},
"source_metadata": {},
"requires_approval": true,
"requested_by": 123,
"approved_by": 123,
"rejected_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"reviewed_at": "2023-11-07T05:31:56Z",
"applied_at": "2023-11-07T05:31:56Z",
"counts": {
"matched": 123,
"unmatched": 123,
"ambiguous": 123,
"applied": 123,
"conflicts": 123
}
},
"issue": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"status_comment": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z"
}
}{
"error": "Missing or invalid authorization header"
}{
"error": "Permission denied"
}{
"error": "Policy not found"
}Update detection status
Changes one accessible SAST detection. Requires heeler.view_issue and heeler.change_issue_status. Supply status and a non-empty comment. False-positive and accepted-risk comments must explain the decision; other statuses, including reopening, are exempt from justification review but still require a comment. When company settings require approval, false_positive, duplicate, or accepted_risk decisions return 202 and leave the detection unchanged until approval. The False positive setting also covers duplicate. Requesters with permission to approve triage requests bypass this requirement. Bulk count and severity thresholds do not apply. Unknown fields are rejected.
Also served at /api/v1/issue/{issue_id}, this endpoint’s earlier name, which stays supported with the same parameters and response.
curl --request PATCH \
--url https://www.corgea.app/api/v1/detections/{issue_id} \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>",
"expiry_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://www.corgea.app/api/v1/detections/{issue_id}"
payload = {
"comment": "<string>",
"expiry_date": "2023-11-07T05:31:56Z"
}
headers = {
"CORGEA-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'CORGEA-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: '<string>', expiry_date: '2023-11-07T05:31:56Z'})
};
fetch('https://www.corgea.app/api/v1/detections/{issue_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://www.corgea.app/api/v1/detections/{issue_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([
'comment' => '<string>',
'expiry_date' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"CORGEA-TOKEN: <api-key>",
"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://www.corgea.app/api/v1/detections/{issue_id}"
payload := strings.NewReader("{\n \"comment\": \"<string>\",\n \"expiry_date\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("CORGEA-TOKEN", "<api-key>")
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://www.corgea.app/api/v1/detections/{issue_id}")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"<string>\",\n \"expiry_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/detections/{issue_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["CORGEA-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"<string>\",\n \"expiry_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"action": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "preview",
"source": "api",
"target_status": "<string>",
"justification": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z",
"rule": {},
"source_metadata": {},
"requires_approval": true,
"requested_by": 123,
"approved_by": 123,
"rejected_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"reviewed_at": "2023-11-07T05:31:56Z",
"applied_at": "2023-11-07T05:31:56Z",
"counts": {
"matched": 123,
"unmatched": 123,
"ambiguous": 123,
"applied": 123,
"conflicts": 123
}
},
"issue": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"status_comment": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z"
}
}{
"status": "ok",
"action": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "preview",
"source": "api",
"target_status": "<string>",
"justification": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z",
"rule": {},
"source_metadata": {},
"requires_approval": true,
"requested_by": 123,
"approved_by": 123,
"rejected_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"reviewed_at": "2023-11-07T05:31:56Z",
"applied_at": "2023-11-07T05:31:56Z",
"counts": {
"matched": 123,
"unmatched": 123,
"ambiguous": 123,
"applied": 123,
"conflicts": 123
}
},
"issue": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"status_comment": "<string>",
"accepted_risk_expiry_date": "2023-11-07T05:31:56Z"
}
}{
"error": "Missing or invalid authorization header"
}{
"error": "Permission denied"
}{
"error": "Policy not found"
}Authorizations
Body
Was this page helpful?
