{
  "opencollection": "1.0.0",
  "info": {
    "name": "Atlassian Admin Account Branch Restrictions API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Branch Restrictions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Atlassian List Branch Restrictions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/branch-restrictions",
            "params": [
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              },
              {
                "name": "kind",
                "value": "",
                "type": "query",
                "description": "Branch restrictions of this type"
              },
              {
                "name": "pattern",
                "value": "",
                "type": "query",
                "description": "Branch restrictions applied to branches of this pattern"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns a paginated list of all branch restrictions on the<br>repository."
        },
        {
          "info": {
            "name": "Atlassian Create A Branch Restriction Rule",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/branch-restrictions",
            "params": [
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates a new branch restriction rule for a repository.<br><br>`kind` describes what will be restricted. Allowed values include:<br>`push`, `force`, `delete`, `restrict_merges`, `require_tasks_to_be_completed`,<br>`require_approvals_to_merge`, `require_default_reviewer_approvals_to_merge`,<br>`require_no_changes_requested`, `require_passing_builds_to_merge`, `require_commits_behind`,<br>`reset_pullrequest_approvals_on_change`, `smart_reset_pullrequest_approvals`,<br>`reset_pullrequest_changes_re"
        },
        {
          "info": {
            "name": "Atlassian Get A Branch Restriction Rule",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/branch-restrictions/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The restriction rule's id"
              },
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns a specific branch restriction rule."
        },
        {
          "info": {
            "name": "Atlassian Update A Branch Restriction Rule",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/branch-restrictions/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The restriction rule's id"
              },
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Updates an existing branch restriction rule.<br><br>Fields not present in the request body are ignored.<br><br>See [`POST`](/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post) for details."
        },
        {
          "info": {
            "name": "Atlassian Delete A Branch Restriction Rule",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/branch-restrictions/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The restriction rule's id"
              },
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Deletes an existing branch restriction rule."
        }
      ]
    }
  ],
  "bundled": true
}