跳至正文内容
TursoDB.cn 独立社区 · MVCC 并发写与每 Agent 独立库实战 阅读解析 →
Turso Cloud API 参考 接口资源 组织管理

列出组织

返回已认证用户拥有或所属的组织列表。

GET https://api.turso.tech/v1/organizations
curl -L https://api.turso.tech/v1/organizations \
  -H 'Authorization: Bearer TOKEN'
import { createClient } from "@tursodatabase/api";

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

const organizations = await turso.organizations.list();

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:
    get:
      summary: 列出组织
      description: >-
        返回已认证用户拥有或所属的组织列表。
      operationId: listOrganizations
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Organization'
components:
  schemas:
    Organization:
      type: object
      properties:
        name:
          type: string
          description: >-
            组织名称。每个用户都有一个用于其自身账户的 `personal` 组织。
          example: personal
        slug:
          type: string
          description: >-
            组织 slug。对于 `personal` 账户,这将是你的用户名。
          example: iku
        type:
          type: string
          description: >-
            该组织的账户类型。始终为 `personal` 或 `team`。
          example: personal
          enum:
            - personal
            - team
        overages:
          type: boolean
          description: >-
            组织名称。每个用户都有一个用于其自身账户的 `personal` 组织。
          example: false
        require_mfa:
          type: boolean
          description: >-
            是否要求组织所有成员启用多因素认证。
          example: false
        blocked_reads:
          type: boolean
          description: 返回阻止读取的当前状态。
          example: false
        blocked_writes:
          type: boolean
          description: 返回阻止写入的当前状态。
          example: false
        plan_id:
          type: string
          description: 该组织订阅的定价方案标识符。
          example: developer
        plan_timeline:
          type: string
          description: 付费方案的计费周期(如果有)。
          example: monthly
        platform:
          type: string
          description: >-
            管理该组织的外部平台。对于 Turso 管理的组织,此字段为空。
          example: vercel
        restore_enabled:
          type: boolean
          description: >-
            是否为该组织启用已删除数据库和组的恢复。在检索单个组织时返回。
同步自官方 Turso 文档仓库 ( tursodatabase/turso-docs · MIT 开源协议) 查看官方原文 ↗
搜索
按 Esc 关闭 · 由 Pagefind 静态索引驱动