# List user audit events

View a specified user's activity records in the current workspace in chronological order.

```text
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/users/{user_id}/audit-events
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

First [select the user](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/users-and-permissions/users/list-users.html.md#select-a-user). To continue reading, retain the cursor returned by the previous page.

## Request parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Input example

```bash
curl -G "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/users/$USER_ID/audit-events" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --data-urlencode "limit=20"
```

:::::
:::::{tab-item} Parameter description

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string | Yes | Target workspace ID. |
| `user_id` | string | Yes | ID of the user whose activity records you want to view. |

### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `cursor` | string | No | Cursor returned by the previous page. |
| `limit` | integer | No | Number of items per page. The default is 20; the range is 1–100. |

When `data.next_cursor` is non-empty, use it as the `cursor` for the next request. Stop paginating when `data.next_cursor` is empty.

:::::
::::::
:::::::
## Successful response

On success, returns structured user activity records for the current page and the next-page cursor.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "events": [],
    "next_cursor": "",
    "request_id": "req-001",
    "trace_id": "trace-001"
  }
}
```

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data.events` | object (array) | User activity records for the current page. |
| `data.next_cursor` | string | Cursor for the next page; empty when there is no next page. |
| `data.request_id` | string | Request correlation ID. |
| `data.trace_id` | string | Trace ID. |

:::::
::::::
:::::::

## Error response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}
```

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `msg` | string | Error message. |
| `data` | null | — |

:::::
::::::
:::::::
