From 7970f65e81d563a9172ac6346c862c64579dd3a9 Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Mon, 1 May 2023 16:54:34 +0530 Subject: [PATCH] Update README.md Use the ingest api simpler readme steps Signed-off-by: Nitish Tiwari --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7d7f4f1b3..81b98068d 100644 --- a/README.md +++ b/README.md @@ -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 '[ @@ -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.