Search
Search events
post/v1/events/search
For a set of events, look up matched billable metrics and customers by transaction id. This endpoint looks at transactions that occurred in the last 34 days, and is intended for sampling-based testing workflows. It is heavily rate limited.
Body Parameters
transactionIdsarray of string
The transaction IDs of the events to retrieve
Returns
idstring
customer_idstring
The ID of the customer in the ingest event body
event_typestring
timestampstring
formatdate-time
transaction_idstring
is_duplicateboolean
optional
matched_billable_metricsarray of object
optional
matched_customerobject
optional
The customer the event was matched to if a match was found
processed_atstring
optional
formatdate-time
propertiesmap
optional
curl https://api.metronome.com/v1/events/search \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \
-d '{
"transactionIds": [
"2021-01-01T00:00:00Z_cluster42"
]
}'
200 Example
[
{
"id": "id",
"customer_id": "customer_id",
"event_type": "event_type",
"timestamp": "2019-12-27T18:11:19.117Z",
"transaction_id": "transaction_id",
"is_duplicate": true,
"matched_billable_metrics": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name",
"aggregate": "aggregate",
"aggregate_keys": [
"string"
],
"aggregation_key": "aggregation_key",
"aggregation_type": "COUNT",
"archived_at": "2019-12-27T18:11:19.117Z",
"custom_fields": {
"foo": "string"
},
"event_type_filter": {
"in_values": [
"string"
],
"not_in_values": [
"string"
]
},
"filter": {
"foo": "bar"
},
"group_by": [
"string"
],
"group_keys": [
[
"string"
]
],
"property_filters": [
{
"name": "name",
"exists": true,
"in_values": [
"string"
],
"not_in_values": [
"string"
]
}
],
"sql": "sql"
}
],
"matched_customer": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"processed_at": "2019-12-27T18:11:19.117Z",
"properties": {
"foo": "bar"
}
}
]