Skip to content

Commit

Permalink
Update README.md (#391)
Browse files Browse the repository at this point in the history
Use the ingest api simpler readme steps

Signed-off-by: Nitish Tiwari <[email protected]>
  • Loading branch information
nitisht authored May 1, 2023
1 parent 18eb06b commit bee5528
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,13 @@ docker run -p 8000:8000 \

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`.

### Create a stream
### Send log events

```sh
curl --location --request PUT 'http://localhost:8000/api/v1/logstream/demo' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='
```

### Send events to the stream

```sh
curl --location --request POST 'http://localhost:8000/api/v1/logstream/demo' \
curl --location --request POST 'http://localhost:8000/api/v1/ingest' \
--header 'X-P-META-meta1: value1' \
--header 'X-P-TAG-tag1: value1' \
--header 'X-P-Stream: demo' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'Content-Type: application/json' \
--data-raw '[
Expand All @@ -83,6 +77,8 @@ curl --location --request POST 'http://localhost:8000/api/v1/logstream/demo' \
]'
```

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.

### Query the stream

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

0 comments on commit bee5528

Please sign in to comment.