Skip to content

Commit bee5528

Browse files
authored
Update README.md (#391)
Use the ingest api simpler readme steps Signed-off-by: Nitish Tiwari <[email protected]>
1 parent 18eb06b commit bee5528

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,13 @@ docker run -p 8000:8000 \
5555

5656
Once this runs successfully, you'll see dashboard at [http://localhost:8000](http://localhost:8000). You can login to the dashboard default credentials `admin`, `admin`.
5757

58-
### Create a stream
58+
### Send log events
5959

6060
```sh
61-
curl --location --request PUT 'http://localhost:8000/api/v1/logstream/demo' \
62-
--header 'Authorization: Basic YWRtaW46YWRtaW4='
63-
```
64-
65-
### Send events to the stream
66-
67-
```sh
68-
curl --location --request POST 'http://localhost:8000/api/v1/logstream/demo' \
61+
curl --location --request POST 'http://localhost:8000/api/v1/ingest' \
6962
--header 'X-P-META-meta1: value1' \
7063
--header 'X-P-TAG-tag1: value1' \
64+
--header 'X-P-Stream: demo' \
7165
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
7266
--header 'Content-Type: application/json' \
7367
--data-raw '[
@@ -83,6 +77,8 @@ curl --location --request POST 'http://localhost:8000/api/v1/logstream/demo' \
8377
]'
8478
```
8579

80+
Note: The `X-P-Stream` header is used to specify the log stream where data is sent. Parseable will create the stream automatically if it doesn't exist already.
81+
8682
### Query the stream
8783

8884
You can see the events in Parseable UI, or use the below curl command to see the query response on CLI.

0 commit comments

Comments
 (0)