Welcome to Zuora Product Documentation

Explore our rich library of product information

Running pipelines: manage_meters_run

Use manage_meters_run operations to start, monitor, stop, and analyze meter runs, manage prefetch jobs, and ingest usage events.

OperationAccessWhat it does
run_guidanceReadDescribes the workflow. Start here.
run_meterWriteStarts a run. Accepts a mode (normal or debug) and optional run parameters.
stop_meter_runWriteStops a run. Using the run ID is preferred.
get_run_statusReadReturns the current status of a meter version
list_run_historyReadLists past runs, with filters and cursor pagination
get_run_summaryReadReturns operator-level statistics for a run
get_run_recordsReadReturns paged output records from a SINK step
query_event_storeReadRuns an asynchronous SQL SELECT against an event store and returns a query ID
get_operator_summaryReadReturns aggregated operator statistics over a time window
list_prefetch_definitionsReadLists live prefetch definitions for a meter version
get_prefetch_statusReadReturns the status of a prefetch job
start_prefetchWriteStarts a prefetch job, optionally for a single processor
cancel_prefetchWriteCancels a prefetch job
ingest_usage_eventsWriteReturns the REST endpoint and instructions for sending usage events. Your system makes the POST request with its own OAuth credentials.

Run status values

StatusMeaning
INITIALIZINGThe run is starting up
JOB_SUBMISSION_IN_PROGRESSThe run job is being submitted
RUNNINGThe run is active
PAUSEDThe run is paused
STOPPINGA graceful stop is in progress
COMPLETEDThe run finished. Confirm billing completeness through the error audit.
FAILEDThe run failed
CANCELEDThe run was canceled
FORCE_STOPPEDThe run was force stopped
NEVER_RUNThe meter version has never been run

Stopping a run

MethodBehaviorWhen to use it
Graceful stop (default)Shuts down streaming pipelines cleanly by saving a checkpointNormal stops
Force stopStops the run immediately through the REST API (forceStop=true)Only when a run is stuck in STOPPING or RUNNING after a graceful attempt

You cannot force a stop while its status is STOPPING. A force stop on a streaming pipeline results in FORCE_STOPPED, and in-flight data may be lost. Confirm with your team before using force stop.

Prefetch

Prefetch loads reference data, such as lookup tables, before a run needs it. The typical sequence is:

  1. Check existing definitions or the current prefetch status for a meter version.
  2. Start prefetch for a specific processor. The response returns a job ID.
  3. Poll the job status until it reaches FETCHED.
  4. Cancel the job if you no longer need it.

If you start prefetch without specifying a processor, it runs for all live definitions. In that case no job ID is returned, so you track progress through the prefetch status instead.

Direct ingestion

ingest_usage_events does not send events for you. It returns the REST endpoint along with instructions. Your system then sends the events using its own OAuth credentials. Each event must include CustomerId, UsageIdentifier, UsageDate, and Quantity.