Harthelm Docs

List a repository's branches

The branches of one repository at a connected Git provider, read with the caller's own token; the default branch comes first. 409 when the caller has not connected the provider, 503 when the provider does not answer.

Generated from openapi/harthelm.yaml at v1.5.0
GET
/git/repos/{provider}/{owner}/{repo}/branches

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

provider*string

Provider id from GET /git/providers.

Match^[a-z][a-z0-9-]{0,30}$
owner*string

Owner (user or organization) of the repository at the provider.

Match^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$
repo*string

Repository name without .git.

Match^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$

Query Parameters

limit?integer

Maximum number of items per page.

Range1 <= value <= 200
Default50
cursor?string

Opaque cursor from next_cursor of the previous page.

Lengthlength <= 1024

Response Body

A page of branches, the default branch first.

application/json
  1. response
next_cursor?string

Absent on the last page.

items*array<>
curl -X GET 'https://console.example.com/api/v1/git/repos/string/string/string/branches'
{  "next_cursor": "string",  "items": [    {      "name": "string",      "commit": "string",      "default": true    }  ]}