openapi: 3.1.0
info:
title: Atlassian Admin Account Branching Model API
description: The Atlassian Admin API provides programmatic access to manage Atlassian organizations, users, domains, policies, and events. It enables administrators to automate organization management tasks, integrate with identity providers, and ensure appropriate access to Atlassian products.
version: 1.0.0
contact:
name: Atlassian Developer
url: https://developer.atlassian.com/cloud/admin/
license:
name: Atlassian Developer Terms
url: https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
x-logo:
url: https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/favicon.png
servers:
- url: https://api.atlassian.com
description: Atlassian Cloud API
security:
- bearerAuth: []
- oauth2: []
tags:
- name: Branching Model
paths:
/repositories/{workspace}/{repo_slug}/branching-model:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Branching Model
description: Return the branching model as applied to the repository. This view is
read-only. The branching model settings can be changed using the
[settings](#api-repositories-workspace-repo-slug-branching-model-settings-get) API.
The returned object:
1. Always has a `development` property. `development.branch` contains
the actual repository branch object that is considered to be the
`development` branch. `development.branch` will not be present
if it does not exist.
2. Might have a `production` property. `production` will not
be present when `production` is disabled.
`production.branch` contains the actual branch object that is
considered to be the `production` branch. `production.branch` will
not be present if it does not exist.
3. Always has a `branch_types` array which contains all enabled branch
types.
summary: Atlassian Get The Branching Model For A Repository
responses:
'200':
description: The branching model object
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model'
examples:
response:
value:
development:
name: master
branch:
type: branch
name: master
target:
hash: 16dffcb0de1b22e249db6799532074cf32efe80f
use_mainbranch: true
production:
name: production
branch:
type: branch
name: production
target:
hash: 16dffcb0de1b22e249db6799532074cf32efe80f
use_mainbranch: false
branch_types:
- kind: release
prefix: release/
- kind: hotfix
prefix: hotfix/
- kind: feature
prefix: feature/
- kind: bugfix
prefix: bugfix/
type: branching_model
links:
self:
href: https://api.bitbucket.org/.../branching-model
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have read access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: atlassianGetTheBranchingModelForARepository
/repositories/{workspace}/{repo_slug}/branching-model/settings:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Branching Model
description: Return the branching model configuration for a repository. The returned
object:
1. Always has a `development` property for the development branch.
2. Always a `production` property for the production branch. The
production branch can be disabled.
3. The `branch_types` contains all the branch types.
This is the raw configuration for the branching model. A client
wishing to see the branching model with its actual current branches may
find the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful.
summary: Atlassian Get The Branching Model Config For A Repository
responses:
'200':
description: The branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model_settings'
examples:
response:
value:
development:
is_valid: true
name: 'null'
use_mainbranch: true
production:
is_valid: true
name: production
use_mainbranch: false
enabled: false
branch_types:
- kind: release
enabled: true
prefix: release/
- kind: hotfix
enabled: true
prefix: hotfix/
- kind: feature
enabled: true
prefix: feature/
- kind: bugfix
enabled: false
prefix: bugfix/
type: branching_model_settings
links:
self:
href: https://api.bitbucket.org/.../branching-model/settings
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have admin access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: atlassianGetTheBranchingModelConfigForARepository
put:
tags:
- Branching Model
description: Update the branching model configuration for a repository.
The `development` branch can be configured to a specific branch or to
track the main branch. When set to a specific branch it must
currently exist. Only the passed properties will be updated. The
properties not passed will be left unchanged. A request without a
`development` property will leave the development branch unchanged.
It is possible for the `development` branch to be invalid. This
happens when it points at a specific branch that has been
deleted. This is indicated in the `is_valid` field for the branch. It is
not possible to update the settings for `development` if that
would leave the branch in an invalid state. Such a request will be
rejected.
The `production` branch can be a specific branch, the main
branch or disabled. When set to a specific branch it must currently
exist. The `enabled` property can be used to enable (`true`) or
disable (`false`) it. Only the passed properties will be updated. The
properties not passed will be left unchanged. A request without a
`production` property will leave the production branch unchanged.
It is possible for the `production` branch to be invalid. This
happens when it points at a specific branch that has been
deleted. This is indicated in the `is_valid` field for the branch. A
request that would leave `production` enabled and invalid will be
rejected. It is possible to update `production` and make it invalid if
it would also be left disabled.
The `branch_types` property contains the branch types to be updated.
Only the branch types passed will be updated. All updates will be
rejected if it would leave the branching model in an invalid state.
For branch types this means that:
1. The prefixes for all enabled branch types are valid. For example,
it is not possible to use '*' inside a Git prefix.
2. A prefix of an enabled branch type must not be a prefix of another
enabled branch type. This is to ensure that a branch can be easily
classified by its prefix unambiguously.
It is possible to store an invalid prefix if that branch type would be
left disabled. Only the passed properties will be updated. The
properties not passed will be left unchanged. Each branch type must
have a `kind` property to identify it.
There is currently a side effect when using this API endpoint. If the
repository is inheriting branching model settings from its project,
updating the branching model for this repository will disable the
project setting inheritance.
We have deprecated this side effect and will remove it on 1 August 2022.
summary: Atlassian Update The Branching Model Config For A Repository
responses:
'200':
description: The updated branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model_settings'
examples:
response:
value:
development:
use_mainbranch: true
production:
enabled: true
use_mainbranch: false
name: production
branch_types:
- kind: bugfix
enabled: true
prefix: bugfix/
- kind: feature
enabled: true
prefix: feature/
- kind: hotfix
prefix: hotfix/
- kind: release
enabled: false
'400':
description: If the request contains invalid branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have admin access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: atlassianUpdateTheBranchingModelConfigForARepository
/repositories/{workspace}/{repo_slug}/effective-branching-model:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Branching Model
description: Needs a more full description created.
summary: Atlassian Get The Effective, Or Currently Applied, Branching Model For A Repository
responses:
'200':
description: The effective branching model object
content:
application/json:
schema:
$ref: '#/components/schemas/effective_repo_branching_model'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have read access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: atlassianGetTheEffective,OrCurrentlyApplied,BranchingModelForARepository
/workspaces/{workspace}/projects/{project_key}/branching-model:
parameters:
- name: project_key
in: path
description: 'The project in question. This is the actual `key` assigned
to the project.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Branching Model
description: Return the branching model set at the project level. This view is
read-only. The branching model settings can be changed using the
[settings](#api-workspaces-workspace-projects-project-key-branching-model-settings-get)
API.
The returned object:
1. Always has a `development` property. `development.name` is
the user-specified branch that can be inherited by an individual repository's
branching model.
2. Might have a `production` property. `production` will not
be present when `production` is disabled.
`production.name` is the user-specified branch that can be
inherited by an individual repository's branching model.
3. Always has a `branch_types` array which contains all enabled branch
types.
summary: Atlassian Get The Branching Model For A Project
responses:
'200':
description: The branching model object
content:
application/json:
schema:
$ref: '#/components/schemas/project_branching_model'
examples:
response:
value:
development:
name: master
use_mainbranch: true
production:
name: production
use_mainbranch: false
branch_types:
- kind: release
prefix: release/
- kind: hotfix
prefix: hotfix/
- kind: feature
prefix: feature/
- kind: bugfix
prefix: bugfix/
type: project_branching_model
links:
self:
href: https://api.bitbucket.org/.../branching-model
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have read access to the project
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the project does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- project:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: atlassianGetTheBranchingModelForAProject
/workspaces/{workspace}/projects/{project_key}/branching-model/settings:
parameters:
- name: project_key
in: path
description: 'The project in question. This is the actual `key` assigned
to the project.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Branching Model
description: Return the branching model configuration for a project. The returned
object:
1. Always has a `development` property for the development branch.
2. Always a `production` property for the production branch. The
production branch can be disabled.
3. The `branch_types` contains all the branch types.
This is the raw configuration for the branching model. A client
wishing to see the branching model with its actual current branches may find the
[active model API](#api-workspaces-workspace-projects-project-key-branching-model-get)
more useful.
summary: Atlassian Get The Branching Model Config For A Project
responses:
'200':
description: The branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model_settings'
examples:
response:
value:
development:
name: 'null'
use_mainbranch: true
production:
name: production
use_mainbranch: false
enabled: false
branch_types:
- kind: release
enabled: true
prefix: release/
- kind: hotfix
enabled: true
prefix: hotfix/
- kind: feature
enabled: true
prefix: feature/
- kind: bugfix
enabled: false
prefix: bugfix/
type: branching_model_settings
links:
self:
href: https://api.bitbucket.org/.../branching-model/settings
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have admin access to the project
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the project does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- project:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:project:bitbucket
operationId: atlassianGetTheBranchingModelConfigForAProject
put:
tags:
- Branching Model
description: Update the branching model configuration for a project.
The `development` branch can be configured to a specific branch or to
track the main branch. Any branch name can be supplied, but will only
successfully be applied to a repository via inheritance if that branch
exists for that repository. Only the passed properties will be updated. The
properties not passed will be left unchanged. A request without a
`development` property will leave the development branch unchanged.
The `production` branch can be a specific branch, the main
branch or disabled. Any branch name can be supplied, but will only
successfully be applied to a repository via inheritance if that branch
exists for that repository. The `enabled` property can be used to enable (`true`)
or disable (`false`) it. Only the passed properties will be updated. The
properties not passed will be left unchanged. A request without a
`production` property will leave the production branch unchanged.
The `branch_types` property contains the branch types to be updated.
Only the branch types passed will be updated. All updates will be
rejected if it would leave the branching model in an invalid state.
For branch types this means that:
1. The prefixes for all enabled branch types are valid. For example,
it is not possible to use '*' inside a Git prefix.
2. A prefix of an enabled branch type must not be a prefix of another
enabled branch type. This is to ensure that a branch can be easily
classified by its prefix unambiguously.
It is possible to store an invalid prefix if that branch type would be
left disabled. Only the passed properties will be updated. The
properties not passed will be left unchanged. Each branch type must
have a `kind` property to identify it.
summary: Atlassian Update The Branching Model Config For A Project
responses:
'200':
description: The updated branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model_settings'
examples:
response:
value:
development:
use_mainbranch: true
production:
enabled: true
use_mainbranch: false
name: production
branch_types:
- kind: bugfix
enabled: true
prefix: bugfix/
- kind: feature
enabled: true
prefix: feature/
- kind: hotfix
prefix: hotfix/
- kind: release
enabled: false
'400':
description: If the request contains an invalid branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have admin access to the project
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the project does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- project:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:project:bitbucket
operationId: atlassianUpdateTheBranchingModelConfigForAProject
components:
schemas:
account:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Account
description: An account object.
properties:
links:
$ref: '#/components/schemas/account_links'
created_on:
type: string
format: date-time
display_name:
type: string
username:
type: string
pattern: ^[a-zA-Z0-9_\-]+$
uuid:
type: string
additionalProperties: true
participant:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Participant
description: Object describing a user's role on resources like commits or pull requests.
properties:
user:
$ref: '#/components/schemas/account'
role:
type: string
enum:
- PARTICIPANT
- REVIEWER
approved:
type: boolean
state:
type: string
enum:
- approved
- changes_requested
- null
participated_on:
type: string
description: The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
format: date-time
additionalProperties: true
team_links:
allOf:
- $ref: '#/components/schemas/account_links'
- type: object
title: Team Links
description: Links related to a Team.
properties:
self:
$ref: '#/components/schemas/link'
html:
$ref: '#/components/schemas/link'
members:
$ref: '#/components/schemas/link'
projects:
$ref: '#/components/schemas/link'
repositories:
$ref: '#/components/schemas/link'
additionalProperties: true
project:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Project
description: "A Bitbucket project.\n Projects are used by teams to organize repositories."
properties:
links:
type: object
properties:
html:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
avatar:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
additionalProperties: false
uuid:
type: string
description: The project's immutable id.
key:
type: string
description: The project's key.
owner:
$ref: '#/components/schemas/team'
name:
type: string
description: The name of the project.
description:
type: string
is_private:
type: boolean
description: '
Indicates whether the project is publicly accessible, or whether it is
private to the team and consequently only visible to team members.
Note that private projects cannot contain public repositories.'
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
has_publicly_visible_repos:
type: boolean
description: '
Indicates whether the project contains publicly visible repositories.
Note that private projects cannot contain public repositories.'
additionalProperties: true
error:
type: object
title: Error
description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
properties:
type:
type: string
error:
type: object
properties:
message:
type: string
detail:
type: string
data:
type: object
description: Optional structured data that is endpoint-specific.
properties: {}
additionalProperties: true
required:
- message
additionalProperties: false
required:
- type
additionalProperties: true
author:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Author
description: The author of a change in a repository
properties:
raw:
type: string
description: The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
user:
$ref: '#/components/schemas/account'
additionalProperties: true
project_branching_model:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Project Branching Model
description: A project's branching model
properties:
branch_types:
type: array
description: The active branch types.
items:
type: object
properties:
kind:
type: string
description: The kind of branch.
enum:
- feature
- bugfix
- release
- hotfix
prefix:
type: string
description: The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`.
required:
- kind
- prefix
additionalProperties: false
minItems: 0
maxItems: 4
uniqueItems: true
development:
type: object
properties:
name:
type: string
description: Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
required:
- name
- use_mainbranch
additionalProperties: false
production:
type: object
properties:
name:
type: string
description: Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
required:
- name
- use_mainbranch
additionalProperties: false
additionalProperties: true
team:
allOf:
- $ref: '#/components/schemas/account'
- type: object
title: Team
description: A team object.
properties:
links:
$ref: '#/components/schemas/team_links'
additionalProperties: true
branching_model:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Branching Model
description: A repository's branching model
properties:
branch_types:
type: array
description: The active branch types.
items:
type: object
properties:
kind:
type: string
description: The kind of branch.
enum:
- feature
- bugfix
- release
- hotfix
prefix:
type: string
description: The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`.
required:
- kind
- prefix
additionalProperties: false
minItems: 0
maxItems: 4
uniqueItems: true
development:
type: object
properties:
branch:
$ref: '#/components/schemas/branch'
name:
type: string
description: Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
required:
- name
- use_mainbranch
additionalProperties: false
production:
type: object
properties:
branch:
$ref: '#/components/schemas/branch'
name:
type: string
description: Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
required:
- name
- use_mainbranch
additionalProperties: false
additionalProperties: true
object:
type: object
description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
properties:
type:
type: string
required:
- type
additionalProperties: true
discriminator:
propertyName: type
repository:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Repository
description: A Bitbucket repository.
properties:
links:
type: object
properties:
self:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
html:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
avatar:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
pullrequests:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
commits:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
forks:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
watchers:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
downloads:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
clone:
type: array
items:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
hooks:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
additionalProperties: false
uuid:
type: string
description: The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
full_name:
type: string
description: The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs.
is_private:
type: boolean
parent:
$ref: '#/components/schemas/repository'
scm:
type: string
enum:
- git
owner:
$ref: '#/components/schemas/account'
name:
type: string
description:
type: string
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
size:
type: integer
language:
type: string
has_issues:
type: boolean
description: '
The issue tracker for this repository is enabled. Issue Tracker
features are not supported for repositories in workspaces
administered through admin.atlassian.com.
'
has_wiki:
type: boolean
description: '
The wiki for this repository is enabled. Wiki
features are not supported for repositories in workspaces
administered through admin.atlassian.com.
'
fork_policy:
type: string
description: "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n be made public later)\n* **no_forks**: deny all forking\n"
enum:
- allow_forks
- no_public_forks
- no_forks
project:
$ref: '#/components/schemas/project'
mainbranch:
$ref: '#/components/schemas/branch'
additionalProperties: true
account_links:
type: object
title: Account Links
description: Links related to an Account.
properties:
avatar:
$ref: '#/components/schemas/link'
additionalProperties: true
effective_repo_branching_model:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Effective Repository Branching Model
description: A repository's effective branching model
properties:
branch_types:
type: array
description: The active branch types.
items:
type: object
properties:
kind:
type: string
description: The kind of branch.
enum:
- feature
- bugfix
- release
- hotfix
prefix:
type: string
description: The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`.
required:
- kind
- prefix
additionalProperties: false
minItems: 0
maxItems: 4
uniqueItems: true
development:
type: object
properties:
branch:
$ref: '#/components/schemas/branch'
name:
type: string
description: Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
required:
- name
- use_mainbranch
additionalProperties: false
production:
type: object
properties:
branch:
$ref: '#/components/schemas/branch'
name:
type: string
description: Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
required:
- name
- use_mainbranch
additionalProperties: false
additionalProperties: true
branching_model_settings:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Branching Model Settings
description: A repository's branching model settings
properties:
links:
type: object
properties:
self:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
additionalProperties: false
branch_types:
type: array
items:
type: object
properties:
enabled:
type: boolean
description: Whether the branch type is enabled or not. A disabled branch type may contain an invalid `prefix`.
kind:
type: string
description: The kind of the branch type.
enum:
- feature
- bugfix
- release
- hotfix
prefix:
type: string
description: The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The `prefix` of an enabled branch type must be a valid branch prefix.Additionally, it cannot be blank, empty or `null`. The `prefix` for a disabled branch type can be empty or invalid.
required:
- kind
additionalProperties: false
minItems: 0
maxItems: 4
uniqueItems: true
development:
type: object
properties:
is_valid:
type: boolean
description: Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings.
name:
type: string
description: The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name.
additionalProperties: false
production:
type: object
properties:
is_valid:
type: boolean
description: Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings.
name:
type: string
description: The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur.
use_mainbranch:
type: boolean
description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name.
enabled:
type: boolean
description: Indicates if branch is enabled or not.
additionalProperties: false
additionalProperties: true
link:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
base_commit:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Base Commit
description: The common base type for both repository and snippet commits.
properties:
hash:
type: string
pattern: '[0-9a-f]{7,}?'
date:
type: string
format: date-time
author:
$ref: '#/components/schemas/author'
message:
type: string
summary:
type: object
properties:
raw:
type: string
description: The text as it was typed by a user.
markup:
type: string
description: The type of markup language the raw content is to be interpreted in.
enum:
- markdown
- creole
- plaintext
html:
type: string
description: The user's content rendered as HTML.
additionalProperties: false
parents:
type: array
items:
$ref: '#/components/schemas/base_commit'
minItems: 0
additionalProperties: true
branch:
allOf:
- $ref: '#/components/schemas/ref'
- type: object
title: Branch
description: A branch object, representing a branch in a repository.
properties:
merge_strategies:
type: array
description: Available merge strategies for pull requests targeting this branch.
items:
type: string
enum:
- merge_commit
- squash
- fast_forward
default_merge_strategy:
type: string
description: The default merge strategy for pull requests targeting this branch.
additionalProperties: true
commit:
allOf:
- $ref: '#/components/schemas/base_commit'
- type: object
title: Commit
description: A repository commit object.
properties:
repository:
$ref: '#/components/schemas/repository'
participants:
type: array
items:
$ref: '#/components/schemas/participant'
minItems: 0
additionalProperties: true
ref:
type: object
title: Ref
description: A ref object, representing a branch or tag in a repository.
properties:
type:
type: string
links:
type: object
properties:
self:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
commits:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
html:
type: object
title: Link
description: A link to a resource related to this object.
properties:
href:
type: string
format: uri
name:
type: string
additionalProperties: false
additionalProperties: false
name:
type: string
description: The name of the ref.
target:
$ref: '#/components/schemas/commit'
required:
- type
additionalProperties: true
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: API Key
description: Use an Atlassian API key as a Bearer token. Create API keys at https://admin.atlassian.com.
oauth2:
type: oauth2
description: OAuth 2.0 authorization for Atlassian Cloud APIs.
flows:
authorizationCode:
authorizationUrl: https://auth.atlassian.com/authorize
tokenUrl: https://auth.atlassian.com/oauth/token
scopes:
read:org:admin: Read organization information.
write:org:admin: Modify organization settings.
read:user:admin: Read user information.
write:user:admin: Modify user accounts.
read:policy:admin: Read organization policies.
write:policy:admin: Modify organization policies.
read:event:admin: Read organization events.
externalDocs:
description: Atlassian Admin REST API Documentation
url: https://developer.atlassian.com/cloud/admin/organization/rest/intro/