---
updatedAt: 2026-03-31T06:01:10.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/artifactory/llms.txt
---

# Restore Item from Trash Can

Restore an item from the trash can.

**Notes:** Requires Artifactory Pro.

**Security:** Requires a valid admin user, project admin user, or user with Manage permissions.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JFrog Artifactory Trash Can/Garbage Collection API",
    "description": "REST API for managing trash can and garbage collection in JFrog Artifactory",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support"
    }
  },
  "servers": [
    {
      "url": "https://{jfrog_url}/artifactory/api",
      "description": "JFrog Platform",
      "variables": {
        "jfrog_url": {
          "default": "myserver.jfrog.io",
          "description": "Your JFrog Platform hostname (e.g., mycompany.jfrog.io)"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Trash Can",
      "description": "Trash can management operations"
    }
  ],
  "paths": {
    "/trash/restore/{fromPath}": {
      "post": {
        "tags": [
          "Trash Can"
        ],
        "summary": "Restore Item from Trash Can",
        "description": "Restore an item from the trash can.\n\n**Notes:** Requires Artifactory Pro.\n\n**Security:** Requires a valid admin user, project admin user, or user with Manage permissions.\n",
        "operationId": "restoreItemFromTrashCan",
        "parameters": [
          {
            "name": "fromPath",
            "in": "path",
            "description": "Source path in trash can (e.g., npm-local)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Destination path where the item should be restored (e.g., npm-local2)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transaction-size",
            "in": "query",
            "required": false,
            "description": "Number of items to process in each database transaction during the restore operation.\n",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 1000
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Item restored successfully",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "Successfully restored trash items"
              }
            }
          },
          "400": {
            "description": "Permission Denied - The user does not have admin permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "status": 400,
                      "message": "Permission Denied"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Bad Credentials - Authentication failed. A valid token is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "status": 401,
                      "message": "Authentication is required"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found - The specified item does not exist in the trash can.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "status": 404,
                      "message": "Item does not exist"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorDetails"
            }
          }
        }
      },
      "ErrorDetails": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP status code"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT token authentication"
      },
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Basic authentication"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "basicAuth": []
    }
  ],
  "x-readme": {
    "explorer-enabled": false
  }
}
```