> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cybedefend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk-apply a container-registry credential to projects

> Creates (or rotates) one credential of the given registry type and links it to a set of projects in a single call. Unknown or foreign-organization projects are skipped and reported in the response.



## OpenAPI

````yaml post /integrations/container-registry/organization/{organizationId}/bulk-apply
openapi: 3.0.0
info:
  title: Cybedefend API
  description: >-
    CybeDefend is an advanced API for application security analysis. Key
    features include OAuth 2.0 authentication, user/organization/project
    management, and REBAC-based permissions. It excels in static, dynamic, and
    IaC security analyses (SAST, DAST, IaC, etc.).
  version: '1.0'
  contact: {}
servers:
  - url: https://api-eu.cybedefend.com
    description: EU
  - url: https://api-us.cybedefend.com
    description: US
security: []
tags: []
paths:
  /integrations/container-registry/organization/{organizationId}/bulk-apply:
    post:
      tags:
        - Container Registry Credentials
      summary: Bulk-apply a container-registry credential to projects
      description: >-
        Creates (or rotates) one credential of the given registry type and links
        it to a set of projects in a single call. Unknown or
        foreign-organization projects are skipped and reported in the response.
      operationId: ContainerRegistryCredentialsController_bulkApply
      parameters:
        - name: organizationId
          required: true
          in: path
          schema:
            format: uuid
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkApplyCredentialDto'
      responses:
        '201':
          description: Credential stored and linked; partial-success report returned
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                example:
                  message: Unauthorized
                  statusCode: 401
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '403':
          description: Forbidden - Insufficient permissions to manage integrations
          content:
            application/json:
              schema:
                example:
                  message: Forbidden
                  statusCode: 403
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
components:
  schemas:
    BulkApplyCredentialDto:
      type: object
      properties:
        registryType:
          type: string
          description: Registry type to create the credential for
          enum:
            - gcr
            - acr
            - dockerhub
            - gitlab
            - quay
            - harbor
            - jfrog
            - scaleway
            - ecr
        projectIds:
          description: Project ids to link the new credential to
          example:
            - 097bbbf4-d1eb-4512-9950-684445279808
          type: array
          items:
            type: string
        name:
          type: string
          description: Display name for the credential
        description:
          type: string
          description: Description for this credential
        gcpProjectId:
          type: string
          description: GCP project ID (gcr only)
        registryHostname:
          type: string
          description: GCR registry hostname (gcr only)
        serviceAccountKey:
          type: string
          description: GCP service account JSON key (gcr only)
        acrLoginServer:
          type: string
          description: ACR login server (acr only)
        servicePrincipalId:
          type: string
          description: ACR service principal app id / admin username (acr only)
        servicePrincipalPassword:
          type: string
          description: ACR service principal password / admin password (acr only)
        dockerhubUsername:
          type: string
          description: DockerHub username (dockerhub only)
        gitlabProjectId:
          type: number
          description: GitLab numeric project id (gitlab only)
        deployToken:
          type: string
          description: GitLab deploy token (gitlab only)
        registryUrl:
          type: string
          description: GitLab registry URL (gitlab only)
        projectPath:
          type: string
          description: GitLab project path (gitlab only)
        scopes:
          description: GitLab deploy-token scopes (gitlab only)
          type: array
          items:
            type: string
        expiresAt:
          type: string
          description: GitLab deploy-token expiry (gitlab only)
        quayNamespace:
          type: string
          description: Quay namespace (quay only)
        robotUsername:
          type: string
          description: Quay robot account username (quay only)
        robotToken:
          type: string
          description: Quay robot account token (quay only)
        quayHost:
          type: string
          description: Quay host (quay only, defaults quay.io)
        harborUrl:
          type: string
          description: Harbor server URL (harbor only)
        harborProject:
          type: string
          description: Harbor project name (harbor only)
        jfrogUrl:
          type: string
          description: JFrog Artifactory URL (jfrog only)
        repositoryKey:
          type: string
          description: JFrog docker repository key (jfrog only)
        username:
          type: string
          description: >-
            Registry username — required for gitlab/harbor/jfrog (robot account
            or user)
        password:
          type: string
          description: >-
            Registry password/token — required for harbor/jfrog (robot token or
            password)
        accessToken:
          type: string
          description: Access token — required for dockerhub (PAT)
        region:
          type: string
          description: Scaleway region (scaleway only)
        namespaceName:
          type: string
          description: Scaleway namespace name (scaleway only)
        secretKey:
          type: string
          description: Scaleway API secret key (scaleway only)
        credentialType:
          type: string
          description: ECR authentication mode (ecr only)
          enum:
            - static_keys
            - iam_role
          default: static_keys
        awsRegion:
          type: string
          description: AWS region (ecr only)
        awsAccountId:
          type: string
          description: AWS account id — required for ecr static_keys
        awsAccessKeyId:
          type: string
          description: AWS access key id — required for ecr static_keys
        awsSecretAccessKey:
          type: string
          description: AWS secret access key — required for ecr static_keys
        roleArn:
          type: string
          description: IAM role ARN to assume — required for ecr iam_role
        externalId:
          type: string
          description: External ID for the role trust policy (ecr iam_role)
      required:
        - registryType
        - projectIds
        - name

````