---
title: GitLab DevSecOps Platform
slug: connectors/gitlab-devsecops-platform
docTags: 
createdAt: 2026-06-09T16:29:59.981Z
---

GitLab DevSecOps Platform is a unified application for the entire software development lifecycle, integrating development, security, and operations.

GitLab is a comprehensive DevSecOps platform that enables teams to collaborate on code, manage projects, and automate CI/CD pipelines. The GitLab DevSecOps Platform Connector allows Swimlane Turbine users to seamlessly integrate GitLab's robust version control and project management capabilities into their security automation workflows. This integration empowers users to automate repository management, streamline code review processes, and enhance collaboration across development and security teams, ultimately improving the efficiency and effectiveness of DevSecOps practices.

## Prerequisites

Before you can use the GitLab DevSecOps Platform connector for Turbine, you'll need access to the GitLab API. This requires the following:

- an API key authentication using the following parameters:
  - URL: The base URL of your GitLab instance.
  - Private Token: A personal access token with appropriate permissions to interact with the GitLab API.

## Capabilities

This Connector provides the following capabilities:

- Get Repo Archive
- List Repository Tree
- Create New File In Repository
- Get File
- List Repository Commits
- Create a Commit
- List Branches
- Create Branch
- Delete Branch
- List Merge Requests
- Get Merge Request
- Create Merge Request
- Delete Merge Request

## Asset Setup

The GitLab asset requires an **Private-Token** for authentication.

## Notes

