addEvents
POST {{app_url}}/api/addEvents
Insert one or more structured log events. If you generate many events per second, group them into batches, and send a batch every few seconds for each of your server.
With addEvents
you can define and set values for fields other than message
, but you must generate a unique session
id for each upload process.
The request body must be 6MB or less. Othwewise, we reject larger requests.
Request Body
{"token"=>"{{log-write-token}}", "session"=>"session_1234", "sessionInfo"=>{"serverHost"=>"test", "logfile"=>"account"}, "events"=>[{"ts"=>"{{currentdate1}}", "attrs"=>{"message"=>"{\"field 1\":{\"barr\":\"foo\", \"b\":[{\"1\":\"3\"},{\"2\":\"4\"}]}, \"field 2\": \"fooo\"}", "parser"=>"json"}}, {"ts"=>"{{currentdate2}}", "attrs"=>{"message"=>"{\"field 1\":\"barr\", \"field 2\": \"fooo\"}", "parser"=>"json"}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"bytesCharged":0,"status":"success"}