---
title: "Get Audit Log for a User"
method: GET
path: "/users/{user_id}/audit_log"
tags: ["Audit Logs"]
---

# Get Audit Log for a User

`GET /users/{user_id}/audit_log`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/users/{user_id}/audit_log`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/users/:user_id/audit_log/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves the history of changes made to the properties of a user.

## Path parameters

- `user_id` integer, required

## Query parameters

- `async` boolean
- `request_id` integer

## Headers

- `Accept` 'application/vnd.nexla.api.v1+json' | 'application/json': Setting to `application/vnd.nexla.api.v1+json` is recommended.

## Response `200`

Success

- union
  - LogEntry[]
    - `id` integer: Unique ID of this change event.
    - `item_type` string: The type of resource that the change was performed on.
    - `item_id` integer: Unique ID of resource that the change was performed on.
    - `event` string: The type of change event that was executed.
    - `change_summary` string[]
    - `object_changes` object: This object contains before and after information on each property that was modified as a result of this change event. Each key in this object is the name of the property that was modified. The value of each property is a 2-element array. The first element shows the value of the property before the change event was executed and the second element shows the value of this property after the change event was executed. For example, the values below should be interpreted as resource `status` was changed from `ACTIVE` to `PAUSED` and resource `name` was changed from `before` to `after`. ``` { "status": ["ACTIVE", "PAUSED"], "name": ["before", "after"] } ```
    - `association_resource` object: Sometimes change events result in updates to relationships between resources. This object reflects information about the resource relationship that was modified.
      - `type` string: The resource type of the resource whose relationship with this resource was modified.
      - `id` integer: The ID of the resource whose relationship with this resource was modified.
    - `request_ip` string, ipv4: IP Address of the device where this change event request originated.
    - `request_user_agent` string: User Agent of the browser where this change event request originated.
    - `request_url` string, url: Nexla UI or API URL that was accessed by the user to trigger this change event.
    - `user` object: Details about the user who triggered this change event. Note that if changes were triggered by a Nexla support team member acting on behalf of a user then this field reflects information about that user while `impersonator_id` reflects information about the Nexla support team member.
      - `id` integer
      - `email` string, email
    - `impersonator_id` string, nullable: If the changes were made by a Nexla support team member acting on behalf of a user then this field reflects information about the Nexla support team member.
    - `org_id` integer: The ID of the organization that this resource belongs to.
    - `owner_id` integer: The ID of the user that this resource belongs to.
    - `owner_email` string: Email ID of the user that this resource belongs to.
    - `created_at` string, date-time
  - AsyncResponse: This object represents the response of an asynchronous operation. The response can be a dictionary or an array of dictionaries. The format of the response depends on the operation that was executed.
    - `request_id` integer: The unique ID of the request that was executed. This ID can be used to track the status of the request.
    - `status` 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'
    - `request_started_at` string, date-time: The date and time when the request was started.
    - `progress` integer: The progress of the request (value from 0 to 100). This value is a percentage of the total progress of the request. Applicable only to certain types of async operations.
    - `result` object: The result of the async operation. Format depends on the task type.
    - `request_stopped_at` string, date-time: The date and time when the request was stopped. This field is only present if the request has been stopped (due to cancellation or error).
    - `request_completed_at` string, date-time: The date and time when the request was completed. This field is only present if the request has been completed successfully.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
