Leap0

Create a branch

Create a new branch in a repository. Optionally check it out immediately.

POST
/v1/sandbox/{sandboxID}/git/create-branch

Create a new branch in a repository. Optionally check it out immediately.

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token in the Authorization header. Alternatively, use the leap0-authorization header.

In: header

Path Parameters

sandboxID*string

Unique sandbox identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

path*string

Path to the git repository.

name*string

Name of the new branch.

checkout?boolean

Checkout the branch after creating it.

base_branch?string

Optional base branch or revision to create the branch from.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.leap0.dev/v1/sandbox/string/git/create-branch" \  -H "Content-Type: application/json" \  -d '{    "path": "string",    "name": "string"  }'
{  "output": "string",  "exit_code": 0}
{  "message": "string",  "errors": [    {      "field": "string",      "error": "string"    }  ]}
{  "message": "string"}