Getting started
List repository branches
List branches for an accessible repository. Use the repository ID returned by listSourceRepositories.
GET
/api/customer/v1/source/repositories/{repositoryId}/branchesPath parameters
| Name | Value |
|---|---|
repositoryId | Required resource ID from an earlier API response. |
Query parameters
| Name | Type | Required | Limits |
|---|---|---|---|
installationId | string | No | At least 1 character(s) |
projectId | string | No | At least 1 character(s) |
Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request GET "$HCODE_BASE_URL/api/customer/v1/source/repositories/${REPOSITORY_ID}/branches" \
--header "Authorization: Bearer $HCODE_API_KEY" Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"branches": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"branches"
],
"additionalProperties": true
}See errors and retries for failure responses.