API Reference — Events Ingestion
事件结构
Required Fields
Required Fields
Optional Fields
Optional Fields
发送事件
摄取蓝图
适用于常见用例的现成事件模式。使用经过验证的蓝图开始,而不是从头开始构建。LLM Blueprint
API Gateway Blueprint
Object Storage Blueprint
Stream Blueprint
Time Range Blueprint
View All Blueprints
最佳实践
Use Unique Event IDs
Use Unique Event IDs
使用确定性 ID 防止重复:
${customerId}_${action}_${timestamp}。Implement Retries
Implement Retries
对于 5xx 和
429 错误,请使用指数退避进行重试。不要重试其他 4xx 错误。Include Timestamps
Include Timestamps
对于实时事件,请省略时间戳。对于延迟事件或批量事件,请提供时间戳以确保准确性。
Monitor Delivery
Monitor Delivery
跟踪成功率并将失败事件排队以便重试。
故障排除
Events not appearing
Events not appearing
- 事件名称必须与 meter 完全匹配(区分大小写)
- Customer ID 必须存在于您的账户中
- 检查 meter filters 是否排除了事件
- 确认时间戳是近期的
Authentication errors (401)
Authentication errors (401)
确认 API key 正确,并使用以下格式:
Bearer YOUR_API_KEY。Validation errors (400)
Validation errors (400)
确保所有必填字段均已提供:
event_id、customer_id、event_name。Metadata not aggregating
Metadata not aggregating
- Metadata keys 必须与 meter 的 “Over Property” 完全匹配
- 使用数字而非字符串:
tokens: 150,而不是tokens: "150"