Send logs to a dataset
Log Ingestion API via Stream Endpoint
In this approach, you need to create a dataset first using the Create Stream API.
Once the dataset is created, you can send logs to the dataset ingestion API endpoint:
http://INGESTION_ENDPOINT/api/v1/logstream/stream_name
This API does not require any headers for specifying the dataset name.
Authorization
basicAuth AuthorizationBasic <token>
In: header
Path Parameters
stream_name*string
Request Body
application/json
Response Body
application/json
curl -X POST "http://localhost:8000/api/v1/logstream/string" \ -H "Content-Type: application/json" \ -d '[ { "id": "434a5f5e-2f5f-11ed-a261-asdasdafgdfd", "datetime": "24/Jun/2022:14:12:15 +0000", "host": "153.10.110.81", "user-identifier": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0", "method": "PUT", "status": 500, "referrer": "http://www.google.com/" } ]'Empty
Was this page helpful?