Get the force branch protection inheritance setting of an organization
GET
/orgs/{org}/branch_protection_inheritance
const url = 'https://gitea.example.com/api/v1/orgs/example/branch_protection_inheritance';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.example.com/api/v1/orgs/example/branch_protection_inheritance \ --header 'Authorization: Basic <credentials>'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
Name of the organization
Responses
Section titled “Responses”OrgBranchProtectionInheritance
Media typeapplication/json
OrgBranchProtectionInheritance represents the organization-level setting that forces all repositories of the organization to inherit its branch protection rules.
object
force_inheritance
Whether all repositories of the organization are forced to inherit the organization’s branch protection rules. When enabled, a repository can not opt out of inheritance.
boolean
Examplegenerated
{ "force_inheritance": true}APINotFound is a not found empty response
Media typeapplication/json