Skip to main content

Ingestion

Log event can be sent via POST request to the log ingestion API. There are two ways to send log events to the API:

  • Log Ingestion API via Ingestion endpoint and HTTP Header: In this case, you can add the x-p-stream header to the request to specify the stream name. If the stream does not exist, it will be created automatically. This is useful for automation scenarios where you want to create a stream and send logs to it via agents.
  • Log Ingestion API via Stream endpoint: In this approach you need to create a stream first, using the Create Stream API. Once the stream is created, you can send logs to the stream ingestion API endpoint - http://{{endpoint}}/api/v1/logstream/{{stream_name}}. This API doesn't require any headers for stream name.

Run in Postman

Note
  • To add metadata with a log event, please add the a HTTP header X-P-Meta-<key> with the value of the metadata. For example, to add a metadata user_id with value 123, you can add a header X-P-Meta-user_id: 123.
  • To add a tag with a log event, please add the a HTTP header X-P-Tag-<key> with the value of the tag. For example, to add a tag app with value kafka, you can add a header X-P-Tag-app: kafka.

Get Updates from Parseable

Subscribe to keep up with latest news, updates and new features on Parseable