Skip to content

Commit

Permalink
Merge pull request #679 from tursodatabase/document-admin-api
Browse files Browse the repository at this point in the history
partially document admin API
  • Loading branch information
MarinPostma committed Nov 23, 2023
2 parents 5412434 + dfc57d6 commit a5cd846
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/ADMIN_API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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`:
- `--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

```
POST /v1/namespaces/:namespace/create
```
Create a namespace named `:namespace`.
body:
```json
{
"dump_url"?: string,
}
```

```
DELETE /v1/namespaces/:namespace
```

Delete the namespace named `:namespace`.

```
POST /v1/namespaces/:namespace/fork/:to
```
Fork `:namespace` into new namespace `:to`

0 comments on commit a5cd846

Please sign in to comment.