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

# Restore Items



## OpenAPI

````yaml /api-reference/openapi.json post /fs-items/restore
openapi: 3.1.0
info:
  title: Aspect Platform API
  description: A FastAPI application for Aspect Platform functionality
  version: 0.0.0
servers:
  - url: https://api.aspect.inc
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /fs-items/restore:
    post:
      tags:
        - Filesystem Items
      summary: Restore Items
      operationId: post_Filesystem Items_fs_items_restore
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FsItemsRestoreRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FsItemsRestoreResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FsItemsRestoreRequest:
      properties:
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: Project ID the items belong to
        asset_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Asset Ids
          description: List of asset IDs to restore from trash
        directory_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Directory Ids
          description: List of directory IDs to restore from trash
        symlink_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Symlink Ids
          description: List of symlink IDs to restore from trash
        conflict_resolutions:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/ItemConflictResolution'
              type: object
            - type: 'null'
          title: Conflict Resolutions
          description: >-
            Resolution strategies for name conflicts at restore destinations.
            Keys are string UUIDs of conflicting items. Each value specifies the
            resolution strategy and optional auto-rename style. If not provided
            and conflicts exist, returns 409 with conflict details.
      type: object
      required:
        - project_id
      title: FsItemsRestoreRequest
      description: >-
        API request schema for restoring filesystem items from the project
        trash.


        The backend resolves each item's restore destination from its

        pre_trash_directory_id. If the original directory no longer exists or is

        itself in trash, items fall back to the project root directory. Name

        conflict handling follows the same pattern as the move endpoint.
    FsItemsRestoreResponse:
      properties:
        restored_asset_count:
          type: integer
          title: Restored Asset Count
          description: Number of assets successfully restored
        restored_directory_count:
          type: integer
          title: Restored Directory Count
          description: Number of directories successfully restored
        restored_symlink_count:
          type: integer
          title: Restored Symlink Count
          description: Number of symlinks successfully restored
          default: 0
      type: object
      required:
        - restored_asset_count
        - restored_directory_count
      title: FsItemsRestoreResponse
      description: API response schema for restoring filesystem items from trash
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ItemConflictResolution:
      properties:
        resolution:
          $ref: '#/components/schemas/ConflictResolution'
          description: 'How to resolve this conflict: keep_both, replace, or skip'
        auto_rename_style:
          anyOf:
            - $ref: '#/components/schemas/AutoRenameStyle'
            - type: 'null'
          description: >-
            Rename style when resolution is keep_both. Defaults to parenthesized
            for assets and numeric for directories if not provided.
      type: object
      required:
        - resolution
      title: ItemConflictResolution
      description: >-
        Per-item conflict resolution with optional auto-rename style for
        KEEP_BOTH
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ConflictResolution:
      type: string
      enum:
        - keep_both
        - replace
        - skip
      title: ConflictResolution
      description: Resolution strategy for a single name conflict during move operations
    AutoRenameStyle:
      type: string
      enum:
        - parenthesized
        - numeric
      title: AutoRenameStyle
      description: Style for auto-renaming items when name conflicts occur during creation
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT in Authorization header. 'Bearer ' prefix optional.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````