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

列出已刪除的群組

傳回過去五天內刪除的群組,包括空群組,這些群組仍可還原。需要付費方案與組織層級權杖。即使組織已停用復原功能,此端點仍可使用。

GET https://api.turso.tech/v3/organizations/{organizationId}/deleted-groups
注意

與 v1 端點不同,此端點是以組織的 UUID 來識別組織,也就是 擷取組織 回應中的 id 欄位。

curl -L 'https://api.turso.tech/v3/organizations/{organizationId}/deleted-groups' \
  -H 'Authorization: Bearer TOKEN'

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:
  /v3/organizations/{organizationId}/deleted-groups:
    get:
      summary: List Deleted Groups
      description: >-
        Returns groups deleted within the last five days, including empty
        groups, which can still be restored. Requires a paid plan and an
        organization-level token. Available even while recovery is disabled for
        the organization.
      operationId: listDeletedGroups
      parameters:
        - $ref: '#/components/parameters/organizationId'
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
          description: Page size, from 1 to 1000.
        - name: cursor
          in: query
          schema:
            type: string
          description: Opaque pagination cursor from the previous page's `pagination.next`.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  groups:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeletedGroup'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '403':
          description: The organization is on the free plan, or the token is group-scoped.
components:
  parameters:
    organizationId:
      name: organizationId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: >-
        The UUID of the organization. Retrieve it with the Retrieve Organization
        endpoint (the `id` field).
  schemas:
    DeletedGroup:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          description: The group UUID. Use it to restore the group.
        name:
          type: string
          description: The group name.
        deleted_at:
          type: string
          format: date-time
          description: When the group was deleted.
        cascade_databases:
          type: integer
          description: >-
            The number of member databases that restoring the group would bring
            back with it.
    Pagination:
      type: object
      properties:
        next:
          type: string
          description: >-
            Opaque cursor for the next page. Pass it back as the `cursor` query
            parameter. Absent on the last page.
同步自官方 Turso 文件倉庫 ( tursodatabase/turso-docs · MIT 開源授權) 檢視官方原文 ↗
搜尋
按 Esc 關閉 · 由 Pagefind 靜態索引驅動