Create an audit export
curl --request POST \
--url https://sta.sandbox.lerian.net/v1/audit/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityType": "<string>",
"periodFrom": "2023-11-07T05:31:56Z",
"periodTo": "2023-11-07T05:31:56Z",
"format": "<string>"
}
'import requests
url = "https://sta.sandbox.lerian.net/v1/audit/exports"
payload = {
"entityType": "<string>",
"periodFrom": "2023-11-07T05:31:56Z",
"periodTo": "2023-11-07T05:31:56Z",
"format": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityType: '<string>',
periodFrom: '2023-11-07T05:31:56Z',
periodTo: '2023-11-07T05:31:56Z',
format: '<string>'
})
};
fetch('https://sta.sandbox.lerian.net/v1/audit/exports', 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://sta.sandbox.lerian.net/v1/audit/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entityType' => '<string>',
'periodFrom' => '2023-11-07T05:31:56Z',
'periodTo' => '2023-11-07T05:31:56Z',
'format' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sta.sandbox.lerian.net/v1/audit/exports"
payload := strings.NewReader("{\n \"entityType\": \"<string>\",\n \"periodFrom\": \"2023-11-07T05:31:56Z\",\n \"periodTo\": \"2023-11-07T05:31:56Z\",\n \"format\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sta.sandbox.lerian.net/v1/audit/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityType\": \"<string>\",\n \"periodFrom\": \"2023-11-07T05:31:56Z\",\n \"periodTo\": \"2023-11-07T05:31:56Z\",\n \"format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sta.sandbox.lerian.net/v1/audit/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityType\": \"<string>\",\n \"periodFrom\": \"2023-11-07T05:31:56Z\",\n \"periodTo\": \"2023-11-07T05:31:56Z\",\n \"format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"entityType": "<string>",
"format": "<string>",
"id": "<string>",
"periodFrom": "2023-11-07T05:31:56Z",
"periodTo": "2023-11-07T05:31:56Z",
"requestedAt": "2023-11-07T05:31:56Z",
"requestedBy": "<string>",
"status": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"failureReason": "<string>",
"recordCount": 123,
"sha256Hash": "<string>",
"sizeBytes": 123
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Create an audit export
Enqueues an asynchronous audit export (status GENERATING) for the given entity type, format, and RFC3339 window. The date range is capped at 365 days; a second concurrent export for the same entity type returns 409. The export generator worker materializes the object.
POST
/
v1
/
audit
/
exports
Create an audit export
curl --request POST \
--url https://sta.sandbox.lerian.net/v1/audit/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityType": "<string>",
"periodFrom": "2023-11-07T05:31:56Z",
"periodTo": "2023-11-07T05:31:56Z",
"format": "<string>"
}
'import requests
url = "https://sta.sandbox.lerian.net/v1/audit/exports"
payload = {
"entityType": "<string>",
"periodFrom": "2023-11-07T05:31:56Z",
"periodTo": "2023-11-07T05:31:56Z",
"format": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityType: '<string>',
periodFrom: '2023-11-07T05:31:56Z',
periodTo: '2023-11-07T05:31:56Z',
format: '<string>'
})
};
fetch('https://sta.sandbox.lerian.net/v1/audit/exports', 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://sta.sandbox.lerian.net/v1/audit/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entityType' => '<string>',
'periodFrom' => '2023-11-07T05:31:56Z',
'periodTo' => '2023-11-07T05:31:56Z',
'format' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sta.sandbox.lerian.net/v1/audit/exports"
payload := strings.NewReader("{\n \"entityType\": \"<string>\",\n \"periodFrom\": \"2023-11-07T05:31:56Z\",\n \"periodTo\": \"2023-11-07T05:31:56Z\",\n \"format\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sta.sandbox.lerian.net/v1/audit/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityType\": \"<string>\",\n \"periodFrom\": \"2023-11-07T05:31:56Z\",\n \"periodTo\": \"2023-11-07T05:31:56Z\",\n \"format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sta.sandbox.lerian.net/v1/audit/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityType\": \"<string>\",\n \"periodFrom\": \"2023-11-07T05:31:56Z\",\n \"periodTo\": \"2023-11-07T05:31:56Z\",\n \"format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"entityType": "<string>",
"format": "<string>",
"id": "<string>",
"periodFrom": "2023-11-07T05:31:56Z",
"periodTo": "2023-11-07T05:31:56Z",
"requestedAt": "2023-11-07T05:31:56Z",
"requestedBy": "<string>",
"status": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"failureReason": "<string>",
"recordCount": 123,
"sha256Hash": "<string>",
"sizeBytes": 123
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Authorizations
JWT bearer token issued by the identity provider.
Body
application/json
Audit export creation payload
Audit entity to export (credential_access | transfer_history)
Example:
"credential_access"
Inclusive lower bound of the export window (RFC3339)
Example:
"2026-01-01T00:00:00Z"
Exclusive upper bound of the export window (RFC3339)
Example:
"2026-02-01T00:00:00Z"
Export format (CSV | JSON_GZIP); defaults to CSV
Example:
"CSV"
Response
Accepted
Was this page helpful?
⌘I

