Skip to main content
PATCH
/
project
/
{projectId}
/
results
/
batch
Batch update multiple vulnerabilities
curl --request PATCH \
  --url https://api-eu.cybedefend.com/project/{projectId}/results/batch \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "vulnerabilityId": "69da14be-ce56-46d1-8da0-25927da0876f",
      "status": "ignored",
      "comment": "Reviewed and marked as ignored"
    },
    {
      "vulnerabilityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "status": "resolved"
    }
  ]
}
'
import requests

url = "https://api-eu.cybedefend.com/project/{projectId}/results/batch"

payload = { "items": [
{
"vulnerabilityId": "69da14be-ce56-46d1-8da0-25927da0876f",
"status": "ignored",
"comment": "Reviewed and marked as ignored"
},
{
"vulnerabilityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "resolved"
}
] }
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
vulnerabilityId: '69da14be-ce56-46d1-8da0-25927da0876f',
status: 'ignored',
comment: 'Reviewed and marked as ignored'
},
{vulnerabilityId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', status: 'resolved'}
]
})
};

fetch('https://api-eu.cybedefend.com/project/{projectId}/results/batch', 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-eu.cybedefend.com/project/{projectId}/results/batch",
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([
'items' => [
[
'vulnerabilityId' => '69da14be-ce56-46d1-8da0-25927da0876f',
'status' => 'ignored',
'comment' => 'Reviewed and marked as ignored'
],
[
'vulnerabilityId' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'status' => 'resolved'
]
]
]),
CURLOPT_HTTPHEADER => [
"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-eu.cybedefend.com/project/{projectId}/results/batch"

payload := strings.NewReader("{\n \"items\": [\n {\n \"vulnerabilityId\": \"69da14be-ce56-46d1-8da0-25927da0876f\",\n \"status\": \"ignored\",\n \"comment\": \"Reviewed and marked as ignored\"\n },\n {\n \"vulnerabilityId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"status\": \"resolved\"\n }\n ]\n}")

req, _ := http.NewRequest("PATCH", url, payload)

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-eu.cybedefend.com/project/{projectId}/results/batch")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"vulnerabilityId\": \"69da14be-ce56-46d1-8da0-25927da0876f\",\n \"status\": \"ignored\",\n \"comment\": \"Reviewed and marked as ignored\"\n },\n {\n \"vulnerabilityId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"status\": \"resolved\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-eu.cybedefend.com/project/{projectId}/results/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"vulnerabilityId\": \"69da14be-ce56-46d1-8da0-25927da0876f\",\n \"status\": \"ignored\",\n \"comment\": \"Reviewed and marked as ignored\"\n },\n {\n \"vulnerabilityId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"status\": \"resolved\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "projectId": "30244c51-b01b-4306-a1e5-ade3f87303ff",
  "totalCount": 5,
  "successCount": 4,
  "failureCount": 1,
  "results": [
    {
      "vulnerabilityId": "69da14be-ce56-46d1-8da0-25927da0876f",
      "success": true
    },
    {
      "vulnerabilityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "success": false,
      "error": "Vulnerability not found"
    }
  ]
}
{
"timestamp": "2025-02-18T12:31:18.491Z",
"service": "AiService",
"method": "startConversation",
"message": "Invalid parameters provided",
"code": 400
}

Path Parameters

projectId
string<uuid>
required

Body

application/json
items
object[]
required

List of vulnerabilities to update. Each item must contain vulnerabilityId and at least one field to update (status, priority, or comment).

Required array length: 1 - 100 elements
Example:
[
{
"vulnerabilityId": "69da14be-ce56-46d1-8da0-25927da0876f",
"status": "ignored",
"comment": "Reviewed and marked as ignored"
},
{
"vulnerabilityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "resolved"
}
]

Response

Batch update results with success/failure per vulnerability

projectId
string<uuid>
required

Project unique identifier

Example:

"30244c51-b01b-4306-a1e5-ade3f87303ff"

totalCount
number
required

Total number of vulnerabilities processed

Example:

5

successCount
number
required

Number of successful updates

Example:

4

failureCount
number
required

Number of failed updates

Example:

1

results
object[]
required

Detailed results per vulnerability

Example:
[
{
"vulnerabilityId": "69da14be-ce56-46d1-8da0-25927da0876f",
"success": true
},
{
"vulnerabilityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"success": false,
"error": "Vulnerability not found"
}
]