모든 데이터베이스 인증 토큰 무효화
지정한 데이터베이스의 모든 인증 토큰을 무효화하는 API예요.
출처: 문서
본문
변경을 완료하려면 짧은 다운타임이 필요해요.
요청 예시:
curl -L -X POST 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/rotate' \
-H 'Authorization: Bearer ***'
Node.js 요청 예시:
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "...",
token: "",
});
const response = await turso.databases.rotateTokens("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}/auth/rotate:
post:
summary: Invalidate All Database Auth Tokens
description: Invalidates all authorization tokens for the specified database.
operationId: invalidateDatabaseTokens
parameters:
- $ref: '#/components/parameters/organizationSlug'
- $ref: '#/components/parameters/databaseName'
responses:
'200':
description: Successful response (No Content)
'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)
- 데이터베이스 토큰 생성 — 새 인증 토큰 발급하기
- 인증 — API 토큰 인증 방식
- 데이터베이스 조회 — 데이터베이스 정보 확인