curl --request POST \
--url https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>"
}
'import requests
url = "https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject"
payload = { "comment": "<string>" }
headers = {
"CORGEA-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'CORGEA-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: '<string>'})
};
fetch('https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject', 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/triage/approvals/{action_id}/reject",
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([
'comment' => '<string>'
]),
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/triage/approvals/{action_id}/reject"
payload := strings.NewReader("{\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["CORGEA-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"source": "<string>",
"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
},
"decision_label": "<string>",
"requester": {
"id": 123,
"name": "<string>"
},
"review_comment": "<string>",
"finding_total": 123,
"finding_previews": [
{
"kind": "sast",
"id": "<string>",
"title": "<string>",
"severity": "<string>",
"location": "<string>"
}
],
"project_names": [
"<string>"
],
"skip_count": 123,
"closed_by_rescan": true,
"can_review": true,
"is_requester": true,
"suggestion": {},
"investigation": {}
}
}Triage-Anfrage ablehnen
Jeder sieht eigene Anfragen. Prüfberechtigte mit der Berechtigung Can approve or reject triage requests (heeler.approve_triage_request) sehen auch andere Anfragen; bei Projektzugriffskontrolle benötigen sie Zugriff auf jedes Projekt. Nicht sichtbare Anfragen liefern 404. Prüfer müssen sich vom Antragsteller unterscheiden und die Berechtigung Can approve or reject triage requests, Statusänderungsrechte für jeden Befundtyp sowie Zugriff auf jedes Projekt der Anfrage haben. Ein optionaler comment mit bis zu 10.000 Zeichen geht an den Antragsteller. Eine Ablehnung lässt Befunde unverändert. Bei 409 vor einem neuen Versuch die Anfrage erneut abrufen.
curl --request POST \
--url https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "<string>"
}
'import requests
url = "https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject"
payload = { "comment": "<string>" }
headers = {
"CORGEA-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'CORGEA-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({comment: '<string>'})
};
fetch('https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject', 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/triage/approvals/{action_id}/reject",
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([
'comment' => '<string>'
]),
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/triage/approvals/{action_id}/reject"
payload := strings.NewReader("{\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/triage/approvals/{action_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["CORGEA-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"source": "<string>",
"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
},
"decision_label": "<string>",
"requester": {
"id": 123,
"name": "<string>"
},
"review_comment": "<string>",
"finding_total": 123,
"finding_previews": [
{
"kind": "sast",
"id": "<string>",
"title": "<string>",
"severity": "<string>",
"location": "<string>"
}
],
"project_names": [
"<string>"
],
"skip_count": 123,
"closed_by_rescan": true,
"can_review": true,
"is_requester": true,
"suggestion": {},
"investigation": {}
}
}Autorisierungen
API-Key für die Authentifizierung API-Tokens inaktiver Benutzer werden abgelehnt.
Pfadparameter
Body
10000War diese Seite hilfreich?
