Delete a specific branch protection rule of an organization
DELETE
/orgs/{org}/branch_protections/{name}
const url = 'https://gitea.example.com/api/v1/orgs/example/branch_protections/example';const options = {method: 'DELETE', 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 DELETE \ --url https://gitea.example.com/api/v1/orgs/example/branch_protections/example \ --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
name
required
string
Name of protected branch rule
Responses
Section titled “Responses”APIEmpty is an empty response
Media typeapplication/json
APINotFound is a not found empty response
Media typeapplication/json