Docs
API Reference

Databases

Create, inspect, update, suspend, resume, and delete databases via the REST API.

A database is the primary working unit in Silos. It belongs to a project, has a region and compute size, and exposes one or more branches.

The API is stabilizing. The paths below reflect the current interface; field-level details may still change before general availability.

Create a database

POST /v1/projects/{project_id}/databases

Terminal
curl -X POST https://api.silos.sh/v1/projects/proj_abc123/databases \
  -H "Authorization: Bearer $SILOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-app",
    "region": "iad",
    "compute_size": "xsmall"
  }'
Response
{
  "database": {
    "id": "db_abc123",
    "name": "my-app",
    "project_id": "proj_abc123",
    "region": "iad",
    "status": "active",
    "created_at": "2026-06-01T12:00:00Z"
  }
}

List databases

GET /v1/databases

Terminal
curl https://api.silos.sh/v1/databases \
  -H "Authorization: Bearer $SILOS_API_KEY"

Filter to a branch:

Terminal
curl "https://api.silos.sh/v1/databases?branch=br_abc123" \
  -H "Authorization: Bearer $SILOS_API_KEY"
Response
{
  "databases": [
    {
      "id": "db_abc123",
      "name": "my-app",
      "region": "iad",
      "status": "active"
    }
  ]
}

Get a database

GET /v1/databases/{id}

Terminal
curl https://api.silos.sh/v1/databases/db_abc123 \
  -H "Authorization: Bearer $SILOS_API_KEY"
Response
{
  "database": {
    "id": "db_abc123",
    "name": "my-app",
    "project_id": "proj_abc123",
    "region": "iad",
    "status": "active",
    "created_at": "2026-06-01T12:00:00Z"
  }
}

Update a database

PATCH /v1/databases/{id}

Terminal
curl -X PATCH https://api.silos.sh/v1/databases/db_abc123 \
  -H "Authorization: Bearer $SILOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "renamed-app" }'
Response
{
  "database": {
    "id": "db_abc123",
    "name": "renamed-app",
    "status": "active"
  }
}

Suspend a database

POST /v1/databases/{id}/suspend

Suspend the compute serving a database. Durable state is retained.

Terminal
curl -X POST https://api.silos.sh/v1/databases/db_abc123/suspend \
  -H "Authorization: Bearer $SILOS_API_KEY"
Response
{
  "database": {
    "id": "db_abc123",
    "status": "suspended"
  }
}

Resume a database

POST /v1/databases/{id}/resume

Terminal
curl -X POST https://api.silos.sh/v1/databases/db_abc123/resume \
  -H "Authorization: Bearer $SILOS_API_KEY"
Response
{
  "database": {
    "id": "db_abc123",
    "status": "active"
  }
}

Suspend and resume map to the platform's scale-to-zero lifecycle. A suspended database also wakes automatically on the next connection.

Delete a database

DELETE /v1/databases/{id}

Terminal
curl -X DELETE https://api.silos.sh/v1/databases/db_abc123 \
  -H "Authorization: Bearer $SILOS_API_KEY"

Deleting a database removes all of its branches and the underlying snapshots and WAL. This is irreversible.

On this page