Reference

Create branch

Forks a branch, or makes an empty one. A fork copies no data.

POST
/namespaces/{namespace}/branches

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.

Request Body

application/json
  1. body
name*string
Match^[A-Za-z0-9_-][A-Za-z0-9._-]*(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$
Lengthlength <= 200
from?string

The branch to fork. Without it, the new branch is empty.

Match^[A-Za-z0-9_-][A-Za-z0-9._-]*(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$
Lengthlength <= 200
at?string

Fork this older commit of from instead of its head.

Match^[0-9a-f]{64}$
withIndex?boolean

Also fork the linked index, from its version that matches the fork's commit, and keep it up with this branch. Needs from and a namespace with a linked index.

Response Body

The new branch's head.

application/json
  1. response
head*string
Example Request
curl -X POST 'https://example.com/v1/namespaces/string/branches' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "head": "string"}