Parseable

Query a log dataset


Parseable Log Query API
This endpoint allows you to query logs using PostgreSQL syntax.

The query API accepts the following parameters:

  • query: The SQL query to execute (required)
  • startTime: The start time for the query range (optional)
  • endTime: The end time for the query range (optional)
  • streamName: The name of the log dataset to query (required)

Example request body:

{
  "query": "SELECT * FROM log WHERE log ILIKE '%error%';",
  "startTime": "2023-01-01 00:00:00.000000",
  "endTime": "2023-01-01 23:59:59.999999",
  "streamName": "example-dataset"
}
POST
/api/v1/query

Authorization

basicAuth
AuthorizationBasic <token>

In: header

Request Body

application/json

query*string
startTime?string
endTime?string
streamName*string

Response Body

application/json

curl -X POST "http://localhost:8000/api/v1/query" \  -H "Content-Type: application/json" \  -d '{    "query": "string",    "streamName": "string"  }'
Empty

Was this page helpful?