- For more information on API Documentation, [check here](https://docs.gitlab.com/ee/api/api_resources.html)

# Configurations

## GitLab Private Token Authentication

Authenticates using a private token

### Configuration Parameters

| **Parameter** | **Description**                                              | **Type** | **Required** |
| ------------- | ------------------------------------------------------------ | -------- | ------------ |
| url           | A URL to the target host.                                    | string   | Required     |
| PRIVATE-TOKEN | Private Token - not required if repo is publicly accessible. | string   | Required     |
| verify\_ssl   | Verify SSL certificate                                       | boolean  | Optional     |
| http\_proxy   | A proxy to route requests through.                           | string   | Optional     |

# Actions

## Create a Commit

Create a commit in a GitLab project with file actions like create, delete, move, update, or chmod. Requires path parameters and JSON body including branch and commit message.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/commits`
- **Method:** `POST`

### Input

| **Argument Name**          | **Type** | **Required** | **Description**                                                                                             |
| -------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------- |
| `path_parameters.id`       | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.                                  |
| `branch`                   | string   | Optional     | Name of the branch to commit into. To create a new branch, also provide either start\_branch or start\_sha. |
| `commit_message`           | string   | Optional     | Commit message.                                                                                             |
| `actions`                  | array    | Optional     | An array of action hashes to commit as a batch.                                                             |
| `actions.action`           | string   | Required     | The action to perform: create, delete, move, update, or chmod.                                              |
| `actions.file_path`        | string   | Required     | Full path to the file. For example: lib/class.rb.                                                           |
| `actions.content`          | string   | Optional     | File content, required for all except delete, chmod, and move.                                              |
| `actions.encoding`         | string   | Optional     | text or base64. text is default.                                                                            |
| `actions.execute_filemode` | boolean  | Optional     | Enables or disables the execute flag on the file. Only considered for chmod action.                         |
| `actions.last_commit_id`   | string   | Optional     | Last known file commit ID. Only considered in update, move, and delete actions.                             |
| `actions.previous_path`    | string   | Optional     | Original full path to the file being moved. Only considered for move action.                                |
| `allow_empty`              | boolean  | Optional     | When true, creates an empty commit. Default is false.                                                       |
| `author_email`             | string   | Optional     | Specify the commit author's email address.                                                                  |
| `author_name`              | string   | Optional     | Specify the commit author's name.                                                                           |
| `force`                    | boolean  | Optional     | If true, overwrites branch with a new commit based on start\_branch or start\_sha. Default is false.        |
| `start_branch`             | string   | Optional     | Name of the branch to use as the parent for the new commit. Mutually exclusive with start\_sha.             |
| `start_project`            | string   | Optional     | The project ID or URL-encoded path of the project to use as the source for start\_branch or start\_sha.     |
| `start_sha`                | string   | Optional     | SHA of the commit to use as the parent for the new commit. Mutually exclusive with start\_branch.           |
| `stats`                    | boolean  | Optional     | Include commit stats. Default is true.                                                                      |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc"},"branch":"string","commit_message":"string","actions":[{"action":"string","file_path":"string","content":"string","encoding":"string","execute_filemode":true,"last_commit_id":"string","previous_path":"string"}],"allow_empty":true,"author_email":"string","author_name":"Example Name","force":true,"start_branch":"string","start_project":"string","start_sha":"string","stats":true}`

### Output

| **Parameter**     | **Type** | **Description**                        |
| ----------------- | -------- | -------------------------------------- |
| `status_code`     | number   | HTTP status code of the response       |
| `reason`          | string   | Response reason phrase                 |
| `id`              | string   | SHA of the created commit.             |
| `short_id`        | string   | Short SHA of the created commit.       |
| `title`           | string   | Title of the commit message.           |
| `author_name`     | string   | Name of the commit author.             |
| `author_email`    | string   | Email address of the commit author.    |
| `authored_date`   | string   | Date when the commit was authored.     |
| `committer_name`  | string   | Name of the commit committer.          |
| `committer_email` | string   | Email address of the commit committer. |
| `committed_date`  | string   | Date when the commit was committed.    |
| `created_at`      | string   | Date when the commit was created.      |
| `message`         | string   | Full commit message.                   |
| `parent_ids`      | array    | Array of parent commit SHAs.           |
| `stats`           | object   | Statistics about the commit.           |
| `stats.additions` | number   | Output field: stats.additions          |
| `stats.deletions` | number   | Output field: stats.deletions          |
| `stats.total`     | number   | Output field: stats.total              |
| `status`          | string   | Status of the commit.                  |
| `web_url`         | string   | Web URL of the commit.                 |

### Output Example

`{"id":"12345678-1234-1234-1234-123456789abc","short_id":"string","title":"string","author_name":"Example Name","author_email":"string","authored_date":"string","committer_name":"Example Name","committer_email":"string","committed_date":"string","created_at":"string","message":"string","parent_ids":["string"],"stats":{"additions":123,"deletions":123,"total":123},"status":"active","web_url":"string"}`

## Create Branch

Create a new branch in a GitLab project repository using a specified branch name or commit SHA. Requires project ID, branch name, and reference.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/branches`
- **Method:** `POST`

### Input

| **Argument Name**    | **Type** | **Required** | **Description**                                                                                 |
| -------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------- |
| `path_parameters.id` | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.                      |
| `parameters.branch`  | string   | Required     | Name of the branch. Cannot contain spaces or special characters except hyphens and underscores. |
| `parameters.ref`     | string   | Required     | Branch name or commit SHA to create the branch from.                                            |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc"},"parameters":{"branch":"string","ref":"string"}}`

### Output

| **Parameter**            | **Type** | **Description**                                                  |
| ------------------------ | -------- | ---------------------------------------------------------------- |
| `status_code`            | number   | HTTP status code of the response                                 |
| `reason`                 | string   | Response reason phrase                                           |
| `name`                   | string   | Name of the branch.                                              |
| `merged`                 | boolean  | If true, the branch merged into the default branch.              |
| `protected`              | boolean  | If true, the branch is protected from force pushes and deletion. |
| `default`                | boolean  | If true, the branch is the default branch for the project.       |
| `developers_can_push`    | boolean  | If true, users with the Developer role can push to this branch.  |
| `developers_can_merge`   | boolean  | If true, users with the Developer role can merge to this branch. |
| `can_push`               | boolean  | If true, the authenticated user can push to this branch.         |
| `web_url`                | string   | URL to view the branch in the GitLab UI.                         |
| `commit`                 | object   | Details about the latest commit on the branch.                   |
| `commit.id`              | string   | Full SHA of the commit.                                          |
| `commit.short_id`        | string   | Abbreviated SHA of the commit.                                   |
| `commit.title`           | string   | Title of the commit message.                                     |
| `commit.message`         | string   | Full commit message.                                             |
| `commit.author_name`     | string   | Name of the commit author.                                       |
| `commit.author_email`    | string   | Email address of the commit author.                              |
| `commit.authored_date`   | string   | Date when the commit was authored.                               |
| `commit.committer_name`  | string   | Name of the commit committer.                                    |
| `commit.committer_email` | string   | Email address of the commit committer.                           |
| `commit.committed_date`  | string   | Date when the commit was committed.                              |
| `commit.created_at`      | string   | Date when the commit was created.                                |
| `commit.parent_ids`      | array    | Array of parent commit SHAs.                                     |
| `commit.web_url`         | string   | URL to view the commit in the GitLab UI.                         |

### Output Example

`{"name":"Example Name","merged":true,"protected":true,"default":true,"developers_can_push":true,"developers_can_merge":true,"can_push":true,"web_url":"string","commit":{"id":"12345678-1234-1234-1234-123456789abc","short_id":"string","title":"string","message":"string","author_name":"Example Name","author_email":"string","authored_date":"string","committer_name":"Example Name","committer_email":"string","committed_date":"string","created_at":"string","parent_ids":["string"],"web_url":"string"}}`

## Create Merge Request

Create a new merge request in GitLab from a source branch to a target branch. Requires project ID, source\_branch, target\_branch, and title.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/merge_requests`
- **Method:** `POST`

### Input

| **Argument Name**      | **Type** | **Required** | **Description**                                                                                                    |
| ---------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------ |
| `path_parameters.id`   | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.                                         |
| `source_branch`        | string   | Optional     | The source branch.                                                                                                 |
| `target_branch`        | string   | Optional     | The target branch.                                                                                                 |
| `title`                | string   | Optional     | Title of the merge request.                                                                                        |
| `description`          | string   | Optional     | Description of the merge request. Limited to 1,048,576 characters.                                                 |
| `assignee_id`          | number   | Optional     | Assignee user ID.                                                                                                  |
| `assignee_ids`         | array    | Optional     | The IDs of the users to assign the merge request to. Set to 0 or provide an empty value to unassign all assignees. |
| `reviewer_ids`         | array    | Optional     | The IDs of the users added as reviewers. If set to 0 or left empty, no reviewers are added.                        |
| `labels`               | string   | Optional     | Labels for the merge request, as a comma-separated list.                                                           |
| `milestone_id`         | number   | Optional     | The global ID of a milestone. Mutually exclusive with milestone.                                                   |
| `milestone`            | string   | Optional     | The title of a project or ancestor-group milestone. Mutually exclusive with milestone\_id.                         |
| `remove_source_branch` | boolean  | Optional     | Flag indicating if a merge request should remove the source branch when merging.                                   |
| `allow_collaboration`  | boolean  | Optional     | Allow commits from members who can merge to the target branch.                                                     |
| `squash`               | boolean  | Optional     | If true, squash all commits into a single commit on merge.                                                         |
| `target_project_id`    | number   | Optional     | Numeric ID of the target project.                                                                                  |
| `merge_after`          | string   | Optional     | Date after which the merge request can be merged.                                                                  |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc"},"source_branch":"string","target_branch":"string","title":"string","description":"string","assignee_id":123,"assignee_ids":[123],"reviewer_ids":[123],"labels":"string","milestone_id":123,"milestone":"string","remove_source_branch":true,"allow_collaboration":true,"squash":true,"target_project_id":123,"merge_after":"string"}`

### Output

| **Parameter**       | **Type** | **Description**                                              |
| ------------------- | -------- | ------------------------------------------------------------ |
| `status_code`       | number   | HTTP status code of the response                             |
| `reason`            | string   | Response reason phrase                                       |
| `id`                | number   | ID of the merge request.                                     |
| `iid`               | number   | Internal ID of the merge request.                            |
| `project_id`        | number   | ID of the project.                                           |
| `title`             | string   | Title of the merge request.                                  |
| `description`       | string   | Description of the merge request.                            |
| `state`             | string   | State of the merge request (opened, closed, merged, locked). |
| `created_at`        | string   | Date when the merge request was created.                     |
| `updated_at`        | string   | Date when the merge request was last updated.                |
| `target_branch`     | string   | Target branch of the merge request.                          |
| `source_branch`     | string   | Source branch of the merge request.                          |
| `author`            | object   | Information about the merge request author.                  |
| `assignee`          | object   | Information about the merge request assignee.                |
| `source_project_id` | number   | ID of the source project.                                    |
| `target_project_id` | number   | ID of the target project.                                    |
| `labels`            | array    | Labels associated with the merge request.                    |
| `draft`             | boolean  | If true, the merge request is a draft.                       |
| `work_in_progress`  | boolean  | If true, the merge request is set as work in progress.       |
| `merge_status`      | string   | Merge status of the merge request.                           |
| `sha`               | string   | SHA of the merge request.                                    |
| `merge_commit_sha`  | string   | SHA of the merge commit.                                     |
| `web_url`           | string   | Web URL of the merge request.                                |

### Output Example

`{"id":123,"iid":123,"project_id":123,"title":"string","description":"string","state":"string","created_at":"string","updated_at":"string","target_branch":"string","source_branch":"string","author":{},"assignee":{},"source_project_id":123,"target_project_id":123,"labels":["string"]}`

## Create New File in Repository

Create a new file in a specified GitLab repository using the provided branch, commit message, and content.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/files/{{file_path}}`
- **Method:** `POST`

### Input

| **Argument Name**           | **Type** | **Required** | **Description**                                                            |
| --------------------------- | -------- | ------------ | -------------------------------------------------------------------------- |
| `path_parameters.id`        | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user. |
| `path_parameters.file_path` | string   | Required     | URL-encoded full path to new file.                                         |
| `branch`                    | string   | Optional     | Name of the new branch to create. The commit is added to this branch.      |
| `commit_message`            | string   | Optional     | The commit message.                                                        |
| `content`                   | string   | Optional     | The files content.                                                         |
| `author_email`              | string   | Optional     | The commit authors email address.                                          |
| `author_name`               | string   | Optional     | The commit authors name.                                                   |
| `encoding`                  | string   | Optional     | Change encoding to base64.                                                 |
| `execute_filemode`          | boolean  | Optional     | Enables or disables the execute flag on the file.                          |
| `start_branch`              | string   | Optional     | Name of the base branch to create the new branch from.                     |

### Input Example

`{"json_body":{"branch":"main","commit_message":"create a new file","content":"some content","author_email":"author@example.com","author_name":"Firstname Lastname","encoding":"text","execute_filemode":false,"start_branch":"New"},"path_parameters":{"id":"13083","file_path":"lib%2Fclass%2Erb"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"reason":"OK","response_headers":{},"json_body":{}}`

## Delete Branch

Delete a specified branch from a GitLab project repository using the branch name and project ID. The default branch and protected branches cannot be deleted.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/branches/{{branch}}`
- **Method:** `DELETE`

### Input

| **Argument Name**        | **Type** | **Required** | **Description**                                                                         |
| ------------------------ | -------- | ------------ | --------------------------------------------------------------------------------------- |
| `path_parameters.id`     | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.              |
| `path_parameters.branch` | string   | Required     | URL-encoded name of the branch. Cannot delete the default branch or protected branches. |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc","branch":"string"}}`

### Output

| **Parameter**   | **Type** | **Description**                  |
| --------------- | -------- | -------------------------------- |
| `status_code`   | number   | HTTP status code of the response |
| `reason`        | string   | Response reason phrase           |
| `response_text` | string   | Raw response body text, if any.  |

### Output Example

`{"response_text":"string"}`

## Delete Merge Request

Delete a merge request in a GitLab project using its internal ID. Only administrators and project owners have the permission to perform this action.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/merge_requests/{{merge_request_iid}}`
- **Method:** `DELETE`

### Input

| **Argument Name**                   | **Type** | **Required** | **Description**                                                            |
| ----------------------------------- | -------- | ------------ | -------------------------------------------------------------------------- |
| `path_parameters.id`                | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user. |
| `path_parameters.merge_request_iid` | string   | Required     | The internal ID of the merge request.                                      |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc","merge_request_iid":"string"}}`

### Output

| **Parameter**   | **Type** | **Description**                  |
| --------------- | -------- | -------------------------------- |
| `status_code`   | number   | HTTP status code of the response |
| `reason`        | string   | Response reason phrase           |
| `response_text` | string   | Raw response body text, if any.  |

### Output Example

`{"response_text":"string"}`

## Get File

Retrieve file details from a GitLab repository, including name, size, and Base64 encoded contents. Requires path parameters 'id' and 'file\_path', and parameter 'ref'.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/files/{{file_path}}`
- **Method:** `GET`

### Input

| **Argument Name**           | **Type** | **Required** | **Description**                                                                   |
| --------------------------- | -------- | ------------ | --------------------------------------------------------------------------------- |
| `path_parameters.id`        | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.        |
| `path_parameters.file_path` | string   | Required     | URL-encoded full path to the file, such as lib%2Fclass%2Erb.                      |
| `parameters.ref`            | string   | Required     | Name of branch, tag, or commit. Use HEAD to automatically use the default branch. |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc","file_path":"string"},"parameters":{"ref":"string"}}`

### Output

| **Parameter**      | **Type** | **Description**                                 |
| ------------------ | -------- | ----------------------------------------------- |
| `status_code`      | number   | HTTP status code of the response                |
| `reason`           | string   | Response reason phrase                          |
| `file_name`        | string   | Name of the file.                               |
| `file_path`        | string   | Full path to the file.                          |
| `size`             | number   | Size of the file in bytes.                      |
| `encoding`         | string   | Encoding used for the file content.             |
| `content`          | string   | Base64 encoded file content.                    |
| `content_sha256`   | string   | SHA256 hash of the file content.                |
| `ref`              | string   | Name of the branch, tag, or commit used.        |
| `blob_id`          | string   | Blob SHA.                                       |
| `commit_id`        | string   | Commit SHA for the file.                        |
| `last_commit_id`   | string   | SHA of the last commit that modified this file. |
| `execute_filemode` | boolean  | If true, the execute flag is set on the file.   |

### Output Example

`{"file_name":"Example Name","file_path":"string","size":123,"encoding":"string","content":"string","content_sha256":"string","ref":"string","blob_id":"string","commit_id":"string","last_commit_id":"string","execute_filemode":true}`

## Get Merge Request

Retrieve information about a single merge request in a GitLab project using its internal ID (iid). Requires path parameters: ID and merge\_request\_iid.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/merge_requests/{{merge_request_iid}}`
- **Method:** `GET`

### Input

| **Argument Name**                           | **Type** | **Required** | **Description**                                                            |
| ------------------------------------------- | -------- | ------------ | -------------------------------------------------------------------------- |
| `path_parameters.id`                        | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user. |
| `path_parameters.merge_request_iid`         | string   | Required     | The internal ID of the merge request.                                      |
| `parameters.include_diverged_commits_count` | boolean  | Optional     | If true, response includes the commits behind the target branch.           |
| `parameters.include_rebase_in_progress`     | boolean  | Optional     | If true, response includes whether a rebase operation is in progress.      |
| `parameters.render_html`                    | boolean  | Optional     | If true, response includes rendered HTML for title and description.        |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc","merge_request_iid":"string"},"parameters":{"include_diverged_commits_count":true,"include_rebase_in_progress":true,"render_html":true}}`

### Output

| **Parameter**           | **Type** | **Description**                                              |
| ----------------------- | -------- | ------------------------------------------------------------ |
| `status_code`           | number   | HTTP status code of the response                             |
| `reason`                | string   | Response reason phrase                                       |
| `id`                    | number   | ID of the merge request.                                     |
| `iid`                   | number   | Internal ID of the merge request.                            |
| `project_id`            | number   | ID of the project.                                           |
| `title`                 | string   | Title of the merge request.                                  |
| `description`           | string   | Description of the merge request.                            |
| `state`                 | string   | State of the merge request (opened, closed, merged, locked). |
| `created_at`            | string   | Date when the merge request was created.                     |
| `updated_at`            | string   | Date when the merge request was last updated.                |
| `target_branch`         | string   | Target branch of the merge request.                          |
| `source_branch`         | string   | Source branch of the merge request.                          |
| `upvotes`               | number   | Number of upvotes.                                           |
| `downvotes`             | number   | Number of downvotes.                                         |
| `author`                | object   | Information about the merge request author.                  |
| `assignee`              | object   | Information about the merge request assignee.                |
| `assignees`             | array    | Users assigned to the merge request.                         |
| `reviewers`             | array    | Users set as reviewers of the merge request.                 |
| `source_project_id`     | number   | ID of the source project.                                    |
| `target_project_id`     | number   | ID of the target project.                                    |
| `labels`                | array    | Labels associated with the merge request.                    |
| `draft`                 | boolean  | If true, the merge request is a draft.                       |
| `work_in_progress`      | boolean  | If true, the merge request is set as work in progress.       |
| `merge_status`          | string   | Merge status of the merge request.                           |
| `detailed_merge_status` | string   | Detailed merge status of the merge request.                  |

### Output Example

`{"id":123,"iid":123,"project_id":123,"title":"string","description":"string","state":"string","created_at":"string","updated_at":"string","target_branch":"string","source_branch":"string","upvotes":123,"downvotes":123,"author":{},"assignee":{},"assignees":[]}`

## Get Repository Archive

Retrieve an archive of a repository from GitLab DevSecOps Platform using the project ID and specified format.

### Endpoint

- **URL:** `/api/v4/projects/{{id}}/repository/archive.{{format}}`
- **Method:** `GET`

### Input

| **Argument Name**        | **Type** | **Required** | **Description**                                                                                                                       |
| ------------------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `path_parameters.id`     | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.                                                            |
| `path_parameters.format` | string   | Required     | Name of the repository to download.                                                                                                   |
| `parameters.path`        | string   | Optional     | The subpath of the repository to download. If an empty string, defaults to the whole repository.                                      |
| `parameters.sha`         | string   | Optional     | The commit SHA to download. A tag, branch reference, or SHA can be used. If not specified, defaults to the tip of the default branch. |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc","format":"string"},"parameters":{"path":"string","sha":"string"}}`

### Output

| **Parameter**    | **Type** | **Description**         |
| ---------------- | -------- | ----------------------- |
| `file`           | object   | Output field: file      |
| `file.file`      | string   | Output field: file.file |
| `file.file_name` | string   | Name of the resource    |

### Output Example

`{"file":{"file":"string","file_name":"Example Name"}}`

## List Branches

Lists all repository branches from a GitLab project, sorted alphabetically, with optional search or regex filtering. Requires the project ID as a path parameter.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/branches`
- **Method:** `GET`

### Input

| **Argument Name**    | **Type** | **Required** | **Description**                                                                                                                                       |
| -------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path_parameters.id` | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.                                                                            |
| `parameters.search`  | string   | Optional     | Return list of branches containing the search string. Use ^term to find branches that begin with term, and term$ to find branches that end with term. |
| `parameters.regex`   | string   | Optional     | Return list of branches with names matching a re2 regular expression. Cannot be used together with search.                                            |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc"},"parameters":{"search":"string","regex":"string"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`[]`

## List Merge Requests

List all merge requests for a GitLab project using optional filters like state, labels, milestone, author, assignee, and branch. Requires the project ID as a path parameter.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/merge_requests`
- **Method:** `GET`

### Input

| **Argument Name**                      | **Type** | **Required** | **Description**                                                                                                                            |
| -------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `path_parameters.id`                   | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.                                                                 |
| `parameters.state`                     | string   | Optional     | Returns all merge requests or just those that are opened, closed, locked, or merged. Defaults to all.                                      |
| `parameters.order_by`                  | string   | Optional     | Returns merge requests ordered by the given field. Default is created\_at.                                                                 |
| `parameters.sort`                      | string   | Optional     | Returns merge requests sorted in asc or desc order. Default is desc.                                                                       |
| `parameters.milestone`                 | string   | Optional     | Returns merge requests for a specific milestone.                                                                                           |
| `parameters.view`                      | string   | Optional     | If simple, returns the iid, URL, title, description, and basic state of merge request.                                                     |
| `parameters.labels`                    | string   | Optional     | Returns merge requests matching a comma-separated list of labels.                                                                          |
| `parameters.with_labels_details`       | boolean  | Optional     | If true, response returns more details for each label.                                                                                     |
| `parameters.with_merge_status_recheck` | boolean  | Optional     | If true, requests an asynchronous recalculation of the merge\_status field.                                                                |
| `parameters.created_after`             | string   | Optional     | Returns merge requests created on or after the given date and time (ISO 8601).                                                             |
| `parameters.created_before`            | string   | Optional     | Returns merge requests created on or before the given date and time (ISO 8601).                                                            |
| `parameters.updated_after`             | string   | Optional     | Returns merge requests updated on or after the given date and time (ISO 8601).                                                             |
| `parameters.updated_before`            | string   | Optional     | Returns merge requests updated on or before the given date and time (ISO 8601).                                                            |
| `parameters.scope`                     | string   | Optional     | Returns merge requests for the given scope. Defaults to all.                                                                               |
| `parameters.author_id`                 | number   | Optional     | Returns merge requests created by the given user id. Mutually exclusive with author\_username.                                             |
| `parameters.author_username`           | string   | Optional     | Returns merge requests created by the given username. Mutually exclusive with author\_id.                                                  |
| `parameters.assignee_id`               | string   | Optional     | Returns merge requests assigned to the given user id. None returns unassigned merge requests. Any returns merge requests with an assignee. |
| `parameters.reviewer_id`               | string   | Optional     | Returns merge requests which have the user as a reviewer with the given user id.                                                           |
| `parameters.reviewer_username`         | string   | Optional     | Returns merge requests which have the user as a reviewer with the given username.                                                          |
| `parameters.source_branch`             | string   | Optional     | Returns merge requests with the given source branch.                                                                                       |
| `parameters.target_branch`             | string   | Optional     | Returns merge requests with the given target branch.                                                                                       |
| `parameters.search`                    | string   | Optional     | Search merge requests against their title and description.                                                                                 |
| `parameters.in`                        | string   | Optional     | Modify the scope of the search attribute. title, description, or a string joining them with comma. Default is title,description.           |
| `parameters.draft`                     | boolean  | Optional     | Filter merge requests by their draft status.                                                                                               |
| `parameters.my_reaction_emoji`         | string   | Optional     | Returns merge requests reacted to by the authenticated user by the given emoji.                                                            |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc"},"parameters":{"state":"string","order_by":"string","sort":"string","milestone":"string","view":"string","labels":"string","with_labels_details":true,"with_merge_status_recheck":true,"created_after":"string","created_before":"string","updated_after":"string","updated_before":"string","scope":"string","author_id":123,"author_username":"Example Name","assignee_id":"string","reviewer_id":"string","reviewer_username":"Example Name","source_branch":"string","target_branch":"string","search":"string","in":"string","draft":true,"my_reaction_emoji":"string"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`[]`

## List Repository Commits

Retrieve a list of repository commits in a GitLab project using optional filters like author, ref name, path, and date range. Requires the project ID as a path parameter.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/commits`
- **Method:** `GET`

### Input

| **Argument Name**         | **Type** | **Required** | **Description**                                                                                                              |
| ------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `path_parameters.id`      | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.                                                   |
| `parameters.ref_name`     | string   | Optional     | The name of a repository branch, tag or revision range, or if not given the default branch.                                  |
| `parameters.all`          | boolean  | Optional     | Retrieve every commit from the repository. If true, the ref\_name parameter is ignored.                                      |
| `parameters.author`       | string   | Optional     | Search commits by commit author.                                                                                             |
| `parameters.first_parent` | boolean  | Optional     | If true, follows only the first parent commit upon seeing a merge commit.                                                    |
| `parameters.follow`       | boolean  | Optional     | If true, follows file renames when filtering commits by path. Used only when path specifies a single file. Defaults to true. |
| `parameters.order`        | string   | Optional     | List commits in order. Defaults to default, showing commits in reverse chronological order.                                  |
| `parameters.path`         | string   | Optional     | The file path.                                                                                                               |
| `parameters.since`        | string   | Optional     | Only commits after or on this date are returned in ISO 8601 format YYYY-MM-DDTHH\:MM\:SSZ.                                   |
| `parameters.until`        | string   | Optional     | Only commits before or on this date are returned in ISO 8601 format YYYY-MM-DDTHH\:MM\:SSZ.                                  |
| `parameters.trailers`     | boolean  | Optional     | If true, parses and includes Git trailers for every commit.                                                                  |
| `parameters.with_stats`   | boolean  | Optional     | If true, retrieve stats about each commit.                                                                                   |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc"},"parameters":{"ref_name":"Example Name","all":true,"author":"string","first_parent":true,"follow":true,"order":"string","path":"string","since":"string","until":"string","trailers":true,"with_stats":true}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`[]`

## List Repository Tree

Lists all repository files and directories in a GitLab project, with optional path, ref, and recursive filters. Requires the project ID as a path parameter.

### Endpoint

- **URL:** `api/v4/projects/{{id}}/repository/tree`
- **Method:** `GET`

### Input

| **Argument Name**       | **Type** | **Required** | **Description**                                                                   |
| ----------------------- | -------- | ------------ | --------------------------------------------------------------------------------- |
| `path_parameters.id`    | string   | Required     | The ID or URL-encoded path of the project owned by the authenticated user.        |
| `parameters.path`       | string   | Optional     | Path inside the repository. Used to get content of subdirectories.                |
| `parameters.ref`        | string   | Optional     | Name of a repository branch or tag. If not specified, uses the default branch.    |
| `parameters.recursive`  | boolean  | Optional     | If true, get a recursive tree. Default is false.                                  |
| `parameters.per_page`   | number   | Optional     | Number of results to show per page. Defaults to 20.                               |
| `parameters.pagination` | string   | Optional     | If keyset, use the keyset-based pagination method.                                |
| `parameters.page_token` | string   | Optional     | Tree record ID at which to fetch the next page. Used only with keyset pagination. |

### Input Example

`{"path_parameters":{"id":"12345678-1234-1234-1234-123456789abc"},"parameters":{"path":"string","ref":"string","recursive":true,"per_page":123,"pagination":"string","page_token":"string"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`[]`

# Response Headers

| **Header**   | **Description**                                       | **Example**                   |
| ------------ | ----------------------------------------------------- | ----------------------------- |
| Content-Type | The media type of the resource                        | application/json              |
| Date         | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |
