v1

latestOpenAPI 3.0.3MIT2026-07-1411163326.7 KB
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

{"stackTrail":"paths:/insights/{project-slug}/branches:get:responses:200:content:application/json:schema:properties:org_id","oasType":"schema","type":"unknown","description":"The unique ID of the organization"}
{"stackTrail":"paths:/insights/{project-slug}/branches:get:responses:200:content:application/json:schema:properties:project_id","oasType":"schema","type":"unknown","description":"The unique ID of the project"}
branchesstring[] required

A list of all the branches for a given project.

Example response

{
  "branches": [
    "main"
  ]
}