Zum Hauptinhalt springen
Mehrsprachige Guides für TursoDB, MVCC & KI-Agenten Engine-Guide →
Turso Cloud API-Referenz Ressourcen Gruppen

Gruppe wiederherstellen

Stellen Sie eine innerhalb der letzten fünf Tage gelöschte Gruppe zusammen mit den Member-Datenbanken wieder her, die mit ihr gelöscht wurden. Erfordert einen kostenpflichtigen Plan, einen Admin oder Owner der Organisation und aktivierte Wiederherstellung für die Organisation. Wenn einige Datenbanken nicht wiederhergestellt werden können, wird die Gruppe trotzdem aktiv: Wiederholen Sie die fehlgeschlagenen Datenbank-UUIDs einzeln mit Restore Database.

POST https://api.turso.tech/v3/organizations/{organizationId}/groups/{groupId}/restore
HINWEIS

Anders als bei den v1-Endpunkten identifiziert dieser Endpunkt die Organisation und die Gruppe anhand der UUID — verwenden Sie das Feld id aus Organisation abrufen und das Feld uuid aus Gelöschte Gruppen auflisten.

curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/groups/{groupId}/restore' \
  -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}/groups/{groupId}/restore:
    post:
      summary: Restore Group
      description: >-
        Restore a group deleted within the last five days, along with the member
        databases that were deleted with it. Requires a paid plan, an admin or
        owner of the organization, and recovery enabled for the organization. If
        some databases fail to restore, the group still becomes active: retry
        the failed database UUIDs individually with Restore Database.
      operationId: restoreGroup
      parameters:
        - $ref: '#/components/parameters/organizationId'
        - $ref: '#/components/parameters/groupId'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    $ref: '#/components/schemas/Group'
                    description: The restored group.
                  databases:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeletedDatabase'
                    description: >-
                      The member databases restored with the group, in restore
                      order.
                  failures:
                    type: object
                    additionalProperties:
                      type: string
                    description: >-
                      Maps database UUID to error message for members whose
                      restore failed. Retry them individually with Restore
                      Database.
        '400':
          description: >-
            Recovery is disabled for the organization, or the request is
            invalid.
        '403':
          description: >-
            The organization is on the free plan, or the caller is not an admin
            or owner.
        '404':
          description: >-
            No deleted group with this UUID exists, or its recovery window has
            passed.
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).
    groupId:
      name: groupId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: >-
        The UUID of the group, as returned when listing deleted groups (the
        `uuid` field).
  schemas:
    Group:
      allOf:
        - $ref: '#/components/schemas/BaseGroup'
        - type: object
    DeletedDatabase:
      type: object
      properties:
        Name:
          type: string
          description: The database name.
        DbId:
          type: string
          format: uuid
          description: The database UUID. Use it to restore the database.
        Hostname:
          type: string
          description: >-
            The DNS hostname the database had, used for client and HTTP
            connections.
        group:
          type: string
          description: The name of the group the database belonged to.
        group_id:
          type: string
          format: uuid
          description: The UUID of the group the database belonged to.
        organization_id:
          type: string
          format: uuid
          description: The UUID of the organization.
        regions:
          type: array
          items:
            type: string
          description: The regions the database was located in.
        primaryRegion:
          type: string
          description: The primary region of the database.
        delete_protection:
          type: boolean
          description: Whether delete protection was enabled for the database.
        deleted_at:
          type: string
          format: date-time
          description: When the database was deleted.
        group_deleted_at:
          type: string
          format: date-time
          description: >-
            Set when the database's group was deleted with it. Restoring the
            database also restores the group.
    BaseGroup:
      type: object
      properties:
        name:
          type: string
          description: The group name, unique across your organization.
          example: default
        version:
          type: string
          description: >-
            The current libSQL server version the databases in that group are
            running.
          example: v0.23.7
          deprecated: true
        uuid:
          type: string
          description: The group universal unique identifier (UUID).
          example: 0a28102d-6906-11ee-8553-eaa7715aeaf2
        locations:
          type: array
          items:
            type: string
          description: An array of location keys the group is located.
          example:
            - aws-us-east-1
          deprecated: true
        primary:
          type: string
          description: The primary location key.
          example: us-east-1
        delete_protection:
          type: boolean
          description: >-
            The current status for delete protection. If enabled, the group and
            all its databases cannot be deleted.
          example: false
Synchronisiert aus der offiziellen Turso-Dokumentation ( tursodatabase/turso-docs · MIT-Lizenz) Offizielle Doku ↗
Suche
Esc zum Schließen · Betrieben mit Pagefind