# Harbor v2.0 REST API

**Canonical:** https://apis.io/apis/goharbor/goharbor-harbor-v2-api/  
**Provider:** GoHarbor — https://apis.io/providers/goharbor/  
**Base URL:** https://{host}/api/v2.0  
**Documentation:** https://goharbor.io/docs/2.15.0/working-with-projects/using-api-explorer/

Harbor v2.0 REST API is one of 16 APIs that [GoHarbor](https://apis.io/providers/goharbor/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Registry, Artifacts, and OCI. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

Harbor's complete, first-party v2.0 REST API as published in the project's own repository (api/v2.0/swagger.yaml) — 135 paths, 203 operations and 153 definitions covering projects, repositories, artifacts, tags, labels, accessories, scanning, SBOMs, robot accounts, users and groups, quotas, registries, replication, retention, immutability, webhooks, preheat, garbage collection, audit logs, the Security Hub and system configuration. Authenticates with HTTP Basic; the base URL is the operator's own Harbor instance.

## Operations (60 of 203)

| Method | Path | Summary |
|---|---|---|
| GET | `/health` | Check the status of Harbor components |
| GET | `/search` | Search for projects and repositories |
| GET | `/statistics` | Get the statistic information about the projects and repositories |
| POST | `/ldap/ping` | Ping available ldap service. |
| GET | `/ldap/users/search` | Search available ldap users. |
| POST | `/ldap/users/import` | Import selected available ldap users. |
| GET | `/ldap/groups/search` | Search available ldap groups. |
| GET | `/internalconfig` | Get internal configurations. |
| GET | `/configurations` | Get system configurations. |
| PUT | `/configurations` | Modify system configurations. |
| GET | `/projects` | List projects |
| HEAD | `/projects` | Check if the project name user provided already exists. |
| POST | `/projects` | Create a new project. |
| GET | `/projects/{project_name_or_id}` | Return specific project detail information |
| PUT | `/projects/{project_name_or_id}` | Update properties for a selected project. |
| DELETE | `/projects/{project_name_or_id}` | Delete project by projectID |
| GET | `/projects/{project_name_or_id}/_deletable` | Get the deletable status of the project |
| GET | `/projects/{project_name_or_id}/summary` | Get summary of the project. |
| GET | `/projects/{project_name_or_id}/members` | Get all project member information |
| POST | `/projects/{project_name_or_id}/members` | Create project member |
| GET | `/projects/{project_name_or_id}/members/{mid}` | Get the project member information |
| PUT | `/projects/{project_name_or_id}/members/{mid}` | Update project member |
| DELETE | `/projects/{project_name_or_id}/members/{mid}` | Delete project member |
| GET | `/projects/{project_name_or_id}/metadatas/` | Get the metadata of the specific project |
| POST | `/projects/{project_name_or_id}/metadatas/` | Add metadata for the specific project |
| GET | `/projects/{project_name_or_id}/metadatas/{meta_name}` | Get the specific metadata of the specific project |
| PUT | `/projects/{project_name_or_id}/metadatas/{meta_name}` | Update the specific metadata for the specific project |
| DELETE | `/projects/{project_name_or_id}/metadatas/{meta_name}` | Delete the specific metadata for the specific project |
| GET | `/repositories` | List all authorized repositories |
| GET | `/projects/{project_name}/repositories` | List repositories |
| GET | `/projects/{project_name}/repositories/{repository_name}` | Get repository |
| PUT | `/projects/{project_name}/repositories/{repository_name}` | Update repository |
| DELETE | `/projects/{project_name}/repositories/{repository_name}` | Delete repository |
| GET | `/projects/{project_name}/repositories/{repository_name}/artifacts` | List artifacts |
| POST | `/projects/{project_name}/repositories/{repository_name}/artifacts` | Copy artifact |
| GET | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}` | Get the specific artifact |
| DELETE | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}` | Delete the specific artifact |
| POST | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan` | Scan the artifact |
| POST | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop` | Cancelling a scan job for a particular artifact |
| GET | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/{report_id}/log` | Get the log of the scan report |
| POST | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags` | Create tag |
| GET | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags` | List tags |
| DELETE | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags/{tag_name}` | Delete tag |
| GET | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/accessories` | List accessories |
| GET | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/vulnerabilities` | Get the vulnerabilities addition of the specific artifact |
| GET | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/{addition}` | Get the addition of the specific artifact |
| POST | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/labels` | Add label to artifact |
| DELETE | `/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/labels/{label_id}` | Remove label from artifact |
| GET | `/projects/{project_name_or_id}/artifacts` | List artifacts |
| GET | `/projects/{project_name_or_id}/scanner` | Get project level scanner |
| PUT | `/projects/{project_name_or_id}/scanner` | Configure scanner for the specified project |
| GET | `/projects/{project_name_or_id}/scanner/candidates` | Get scanner registration candidates for configurating project level scanner |
| GET | `/audit-logs` | Get recent logs of projects which the user is a member with project admin role, or return all audit logs for system admin user (deprecated) |
| GET | `/auditlog-exts` | Get recent logs of the projects which the user is a member with project_admin role, or return all audit logs for system admin user |
| GET | `/auditlog-exts/events` | Get all event types of audit log |
| GET | `/projects/{project_name}/logs` | Get recent logs of the projects (deprecated) |
| GET | `/projects/{project_name}/auditlog-exts` | Get recent logs of the projects |
| GET | `/p2p/preheat/providers` | List P2P providers |
| POST | `/p2p/preheat/instances/ping` | Ping status of a instance. |
| GET | `/p2p/preheat/instances` | List P2P provider instances |

