跳至正文內容
TursoDB.cn 獨立社群 · MVCC 並行寫入與每 Agent 獨立庫實戰 閱讀解析 →
Turso Cloud API 參考 介面資源 資料庫群組

使所有群組驗證權杖失效

使指定群組的所有群組授權權杖失效。在 AWS 上,資料庫範圍的權杖不會被失效;請透過資料庫端點個別使其失效。

POST https://api.turso.tech/v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate
注意

此操作會使群組權杖失效。在 AWS 上,資料庫範圍的權杖不會被失效;請使用資料庫端點個別使它們失效。

curl -L -X POST 'https://api.turso.tech/v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate' \
-H 'Authorization: Bearer TOKEN'
import { createClient } from "@tursodatabase/api";

const turso = createClient({
  org: "...",
  token: "",
});

const response = await turso.groups.invalidateTokens("default");

OpenAPI

openapi: 3.0.1
info:
  title: Turso Platform API
  description: 此處為 API 說明
  license:
    name: MIT
  version: 0.1.0
servers:
  - url: https://api.turso.tech
    description: Turso 的平台 API
security: []
paths:
  /v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate:
    post:
      summary: 使所有群組驗證權杖失效
      description: >-
        使指定群組的所有群組授權權杖失效。在 AWS 上,資料庫範圍的權杖不會被失效;
        請透過資料庫端點個別使其失效。
      operationId: invalidateGroupTokens
      parameters:
        - $ref: '#/components/parameters/organizationSlug'
        - $ref: '#/components/parameters/groupName'
      responses:
        '200':
          description: 成功回應(無內容)
        '404':
          $ref: '#/components/responses/GroupNotFoundResponse'
components:
  parameters:
    organizationSlug:
      in: path
      name: organizationSlug
      required: true
      schema:
        type: string
      description: 組織或使用者帳號的 slug。
    groupName:
      name: groupName
      in: path
      required: true
      schema:
        type: string
      description: 群組名稱。
  responses:
    GroupNotFoundResponse:
      description: 找不到群組
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: 錯誤訊息
                example: group not found
同步自官方 Turso 文件倉庫 ( tursodatabase/turso-docs · MIT 開源授權) 檢視官方原文 ↗
搜尋
按 Esc 關閉 · 由 Pagefind 靜態索引驅動