본문 바로가기
WIKI 기술 지식 베이스

삭제된 그룹 목록 조회

원문 보기 위키 갱신

최근 5일 안에 삭제된 그룹들을 확인하는 API예요. 비어 있는 그룹까지 포함해서 아직 복구 가능한 것들이 보여요. 유료 플랜과 조직 수준 토큰이 필요하고, 조직의 복구(recovery)가 꺼져 있어도 호출할 수 있어요.

출처: 문서

본문

최근 5일 내에 삭제된 그룹 목록을 반환해요. 비어 있는 그룹을 포함해 아직 복구할 수 있는 그룹들이에요. 유료 플랜과 조직 수준 토큰이 필요해요. 조직에 복구 기능이 비활성화되어 있어도 사용할 수 있어요.

Note: v1 엔드포인트와 달리 이 엔드포인트는 조직을 UUID로 식별해요 — 조직 조회에서 나오는 id 필드를 쓰면 돼요.

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

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.

더 알아보기 (Learn more)