Get the evaluation status for a scan
curl --request GET \
--url https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status', 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/projects/{projectId}/scans/{scanId}/evaluation-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"hasEvaluation": true,
"status": "COMPLETED",
"progress": 75,
"message": "Evaluating 3 policies...",
"evaluationId": "550e8400-e29b-41d4-a716-446655440000",
"startedAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:31:00Z"
}Compliance & Evaluation
Get the evaluation status for a scan
Check if a policy evaluation has been triggered for this scan, and if so, what its current status is. Used by the CLI to poll for completion before checking compliance results.
GET
/
projects
/
{projectId}
/
scans
/
{scanId}
/
evaluation-status
Get the evaluation status for a scan
curl --request GET \
--url https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status', 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/projects/{projectId}/scans/{scanId}/evaluation-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/evaluation-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"hasEvaluation": true,
"status": "COMPLETED",
"progress": 75,
"message": "Evaluating 3 policies...",
"evaluationId": "550e8400-e29b-41d4-a716-446655440000",
"startedAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:31:00Z"
}Authorizations
JWT access token.
Response
200 - application/json
Evaluation status for the scan
Whether an evaluation exists for this scan
Example:
true
Current status of the evaluation
Available options:
PENDING, IN_PROGRESS, COMPLETED, FAILED, NOT_STARTED Example:
"COMPLETED"
Progress percentage (0-100)
Example:
75
Status message or error details
Example:
"Evaluating 3 policies..."
Evaluation ID (if exists)
Example:
"550e8400-e29b-41d4-a716-446655440000"
When the evaluation started
Example:
"2024-01-15T10:30:00Z"
When the evaluation completed (if done)
Example:
"2024-01-15T10:31:00Z"