Insights
Get all branches for a project
Get a list of all branches for a specified project. The list will only contain branches currently available within Insights. The maximum number of branches returned by this endpoint is 5,000.
get/insights/{project-slug}/branches
Path parameters
project-slugstring required
Project slug in the form vcs-slug/org-name/repo-name. The / characters may be URL-escaped. For projects that use GitLab or GitHub App, use circleci as the vcs-slug, replace org-name with the organization ID (found in Organization Settings), and replace repo-name with the project ID (found in Project Settings).
Query parameters
workflow-namestring
The name of a workflow. If not passed we will scope the API call to the project.
Response
A list of branches for a project
Example response
{
"branches": [
"main"
]
}