Ingest Event
Ingests a list of customer events, creating new events and identifying duplicates.
This endpoint processes a batch of customer events, checks for idempotency to prevent duplicates, and attempts to create new events in the system. It returns detailed information about the process, including the number of successfully created events, any duplicates identified, and errors encountered.
Parameters: request: The request object, which includes details about the HTTP request. This is typically provided by the FastAPI framework. customer_event_list (CustomerEventList): An object containing a list of customer events to be ingested. Each event must include an idempotency key to prevent duplicate processing.
Returns: A dictionary with two keys:
- ‘info’: A dictionary containing details about the ingestion process, including the number of events successfully created (‘created_events’) and a list of idempotency keys for events identified as duplicates (‘duplicates’).
- ‘errors’: A list of dictionaries, each representing an error encountered during the ingestion process. Each dictionary includes the ‘idempotency_key’ of the event that caused the error and a description of the error (‘error’).
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Represents a list of customer events.
Attributes: events (list[CustomerEvent]): A list of customer events. Each event should be a dictionary with at-least the following keys: event_name, timestamp, idempotency_key.
Response
Schema for the response of the customer event ingestion process.
Attributes: info (InfoSchema): Detailed information about the ingestion process, including the number of created events and duplicates. errors (list[ErrorSchema]): A list of errors that occurred during the ingestion process.
Detailed information about the customer event ingestion process.
A list of errors that occurred during the ingestion process.