curl --request DELETE \
--url https://api.enkryptai.com/compliance/delete-scan \
--header 'X-Enkrypt-Scan: <x-enkrypt-scan>' \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/compliance/delete-scan"
headers = {
"X-Enkrypt-Scan": "<x-enkrypt-scan>",
"apikey": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Enkrypt-Scan': '<x-enkrypt-scan>', apikey: '<api-key>'}
};
fetch('https://api.enkryptai.com/compliance/delete-scan', 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.enkryptai.com/compliance/delete-scan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Enkrypt-Scan: <x-enkrypt-scan>",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/compliance/delete-scan"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Enkrypt-Scan", "<x-enkrypt-scan>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.enkryptai.com/compliance/delete-scan")
.header("X-Enkrypt-Scan", "<x-enkrypt-scan>")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/compliance/delete-scan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Enkrypt-Scan"] = '<x-enkrypt-scan>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Scan deleted",
"scan_id": "11111111-2222-3333-4444-555555555555"
}{
"error": "Scan not found"
}{
"code": 403,
"error": "Forbidden",
"message": "Access Denied",
"request_id": "<string>",
"time": 123
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}Delete Compliance Scan
Stops the scan and then deletes its record, addressed by name in X-Enkrypt-Scan.
The stop comes first: if the scanning service cannot be reached the call fails with 502 and the scan is left intact, rather than being deleted while it keeps polling the workspace.
The scan’s log-file history is deleted with it. Export List Compliance Log Files first if you need to keep the coverage record.
Requires the governance officer role on the project your API key belongs to. The organization owner is not exempt — an owner without the role gets 403 — and an individual (non-organization) account cannot hold the role at all.
curl --request DELETE \
--url https://api.enkryptai.com/compliance/delete-scan \
--header 'X-Enkrypt-Scan: <x-enkrypt-scan>' \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/compliance/delete-scan"
headers = {
"X-Enkrypt-Scan": "<x-enkrypt-scan>",
"apikey": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Enkrypt-Scan': '<x-enkrypt-scan>', apikey: '<api-key>'}
};
fetch('https://api.enkryptai.com/compliance/delete-scan', 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.enkryptai.com/compliance/delete-scan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Enkrypt-Scan: <x-enkrypt-scan>",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/compliance/delete-scan"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Enkrypt-Scan", "<x-enkrypt-scan>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.enkryptai.com/compliance/delete-scan")
.header("X-Enkrypt-Scan", "<x-enkrypt-scan>")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/compliance/delete-scan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Enkrypt-Scan"] = '<x-enkrypt-scan>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Scan deleted",
"scan_id": "11111111-2222-3333-4444-555555555555"
}{
"error": "Scan not found"
}{
"code": 403,
"error": "Forbidden",
"message": "Access Denied",
"request_id": "<string>",
"time": 123
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}Authorizations
Headers
The scan's saved name, within the project your API key belongs to. Letters, numbers, spaces and _ & - . /; must start and end with a letter or a number; at most 64 characters.
"ChatGPT Enterprise"