…and 143 more operations. They are listed in full on the page.

## Machine-readable artifacts (8)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/goharbor/refs/heads/main/openapi/_original/goharbor-harbor-api-v2.0-swagger.yml
- **Documentation** — https://goharbor.io/docs/2.15.0/
- **APIReference** — https://goharbor.io/docs/2.15.0/working-with-projects/using-api-explorer/
- **SourceCode** — https://github.com/goharbor/harbor
- **Overlay** — https://raw.githubusercontent.com/api-evangelist/goharbor/refs/heads/main/overlays/goharbor-harbor-api-overlay.yaml
- **DataModel** — https://raw.githubusercontent.com/api-evangelist/goharbor/refs/heads/main/data-model/goharbor-data-model.yml
- **ErrorCatalog** — https://raw.githubusercontent.com/api-evangelist/goharbor/refs/heads/main/errors/goharbor-problem-types.yml
- **Webhooks** — https://raw.githubusercontent.com/api-evangelist/goharbor/refs/heads/main/asyncapi/goharbor-webhooks.yml

## Other GoHarbor APIs (12)

- [GoHarbor artifacts API](https://apis.io/apis/goharbor/goharbor-artifacts-api/)
- [GoHarbor audit API](https://apis.io/apis/goharbor/goharbor-audit-api/)
- [GoHarbor health API](https://apis.io/apis/goharbor/goharbor-health-api/)
- [GoHarbor projects API](https://apis.io/apis/goharbor/goharbor-projects-api/)
- [GoHarbor quotas API](https://apis.io/apis/goharbor/goharbor-quotas-api/)
- [GoHarbor registries API](https://apis.io/apis/goharbor/goharbor-registries-api/)
- [GoHarbor replication API](https://apis.io/apis/goharbor/goharbor-replication-api/)
- [GoHarbor repositories API](https://apis.io/apis/goharbor/goharbor-repositories-api/)
- [GoHarbor robots API](https://apis.io/apis/goharbor/goharbor-robots-api/)
- [GoHarbor scan API](https://apis.io/apis/goharbor/goharbor-scan-api/)
- [GoHarbor search API](https://apis.io/apis/goharbor/goharbor-search-api/)
- [GoHarbor tags API](https://apis.io/apis/goharbor/goharbor-tags-api/)

## Tags

Registry, Artifacts, OCI

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/goharbor/goharbor-harbor-v2-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/goharbor/.
