# Registry V3 - Packages

V3 packages endpoints

## List Packages

 - [GET /har/api/v3/packages](https://apidocs.harness.io/registry-v3-packages/listpackagesv3.md): Lists Packages

## Delete a Package

 - [DELETE /har/api/v3/packages/{id}](https://apidocs.harness.io/registry-v3-packages/deletepackagev3.md): Delete a package/image. force=false (soft delete) is not supported for UPSTREAM registries.

## Get Package Metadata

 - [GET /har/api/v3/packages/{id}/metadata](https://apidocs.harness.io/registry-v3-packages/getpackagemetadatav3.md): Retrieves all metadata for a package.

## Upsert Package Metadata

 - [POST /har/api/v3/packages/{id}/metadata](https://apidocs.harness.io/registry-v3-packages/upsertpackagemetadatav3.md): Creates or overwrites metadata for a package.

## Replace Package Metadata

 - [PUT /har/api/v3/packages/{id}/metadata](https://apidocs.harness.io/registry-v3-packages/savepackagemetadatav3.md): Replaces all metadata for a package.

## Restore a Soft-Deleted Package

 - [POST /har/api/v3/packages/{id}/restore](https://apidocs.harness.io/registry-v3-packages/restorepackagev3.md): Restore a previously soft-deleted package/image by ID

## Force-Unlock a Terraform Backend Workspace

 - [POST /har/api/v3/packages/{id}/terraform-backend/force-unlock](https://apidocs.harness.io/registry-v3-packages/forceunlockterraformbackendv3.md): Admin force-clears a Terraform Backend workspace lock (the workspace is the package identified by id). Idempotent — succeeds even if no lock is held. A reason is required and is recorded on the audit trail.

## Rebuild the index for a package

 - [POST /har/api/v3/packages/rebuild-index](https://apidocs.harness.io/registry-v3-packages/rebuildpackageindexv3.md): Trigger an asynchronous rebuild of the package index for the given package. The rebuild runs in the background; this endpoint returns immediately once the request is accepted. Package index rebuild is package-type specific — registries whose package type does not maintain a rebuildable per-package index return 405.

## Get statistics for multiple packages

 - [POST /har/api/v3/packages/stats](https://apidocs.harness.io/registry-v3-packages/getpackagesstatsv3.md): Get statistics (artifactsCount, size, downloadCount) for a list of packages by their UUIDs.

## Roll Back a Terraform Backend Workspace

 - [POST /har/api/v3/versions/{id}/terraform-backend/rollback](https://apidocs.harness.io/registry-v3-packages/rollbackterraformbackendv3.md): Promotes a historical Terraform Backend state version as the current state by copying it forward. The promoted state is written with a new serial. The operation is rejected while the workspace is locked.

