Skip to main content
POST
/
integrations
/
harbor
/
container-registry
/
organization
/
{organizationId}
/
credentials
Store Harbor Container Registry credentials
curl --request POST \
  --url https://api-eu.cybedefend.com/integrations/harbor/container-registry/organization/{organizationId}/credentials \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "projectId": "097bbbf4-d1eb-4512-9950-684445279808",
  "harborUrl": "https://harbor.example.com",
  "harborProject": "my-project",
  "username": "robot$my-project+deploy",
  "password": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "description": "Production Harbor registry"
}
'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "harborUrl": "https://harbor.example.com",
  "harborProject": "my-project",
  "username": "robot$my-project+deploy",
  "createdAt": "2025-01-01T00:00:00Z",
  "description": "Production Harbor registry"
}

Authorizations

x-api-key
string
header
required

API Key for authentication. You can generate an API key from your personal settings.

Path Parameters

organizationId
string<uuid>
required

CybeDefend organization ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json
projectId
string
required

CybeDefend project ID to associate this credential with

Example:

"097bbbf4-d1eb-4512-9950-684445279808"

harborUrl
string
required

Harbor server URL (e.g., https://harbor.example.com)

Example:

"https://harbor.example.com"

harborProject
string
required

Harbor project name

Example:

"my-project"

username
string
required

Robot account username. Required permissions: List/Read Artifact, List Label, Read Project, List/Pull/Read Repository, List Tag

Example:

"robot$my-project+deploy"

password
string
required

Robot account secret token

Example:

"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

description
string

Optional description for the credentials

Example:

"Production Harbor registry"

Response

Credentials stored successfully

id
string
required

Credential ID

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

harborUrl
string
required

Harbor server URL

Example:

"https://harbor.example.com"

harborProject
string
required

Harbor project name

Example:

"my-project"

username
string
required

Username

Example:

"robot$my-project+deploy"

createdAt
string
required

Creation date

Example:

"2025-01-01T00:00:00Z"

description
string

Description

Example:

"Production Harbor registry"