跳转到主要内容
POST /api/v1/ingest/{type}/{stream}
{type}logsmetricstraces。POST 单条记录对象或数组。流在首次写入时创建,schema 随 字段出现演进。时间戳为 Unix 纪元起的微秒(_timestamp)。 路径参数
参数类型说明
typestringlogs / metrics / traces
streamstring流名,如 app
curl -X POST http://localhost:5080/api/v1/ingest/logs/app \
  -H "authorization: Bearer $MS_JWT" \
  -H 'content-type: application/json' \
  -d '[{"_timestamp":1700000000000000,"level":"error","msg":"db pool exhausted","trace_id":"abc123"}]'
{ "accepted": 1, "rejected": 0, "errors": [] }
413 表示存储配额耗尽;429 表示触发接入限流。