For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Open sourceSupportFAQsDocs Home
DocumentationAPI ReferenceRelease notes
DocumentationAPI ReferenceRelease notes
  • Introduction
    • Overview
    • Authentication
  • Guides
    • Integration API routes
    • Operations Manager search APIs
    • Search API
    • URL query parameters
    • Use query parameters in API requests
  • Reference
        • POSTCreate a Git repository
        • POSTCreate a new branch in a repository
        • POSTInitialize a project in Git
        • GETList the available branches for a repository
        • GETRetrieve a project from Git
        • PUTUpdate a project in Git
LogoLogo
Open sourceSupportFAQsDocs Home
ReferenceGit

List the available branches for a repository

GET
http://localhost:3000/git/:gitType/repos/:repoPath/branches
GET
/git/:gitType/repos/:repoPath/branches
$curl http://localhost:3000/git/GitHub/repos/repoPath/branches \
> -u "<username>:<password>"
1[
2 {
3 "name": "main",
4 "protected": true
5 }
6]
Lists the available branches for a repository.
Was this page helpful?
Previous

Retrieve a project from Git

Next
Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

gitTypeenumRequired
The name of the Git provider that is used
Allowed values:
repoPathstringRequired
The path in Git to the repository

Response

The result of retrieving a list of branches from Git
namestring
The name of the branch
protectedboolean
Whether or not the branch is protected

Errors

500
Internal Server Error