Send logs to a stream
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://INGESTION_ENDPOINT/api/v1/logstream/stream_name
This API does not require any headers for specifying the stream name.
Authorization
Authorization
RequiredBasic <token>In: header
Request Body
application/json
OptionalPath Parameters
stream_name
RequiredstringResponse Body
Successful response
curl -X POST "http://ENDPOINT/api/v1/logstream/string" \
-H "Authorization: Basic <token>" \
-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