Start AutoFix workflow
curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/autofix \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "11111111-2222-3333-4444-555555555555",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/autofix"
payload = {
"projectId": "11111111-2222-3333-4444-555555555555",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '11111111-2222-3333-4444-555555555555',
vulnerabilityId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/autofix', 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}/autofix",
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([
'projectId' => '11111111-2222-3333-4444-555555555555',
'vulnerabilityId' => 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
]),
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}/autofix"
payload := strings.NewReader("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-eu.cybedefend.com/project/{projectId}/autofix")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/autofix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"prUrl": "https://github.com/org/repo/pull/123",
"message": "AutoFix PR created successfully",
"reason": "DIFF_UNAPPLICABLE"
}Autofix
Start AutoFix workflow
Initiates an AI-powered AutoFix workflow to automatically generate a fix for a vulnerability and create a Pull Request or Merge Request
POST
/
project
/
{projectId}
/
autofix
Start AutoFix workflow
curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/autofix \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "11111111-2222-3333-4444-555555555555",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/autofix"
payload = {
"projectId": "11111111-2222-3333-4444-555555555555",
"vulnerabilityId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '11111111-2222-3333-4444-555555555555',
vulnerabilityId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/autofix', 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}/autofix",
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([
'projectId' => '11111111-2222-3333-4444-555555555555',
'vulnerabilityId' => 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
]),
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}/autofix"
payload := strings.NewReader("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-eu.cybedefend.com/project/{projectId}/autofix")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/autofix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"11111111-2222-3333-4444-555555555555\",\n \"vulnerabilityId\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"prUrl": "https://github.com/org/repo/pull/123",
"message": "AutoFix PR created successfully",
"reason": "DIFF_UNAPPLICABLE"
}Path Parameters
Project unique identifier
Body
application/json
Response
AutoFix workflow started successfully
Status indicator (ok|error)
Example:
"ok"
Pull / Merge Request URL if success
Example:
"https://github.com/org/repo/pull/123"
Human readable message
Example:
"AutoFix PR created successfully"
Machine readable reason when status=error
Example:
"DIFF_UNAPPLICABLE"
⌘I