Reference

Update branch

Protects a branch, or stops protecting it.

PATCH
/namespaces/{namespace}/branches/{branch}

Protecting answers once the API writes allowed before have ended; if they run for over two minutes it answers 503, and the branch stays protected. Store credentials minted before keep their access until they expire (900 seconds by default), so protection reaches them only then.

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.

Request Body

application/json
  1. body
protected*boolean

A protected branch changes only by merge, and cannot be deleted.

Response Body

Done.

Example Request
curl -X PATCH 'https://example.com/v1/namespaces/string/branches/string' \  -H 'Content-Type: application/json' \  -d '{  "protected": true}'
Example Response
Empty