# 获取项目所有分支

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v4/projects/{项目ID}/repository/branches:
    get:
      summary: 获取项目所有分支
      deprecated: false
      description: ''
      tags:
        - GitLab Api
      parameters:
        - name: 项目ID
          in: path
          description: ''
          required: true
          example: '111'
          schema:
            type: string
        - name: PRIVATE-TOKEN
          in: header
          description: GitLab个人Token
          example: glpat-q1csJCWcYYGum_xZxHhg
          schema:
            type: string
            default: glpat-q1csJCWcYYGum_xZxHhg
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    commit:
                      type: object
                      properties:
                        id:
                          type: string
                        short_id:
                          type: string
                        created_at:
                          type: string
                        parent_ids:
                          type: 'null'
                        title:
                          type: string
                        message:
                          type: string
                        author_name:
                          type: string
                        author_email:
                          type: string
                        authored_date:
                          type: string
                        committer_name:
                          type: string
                        committer_email:
                          type: string
                        committed_date:
                          type: string
                        trailers:
                          type: 'null'
                        web_url:
                          type: string
                      required:
                        - id
                        - short_id
                        - created_at
                        - parent_ids
                        - title
                        - message
                        - author_name
                        - author_email
                        - authored_date
                        - committer_name
                        - committer_email
                        - committed_date
                        - trailers
                        - web_url
                    merged:
                      type: boolean
                    protected:
                      type: boolean
                    developers_can_push:
                      type: boolean
                    developers_can_merge:
                      type: boolean
                    can_push:
                      type: boolean
                    default:
                      type: boolean
                    web_url:
                      type: string
                  required:
                    - name
                    - commit
                    - merged
                    - protected
                    - developers_can_push
                    - developers_can_merge
                    - can_push
                    - default
                    - web_url
              example:
                - name: dev
                  commit:
                    id: 40f224bce46aa28fb9bca73c4ee7274ad47b3e11
                    short_id: 40f224bc
                    created_at: '2024-11-18T10:17:00.000+08:00'
                    parent_ids: null
                    title: Commit Test
                    message: Commit Test
                    author_name: zhf
                    author_email: 1055412539@qq.com
                    authored_date: '2024-11-18T10:17:00.000+08:00'
                    committer_name: zhf
                    committer_email: 1055412539@qq.com
                    committed_date: '2024-11-18T10:17:00.000+08:00'
                    trailers: null
                    web_url: >-
                      https://git.csntcorp.com/mmp/edi/-/commit/40f224bce46aa28fb9bca73c4ee7274ad47b3e11
                  merged: false
                  protected: false
                  developers_can_push: false
                  developers_can_merge: false
                  can_push: true
                  default: true
                  web_url: https://git.csntcorp.com/mmp/edi/-/tree/dev
                - name: master
                  commit:
                    id: 5c75e6c8a563ac0585e246a110854ad280e3a1df
                    short_id: 5c75e6c8
                    created_at: '2020-11-06T17:06:31.000+08:00'
                    parent_ids: null
                    title: 添加根据模板生成文件的方法
                    message: 添加根据模板生成文件的方法
                    author_name: 夏怀婷
                    author_email: xia.huaiting@coscoshipping.com
                    authored_date: '2020-11-06T17:06:31.000+08:00'
                    committer_name: 夏怀婷
                    committer_email: xia.huaiting@coscoshipping.com
                    committed_date: '2020-11-06T17:06:31.000+08:00'
                    trailers: null
                    web_url: >-
                      https://git.csntcorp.com/mmp/edi/-/commit/5c75e6c8a563ac0585e246a110854ad280e3a1df
                  merged: true
                  protected: true
                  developers_can_push: false
                  developers_can_merge: false
                  can_push: false
                  default: false
                  web_url: https://git.csntcorp.com/mmp/edi/-/tree/master
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: GitLab Api
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/5476045/apis/api-234614139-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
