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` :
2025-01-23 12:37:54 +01:00
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
2025-01-23 12:37:54 +01:00
```HTTP
2023-11-23 08:44:45 +01:00
POST /v1/namespaces/:namespace/create
```
2025-01-23 12:37:54 +01:00
2023-11-23 08:44:45 +01:00
Create a namespace named `:namespace` .
body:
2025-01-23 12:37:54 +01:00
2023-11-23 08:44:45 +01:00
```json
{
"dump_url"?: string,
}
```
2025-01-23 12:37:54 +01:00
```HTTP
2023-11-23 08:44:45 +01:00
DELETE /v1/namespaces/:namespace
```
Delete the namespace named `:namespace` .
2025-01-23 12:37:54 +01:00
```HTTP
2023-11-23 08:44:45 +01:00
POST /v1/namespaces/:namespace/fork/:to
```
2025-01-23 12:37:54 +01:00
2023-11-23 08:44:45 +01:00
Fork `:namespace` into new namespace `:to`