openapi: 3.1.0
info:
title: Atlassian Admin Account Commit Statuses 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: Commit Statuses
paths:
/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses:
parameters:
- name: commit
in: path
description: The commit's SHA1.
required: true
schema:
type: string
- 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:
- Commit Statuses
description: Returns all statuses (e.g. build results) for a specific commit.
summary: Atlassian List Commit Statuses For A Commit
responses:
'200':
description: A paginated list of all commit statuses for this commit.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_commitstatuses'
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the repository or commit does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: q
in: query
description: 'Query string to narrow down the response as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
'
required: false
schema:
type: string
- name: sort
in: query
description: 'Field by which the results should be sorted as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
Defaults to `created_on`.
'
required: false
schema:
type: string
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: atlassianListCommitStatusesForACommit
/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build:
parameters:
- name: commit
in: path
description: The commit's SHA1.
required: true
schema:
type: string
- 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
post:
tags:
- Commit Statuses
description: 'Creates a new build status against the specified commit.
If the specified key already exists, the existing status object will
be overwritten.
Example:
```
curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -X POST -u jdoe -H ''Content-Type: application/json'' -d ''{
"key": "MY-BUILD",
"state": "SUCCESSFUL",
"description": "42 tests passed",
"url": "https://www.example.org/my-build-result"
}''
```
When creating a new commit status, you can use a URI template for the URL.
Templates are URLs that contain variable names that Bitbucket will
evaluate at runtime whenever the URL is displayed anywhere similar to
parameter substitution in
[Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).
For example, one could use `https://foo.com/builds/{repository.full_name}`
which Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time.
The context variables available are `repository` and `commit`.'
summary: Atlassian Create A Build Status For A Commit
responses:
'201':
description: The newly created build status object.
content:
application/json:
schema:
$ref: '#/components/schemas/commitstatus'
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the repository, commit, or build status key does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/commitstatus'
description: The new commit status object.
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: atlassianCreateABuildStatusForACommit
/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}:
parameters:
- name: commit
in: path
description: The commit's SHA1.
required: true
schema:
type: string
- name: key
in: path
description: The build status' unique key
required: true
schema:
type: string
- 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:
- Commit Statuses
description: Returns the specified build status for a commit.
summary: Atlassian Get A Build Status For A Commit
responses:
'200':
description: The build status object with the specified key.
content:
application/json:
schema:
$ref: '#/components/schemas/commitstatus'
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the repository, commit, or build status key 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: atlassianGetABuildStatusForACommit
put:
tags:
- Commit Statuses
description: Used to update the current status of a build status object on the
specific commit.
This operation can also be used to change other properties of the
build status:
* `state`
* `name`
* `description`
* `url`
* `refname`
The `key` cannot be changed.
summary: Atlassian Update A Build Status For A Commit
responses:
'200':
description: The updated build status object.
content:
application/json:
schema:
$ref: '#/components/schemas/commitstatus'
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the repository or build does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/commitstatus'
description: The updated build status object
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: atlassianUpdateABuildStatusForACommit
components:
schemas:
commitstatus:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Commit Status
description: A commit status object.
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
commit:
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 commit status' id.
key:
type: string
description: "An identifier for the status that's unique to\n its type (current \"build\" is the only supported type) and the vendor,\n e.g. BB-DEPLOY"
refname:
type: string
description: '
The name of the ref that pointed to this commit at the time the status
object was created. Note that this the ref may since have moved off of
the commit. This optional field can be useful for build systems whose
build triggers and configuration are branch-dependent (e.g. a Pipeline
build).
It is legitimate for this field to not be set, or even apply (e.g. a
static linting job).'
url:
type: string
description: A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time.
state:
type: string
description: Provides some indication of the status of this commit
enum:
- INPROGRESS
- FAILED
- STOPPED
- SUCCESSFUL
name:
type: string
description: An identifier for the build itself, e.g. BB-DEPLOY-1
description:
type: string
description: A description of the build (e.g. "Unit tests in Bamboo")
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
additionalProperties: true
paginated_commitstatuses:
type: object
title: Paginated Commit Statuses
description: A paginated list of commit status objects.
properties:
size:
type: integer
description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
minimum: 0
page:
type: integer
description: Page number of the current results. This is an optional element that is not provided in all responses.
minimum: 1
pagelen:
type: integer
description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
minimum: 1
next:
type: string
description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
format: uri
previous:
type: string
description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.
format: uri
values:
type: array
items:
$ref: '#/components/schemas/commitstatus'
minItems: 0
uniqueItems: true
additionalProperties: false
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
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
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/