Audit Logs
Full audit-level detail for every API request in a namespace — used for compliance audits, security investigations, and forensic analysis.
{
"start_date": "2024-06-01 00:00:00",
"end_date": "2024-06-01 23:59:59"
}
curl -X GET "{baseurl}/api/vault/namespace/reports/audit-details?start_date=2024-06-01+00:00:00&end_date=2024-06-01+23:59:59" \
-H "Authorization: Bearer <ADMIN_USER_AUTH_KEY>"
import requests
response = requests.get(
"{baseurl}/api/vault/namespace/reports/audit-details",
headers={
"Authorization": "Bearer <ADMIN_USER_AUTH_KEY>"
},
params={
"start_date": "2024-06-01 00:00:00",
"end_date": "2024-06-01 23:59:59"
}
)
print(response.json())
{
"data": {
"details": [
{
"date": "2024-06-01",
"requested_method": "/unmask",
"requested_user": "bob@company.com",
"requested_time": "2024-06-01 02:14:09",
"status": "success",
"input_payload": { "unmask": [{ "value": "<PER>hSw8kAEB10</PER>" }] },
"response": { "data": [{ "value": "George Williams" }] },
"error_log": ""
}
],
"next_page_token": null
},
"success": true,
"error": { "message": "" }
}
Provides full audit-level detail for every API request made in a namespace. This is the most detailed reporting endpoint and is typically used for compliance audits, security investigations, and forensic analysis.
Endpoint
| Method | Endpoint |
|---|---|
GET | {baseurl}/api/vault/namespace/reports/audit-details |
Query parameters
Start of the audit window. Format: YYYY-MM-DD HH:MM:SS.
End of the audit window. Format: YYYY-MM-DD HH:MM:SS.
Pagination token for large result sets.
Response fields
Each item in data.details contains the audit record for one API request.
Audit date in YYYY-MM-DD format. This string may be null where the date is unavailable.
API called, such as /mask or /unmask. This string may be null where the method is unavailable.
User ID or email of the caller. This string may be null where the caller is unavailable.
Timestamp of the request. This string may be null where the timestamp is unavailable.
Request status, such as success or failure. This string may be null where the status is unavailable.
Full request payload submitted by the caller.
Full API response returned by Protecto.
Error details if the request failed. This string may be empty or null when there is no error.
Pagination token for the next page of audit records. This string is null when no additional page is available.
Use cases
| Use case | What to look for |
|---|---|
| Security investigation | requested_user, requested_method, status |
| Compliance audit | requested_time, input_payload, response |
| Incident forensics | Full request and response payloads |
| Unmask access review | /unmask calls filtered by user |
| Error root cause analysis | status=failure, error_log |
| Insider threat detection | Frequency of sensitive calls by a single user |
Access notes
| Role | Access |
|---|---|
| Namespace Admin | Full reporting and audit access |
| Regular User | No access |
Audit logs include full request and response payloads, which may contain sensitive data. Always use pagination for large date ranges and avoid pulling large windows repeatedly.