curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/audit-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/audit-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/audit-logs', 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://{region}.api.plerion.com/v1/tenant/audit-logs",
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://{region}.api.plerion.com/v1/tenant/audit-logs"
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://{region}.api.plerion.com/v1/tenant/audit-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/audit-logs")
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{
"data": [
{
"id": "audit-log-12345",
"organizationId": "dc16d897-7f52-4b73-be57-96c7c9a853da",
"tenantId": "42749bc1-c99b-4c2c-a081-a6cda9370081",
"operation": "UserLogin",
"operationTime": "2023-02-04T06:02:40.594Z",
"operatorUserId": "b3b6a8e2-1c2d-4e5f-9a7b-2c3d4e5f6a7b",
"operatorEmail": "user@example.com",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"ip": "192.168.1.1",
"location": {
"country": "United States",
"city": "New York",
"region": "NY"
}
}
],
"meta": {
"cursor": "k3d83a9b-k3dk-5lkd-2ldk-9kd77c1beb6",
"perPage": 10
}
}{
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"message": "Internal server error"
}List audit logs
Use the list audit logs API to retrieve audit trail information for a tenant with filtering options. By default, all audit logs are returned with a page size of 100. You can filter by date range, user, and operation type.
Date range filtering is supported using the operationTimeStart and operationTimeEnd parameters:
operationTimeStartalone: Includes audit logs from the specified date to the present.operationTimeEndalone: Includes audit logs up to the specified date.- Both provided: Includes audit logs within the specified date range.
Date strings must follow ISO 8601 format (e.g., 2023-02-01T18:09:07Z).
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/audit-logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/audit-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/audit-logs', 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://{region}.api.plerion.com/v1/tenant/audit-logs",
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://{region}.api.plerion.com/v1/tenant/audit-logs"
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://{region}.api.plerion.com/v1/tenant/audit-logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/audit-logs")
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{
"data": [
{
"id": "audit-log-12345",
"organizationId": "dc16d897-7f52-4b73-be57-96c7c9a853da",
"tenantId": "42749bc1-c99b-4c2c-a081-a6cda9370081",
"operation": "UserLogin",
"operationTime": "2023-02-04T06:02:40.594Z",
"operatorUserId": "b3b6a8e2-1c2d-4e5f-9a7b-2c3d4e5f6a7b",
"operatorEmail": "user@example.com",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"ip": "192.168.1.1",
"location": {
"country": "United States",
"city": "New York",
"region": "NY"
}
}
],
"meta": {
"cursor": "k3d83a9b-k3dk-5lkd-2ldk-9kd77c1beb6",
"perPage": 10
}
}{
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"message": "Internal server error"
}Authorizations
Headers
Query Parameters
Start of the date range for filtering audit logs based on operation time.
Specify the start of the range using a valid ISO 8601 date-time string.
If operationTimeStart is provided and operationTimeEnd is omitted,
results will include audit logs from this date to the present.
Supported formats include:
yyyy-MM-ddTHH:mm:ssZ(e.g.,2020-12-18T08:00:00Z)yyyy-MM-ddTHH:mm:ss.SSSZ(e.g.,2020-12-18T08:00:00.000Z)
"2023-02-01T18:09:07Z"
End of the date range for filtering audit logs based on operation time.
Specify the end of the range using a valid ISO 8601 date-time string.
If operationTimeEnd is provided and operationTimeStart is omitted,
results will include audit logs up to this date.
Supported formats include:
yyyy-MM-ddTHH:mm:ssZ(e.g.,2020-12-18T08:00:00Z)yyyy-MM-ddTHH:mm:ss.SSSZ(e.g.,2020-12-18T08:00:00.000Z)
"2023-02-01T18:09:07Z"
Filter audit logs based on operation type.
ConfiguredServiceAccountRegion, CreatePleriApiKey, CreatedApiKey, CreatedAssetGroup, CreatedClickUpOutboundIntegration, CreatedCustomReport, CreatedDetectionSetting, CreatedDrataOutboundIntegration, CreatedEmailOutboundIntegration, CreatedFramework, CreatedIntegration, CreatedJiraOutboundIntegration, CreatedJiraSecurityOutboundIntegration, CreatedNotificationRule, CreatedOutboundIntegration, CreatedPagerDutyOutboundIntegration, CreatedPartnerSSO, CreatedSQSOutboundIntegration, CreatedSecurityHubOutboundIntegration, CreatedSentinelOutboundIntegration, CreatedServiceAccount, CreatedServiceNowOutboundIntegration, CreatedSlackOutboundIntegration, CreatedTeamsOutboundIntegration, CreatedVantaOutboundIntegration, CreatedWebhookOutboundIntegration, CreatedWellArchitectedWorkload, CreatedWidget, CreatedWorkflow, DeleteIntegrationStarted, DeleteTenantInternalStarted, DeleteTenantStarted, DeletedAssetGroup, DeletedCustomReport, DeletedDetectionSetting, DeletedFramework, DeletedNotification, DeletedOutboundIntegration, DeletedPartnerSSO, DeletedRiskNotificationPreference, DeletedServiceAccount, DeletedServiceAccountRegion, DeletedWidget, DeletedWorkflow, DownloadedComplianceSummary, FlaggedAlert, LoggedInPartnerSSO, RevokedApiKey, ScheduleCustomReport, SendRiskToOutboundIntegration, SuppressedFinding, TriggeredScan, UpdateAlertAcknowledgement, UpdatedAlert, UpdatedApiKey, UpdatedAssetGroup, UpdatedClickUpOutboundIntegration, UpdatedCustomReport, UpdatedDetectionSetting, UpdatedDetectionSettingAssignment, UpdatedEmailOutboundIntegration, UpdatedFramework, UpdatedIntegration, UpdatedIntegrationDetectionConfigs, UpdatedJiraOutboundIntegration, UpdatedJiraSecurityOutboundIntegration, UpdatedNotification, UpdatedOutboundIntegration, UpdatedPagerDutyOutboundIntegration, UpdatedPartnerSSO, UpdatedPassword, UpdatedRiskLifecycle, UpdatedRiskNotificationPreference, UpdatedSQSOutboundIntegration, UpdatedSecurityHubOutboundIntegration, UpdatedSentinelOutboundIntegration, UpdatedServiceAccount, UpdatedServiceAccountRegion, UpdatedServiceNowOutboundIntegration, UpdatedSlackOutboundIntegration, UpdatedTeamsOutboundIntegration, UpdatedVantaOutboundIntegration, UpdatedWebhookOutboundIntegration, UpdatedWellArchitectedWorkload, UpdatedWidget, UpdatedWorkflow, UserLoggedOut, UserLogin, UserSSOLogin, VerifiedMFA, WellArchitectedDeletedWorkload "UserLogin"
Was this page helpful?