OK!Gotcha provides detailed audit trails for all approval-related activities. Every action in the approval workflow is logged with relevant metadata, creating a complete audit trail that can be used for compliance, debugging, and analytics.
You can also access audit logs programmatically via the API:
Copy
import { OkGotcha } from '@okgotcha/sdk';const ok = OkGotcha();// Get audit logs for a specific time rangeconst logs = await ok.getAuditLogs({ startTime: new Date('2023-01-01'), endTime: new Date('2023-01-31'), limit: 100, offset: 0});// Get audit logs for a specific approvalconst approvalLogs = await ok.getAuditLogs({ approvalId: 'apr_12345'});
# Export logs to JSON via the APIcurl -X GET "https://api.okgotcha.com/v1/audit-logs?startTime=2023-01-01&endTime=2023-01-31" \ -H "Authorization: Bearer YOUR_API_KEY" \ > audit_logs.json