Undo the latest review change of a Triage finding
curl --request POST \
--url https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 1
}
'import requests
url = "https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo"
payload = { "expected_version": 1 }
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({expected_version: 1})
};
fetch('https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo', 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://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo",
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([
'expected_version' => 1
]),
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://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo"
payload := strings.NewReader("{\n \"expected_version\": 1\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://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo")
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 \"expected_version\": 1\n}"
response = http.request(request)
puts response.read_body{
"event": {
"action": "accepted",
"actor_kind": "user",
"after": {},
"before": {},
"created_at": "2023-11-07T05:31:56Z",
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seq": 123,
"writeback": {},
"note": "<string>",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"undoes_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_email": "<string>"
},
"review": {
"version": 123,
"decided_at": "2023-11-07T05:31:56Z",
"decided_by_email": "<string>",
"decision": "accepted",
"decline_reason": "false_positive",
"duplicate_of": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"duplicate_of_title": "<string>",
"fix": {
"evidence": "<string>",
"fixed_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"pr_url": "<string>",
"repository_url": "<string>",
"retest_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "in_progress",
"target_url": "<string>"
},
"note": "<string>",
"severity_override": "none",
"snoozed_until": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}Triage
Undo the latest review change of a Triage finding
Reverse the newest review event of the finding that is not undone yet: the review returns to the state before that event, and a new undo event points at the one it reverses. Earlier events are never changed. archived and unarchived events are never its target (they do not move the review version this undo is guarded by): an archive after a review change neither is reversed by this undo nor blocks it, and an archive is restored with PATCH /api/v1/triage/findings/ or by undoing its bulk job. Undo applies only at the current expected_version and not while a retest of the fix is running. The event’s author or a team admin may undo it.
POST
/
api
/
v1
/
triage
/
findings
/
{id}
/
review
/
undo
Undo the latest review change of a Triage finding
curl --request POST \
--url https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 1
}
'import requests
url = "https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo"
payload = { "expected_version": 1 }
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({expected_version: 1})
};
fetch('https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo', 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://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo",
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([
'expected_version' => 1
]),
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://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo"
payload := strings.NewReader("{\n \"expected_version\": 1\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://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://neo.api.projectdiscovery.io/api/v1/triage/findings/{id}/review/undo")
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 \"expected_version\": 1\n}"
response = http.request(request)
puts response.read_body{
"event": {
"action": "accepted",
"actor_kind": "user",
"after": {},
"before": {},
"created_at": "2023-11-07T05:31:56Z",
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seq": 123,
"writeback": {},
"note": "<string>",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"undoes_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_email": "<string>"
},
"review": {
"version": 123,
"decided_at": "2023-11-07T05:31:56Z",
"decided_by_email": "<string>",
"decision": "accepted",
"decline_reason": "false_positive",
"duplicate_of": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"duplicate_of_title": "<string>",
"fix": {
"evidence": "<string>",
"fixed_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"pr_url": "<string>",
"repository_url": "<string>",
"retest_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "in_progress",
"target_url": "<string>"
},
"note": "<string>",
"severity_override": "none",
"snoozed_until": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}Body
application/json
Response
The review after the undo, and the undo event
The review after a change, and the event the change appended.

