{ "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
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.

`kind` describes what will be restricted. Allowed values include:
`push`, `force`, `delete`, `restrict_merges`, `require_tasks_to_be_completed`,
`require_approvals_to_merge`, `require_default_reviewer_approvals_to_merge`,
`require_no_changes_requested`, `require_passing_builds_to_merge`, `require_commits_behind`,
`reset_pullrequest_approvals_on_change`, `smart_reset_pullrequest_approvals`,
`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.

Fields not present in the request body are ignored.

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 }