Reference

Get branch

Get Branch

GET
/namespaces/{namespace}/branches/{branch}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

namespace*string

A namespace of your organization, such as prod/app, or <org>:<namespace> for a public namespace of another one. Encode / as %2F.

branch*string

A branch, such as main or agents/fix-1. Encode / as %2F.

Response Body

The branch.

application/json
  1. response
name*string
forked_from*string|null
protected*boolean

A protected branch changes only by merge.

created*string
Formatdate-time
head*string

The commit the branch points to.

base*|

The newest commit this branch shares with forked_from: where it forked, or where the two last merged. What the branch changed since is diff?from=<forked_from>&against=base. Null for an empty branch, or once forked_from is deleted.

Example Request
curl -X GET 'https://example.com/v1/namespaces/string/branches/string'
Example Response
{  "name": "string",  "forked_from": "string",  "protected": true,  "created": "2019-08-24T14:15:22Z",  "head": "string",  "base": "string"}