0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-05-19 02:57:10 +00:00
Files
libsql/docs/ADMIN_API.md

38 lines
926 B
Markdown
Raw Permalink Normal View History

2023-11-23 08:44:45 +01:00
# Libsql-server admin API documentation
This document describes the admin API endpoints.
The admin API is used to manage namespaces on a `sqld` instance. Namespaces are isolated database within a same sqld instance.
To enable the admin API, and manage namespaces, two extra flags need to be passed to `sqld`:
2023-11-23 08:44:45 +01:00
- `--admin-listen-addr <addr>:<port>`: the address and port on which the admin API should listen. It must be different from the user API listen address (whi defaults to port 8080).
- `--enable-namespaces`: enable namespaces for the instance. By default namespaces are disabled.
## Routes
```HTTP
2023-11-23 08:44:45 +01:00
POST /v1/namespaces/:namespace/create
```
2023-11-23 08:44:45 +01:00
Create a namespace named `:namespace`.
body:
2023-11-23 08:44:45 +01:00
```json
{
"dump_url"?: string,
}
```
```HTTP
2023-11-23 08:44:45 +01:00
DELETE /v1/namespaces/:namespace
```
Delete the namespace named `:namespace`.
```HTTP
2023-11-23 08:44:45 +01:00
POST /v1/namespaces/:namespace/fork/:to
```
2023-11-23 08:44:45 +01:00
Fork `:namespace` into new namespace `:to`