Turso Cloud API-Referenz Ressourcen Datenbanken
Datenbank abrufen
Gibt eine Datenbank zurück, die zur Organisation oder zum Benutzer gehört.
GET
https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName} curl -L 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}' \
-H 'Authorization: Bearer TOKEN'
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "...",
token: "",
});
const database = await turso.databases.retrieve("my-db");
OpenAPI
openapi: 3.0.1
info:
title: Turso Platform API
description: API-Beschreibung hier
license:
name: MIT
version: 0.1.0
servers:
- url: https://api.turso.tech
description: Turso's Platform API
security: []
paths:
/v1/organizations/{organizationSlug}/databases/{databaseName}:
get:
summary: Datenbank abrufen
description: Gibt eine Datenbank zurück, die zur Organisation oder zum Benutzer gehört.
operationId: getDatabase
parameters:
- $ref: '#/components/parameters/organizationSlug'
- $ref: '#/components/parameters/databaseName'
responses:
'200':
description: Erfolgreiche Antwort
content:
application/json:
schema:
type: object
properties:
database:
$ref: '#/components/schemas/Database'
'404':
$ref: '#/components/responses/DatabaseNotFoundResponse'
components:
parameters:
organizationSlug:
in: path
name: organizationSlug
required: true
schema:
type: string
description: Der Slug der Organisation oder des Benutzerkontos.
databaseName:
name: databaseName
in: path
required: true
schema:
type: string
description: Der Name der Datenbank.
schemas:
Database:
type: object
properties:
Name:
type: string
description: Der Datenbankname, **eindeutig** innerhalb deiner Organisation.
example: my-db
DbId:
type: string
description: Der universell eindeutige Bezeichner (UUID) der Datenbank.
example: 0eb771dd-6906-11ee-8553-eaa7715aeaf2
Hostname:
type: string
description: Der DNS-Hostname, der für clientseitige libSQL- und HTTP-Verbindungen verwendet wird.
example: '[databaseName]-[organizationSlug].turso.io'
block_reads:
type: boolean
description: Der aktuelle Status für blockierte Lesevorgänge.
example: false
block_writes:
type: boolean
description: Der aktuelle Status für blockierte Schreibvorgänge.
example: false
regions:
type: array
items:
type: string
description: Eine Liste der Regionen für die Gruppe, zu der die Datenbank gehört.
example:
- aws-us-east-1
deprecated: true
primaryRegion:
type: string
description: Der Regionscode des primären Standorts der Gruppe, zu der die Datenbank gehört.
example: aws-us-east-1
group:
type: string
description: Der Name der Gruppe, zu der die Datenbank gehört.
example: default
delete_protection:
type: boolean
description: >-
Der aktuelle Status für den Löschschutz. Wenn aktiviert, kann die
Datenbank nicht gelöscht werden.
example: false
parent:
type: object
nullable: true
properties:
id:
type: string
description: Der Bezeichner der übergeordneten Datenbank.
name:
type: string
description: Der Name der übergeordneten Datenbank.
branched_at:
type: string
format: date-time
description: Der Zeitstempel, zu dem die Datenbank von der übergeordneten Datenbank abgezweigt wurde.
example: '2025-04-15T13:14:34.468213117Z'
responses:
DatabaseNotFoundResponse:
description: Datenbank nicht gefunden
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Die Fehlermeldung
example: >-
could not find database with name [databaseName]: record not
found
Synchronisiert aus der offiziellen Turso-Dokumentation (
tursodatabase/turso-docs
· MIT-Lizenz)
Offizielle Doku ↗