Skip to content
Agentmart
Submit a tool

harbor-api

Use when working with the Harbor REST API v2 — project management, artifact operations, robot accounts, replication, vulnerability scanning, OIDC/LDAP config…

Skill by Aidas-dev

IndexedMIT★ 4
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/aidas-dev-harbor-api

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when working with the Harbor REST API v2 — project management, artifact operations, robot accounts, replication, vulnerability scanning, OIDC/LDAP config, garbage collection, and general API automation with curl.

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/harbor-api

What's inside

Skill name
harbor-api
Description
Use when working with the Harbor REST API v2 — project management, artifact operations, robot accounts, replication, vulnerability scanning, OIDC/LDAP config, garbage collection, and general API automation with curl.
License
MIT
Instructions
228 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Harbor REST API v2

Base: `/api/v2.0`. Latest stable: **Harbor v2.15.1** (May 2026). API spec: Swagger 2.0 at `api/v2.0/swagger.yaml`. Built-in Swagger UI: `https://<harbor>/devcenter-api-2.0`.

## Authentication

| Method | Header / Usage | Use Case |
|--------|---------------|----------|
| Basic Auth | `-u username:password` | Direct admin/developer API access |
| Bearer Token | `Authorization: Bearer <token>` | Obtained from `/service/token` per Docker Registry v2 spec |
| Robot Account | `-u robot$<prefix><name>:<secret>` | Automated CI/CD with scoped permissions |
| OIDC ID Token | `Authorization: Bearer <oidc_id_token>` | OIDC-authenticated users (basic auth not supported for OIDC) |

### Bearer Token Flow
```bash
# Get token for push/pull access to a repo
TOKEN=$(curl -s -u "username:password" \
  "https://harbor.example.com/service/token?service=harbor-registry&scope=repository:project/repo:pull,push" \
  | jq -r '.token')

# Use for registry operations
curl -H "Authorization: Bearer $TOKEN" https://harbor.example.com/v2/_catalog
```

### Robot Account Notes
- Secret shown **only once** at creation — Harbor does not store it
- Username format: `robot$<prefix><account_name>`
- System-level (v2.2.0+) or project-level scope
- Permissions: granular RBAC (push, pull, create, read, delete, list, etc.)

## Key Endpoints

### Health & Status

| Method | Endpoint | Purpose |
|--------|----------|---------|
| GET | `/health` | Component health (no auth) |
| GET | `/statistics` | Project & repo statistics |
| GET | `/search?q=<query>` | Search projects, repos, helm charts |

### Project Management

| Method | Endpoint | Purpose |
|--------|----------|---------|
| GET | `/projects` | List projects (filter: name, public, owner) |
| POST | `/projects` | Create project |
| HEAD | `/projects` | Check project name exists |
| GET | `/projects/{name_or_id}` | Get project |
| PUT | `/projects/{name_or_id}` | Update project |
| DELETE | `/projects/{name_or_id}` | Delete project |
| GET | `/projects/{name_or_id}/_deletable` | Check if deletable |
| GET | `/projects/{name_or_id}/summary` | Project summary |
| GET | `/projects/{name_or_id}/metadatas` | List metadata |
| POST | `/projects/{name_or_id}/metadatas` | Add metadata |
| GET/PUT/DELETE | `/projects/{name_or_id}/metadatas/{meta_name}` | CRUD metadata entry |
| GET | `/projects/{name_or_id}/members` | List members |
| POST | `/projects/{name_or_id}/members` | Add member |
| GET/PUT/DELETE | `/projects/{name_or_id}/members/{mid}` | CRUD member |

### Repository Management

| Method | Endpoint | Purpose |
|--------|----------|---------|
| GET | `/repositories` | List all authorized repos |
| GET | `/projects/{project}/repositories` | List repos in project |
| GET | `/projects/{project}/repositories/{repo}` | Get repo |
| PUT | `/projects/{project}/repositories/{repo}` | Update repo description |
| DELETE | `/projects/{project}/repositories/{repo}` | Delete repo |

### Artifact Management

| Method | Endpoint | Purpose |
|--------|----------|---------|
| GET | `/projects/{proj}/repositories/{repo}/artifacts` | List artifacts (`?q=tags=*`, labels, etc.) |
| POST | `/projects/{proj}/repositories/{repo}/artifacts` | Copy artifact |
| GET | `/projects/{proj}/repositories/{repo}/artifacts/{ref}` | Get artifact by digest or tag |
| DELETE | `/projects/{proj}/repositories/{repo}/artifacts/{ref}` | Delete artifact |
| PUT | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/add-label` | Add label |
| DELETE | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/labels/{label_id}` | Remove label |
| GET | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/tags` | List tags |
| POST | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/tags` | Create tag |
| DELETE | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/tags/{tag}` | Delete tag |

### Vulnerability Scanning

| Method | Endpoint | Purpose |
|--------|----------|---------|
| POST | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/scan` | Trigger scan |
| POST | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/scan/stop` | Stop scan |
| GET | `/scanners` | List scanners |
| GET | `/scanners/{id}` | Get scanner metadata |
| POST | `/scanners/ping` | Ping scanner adapter |
| GET | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/scan/{report_id}` | Get scan report |

### Robot Accounts

| Method | Endpoint | Purpose |
|--------|----------|---------|
| GET | `/robots` | List robot accounts |
| POST | `/robots` | Create robot account |
| GET | `/robots/{id}` | Get robot |
| PUT | `/robots/{id}` | Update robot |
| DELETE | `/robots/{id}` | Delete robot |
| PATCH | `/robots/{id}` | Refresh robot secret |

### Replication

| Method | Endpoint | Purpose |
|--------|----------|---------|
| GET | `/replication/policies` | List policies |
| POST | `/replication/policies` | Create policy |
| GET/PUT/DELETE | `/replication/policies/{id}` | CRUD policy |
| GET | `/replication/executions` | List executions |
| POST | `/replication/executions` | Start replication |
| GET | `/replication/executions/{id}` | Get execution status |
| GET | `/replication/executions/{id}/tasks` | List execution tasks |
| GET | `/registries` | List registries |
| POST | `/registries` | Create registry endpoint |
| GET/PUT/DELETE | `/registries/{id}` | CRUD registry |

From Aidas-dev/k8s-agent-skills, MIT.

More from Aidas-dev/k8s-agent-skills

Signals

Stars
4
Forks
3
Open issues
0
Last commit (this folder)
Jun 11, 2026 (4 months ago)
Last release
Aug 14, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Aidas-dev

Cite this page

harbor-api skill. Agent Mart. https://agentmart.dev/skills/aidas-dev-harbor-api (last updated 2026-10-24)