v2

latestOpenAPI 3.0.02026-08-013312111.4 MB
Commit statuses

Update a build status for a commit

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.

put/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}

Request body

typestring required
keystring required

An identifier for the status that's unique to its type (current "build" is the only supported type) and the vendor, e.g. BB-DEPLOY

refnamestring

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).

urlstring

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'FAILED' | 'INPROGRESS' | 'STOPPED' | 'SUCCESSFUL' required

Provides some indication of the status of this commit

namestring

An identifier for the build itself, e.g. BB-DEPLOY-1

descriptionstring

A description of the build (e.g. "Unit tests in Bamboo")

created_onstring date-time
updated_onstring date-time

Response

The updated build status object.

typestring required
keystring required

An identifier for the status that's unique to its type (current "build" is the only supported type) and the vendor, e.g. BB-DEPLOY

refnamestring

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).

urlstring

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'FAILED' | 'INPROGRESS' | 'STOPPED' | 'SUCCESSFUL' required

Provides some indication of the status of this commit

namestring

An identifier for the build itself, e.g. BB-DEPLOY-1

descriptionstring

A description of the build (e.g. "Unit tests in Bamboo")

created_onstring date-time
updated_onstring date-time