Skip to content

Commit

Permalink
feat: a brief placeholder document for log-query endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia committed Jan 22, 2025
1 parent 29b6c16 commit 6fc4ec3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
33 changes: 33 additions & 0 deletions docs/user-guide/query-data/log-query.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
keywords: [log query, logs, search, experimental, HTTP endpoint]
description: Documentation for GreptimeDB's experimental log query endpoint, which provides a dedicated HTTP interface for searching and processing log data.
---

# Log Query (Experimental)

> Warning: The log query endpoint feature is currently experimental and may change in future releases.
GreptimeDB provides a dedicated HTTP endpoint to query log data. This feature allows you to search and processing log entries using a simple query interface. This is an add-on feature to existing GreptimeDB capabilities like SQL queries and Flow computations. You can still use your existing tools and workflows to query log data like before.

## Endpoint

```http
POST /v1/logs
```

## Headers
- [Authorization](/user-guide/protocols/http/#authentication)
- `Content-Type`: `application/json`

## Request Format

The request body should be a JSON object (this is subject to change in patch version within the experimental phase). For the latest request format, please refer to the [implementation](https://github.com/GreptimeTeam/greptimedb/blob/main/src/log-query/src/log_query.rs):

## Response

This endpoint has the same response format as the SQL query endpoint. Please refer to the [SQL query response](/user-guide/protocols/http/#response) for more details.

## Limitations

- Maximum result limit: 1000 entries
- Only supports tables with timestamp and string columns
5 changes: 3 additions & 2 deletions docs/user-guide/query-data/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
keywords: [query languages, PromQL, SQL, views, CTE, query libraries, external data]
description: Overview of query languages supported by GreptimeDB, including PromQL and SQL, and recommended libraries for querying data.
keywords: [query languages, PromQL, SQL, views, CTE, query libraries, external data, log query]
description: Overview of query languages and features supported by GreptimeDB, including PromQL, SQL, and log query capabilities.
---

# Overview
Expand All @@ -9,6 +9,7 @@ description: Overview of query languages supported by GreptimeDB, including Prom

- [PromQL](./promql.md)
- [SQL](./sql.md)
- [Log Query](./log-query.md) (Experimental)

Since v0.9, GreptimeDB supports view and CTE just like other databases, used to simplify queries:

Expand Down
1 change: 1 addition & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const sidebars: SidebarsConfig = {
'user-guide/query-data/view',
'user-guide/query-data/cte',
'user-guide/query-data/query-external-data',
'user-guide/query-data/log-query',
],
},
{ type: 'category', label: 'Manage Data', items: ['user-guide/manage-data/overview', 'user-guide/manage-data/data-index'] },
Expand Down

0 comments on commit 6fc4ec3

Please sign in to comment.