List audit events
curl --request GET \
--url https://{workspace}.klef.ai/api/audit \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/audit"
headers = {"cookie": "klef.session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'klef.session='}};
fetch('https://{workspace}.klef.ai/api/audit', 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://{workspace}.klef.ai/api/audit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "klef.session=",
]);
$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://{workspace}.klef.ai/api/audit"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "klef.session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{workspace}.klef.ai/api/audit")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/audit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'klef.session='
response = http.request(request)
puts response.read_body{
"results": [
{
"class_uid": 123,
"class_name": "<string>",
"category_uid": 123,
"category_name": "<string>",
"activity_id": 123,
"activity_name": "<string>",
"type_uid": 123,
"type_name": "<string>",
"severity_id": 123,
"severity": "<string>",
"status_id": 123,
"status": "<string>",
"time": 123,
"time_dt": "2023-11-07T05:31:56Z",
"message": "<string>",
"metadata": {
"uid": "<string>",
"original_event_uid": "<string>",
"tenant_uid": "<string>",
"product": {
"name": "<string>",
"vendor_name": "<string>"
},
"version": "<string>",
"profiles": [
"<string>"
],
"correlation_uid": "<string>"
},
"actor": {
"user": {
"name": "<string>",
"uid": "<string>",
"type_id": 123,
"type": "<string>",
"credential_uid": "<string>"
},
"app_name": "<string>"
},
"unmapped": {
"klef": {
"action": "entity_insert",
"actor_type": "user",
"target": {
"type": "workspace",
"id": "<string>",
"label": "<string>"
},
"data": {},
"sequence": 123,
"via": "web",
"conversation_id": "<string>",
"api_key_name": "<string>"
}
},
"src_endpoint": {
"ip": "<string>",
"name": "<string>"
},
"http_request": {
"user_agent": "<string>"
},
"user": {
"name": "<string>",
"uid": "<string>",
"type_id": 123,
"type": "<string>",
"credential_uid": "<string>"
},
"entity": {
"uid": "<string>",
"type": "<string>",
"name": "<string>"
},
"group": {
"uid": "<string>",
"type": "<string>",
"name": "<string>"
},
"web_resources": [
{
"uid": "<string>",
"type": "<string>",
"name": "<string>"
}
],
"file": {
"name": "<string>",
"uid": "<string>",
"type_id": 123
},
"api": {
"operation": "<string>"
},
"email": {
"to": [
"<string>"
]
},
"direction_id": 123,
"users": [
{
"name": "<string>",
"uid": "<string>",
"type_id": 123,
"type": "<string>",
"credential_uid": "<string>"
}
],
"service": {
"name": "<string>"
},
"iam_roles": [
{
"name": "<string>"
}
],
"log_name": "<string>",
"ai_agent": {
"name": "<string>"
}
}
],
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
],
"pagination": {
"nextCursor": 123,
"limit": 123,
"hasMore": true,
"total": 123
}
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}Audit
List audit events
OCSF 1.9.0 events.
GET
/
audit
List audit events
curl --request GET \
--url https://{workspace}.klef.ai/api/audit \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/audit"
headers = {"cookie": "klef.session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'klef.session='}};
fetch('https://{workspace}.klef.ai/api/audit', 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://{workspace}.klef.ai/api/audit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "klef.session=",
]);
$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://{workspace}.klef.ai/api/audit"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "klef.session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{workspace}.klef.ai/api/audit")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/audit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'klef.session='
response = http.request(request)
puts response.read_body{
"results": [
{
"class_uid": 123,
"class_name": "<string>",
"category_uid": 123,
"category_name": "<string>",
"activity_id": 123,
"activity_name": "<string>",
"type_uid": 123,
"type_name": "<string>",
"severity_id": 123,
"severity": "<string>",
"status_id": 123,
"status": "<string>",
"time": 123,
"time_dt": "2023-11-07T05:31:56Z",
"message": "<string>",
"metadata": {
"uid": "<string>",
"original_event_uid": "<string>",
"tenant_uid": "<string>",
"product": {
"name": "<string>",
"vendor_name": "<string>"
},
"version": "<string>",
"profiles": [
"<string>"
],
"correlation_uid": "<string>"
},
"actor": {
"user": {
"name": "<string>",
"uid": "<string>",
"type_id": 123,
"type": "<string>",
"credential_uid": "<string>"
},
"app_name": "<string>"
},
"unmapped": {
"klef": {
"action": "entity_insert",
"actor_type": "user",
"target": {
"type": "workspace",
"id": "<string>",
"label": "<string>"
},
"data": {},
"sequence": 123,
"via": "web",
"conversation_id": "<string>",
"api_key_name": "<string>"
}
},
"src_endpoint": {
"ip": "<string>",
"name": "<string>"
},
"http_request": {
"user_agent": "<string>"
},
"user": {
"name": "<string>",
"uid": "<string>",
"type_id": 123,
"type": "<string>",
"credential_uid": "<string>"
},
"entity": {
"uid": "<string>",
"type": "<string>",
"name": "<string>"
},
"group": {
"uid": "<string>",
"type": "<string>",
"name": "<string>"
},
"web_resources": [
{
"uid": "<string>",
"type": "<string>",
"name": "<string>"
}
],
"file": {
"name": "<string>",
"uid": "<string>",
"type_id": 123
},
"api": {
"operation": "<string>"
},
"email": {
"to": [
"<string>"
]
},
"direction_id": 123,
"users": [
{
"name": "<string>",
"uid": "<string>",
"type_id": 123,
"type": "<string>",
"credential_uid": "<string>"
}
],
"service": {
"name": "<string>"
},
"iam_roles": [
{
"name": "<string>"
}
],
"log_name": "<string>",
"ai_agent": {
"name": "<string>"
}
}
],
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
],
"pagination": {
"nextCursor": 123,
"limit": 123,
"hasMore": true,
"total": 123
}
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"code": "details_unavailable",
"params": {},
"causes": [
{
"code": "details_unavailable",
"params": {},
"causes": "<array>"
}
],
"target": "<string>"
}
]
}Authorizations
cookieAuthapiKeyAuth
Query Parameters
The catalog of every audit verb: entity-change CRUD plus explicitly-recorded activities.
Available options:
entity_insert, entity_update, entity_delete, workspace_onboarded, member_invited, member_role_changed, member_removed, invitation_revoked, invitation_resent, invitation_accepted, workspace_accessed, audit_retention_changed, workspace_deletion_scheduled, workspace_restored, workspace_exported, workspace_purged, member_mcp_access_changed, audit_log_delivery_changed, audit_log_delivery_removed, connection_created, connection_updated, connection_deleted, connection_secret_revealed, connection_restored, connection_brake_limit_changed, workspace_secret_created, workspace_secret_updated, workspace_secret_deleted, workspace_secret_revealed, inbox_item_resolved, inbox_items_resolved_all, api_key_created, api_key_rotated, api_key_revoked, policy_created, policy_updated, policy_enabled, policy_disabled, policy_deleted, subscription_checkout_started, subscription_plan_changed, subscription_cancellation_scheduled, subscription_cancellation_cleared, subscription_status_changed, agent_credit_checkout_started, agent_credits_purchased, agent_credits_adjusted, signed_in, signed_out, workers_exported, audit_events_exported, audit_events_purged, sync_plans_purged, audit_ledger_gap_recorded, audit_log_batches_expired, access_history_purged, target_account_provisioned, target_account_updated, target_account_adopted, target_account_detached, target_account_grants_changed, target_account_link_changed, target_account_forgotten, target_account_claims_changed, target_account_elements_changed, target_account_element_ended, agent_turn_requested, agent_turn_answered, agent_turn_failed, agent_tool_called, agent_change_proposed, agent_change_applied, worker_record_viewed, sync_plan_approved, sync_plan_auto_approved, sync_plan_evidence_exported, scheduled_approval_changed, sync_plan_started_by_event, source_events_enabled, source_events_disabled, password_set, temporary_access_pass_issued, first_sign_in_link_sent, first_sign_in_link_opened, recipient_code_requested, recipient_proven, recipient_refused, first_sign_in_revealed, password_reset_requested, first_sign_in_deleted, license_price_added, license_price_changed, license_price_deleted, license_invoice_uploaded, license_invoice_opened, license_invoice_deleted, license_invoice_expired, draft_policy_saved, draft_policy_discarded, draft_policy_published, draft_policy_previewed, segment_created, segment_updated, segment_deleted, source_event_received, connector_revision_uploaded, connector_revision_activated What an audited activity acted upon. Entity-change records carry the CLR type name of the row that moved instead, and are never read back out of the audit log.
Available options:
workspace, workspace_connection, workspace_secret, membership, invitation, api_key, inbox_item, policy, billing, session, data_export, target_account, agent_turn, worker, sync_plan, segment, script, lookup, license_price, license_invoice, audit_log, connector Was this page helpful?