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

Ingest

Ingest events
v1.usage.ingest(**kwargs) -> void
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
usagearray
optional
Array[{ customer_id, event_type, timestamp, 2 more}]
Hide ParametersShow Parameters
customer_idString
minLength1
event_typeString
minLength1
timestampString

RFC 3339 formatted

transaction_idString
minLength1
maxLength128
propertieshash
optional
Hash[Symbol, untyped]
require "metronome_sdk"

metronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token")

result = metronome.v1.usage.ingest

puts(result)