Get paginated audit logs for the organization. #### Path Parameters **`organization_id`** string required Organization ID #### Request Body **`skip`** integer optional · Defaults to `0` Number of records to skip (min: 0). **`take`** integer optional · Defaults to `50` Number of records to return (min: 1, max: 100). **`start_date`** datetime optional Filter logs from this date (ISO 8601 format). **`end_date`** datetime optional Filter logs until this date (ISO 8601 format). **`resource_type`** string optional Filter by resource type. Valid values: `organization_user`, `assistant`, `rule`, `document`. **`action`** string optional Filter by action. Valid values: `created`, `updated`, `deleted`, `added`, `removed`, `restored`, `entity_attached`, `entity_detached`. ## Returns Returns paginated audit logs. ## Notes - Returns all audit logs for the organization - Includes member updates, deletions, restorations, and invitations ## Authorization Requires Admin or Owner role. ```bash curl -X POST https://api.aitronos.com/v1/organizations/org_abc123/dashboard/change-logs \ -H "X-API-Key: $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "skip": 0, "take": 50, "resource_type": "assistant", "action": "created" }' ``` ```python import requests import os api_key = os.environ["FREDDY_API_KEY"] org_id = "org_abc123" response = requests.post( f"https://api.aitronos.com/v1/organizations/{org_id}/dashboard/change-logs", headers={ "X-API-Key": api_key, "Content-Type": "application/json" }, json={ "skip": 0, "take": 50, "resource_type": "assistant", "action": "created" } ) logs = response.json() ``` ```javascript const response = await fetch('https://api.aitronos.com/v1/organizations/org_abc123/dashboard/change-logs', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.FREDDY_API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ skip: 0, take: 50, resource_type: 'assistant', action: 'created' }) }); const logs = await response.json(); ``` **Response:** 200 OK ```json { "logs": [ { "id": "log_abc123", "user_id": "usr_xyz789", "user_name": "Admin User", "user_email": "admin@example.com", "action": "updated", "timestamp": "2025-01-20T14:45:00Z", "resource_type": "organization_user", "resource_id": "usr_def456", "resource_name": "John Doe", "changes": [ { "field": "role_id", "old_value": "role_member", "new_value": "role_admin" } ] } ], "total_count": 156, "skip": 0, "take": 50 } ```