데이터베이스 삭제
조직 또는 사용자 소유의 데이터베이스를 삭제하는 API예요.
출처: 문서
본문
유료 플랜에서는 삭제된 데이터베이스를 최대 5일 동안 복원할 수 있어요 — 삭제된 데이터베이스 복구 문서를 참고하세요.
요청 예시:
curl -L -X DELETE 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}' \
-H 'Authorization: Bearer ***'
Node.js 요청 예시:
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "...",
token: "",
});
const database = await turso.databases.delete("my-db");
OpenAPI
openapi: 3.0.1
info:
title: Turso Platform API
description: API description here
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}:
delete:
summary: Delete Database
description: Delete a database belonging to the organization or user.
operationId: deleteDatabase
parameters:
- $ref: '#/components/parameters/organizationSlug'
- $ref: '#/components/parameters/databaseName'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
database:
type: string
description: The name of the database that was deleted.
example: my-db
'404':
$ref: '#/components/responses/DatabaseNotFoundResponse'
components:
parameters:
organizationSlug:
in: path
name: organizationSlug
required: true
schema:
type: string
description: The slug of the organization or user account.
databaseName:
name: databaseName
in: path
required: true
schema:
type: string
description: The name of the database.
responses:
DatabaseNotFoundResponse:
description: Database not found
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: The error message
example: >-
could not find database with name [databaseName]: record not
found
더 알아보기 (Learn more)
- 데이터베이스 목록 (삭제됨) — 삭제된 데이터베이스 목록 조회
- 데이터베이스 복원 — 삭제된 데이터베이스 복원하기
- 데이터베이스 생성 — 새 데이터베이스 만들기
- 데이터베이스 조회 — 데이터베이스 정보 확인