Skip to content

Commit 38d1817

Browse files
committed
[Streams] Add bulk API example
1 parent bd23195 commit 38d1817

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

solutions/observability/streams/wired-streams.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ Use the **Custom Logs (Filestream)** integration to send data to wired streams:
113113
1. Under **Where to add this integration**, select an agent policy that uses the output you configured in step 4.
114114
:::
115115

116+
:::{tab-item} API
117+
118+
Send data to the `/logs/` endpoint using the [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Refer to the following example for more information:
119+
120+
```json
121+
POST /logs/_bulk
122+
{ "create": {} }
123+
{ "@timestamp": "2025-05-05T12:12:12", "body": { "text": "Hello world!" }, "resource": { "attributes": { "host.name": "my-host-name" } } }
124+
{ "create": {} }
125+
{ "@timestamp": "2025-05-05T12:12:12", "message": "Hello world!", "host.name": "my-host-name" }
126+
```
127+
:::
128+
116129
::::
117130

118131
## View wired streams in Discover [streams-wired-streams-discover]

0 commit comments

Comments
 (0)