Skip to main content

Quick Start

This page shows you how to get started with Parseable quickly. You'll start a standalone Parseable server, and then insert and read some sample data using SQL.

Start Parseable

Parseable Docker is the fastest way to get started. If you don't have Docker installed already, refer this doc to install Docker on your machine.

docker run -p 8000:8000 -v /tmp/parseable:/data \
parseable/parseable:latest \
parseable server --demo
Important

Parseable listens on the port 8000. You can access Parseable Console at http://localhost:8000. Default credentials are parseable and parseable.

caution

In demo mode, i.e. when running with --demo flag, Parseable uses a public object store. Please change this to your S3 (or compatible) bucket before using Parseable.

Create a log stream

Parseable uses log streams to organize log data. You can create a log stream using the following command. Change <stream-name> to the stream name you want to use.

curl --location --request PUT \
'http://localhost:8000/api/v1/logstream/<stream-name>' \
--header 'Authorization: Basic cGFyc2VhYmxlOnBhcnNlYWJsZQ=='

Write log data

Parseable server automatically infers schema from the log data. You can post log data using the following command. Change <stream-name> to the stream name you created in the previous step.

curl --location --request POST \
'http://localhost:8000/api/v1/logstream/<stream-name>' \
--header 'X-P-META-meta1: value1' \
--header 'X-P-TAGS-tag1: value1' \
--header 'Authorization: Basic cGFyc2VhYmxlOnBhcnNlYWJsZQ==' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": "434a5f5e-2f5f-11ed-a261-0242ac120002",
"datetime": "24/Jun/2022:14:12:15 +0000",
"host": "153.10.110.81",
"user-identifier": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) Firefox/64.0",
"method": "PUT",
"status": 500,
"referrer": "http://www.google.com/"
}
]'

Query log data

You can query the data via Parseable Console or API. To query the data via Console, login at http://localhost:8000 and select the correct log stream (that was just created) and correct time stamp.

To query the data via API, use the following command. Before using the command make sure to update the startTime and endTime fields with correct time in UTC. Also, change the <stream-name> to the stream name you created in the first step.

curl --location --request POST 'http://localhost:8000/api/v1/query' \
--header 'Authorization: Basic cGFyc2VhYmxlOnBhcnNlYWJsZQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": "select * from <stream-name>",
"startTime": "2022-09-10T08:20:00+00:00",
"endTime": "2022-09-10T08:20:31+00:00"
}'

For complete Parseable API documentation, refer to Parseable API Ref Docs.