Summary
List the available branches for a repository
Description
List the available branches for a repository
Route
GET /git/:gitType/repos/:repoPath/branches
Roles
Parameters
DetailsExampleSchema
| Name |
Type |
Required |
Description |
| gitType |
string |
yes |
The name of the Git provider that is used |
| repoPath |
string |
yes |
The path in Git to the repository |
Copied to Clipboard
{
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
}
Return
DetailsExampleSchema
| Name |
Type |
Description |
| result |
array |
The result of retrieving a list of branches from Git |
Copied to Clipboard
[
{
"name": "main",
"protected": false
},
{
"name": "main",
"protected": true
},
{
"name": "main",
"protected": false
},
{
"name": "main",
"protected": true
},
{
"name": "main",
"protected": true
}
]
Copied to Clipboard
{
"title": "result",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The name of the branch",
"type": "string",
"examples": [
"main"
]
},
"protected": {
"description": "Whether or not the branch is protected",
"type": "boolean"
}
}
}
}