Get Compliance Summary
curl --request GET \
--url https://api.example.com/api/compliance/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/compliance/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/compliance/summary', 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.example.com/api/compliance/summary",
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.example.com/api/compliance/summary"
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.example.com/api/compliance/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/compliance/summary")
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{
"generated_at": "2023-11-07T05:31:56Z",
"kpis": {
"total_datasets": 0,
"total_scans": 0,
"active_scans": 0,
"failed_scans": 0,
"total_reports": 0,
"critical_changes": 0
},
"activity_stats": {
"by_event_type": {},
"by_actor": {},
"by_scan_status": {}
},
"datasets": [
{
"dataset_id": "<string>",
"dataset_name": "<string>",
"dataset_type": "<string>",
"status": "<string>",
"severity": "<string>",
"vulnerabilities": 0,
"scan_count": 0,
"completed_scan_count": 0,
"failed_scan_count": 0,
"report_count": 0,
"critical_issue_count": 0,
"source_provider": "<string>",
"source_ref": "<string>",
"repo_url": "<string>",
"import_provider": "<string>",
"upload_source": "<string>",
"last_scan_at": "2023-11-07T05:31:56Z",
"last_scan_actor": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"project_names": [
"<string>"
]
}
],
"activity": [
{
"id": "<string>",
"event_type": "<string>",
"summary": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"category": "activity",
"actor": "<string>",
"dataset_id": "<string>",
"dataset_name": "<string>",
"scan_id": "<string>",
"scan_type": "<string>",
"scan_status": "<string>",
"severity": "low",
"critical": false,
"details": {}
}
],
"critical_changes": [
{
"id": "<string>",
"category": "<string>",
"title": "<string>",
"summary": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dataset_id": "<string>",
"dataset_name": "<string>",
"scan_id": "<string>",
"actor": "<string>",
"reason": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}compliance
Get Compliance Summary
GET
/
api
/
compliance
/
summary
Get Compliance Summary
curl --request GET \
--url https://api.example.com/api/compliance/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/compliance/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/compliance/summary', 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.example.com/api/compliance/summary",
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.example.com/api/compliance/summary"
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.example.com/api/compliance/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/compliance/summary")
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{
"generated_at": "2023-11-07T05:31:56Z",
"kpis": {
"total_datasets": 0,
"total_scans": 0,
"active_scans": 0,
"failed_scans": 0,
"total_reports": 0,
"critical_changes": 0
},
"activity_stats": {
"by_event_type": {},
"by_actor": {},
"by_scan_status": {}
},
"datasets": [
{
"dataset_id": "<string>",
"dataset_name": "<string>",
"dataset_type": "<string>",
"status": "<string>",
"severity": "<string>",
"vulnerabilities": 0,
"scan_count": 0,
"completed_scan_count": 0,
"failed_scan_count": 0,
"report_count": 0,
"critical_issue_count": 0,
"source_provider": "<string>",
"source_ref": "<string>",
"repo_url": "<string>",
"import_provider": "<string>",
"upload_source": "<string>",
"last_scan_at": "2023-11-07T05:31:56Z",
"last_scan_actor": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"project_names": [
"<string>"
]
}
],
"activity": [
{
"id": "<string>",
"event_type": "<string>",
"summary": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"category": "activity",
"actor": "<string>",
"dataset_id": "<string>",
"dataset_name": "<string>",
"scan_id": "<string>",
"scan_type": "<string>",
"scan_status": "<string>",
"severity": "low",
"critical": false,
"details": {}
}
],
"critical_changes": [
{
"id": "<string>",
"category": "<string>",
"title": "<string>",
"summary": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dataset_id": "<string>",
"dataset_name": "<string>",
"scan_id": "<string>",
"actor": "<string>",
"reason": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Query Parameters
Optional dataset UUIDs to scope the summary to a subset of datasets.
Optional ISO timestamp marking the beginning of the reporting window.
Optional ISO timestamp marking the end of the reporting window.
Maximum number of activity events returned in the response.
Required range:
1 <= x <= 2000Maximum number of critical changes returned in the response.
Required range:
1 <= x <= 1000Cookies
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

