Actualizar la política de aprobación del triaje
curl --request PATCH \
--url https://www.corgea.app/api/v1/triage/approval-policy \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"finding_count_threshold": 2
}
'import requests
url = "https://www.corgea.app/api/v1/triage/approval-policy"
payload = { "finding_count_threshold": 2 }
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({finding_count_threshold: 2})
};
fetch('https://www.corgea.app/api/v1/triage/approval-policy', 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/approval-policy",
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([
'finding_count_threshold' => 2
]),
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/approval-policy"
payload := strings.NewReader("{\n \"finding_count_threshold\": 2\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/triage/approval-policy")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"finding_count_threshold\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/triage/approval-policy")
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 \"finding_count_threshold\": 2\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"policy": {
"finding_count_threshold": 2,
"severity_threshold": "LO"
}
}Triaje
Actualizar la política de aprobación del triaje
Actualiza parcialmente los umbrales de aprobación de riesgo aceptado. Establece un umbral en null para desactivarlo. Se necesita acceso de administrador de la empresa.
PATCH
/
triage
/
approval-policy
Actualizar la política de aprobación del triaje
curl --request PATCH \
--url https://www.corgea.app/api/v1/triage/approval-policy \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"finding_count_threshold": 2
}
'import requests
url = "https://www.corgea.app/api/v1/triage/approval-policy"
payload = { "finding_count_threshold": 2 }
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({finding_count_threshold: 2})
};
fetch('https://www.corgea.app/api/v1/triage/approval-policy', 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/approval-policy",
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([
'finding_count_threshold' => 2
]),
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/approval-policy"
payload := strings.NewReader("{\n \"finding_count_threshold\": 2\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/triage/approval-policy")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"finding_count_threshold\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/triage/approval-policy")
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 \"finding_count_threshold\": 2\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"policy": {
"finding_count_threshold": 2,
"severity_threshold": "LO"
}
}Autorizaciones
CorgeaTokenBearerAuth
Cuerpo
application/json
¿Esta página le ayudó?
