# Event Store

Event Store APIs let you query and manage raw metering events in Zuora Mediation, including submitting SQL-style queries, retrieving results, and performing bulk deletions or truncation.


## Bulk delete events from an event store

 - [POST /meters/events/bulkDelete](https://developer.zuora.com/v1-api-reference/api/event-store/bulkdeleteeventsfromeventstore.md): Allows you to delete multiple events from an event store in Zuora Mediation using a file that lists the event IDs to be removed. It is useful for cleaning up or correcting data in bulk.

## Retrieve the latest query job of a specific event store

 - [GET /meters/events/stores/{eventStoreId}/jobs/latest](https://developer.zuora.com/v1-api-reference/api/event-store/getlatestqueryjobofspecificeventstore.md): Retrieves the most recent query job executed on a specific event store in Zuora Mediation. It returns metadata such as query type (for example, DELETE), status, record counts, and timestamps.

## Truncate all data from an event store

 - [POST /meters/events/stores/{eventStoreId}/truncate](https://developer.zuora.com/v1-api-reference/api/event-store/truncateeventstore.md): Truncates (deletes) all events from a specific event store in Zuora Mediation.

This operation runs asynchronously and returns a query job identifier that
you can use with the Event Store query job APIs to monitor status.

## Submit an event store query

 - [POST /meters/event-store-queries](https://developer.zuora.com/v1-api-reference/api/event-store/submiteventstorequery.md): Submits a SQL-style asynchronous query to the Event Store to retrieve and inspect metering events for validation, troubleshooting, and reconciliation. The API returns a queryId that can be used to poll and fetch paginated results.

## Retrieve the results for an event store query

 - [GET /meters/event-store-queries/{queryId}](https://developer.zuora.com/v1-api-reference/api/event-store/getqueryresultsforeventstore.md): Retrieves paginated result rows and column metadata for a previously submitted Event Store query using its queryId, including total row count, row-level field values, and readiness status. Query execution is asynchronous.

