> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datris.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Restore a catalog from a zip backup

> Restores an archive produced by `GET /api/v1/catalog/{name}/export` as catalog `name` (the same or a new name, on the same or another install). A restore never merges: with `mode=new` (default) it is refused with 409 when catalog `name` already exists or any archived tap or pipeline name exists anywhere on the install (any catalog, either type), and nothing is written. With `mode=overwrite` (requires `confirm` equal to `name`) items already in `name` may be replaced; a name in another catalog is still a 409. When tap scripts are stored in a code repository, a script file already at branch head with different content is also a clash; identical content is reused without a new commit. Pipelines are saved exactly as `POST /api/v1/pipeline` saves them; tap scripts go to the install's default script storage; taps are saved with `enabled=false` and their run status cleared, so nothing runs until a user tests and enables them. Secrets are never written: `missingSecrets` lists the secrets the archived items reference that are absent on this install. Secrets are only checked where the key may read them: a key without secret read access gets a `<name>: not checked, this key may not read secrets` warning instead, whether or not the secret exists. Each tap's incremental state is restored for taps that did not exist before, unless `restoreState=false`. An archive with no members creates the empty catalog. Not transactional: failed members are listed under `failed` (207). Requires `pipeline:create`. Every member is scope-checked before anything is written: `tap:create` / `pipeline:create` in the target catalog as the caller, and for an item that already exists (overwrite) also `tap:update` / `pipeline:update` against its current catalog and owner. A refused member is listed under `failed` and nothing of it, including its validation schema, is written. Inline credentials (preprocessor and REST destination `bearerToken`/`apiKey`, `restEndpoint` row-function token parameters) are removed at export; the restore response's `warnings` names each one to re-enter.




## OpenAPI

````yaml /openapi.yaml post /api/v1/catalog/{name}/restore
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.28.0
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/catalog/{name}/restore:
    post:
      tags:
        - Pipelines
      summary: Restore a catalog from a zip backup
      description: >
        Restores an archive produced by `GET /api/v1/catalog/{name}/export` as
        catalog `name` (the same or a new name, on the same or another install).
        A restore never merges: with `mode=new` (default) it is refused with 409
        when catalog `name` already exists or any archived tap or pipeline name
        exists anywhere on the install (any catalog, either type), and nothing
        is written. With `mode=overwrite` (requires `confirm` equal to `name`)
        items already in `name` may be replaced; a name in another catalog is
        still a 409. When tap scripts are stored in a code repository, a script
        file already at branch head with different content is also a clash;
        identical content is reused without a new commit. Pipelines are saved
        exactly as `POST /api/v1/pipeline` saves them; tap scripts go to the
        install's default script storage; taps are saved with `enabled=false`
        and their run status cleared, so nothing runs until a user tests and
        enables them. Secrets are never written: `missingSecrets` lists the
        secrets the archived items reference that are absent on this install.
        Secrets are only checked where the key may read them: a key without
        secret read access gets a `<name>: not checked, this key may not read
        secrets` warning instead, whether or not the secret exists. Each tap's
        incremental state is restored for taps that did not exist before, unless
        `restoreState=false`. An archive with no members creates the empty
        catalog. Not transactional: failed members are listed under `failed`
        (207). Requires `pipeline:create`. Every member is scope-checked before
        anything is written: `tap:create` / `pipeline:create` in the target
        catalog as the caller, and for an item that already exists (overwrite)
        also `tap:update` / `pipeline:update` against its current catalog and
        owner. A refused member is listed under `failed` and nothing of it,
        including its validation schema, is written. Inline credentials
        (preprocessor and REST destination `bearerToken`/`apiKey`,
        `restEndpoint` row-function token parameters) are removed at export; the
        restore response's `warnings` names each one to re-enter.
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]+$
          description: Target catalog name. `Uncataloged` (any case) is refused.
        - name: mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - new
              - overwrite
            default: new
        - name: confirm
          in: query
          required: false
          schema:
            type: string
          description: Required for `mode=overwrite`; must equal the catalog name.
        - name: restoreState
          in: query
          required: false
          schema:
            type: boolean
            default: true
          description: >-
            `false` skips every tap's incremental state (for a copy that should
            start from scratch).
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    The catalog archive (zip, at most 1000 entries and 50 MB
                    uncompressed).
      responses:
        '200':
          description: Every member restored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogRestoreResult'
        '207':
          description: Some members could not be restored; see `failed`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogRestoreResult'
        '400':
          description: >-
            Reserved or invalid catalog name, unknown mode, overwrite without a
            matching `confirm`, missing file, or an invalid archive (not a zip,
            unsafe entry path, too large, missing or unsupported
            `formatVersion`)
        '409':
          description: The catalog or an archived name already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  clashes:
                    type: array
                    items:
                      type: string
        '500':
          description: Error
components:
  schemas:
    CatalogRestoreResult:
      type: object
      properties:
        restored:
          type: object
          properties:
            taps:
              type: array
              items:
                type: string
            pipelines:
              type: array
              items:
                type: string
        skipped:
          type: array
          description: >-
            Validation-schema objects that already existed on this install and
            were kept.
          items:
            type: string
        failed:
          type: array
          items:
            $ref: '#/components/schemas/CatalogFailure'
        missingSecrets:
          type: array
          description: >-
            Secrets the archive's items reference that do not exist on this
            install. Create them before enabling the items. Only secrets the key
            may read are checked; the others are named in `warnings` as not
            checked.
          items:
            type: object
            properties:
              name:
                type: string
              usedBy:
                type: array
                items:
                  type: string
        warnings:
          type: array
          items:
            type: string
        tapsDisabled:
          type: boolean
          description: Always true; restored taps are saved disabled.
        stateRestored:
          type: boolean
          description: True when at least one tap's incremental state was restored.
    CatalogFailure:
      type: object
      properties:
        name:
          type: string
          description: Member (or `__catalog__` placeholder) name
        error:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.