<commit_before>## API

Get current database tables:

```
GET /tables
```

Get table details:

```
GET /tables/:name
```

Execute select query:

```
POST /select?query=SQL
 GET /select?query=SQL
```

### Response formats

Successful response:

```json
{
  "columns": [
    "column_name1",
    "column_name2",
    "column_name3"
  ],
  "rows": [
    [<commit_msg>Update docs<commit_after># API

Current endpoint:

```
 GET /info
 GET /tables
 GET /tables/:table
 GET /tables/:table/indexes
 GET /query
POST /query
 GET /explain
POST /explain
 GET /history
```

# Query Response

Successful response:

```json
{
  "columns": [
    "column_name1",
    "column_name2",
    "column_name3"
  ],
  "rows": [
    [
{'fraction_non_alphanumeric': 0.16028368794326242, 'fraction_numerical': 0.00851063829787234, 'mean_word_length': 3.278787878787879, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7328015', 'n_tokens_mistral': 266, 'n_tokens_neox': 257, 'n_words': 63}