Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Ingest

Ingest events
v1.usage.ingest(UsageIngestParams**kwargs)
post/v1/ingest

Send usage events to Metronome. The body of this request is expected to be a JSON array of between 1 and 100 usage events. Compressed request bodies are supported with a Content-Encoding: gzip header. See Getting usage into Metronome to learn more about usage events.

Parameters
usageiterable
optional
customer_idstrevent_typestrtimestampstrtransaction_idstrpropertiesDict[str, object]Iterable[Usage]
Hide ParametersShow Parameters
customer_idstr
minLength1
event_typestr
minLength1
timestampstr

RFC 3339 formatted

transaction_idstr
minLength1
maxLength128
propertiesDict[str, object]
optional
Dict[str, object]
from metronome import Metronome

client = Metronome(
    bearer_token="My Bearer Token",
)
client.v1.usage.ingest()