# Meters

The Zuora Mediation APIs provide a comprehensive set of endpoints to manage, test, run, and monitor usage meters, including execution, status checks, and run-level summaries.


## Run a specific version of a meter

 - [POST /meters/run/{meterId}/{version}](https://developer.zuora.com/v1-api-reference/api/meters/runspecificversionofmeter.md): Executes a specific version of a meter in Zuora Mediation. You can choose to run it with either a local file or event store source by providing optional configurations.

Note on long-running meters and timeouts: 
For large meters with many operators, this API call might take longer to return and, in some cases, can time out even though the meter run has been successfully triggered.
To safely handle this, provide a uniqueKey field in the request body.
If the operation times out, retry the same request with the same uniqueKey.
If the original run already exists, the API returns a 400 error indicating a duplicate uniqueKey instead of creating a new run.

## Test a specific version of a meter

 - [POST /meters/debug/{meterId}/{version}](https://developer.zuora.com/v1-api-reference/api/meters/testspecificversionofmeter.md): Test a specific version of a meter in Zuora Mediation without executing a full run. It supports multiple input methods, including uploaded files, sample files, and manual test data. This is useful for validating meter logic and transformations before meter run.

## Retrieve summary data for a meter

 - [POST /meters/{meterId}/summary](https://developer.zuora.com/v1-api-reference/api/meters/retrievemetersummarydata.md): Retrieves summary data for a specific meter in Zuora Mediation, providing a rolled-up view of a meter run or time window. The API supports grouping by Operator ID, Error Code, or Session ID, and allows optional filters such as Query From Time, Query To Time, Operator IDs, and Session IDs. The API returns aggregated output and error counts per group and includes validation with detailed error responses for invalid parameters or formats.

## Retrieve the run status of a specific meter version

 - [GET /meters/{meterId}/{version}/runStatus](https://developer.zuora.com/v1-api-reference/api/meters/getrunstatusofspecificmeterversion.md): Retrieves the current run status of a specific meter version in Zuora Mediation. It returns an integer code indicating the status, such as RUNNING, COMPLETED, or FAILED, which helps monitor the meter's execution state.

## Export details of a specific meter

 - [GET /meters/export/{meterId}](https://developer.zuora.com/v1-api-reference/api/meters/exportspecificmeter.md): The Export Meter operation exports the full definition of a specific meter in Zuora Mediation, including metadata, all versions, event schemas, and operator configurations (source, processor, sink). It's useful for reviewing, backing up, or replicating meter setups across environments.

## Import a meter definition

 - [POST /meters/import](https://developer.zuora.com/v1-api-reference/api/meters/importmeterdefinition.md): Import a meter definition into Zuora Mediation using a file exported from the Export Meter API.

