# BranchProtectionRules Object

> Source: https://truto.one/docs/api-reference/unified-ci-cd-api/branchprotectionrules/

Schema for the `BranchProtectionRules` resource in **Unified CI/CD API**.

## Properties

- **`id`** _(string, required)_
  The unique identifier for the protection rule
- **`name`** _(string)_
  The name or description of the protection rule
- **`repos`** _(array<object>, required)_
  The repositories this rule applies to
  - **`id`** _(string)_
- **`pattern`** _(string, required)_
  The branch/ref pattern this rule applies to
- **`is_active`** _(boolean)_
  Whether this protection rule is currently active
- **`require_owner_approval`** _(boolean)_
  Require approval from designated owners
- **`required_checks`** _(array<object>)_
  List of required validations/checks
  - **`name`** _(string)_
  - **`context`** _(string)_
  - **`require_up_to_date`** _(boolean)_
- **`access_restrictions`** _(object)_
  Restrictions on who can write to the branch
  - **`is_active`** _(boolean)_
    Whether write restrictions are active
  - **`allowed_users`** _(array<object>)_
    List of user IDs allowed to write
    - **`id`** _(string)_
  - **`allowed_groups`** _(array<object>)_
    List of group/team IDs allowed to write
    - **`id`** _(string)_
  - **`allowed_roles`** _(array<object>)_
    List of role names allowed to write
    - **`id`** _(string)_
- **`integration_restrictions`** _(object)_
  Restrictions on who can integrate/merge changes
  - **`is_active`** _(boolean)_
    Whether integration restrictions are active
  - **`allowed_users`** _(array<object>)_
    List of user IDs allowed to integrate
    - **`id`** _(string)_
  - **`allowed_groups`** _(array<object>)_
    List of group/team IDs allowed to integrate
    - **`id`** _(string)_
  - **`allowed_roles`** _(array<object>)_
    List of role names allowed to integrate
    - **`id`** _(string)_
- **`allow_branch_deletion`** _(boolean)_
  Allow the branch to be deleted
- **`created_by`** _(object)_
  User who created this protection rule
  - **`id`** _(string)_
  - **`username`** _(string)_
- **`created_at`** _(string)_
  When the rule was created
- **`updated_at`** _(string)_
  When the rule was last updated
- **`remote_data`** _(object)_
  Raw data returned from the remote API call.

## Methods

- [GET /unified/ci-cd/branch-protection-rules](/docs/api-reference/unified-ci-cd-api/branchprotectionrules/list) — List Branch protection rules
