Skip to main content
POST
/
integrations
/
gitlab
/
container-registry
/
organization
/
{organizationId}
/
credentials
Store GitLab Container Registry credentials
curl --request POST \
  --url https://api-eu.cybedefend.com/integrations/gitlab/container-registry/organization/{organizationId}/credentials \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "projectId": "097bbbf4-d1eb-4512-9950-684445279808",
  "gitlabProjectId": 12345,
  "username": "gitlab+deploy-token-123",
  "deployToken": "gldt-xxxxxxxxxxxxxxxxxxxx",
  "registryUrl": "registry.gitlab.com",
  "projectPath": "mygroup/myproject",
  "scopes": [
    "read_registry",
    "write_registry"
  ],
  "expiresAt": "2025-12-31T23:59:59Z",
  "description": "Production registry access"
}
'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "gitlabProjectId": 12345,
  "username": "gitlab+deploy-token-123",
  "registryUrl": "registry.gitlab.com",
  "projectPath": "mygroup/myproject",
  "createdAt": "2025-01-01T00:00:00Z",
  "scopes": [
    "read_registry"
  ],
  "expiresAt": "2025-12-31T23:59:59Z",
  "description": "Production registry access"
}

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

GitLab Container Registry deploy token credentials

projectId
string
required

CybeDefend project ID to associate this credential with

Example:

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

gitlabProjectId
number
required

GitLab project ID (numeric)

Example:

12345

username
string
required

Deploy token username from GitLab

Example:

"gitlab+deploy-token-123"

deployToken
string
required

Deploy token secret from GitLab

Example:

"gldt-xxxxxxxxxxxxxxxxxxxx"

registryUrl
string
default:registry.gitlab.com
required

Container registry URL

Example:

"registry.gitlab.com"

projectPath
string
required

GitLab project path (namespace/project)

Example:

"mygroup/myproject"

scopes
string[]

Token scopes

Example:
["read_registry", "write_registry"]
expiresAt
string

Token expiration date (ISO 8601)

Example:

"2025-12-31T23:59:59Z"

description
string

Description for this credential

Example:

"Production registry access"

Response

Credentials stored successfully

id
string
required

Credential ID

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

gitlabProjectId
number
required

GitLab project ID

Example:

12345

username
string
required

Deploy token username

Example:

"gitlab+deploy-token-123"

registryUrl
string
required

Container registry URL

Example:

"registry.gitlab.com"

projectPath
string
required

GitLab project path

Example:

"mygroup/myproject"

createdAt
string
required

Creation date

Example:

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

scopes
string[]

Token scopes

Example:
["read_registry"]
expiresAt
string

Token expiration date

Example:

"2025-12-31T23:59:59Z"

description
string

Description

Example:

"Production registry access"