> ## 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.

# Get GitLab repository branches

> Retrieves all branches for a specific GitLab repository. Use this to populate branch selection when linking a repository.



## OpenAPI

````yaml get /integrations/gitlab/organization/{organizationId}/repositories/{repositoryId}/branches
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/gitlab/organization/{organizationId}/repositories/{repositoryId}/branches:
    get:
      tags:
        - GitLab Integration
      summary: Get GitLab repository branches
      description: >-
        Retrieves all branches for a specific GitLab repository. Use this to
        populate branch selection when linking a repository.
      operationId: GitlabController_getBranches
      parameters:
        - name: organizationId
          required: true
          in: path
          description: The unique identifier of the organization that owns the repository
          schema:
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
        - name: repositoryId
          required: true
          in: path
          description: The unique identifier of the GitLab repository to fetch branches for
          schema:
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
      responses:
        '200':
          description: Branches retrieved successfully
        '401':
          description: Authentication token is missing or invalid
          content:
            application/json:
              schema:
                example:
                  message: Unauthorized
                  statusCode: 401
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '403':
          description: Insufficient permissions to access repository branches
          content:
            application/json:
              schema:
                example:
                  message: Forbidden
                  statusCode: 403
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path

````