4.6. REST API#
The QuasarDB REST server, qdb_rest, gives HTTP access to a QuasarDB cluster.
A client needs an HTTP library and no QuasarDB client library.
This page describes version 2 of the API, which the server serves below /api/v2.
The API has routes for these tasks:
Get and renew access tokens.
Run queries in the QuasarDB query language or in SQL.
Create, list, describe and delete tables.
Write rows to tables and read rows from tables.
Attach tags to tables and find tables by tag.
Read the statistics of the cluster nodes.
The API reads and writes data as Arrow IPC streams, as JSON, as NDJSON and as CSV. Arrow is the fastest format and the format that we recommend for programs. A result arrives as Arrow record batches that Arrow libraries, pandas, Polars and DuckDB use without a conversion, and each value keeps its type and its precision. The examples on this page use Arrow, except where they show a text format.
To install and configure the server, see qdb_rest. To connect an application or a tool that supports the Arrow Flight SQL standard, see Arrow Flight SQL.
4.6.1. Requirements#
Before you start, make sure that:
You have access to a running QuasarDB cluster.
A
qdb_restserver runs and connects to that cluster.You have Python 3 with the
requestsandpyarrowpackages. The examples also usepandas.
Install the packages:
python3 -m pip install requests pyarrow pandas
The examples on this page use a server that listens on https://127.0.0.1:40443.
This is the default address of the HTTPS listener.
4.6.2. Quick start#
This example logs in to a secure cluster, runs a query and reads the result as a pandas DataFrame:
import json
import pyarrow as pa
import requests
URL = "https://127.0.0.1:40443/api/v2"
ARROW = "application/vnd.apache.arrow.stream"
s = requests.Session()
# Only for a server with a self-signed certificate.
s.verify = False
# Arrow is compact. On a fast network, compression costs more time than it saves.
s.headers["Accept-Encoding"] = "identity"
with open("user_private.key") as f:
r = s.post(f"{URL}/auth/login", json=json.load(f))
r.raise_for_status()
tokens = r.json()
s.headers["Authorization"] = "Bearer " + tokens["access_token"]
def query(q):
r = s.post(
f"{URL}/query",
data=q,
headers={"Content-Type": "text/plain", "Accept": ARROW},
)
r.raise_for_status()
return pa.ipc.open_stream(r.content).read_all()
print(query("SELECT * FROM trades").to_pandas())
$timestamp $table price volume exchange note
0 2026-01-05 09:30:00.000 trades 101.25 300 XNAS open
1 2026-01-05 09:30:01.500 trades 101.50 120 XNYS NaN
2 2026-01-05 09:30:02.000 trades 101.40 75 XNAS NaN
The examples that follow use the session s, the constants URL and ARROW, and the function query of this example.
4.6.3. Conventions#
These rules apply to each example and to each route on this page.
- Certificates
A server without a configured certificate generates a self-signed certificate at each start.
s.verify = Falsetellsrequeststo accept that certificate, andrequeststhen writes a warning for each request. When the server has a certificate that your computer trusts, omit that line. To trust one certificate, sets.verifyto the path of its PEM file.- Request bodies
A query is the request body, as plain text. Send it with
Content-Type: text/plainorContent-Type: application/sql. For each other content type, the server answers status 415.requestssets no content type for a string body, so the examples set the header explicitly.- Response formats
The
Acceptheader selects the format of a result. JSON is the default. See Response formats.- Request identifiers
Each response has an
X-Request-Idheader. The server writes the same identifier in its log lines for that request. When a request has anX-Request-Idheader, the server uses that value.- Errors
The status code of a response tells you if the request succeeded. A response with status 200 never contains an error.
r.raise_for_status()raises an exception for each other status. See Errors.
4.6.4. Authentication#
Each data route needs an access token. You get an access token from the login route. The server checks your credentials against the cluster before it issues a token.
A QuasarDB cluster operates in a secure mode or in an insecure mode. If you do not know the mode of your cluster, ask your system administrator.
4.6.4.1. Insecure cluster#
An insecure cluster has no users. Send an empty JSON object to the login route:
r = s.post(f"{URL}/auth/login", json={})
r.raise_for_status()
tokens = r.json()
The server answers with an access token and a refresh token:
{
"access_token": "eyJhbGciOiJkaXIiLCJlbmMi...",
"token_type": "Bearer",
"expires_in": 900,
"refresh_token": "eyJhbGciOiJkaXIiLCJlbmMi..."
}
expires_in is the validity of the access token, in seconds.
4.6.4.2. Secure cluster#
A secure cluster needs these two parameters:
A username.
The secret key of that user.
Your user security file contains these two parameters as a JSON object:
{
"username": "tintin",
"secret_key": "SIMC1BQCOgjU7rkMoMP3gVQACA6JcxRwLhok/5bgS0J8="
}
This object is the body of the login request:
with open("user_private.key") as f:
r = s.post(f"{URL}/auth/login", json=json.load(f))
r.raise_for_status()
tokens = r.json()
The response is the same as for an insecure cluster. When the cluster refuses the credentials, the server answers status 401.
The server holds the public key of the cluster in its configuration, so a client does not send it. For more information about users and keys, see the security manual.
4.6.4.3. Use the access token#
Send the access token in the Authorization header of each request:
s.headers["Authorization"] = "Bearer " + tokens["access_token"]
The server does not accept a token in the URL or in a cookie.
4.6.4.4. Renew the tokens#
By default, an access token is valid for 15 minutes and a refresh token is valid for 14 days. The system administrator can change the two durations in the server configuration.
To get a new access token, send the refresh token to the refresh route:
r = s.post(f"{URL}/auth/refresh", json={"refresh_token": tokens["refresh_token"]})
r.raise_for_status()
tokens = r.json()
s.headers["Authorization"] = "Bearer " + tokens["access_token"]
The response has the same fields as the login response, with a new access token and a new refresh token. The validity of the new refresh token starts at the time of the refresh. Use the new refresh token for the subsequent refresh.
The refresh route does not connect to the cluster. The server accepts a refresh token only on the refresh route. When the refresh token expires, the route answers status 401. Then send your credentials to the login route again.
4.6.4.5. Session#
The session route shows the user, the cluster and the token of the current request:
print(json.dumps(s.get(f"{URL}/session").json(), indent=4))
{
"username": "tintin",
"cluster": {"uri": "qdb://127.0.0.1:2836", "secured": true},
"token": {
"typ": "access",
"iat": 1794811436,
"exp": 1794812336,
"jti": "01a1e319-1f1f-7e8f-ab58-fb33b43ab492",
"auth_time": 1794811436
},
"server": {"version": "3.15.0.dev0"}
}
The times are in seconds since the Unix epoch.
iat is the time the server issued the token and exp is the time the token expires.
auth_time is the time of the login that started the session.
For an anonymous user, username is empty.
4.6.4.6. Logout#
The logout route answers status 204:
r = s.post(f"{URL}/auth/logout")
print(r.status_code)
The server keeps no session state. Thus a token stays valid until it expires, also after a logout. Discard the access token and the refresh token in your client after the logout.
4.6.5. Queries#
The query route runs one query and returns its result.
The query is the body of a POST request to /api/v2/query.
For the query language, see the query language documentation.
This example calculates the total traded volume of a table:
print(query("SELECT sum(volume) FROM trades"))
pyarrow.Table
sum(volume): int64
----
sum(volume): [[495]]
The maximum size of a query is 1 MiB.
4.6.5.1. Response formats#
The query route and the row reader return a result in one of four formats.
The Accept header of the request selects the format.
|
Format |
|---|---|
|
Arrow IPC stream. The fastest format, with the full type and precision of each value. |
|
JSON, one object for each batch of rows, with one array for each column |
|
Newline-delimited JSON, one object for each row |
|
CSV with a header row |
The server uses the first media type in the header that it knows.
The server returns JSON when the header is absent or contains no media type that it knows.
The server ignores q weights.
Use Arrow when your program has an Arrow library. Use a text format for a tool that cannot read Arrow.
4.6.5.1.1. Arrow#
The body is a stream in the Arrow IPC streaming format .
Each Arrow library can read it.
The query function of the quick start reads the full body into one Arrow table.
Convert the table with table.to_pandas() for pandas or with polars.from_arrow(table) for Polars.
The server sends the record batches while the cluster produces them. To process a large result one batch at a time, without the full result in memory, read the response as a stream:
with s.post(
f"{URL}/query",
data="SELECT * FROM trades",
headers={"Content-Type": "text/plain", "Accept": ARROW},
stream=True,
) as r:
r.raise_for_status()
# Decompress the body if the server compressed it.
r.raw.decode_content = True
with pa.ipc.open_stream(r.raw) as reader:
for batch in reader:
print(batch.num_rows, batch.schema.names)
3 ['$timestamp', '$table', 'price', 'volume', 'exchange', 'note']
4.6.5.1.2. Text formats#
This example requests the result of SELECT * FROM trades as CSV:
r = s.post(
f"{URL}/query",
data="SELECT * FROM trades",
headers={"Content-Type": "text/plain", "Accept": "text/csv"},
)
r.raise_for_status()
print(r.text)
The examples that follow show that result in the three text formats.
JSON:
[
{
"columns": [
{"name": "$timestamp", "type": "timestamp", "data": ["2026-01-05T09:30:00.000000000Z", "2026-01-05T09:30:01.500000000Z", "2026-01-05T09:30:02.000000000Z"]},
{"name": "$table", "type": "utf8", "data": ["trades", "trades", "trades"]},
{"name": "price", "type": "float64", "data": [101.25, 101.5, 101.4]},
{"name": "volume", "type": "int64", "data": [300, 120, 75]},
{"name": "exchange", "type": "utf8", "data": ["XNAS", "XNYS", "XNAS"]},
{"name": "note", "type": "utf8", "data": ["open", null, null]}
]
}
]
The body is an array of results.
The server sends a large result as more than one element of the array.
All elements have the same columns, and a client appends the data arrays in sequence.
The server writes the body without the line breaks that this example shows.
NDJSON:
{"$timestamp":"2026-01-05T09:30:00.000000000Z","$table":"trades","price":101.25,"volume":300,"exchange":"XNAS","note":"open"}
{"$timestamp":"2026-01-05T09:30:01.500000000Z","$table":"trades","price":101.5,"volume":120,"exchange":"XNYS","note":null}
{"$timestamp":"2026-01-05T09:30:02.000000000Z","$table":"trades","price":101.4,"volume":75,"exchange":"XNAS","note":null}
Each line is one row. A result without rows is an empty body.
CSV:
$timestamp,$table,price,volume,exchange,note
2026-01-05T09:30:00.000000000Z,trades,101.25,300,XNAS,open
2026-01-05T09:30:01.500000000Z,trades,101.5,120,XNYS,
2026-01-05T09:30:02.000000000Z,trades,101.4,75,XNAS,
The first line is the header. A result without rows is the header only. An empty field is a null value.
4.6.5.2. Values in the text formats#
JSON, NDJSON and CSV write values as this table shows.
Value |
Text |
|---|---|
Timestamp |
RFC 3339 in UTC with nine fractional digits, for example |
Integer |
A number |
Floating point |
A number. NaN and the infinities are |
String and symbol |
The text of the value |
Blob |
Base64 with padding |
Null |
|
Note
Many JSON parsers read each number as a 64-bit floating point value. Such a parser loses digits of an integer larger than 253. Use the Arrow format when you need each digit.
The type of a column in the JSON format is the name of its Arrow type.
A double column of a table has type float64 in a result.
A string column and a symbol column have type utf8, and a blob column has type binary.
4.6.5.3. SQL queries#
The server runs SQL in DuckDB with the QuasarDB DuckDB extension.
A query that starts with #sql and a space runs in DuckDB.
The page of the DuckDB extension describes the SQL that it supports.
Each other query runs in the QuasarDB query engine.
In SQL, the cluster is the catalog qdb.
Thus the table trades has the name qdb.trades:
print(query(
"#sql SELECT exchange, sum(volume) AS volume "
"FROM qdb.trades GROUP BY exchange ORDER BY exchange"
))
pyarrow.Table
exchange: string
volume: decimal128(38, 0)
----
exchange: [["XNAS","XNYS"]]
volume: [[375,120]]
The request and the response formats are the same as for a QuasarDB query.
The server does not make a difference between uppercase and lowercase in the #sql prefix.
These rules apply to SQL queries:
The query runs with the credentials of your token, so the permissions of your user apply.
When the body contains more than one statement, the server runs each statement and returns the last result.
An SQL result can contain types that the text formats cannot write, for example a list. The server then answers status 500. Request the Arrow format, or cast the column to a scalar type in the query.
The server limits the number of users that run SQL at the same time. At the limit, the server answers status 503 with a
Retry-Afterheader.
4.6.5.4. Compression#
The server compresses a response when the request has an Accept-Encoding header.
The server supports gzip and zstd.
It uses the first of gzip, zstd and identity in the header and ignores q weights.
By default, requests sends Accept-Encoding: gzip, deflate, and it decompresses the response.
Thus the server compresses each response, unless the request sets the header, as the quick start does.
An Arrow body is compact, and compression makes it about half as large. On a local network, an uncompressed Arrow body arrives faster than a compressed one. The text formats become four to six times smaller, so compress them when the network is slow.
For a slow network, zstd is faster than gzip.
requests decompresses zstd when you install the zstd option of urllib3:
python3 -m pip install "urllib3[zstd]"
This example requests a zstd body for one query:
r = s.post(
f"{URL}/query",
data="SELECT * FROM trades",
headers={"Content-Type": "text/plain", "Accept": ARROW, "Accept-Encoding": "zstd"},
)
r.raise_for_status()
print(r.headers["Content-Encoding"], pa.ipc.open_stream(r.content).read_all().num_rows)
zstd 3
4.6.6. Tables#
4.6.6.1. Create a table#
To create a table, send its description to POST /api/v2/tables:
r = s.post(
f"{URL}/tables",
json={
"name": "trades",
"shard_size": 86400000,
"columns": [
{"name": "price", "type": "double"},
{"name": "volume", "type": "int64"},
{"name": "exchange", "type": "symbol", "symtable": "exchanges"},
{"name": "note", "type": "string"},
],
},
)
r.raise_for_status()
print(r.status_code, r.headers["Location"])
201 /api/v2/tables/trades
Field |
Description |
|---|---|
|
The name of the table. |
|
The shard size in milliseconds. This field is mandatory. |
|
The columns, in sequence. Do not include |
|
One of |
|
The symbol table of a |
The server answers status 201 with an empty body.
The Location header contains the path of the new table.
When a table with that name exists, the server answers status 409.
4.6.6.2. List the tables#
GET /api/v2/tables returns the names of the tables.
The optional prefix parameter keeps only the names that start with its value:
print(s.get(f"{URL}/tables", params={"prefix": "tra"}).json())
{'tables': ['trades']}
4.6.6.3. Describe a table#
GET /api/v2/tables/{name} returns the description of one table:
print(json.dumps(s.get(f"{URL}/tables/trades").json(), indent=4))
{
"name": "trades",
"shard_size": 86400000,
"ttl": 0,
"columns": [
{"name": "$timestamp", "type": "timestamp"},
{"name": "price", "type": "double"},
{"name": "volume", "type": "int64"},
{"name": "exchange", "type": "symbol", "symtable": "exchanges"},
{"name": "note", "type": "string"}
],
"tags": []
}
The fields are those of the create request, with $timestamp as the first column.
ttl is the time to live of the data in milliseconds, and 0 means that the table has no time to live.
tags contains the tags of the table.
When the table does not exist, the server answers status 404.
4.6.6.4. Delete a table#
DELETE /api/v2/tables/{name} deletes a table and its data:
r = s.delete(f"{URL}/tables/trades")
print(r.status_code)
The server answers status 204. When the table does not exist, the server answers status 404.
Warning
You cannot restore a deleted table.
4.6.7. Rows#
4.6.7.1. Write rows#
POST /api/v2/rows writes the rows of the request body to their tables.
One request can contain rows for more than one table.
Each row has these two columns in addition to its data columns:
$tableis the name of the table that receives the row.
$timestampis the timestamp of the row.
The Content-Type header selects the format of the body.
The server accepts the four formats that it returns: application/vnd.apache.arrow.stream, text/csv, application/x-ndjson and application/json.
For each other type, the server answers status 415.
Thus you can send the result of a query that contains $table and $timestamp to this route without a change.
4.6.7.1.1. Arrow#
An Arrow body is the fastest format to write, because the server writes its columns to the cluster without a conversion. The type of each Arrow column must be the same as the type of the table column:
Table column |
Arrow type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The server refuses other types with status 400, also types that Arrow can convert, for example pa.large_string() or pa.timestamp("us").
Thus give the schema explicitly when you make the table:
from datetime import datetime
schema = pa.schema([
("$table", pa.string()),
("$timestamp", pa.timestamp("ns")),
("price", pa.float64()),
("volume", pa.int64()),
("exchange", pa.string()),
("note", pa.string()),
])
rows = pa.table(
{
"$table": ["trades", "trades", "trades"],
"$timestamp": [
datetime(2026, 1, 5, 9, 30, 0),
datetime(2026, 1, 5, 9, 30, 1, 500000),
datetime(2026, 1, 5, 9, 30, 2),
],
"price": [101.25, 101.5, 101.4],
"volume": [300, 120, 75],
"exchange": ["XNAS", "XNYS", "XNAS"],
"note": ["open", None, None],
},
schema=schema,
)
def arrow_body(t):
sink = pa.BufferOutputStream()
with pa.ipc.new_stream(sink, t.schema) as w:
w.write_table(t)
return sink.getvalue()
r = s.post(f"{URL}/rows", data=arrow_body(rows), headers={"Content-Type": ARROW})
r.raise_for_status()
print(r.json())
{'rows': 3, 'tables': 1, 'parse_ms': 0, 'push_ms': 0}
The response gives the number of rows and tables that the server wrote.
parse_ms and push_ms are the durations in milliseconds to read the body and to write the rows.
4.6.7.1.2. pandas#
pa.Table.from_pandas converts a DataFrame.
pandas keeps strings as large_string and timestamps in microseconds, so give the schema to the conversion:
import pandas as pd
df = pd.DataFrame({
"$table": ["trades"],
"$timestamp": [pd.Timestamp("2026-01-05T09:30:03")],
"price": [101.3],
"volume": [50],
"exchange": ["XNYS"],
"note": [None],
})
t = pa.Table.from_pandas(df, schema=schema, preserve_index=False)
r = s.post(f"{URL}/rows", data=arrow_body(t), headers={"Content-Type": ARROW})
r.raise_for_status()
print(r.json())
{'rows': 1, 'tables': 1, 'parse_ms': 0, 'push_ms': 0}
4.6.7.1.3. Text formats#
This is a CSV body with three rows for the table trades:
$table,$timestamp,price,volume,exchange,note
trades,2026-01-05T09:30:00Z,101.25,300,XNAS,open
trades,2026-01-05T09:30:01.5Z,101.5,120,XNYS,
trades,2026-01-05T09:30:02Z,101.4,75,XNAS,
Send the file with its content type:
with open("rows.csv", "rb") as f:
r = s.post(f"{URL}/rows", data=f, headers={"Content-Type": "text/csv"})
r.raise_for_status()
In the text formats, the server converts each value to the type of its column.
4.6.7.1.4. Rules#
These rules apply to the body:
The maximum size of the body is 64 MiB. Divide a larger dataset into more than one request.
Each table must exist. If one table does not exist, the server answers status 404 and writes no rows.
A column that the body does not contain gets a null value.
In the text formats, an empty field is a null value. The text formats cannot contain an empty string.
4.6.7.1.5. Options#
URL parameters set the options of the write operation.
Parameter |
Values |
Description |
|---|---|---|
|
|
How the cluster writes the rows. The default is |
|
|
What the cluster does with a row that is a duplicate. Without this parameter, the cluster does not deduplicate. |
|
A list of column names, with commas between them |
The columns that identify a duplicate. Mandatory with |
With push-mode=async, the cluster accepts the rows and writes them to the tables later.
In that mode, push_ms is the time until the cluster accepted the rows.
Thus the row reader and an SQL query can return the rows a short time after the response.
This example drops each row that has the same timestamp as a row in the table:
r = s.post(
f"{URL}/rows",
params={"deduplication-mode": "drop", "deduplication-columns": "$timestamp"},
data=arrow_body(rows),
headers={"Content-Type": ARROW},
)
r.raise_for_status()
4.6.7.1.6. Compressed bodies#
The route accepts a body with Content-Encoding: gzip or Content-Encoding: zstd:
import gzip
r = s.post(
f"{URL}/rows",
data=gzip.compress(arrow_body(rows)),
headers={"Content-Type": ARROW, "Content-Encoding": "gzip"},
)
r.raise_for_status()
The limit of 64 MiB applies to the compressed body.
4.6.7.2. Read rows#
GET /api/v2/tables/{name}/rows returns the rows of one table without a query.
The Accept header selects the format, as for a query.
Parameter |
Description |
|---|---|
|
A list of column names, with commas between them. The response contains these columns in this sequence. Without this parameter, the response contains |
|
The start of the time range, in RFC 3339. The range includes this time. |
|
The end of the time range, in RFC 3339. The range does not include this time. |
Set start and end together.
Without them, the server returns all rows of the table.
This example reads two columns of the rows in a range of two seconds:
r = s.get(
f"{URL}/tables/trades/rows",
params={
"columns": "price,volume",
"start": "2026-01-05T09:30:00Z",
"end": "2026-01-05T09:30:02Z",
},
headers={"Accept": ARROW},
)
r.raise_for_status()
print(pa.ipc.open_stream(r.content).read_all())
pyarrow.Table
price: double
volume: int64
----
price: [[101.25,101.5]]
volume: [[300,120]]
When the table does not exist, the server answers status 404. An unknown column and an incorrect range give status 400.
4.6.9. Cluster statistics#
GET /api/v2/cluster returns the statistics of each node of the cluster.
GET /api/v2/cluster/nodes/{id} returns the statistics of one node.
The id of a node is its address, in the format <ip>:<port>:
print(json.dumps(s.get(f"{URL}/cluster").json(), indent=2))
This example shows one node:
{
"nodes": [
{
"id": "127.0.0.1:2836",
"engine_build_date": "2026-10-19T09:54:38.000000000Z",
"engine_version": "3.15.0.dev0",
"hardware_concurrency_count": 16,
"memory": {
"resident_bytes": 272214102,
"resident_count": 722018,
"physmem": {"used_bytes": 50981109760, "total_bytes": 51539607552},
"vm": {"used_bytes": 32317030400, "total_bytes": 140737488338944}
},
"network": {
"current_users_count": 0,
"partitions_count": 16,
"sessions": {"available_count": 509, "unavailable_count": 3, "max_count": 512}
},
"chord.node_id": "0-0-0-1",
"operating_system": "Darwin 27.2.0 amd64",
"persistence": {"read_bytes": 13316208813, "written_bytes": 121850329491},
"requests": {"out_bytes": 594816935, "successes_count": 22161984, "total_count": 22601003},
"startup_epoch": 1793605178
}
]
}
The nodes are in the sequence of their id.
The route for one node returns one such object without the nodes array.
Status |
Meaning |
|---|---|
404 |
The cluster has no node with that address. |
503 |
The server cannot connect to the node. |
On a secure cluster, the permissions of your user control access to the statistics.
4.6.10. Health probes#
The two probes need no token and return an empty body:
r = requests.get(f"{URL}/status/readiness", verify=False)
print(r.status_code)
Route |
Response |
|---|---|
|
Status 200 when the server process runs. |
|
Status 200 when the server can connect to the cluster, and status 503 when it cannot. |
The server also serves the two probes without the version, at /api/status/liveness and /api/status/readiness.
4.6.11. Errors#
Each error response of the API has the content type application/problem+json and a body in the format of RFC 9457 :
r = s.post(
f"{URL}/query",
data="SELECT * FROM missing",
headers={"Content-Type": "text/plain", "Accept": ARROW},
)
print(r.status_code, r.headers["Content-Type"])
print(json.dumps(r.json(), indent=4))
400 application/problem+json
{
"status": 400,
"title": "Bad Request",
"detail": "query_execute_arrow (operation=query_execute_arrow, query=SELECT * FROM missing): An entry matching the provided alias cannot be found."
}
status is the HTTP status code and title is the standard text of that code.
detail describes this error.
When the cluster or the SQL engine refuses a request, detail contains the message of the cluster or the engine.
The status code tells you where the cause of the error is.
Status |
Cause |
|---|---|
400 |
The cluster or the SQL engine refused the request. Examples are an incorrect query, an unknown table in a query and an operation that your user is not permitted to do. The server also answers 400 for an incorrect body or parameter. |
401 |
The token is absent, incorrect or expired, or the cluster refused the credentials. Get a new token. |
404 |
The table, tag or node in the path does not exist. |
409 |
A table with that name already exists. |
413 |
The body is larger than the limit. |
415 |
The server does not support the |
500 |
The REST server failed. |
503 |
The server cannot connect to the cluster, or it is at a limit. When the response has a |
A response with status 401 has a WWW-Authenticate header, except on the login route.
The value is Bearer when the request had no token.
The value is Bearer error="invalid_token" when the server did not accept the token.
An unknown path gives status 404 and an incorrect method gives status 405. These two responses have a plain text body.
A response can stop before its end when an error occurs after the server sent the first bytes. An Arrow reader and a JSON parser detect a body that stops early.
4.6.12. Routes#
Method |
Path |
Task |
|---|---|---|
POST |
|
Get an access token and a refresh token |
POST |
|
Renew the tokens |
POST |
|
End the session |
GET |
|
Show the session |
POST |
|
Run a query |
GET |
|
List the tables |
POST |
|
Create a table |
GET |
|
Describe a table |
DELETE |
|
Delete a table |
GET |
|
Read rows |
POST |
|
Write rows |
PUT |
|
Attach a tag |
DELETE |
|
Detach a tag |
GET |
|
List the entries of a tag |
POST |
|
Find entries |
GET |
|
Read the statistics of all nodes |
GET |
|
Read the statistics of one node |
GET |
|
Liveness probe |
GET |
|
Readiness probe |