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

# List Branches

Get a list of repository branches from a project, sorted by name alphabetically.

<Note>
  External Documentation

  To learn more, visit the [GitLab documentation](https://docs.gitlab.com/ee/api/branches.html#list-repository-branches).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter  | Description                                                                                                                                          |
  | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Project ID | The ID or path of the project owned by the authenticated user. If the path is being used, it should be url encoded - for example: user%2my-project . |
  | Search     | Return list of branches containing the search string. You can use ^term and term\$ to find branches that begin and end with term respectively.       |
</div>

## Example Output

```json theme={"dark"}
[
	{
		"name": "<string>",
		"commit": {
			"id": "<string>",
			"short_id": "<string>",
			"created_at": "2020-05-18T02:42:05",
			"parent_ids": [],
			"title": "<string>",
			"message": "<string>",
			"author_name": "<string>",
			"author_email": "<string>",
			"authored_date": "2022-11-09T05:50:43",
			"committer_name": "<string>",
			"committer_email": "<string>",
			"committed_date": "2021-11-24T13:02:39",
			"trailers": {},
			"extended_trailers": {},
			"web_url": "<string>"
		},
		"merged": false,
		"protected": true,
		"developers_can_push": false,
		"developers_can_merge": false,
		"can_push": true,
		"default": true,
		"web_url": "<string>"
	},
	{
		"name": "<string>",
		"commit": {
			"id": "<string>",
			"short_id": "<string>",
			"created_at": "2020-05-18T02:42:05",
			"parent_ids": [],
			"title": "<string>",
			"message": "<string>",
			"author_name": "<string>",
			"author_email": "<string>",
			"authored_date": "2020-05-18T02:42:05",
			"committer_name": "<string>",
			"committer_email": "<string>",
			"committed_date": "2020-05-18T02:42:05",
			"trailers": {},
			"extended_trailers": {},
			"web_url": "<string>"
		},
		"merged": false,
		"protected": false,
		"developers_can_push": false,
		"developers_can_merge": false,
		"can_push": true,
		"default": false,
		"web_url": "<string>"
	}
]
```

## Workflow Library Example

[List Branches with Gitlab and Send Results Via Email](https://library.blinkops.com/workflows/list-branches-with-gitlab-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-branches-with-gitlab-and-send-results-via-email/canvas" />
</div>
