# IRPCEventsAdmin.ClearEvents

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Event administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/ClearEvents/

Badges: `Administration API / specialized` `admin` `session`

Deletes all events of the vault.

- **Service:** [Event administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/index.md) `MFiles.IRPCEventsAdmin`
- **gRPC method:** `/MFiles.IRPCEventsAdmin/ClearEvents`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/clear-events`
- **Request:** [`ClearEventsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/ClearEvents/index.md#request)
- **Response:** [`ClearEventsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/ClearEvents/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- **Destructive.** Removes the whole event log; export it first if you need it
  ([GetEventsRange](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/GetEventsRange/index.md)).
- Runs in the background: the server first creates the pending notifications, then deletes the
  events. The call returns after about five seconds, possibly before the log is empty.
- Requires a vault session and the vault right `manage_events`. Refused in vaults with the
  advanced event log features; use
  [DeleteEventsRange](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/DeleteEventsRange/index.md) there.

<a id="request"></a>

## Request: ClearEventsRequest

No fields.

<a id="response"></a>

## Response: ClearEventsResponse

No fields.

<a id="related"></a>

## Related methods

- [GetEventsRange](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/GetEventsRange/index.md): Gets events by ID range and filters, oldest or newest first, with an optional maximum count.
- [DeleteEventsRange](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEventsAdmin/DeleteEventsRange/index.md): Deletes the events whose IDs are in the given range.
