Backlog
Board
Epic
Issue
Sprint
Development Information
Feature Flags
Deployments
Builds
Remote Links
Security Information
Other operations

Rate this page:

Builds

APIs related to integrating builds data with Jira Software. These APIs are available to Atlassian Connect apps. To use these APIs you must have the Build module see https://developer.atlassian.com/cloud/jira/software/modules/build/ in your app's descriptor. They are also related to integrating Jira Software Cloud with on-premises tools using OAuth 2.0 credentials, see https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/.

Submit build data

POST /rest/builds/0.1/bulk

Update / insert builds data.

Builds are identified by the combination of pipelineId and buildNumber, and existing build data for the same build will be replaced if it exists and the updateSequenceNumber of the existing data is less than the incoming data.

Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are available within a short period of time, but may take some time during peak load and/or maintenance times. The getBuildByKey operation can be used to confirm that data has been stored successfully (if needed).

In the case of multiple builds being submitted in one request, each is validated individually prior to submission. Details of which build failed submission (if any) are available in the response object.

Only Connect apps that define the jiraBuildInfoProvider module, and on-premise integrations, can access this resource. This resource requires the 'WRITE' scope for Connect apps.

Connect app scope requiredWRITE

Request

Header parameters
Authorization Required

string

All requests must be signed with either a Connect JWT token or OAuth token for an on-premise integration that corresponds to an app installed in Jira.

If the Connect JWT token corresponds to an app that does not define jiraBuildInfoProvider module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details about Connect JWT tokens. See https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/ for details about on-premise integrations.

Pattern: JWT \S+
Body parameters

The payload used to submit (update / insert) build data.

properties

Properties

Properties assigned to build data that can then be used for delete / query operations.

Examples might be an account or user ID that can then be used to clean up data if an account is removed from the Provider system.

Note that these properties will never be returned with build data. They are not intended for use as metadata to associate with a build. Internally they are stored as a hash so that personal information etc. is never stored within Jira.

Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain ':' or start with '_'.

Max properties: 5
builds Required

Array<BuildData>

A list of builds to submit to Jira. Each build may be associated with one or more Jira issue keys, and will be associated with any properties included in this request.

Min items: 1
providerMetadata

ProviderMetadata

Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not considered private information. Hence, it may not contain personally identifiable information.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
curl --request POST \
  --url 'https://your-domain.atlassian.com/rest/builds/0.1/bulk' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "properties": {
    "accountId": "account-234",
    "projectId": "project-123"
  },
  "builds": [
    {
      "schemaVersion": "1.0",
      "pipelineId": "my-build-plan",
      "buildNumber": 16,
      "updateSequenceNumber": 1523494301448,
      "displayName": "My Project build #16",
      "description": "My Project build #16: Failed",
      "label": "<string>",
      "url": "<string>",
      "state": "failed",
      "lastUpdated": "2018-01-20T23:27:25.000Z",
      "issueKeys": [
        "ISSUE-123"
      ],
      "testInfo": {
        "totalNumber": 150,
        "numberPassed": 145,
        "numberFailed": 5,
        "numberSkipped": 0
      },
      "references": [
        {
          "commit": {
            "id": "08cd9c26b2b8d7cf6e6af6b49da8895d065c259f",
            "repositoryUri": "https://bitbucket.org/atlassian/biij-vendor-api"
          },
          "ref": {
            "name": "feature/ISSUE-123-some-work",
            "uri": "https://bitbucket.org/atlassian/biij-vendor-api/refs/feature/ISSUE-123-some-work"
          }
        }
      ]
    }
  ],
  "providerMetadata": {
    "product": "Bamboo 6.10.2"
  }
}'

Responses

Submission accepted. Each submitted build that is of a valid format will be eventually available in Jira.

Details of which builds were submitted and which failed submission (due to data format problems etc.) are available in the response object.

Content typeValue
application/json

SubmitBuildsResponse

Delete builds by Property

DELETE /rest/builds/0.1/bulkByProperties

Bulk delete all builds data that match the given request.

One or more query params must be supplied to specify Properties to delete by. Optional param _updateSequenceNumber is no longer supported. If more than one Property is provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND).

See the documentation for the submitBuilds operation for more details.

e.g. DELETE /bulkByProperties?accountId=account-123&repoId=repo-345

Deletion is performed asynchronously. The getBuildByKey operation can be used to confirm that data has been deleted successfully (if needed).

Only Connect apps that define the jiraBuildInfoProvider module, and on-premise integrations, can access this resource. This resource requires the 'DELETE' scope for Connect apps.

Connect app scope requiredDELETE

Request

Query parameters
_updateSequenceNumber Deprecated

integer

This parameter usage is no longer supported.

An optional _updateSequenceNumber to use to control deletion.

Only stored data with an updateSequenceNumber less than or equal to that provided will be deleted. This can be used help ensure submit/delete requests are applied correctly if issued close together.

If not provided, all stored data that matches the request will be deleted.

Format: int64
Header parameters
Authorization Required

string

All requests must be signed with either a Connect JWT token or OAuth token for an on-premise integration that corresponds to an app installed in Jira.

If the Connect JWT token corresponds to an app that does not define jiraBuildInfoProvider module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details about Connect JWT tokens. See https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/ for details about on-premise integrations.

Pattern: JWT \S+

Example

1
2
curl --request DELETE \
  --url 'https://your-domain.atlassian.com/rest/builds/0.1/bulkByProperties'

Responses

Delete accepted. Data will eventually be removed from Jira.

A schema has not been defined for this response code.

Get a build by key

GET /rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}

Retrieve the currently stored build data for the given pipelineId and buildNumber combination.

The result will be what is currently stored, ignoring any pending updates or deletes.

Only Connect apps that define the jiraBuildInfoProvider module, and on-premise integrations, can access this resource. This resource requires the 'READ' scope for Connect apps.

Connect app scope requiredREAD

Request

Path parameters
pipelineId Required

string

The pipelineId of the build.

Max length: 255
buildNumber Required

integer

The buildNumber of the build.

Format: int64
Header parameters
Authorization Required

string

All requests must be signed with either a Connect JWT token or OAuth token for an on-premise integration that corresponds to an app installed in Jira.

If the Connect JWT token corresponds to an app that does not define jiraBuildInfoProvider module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details about Connect JWT tokens. See https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/ for details about on-premise integrations.

Pattern: JWT \S+

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.com/rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}' \
  --header 'Accept: application/json'

Responses

The build data currently stored for the given key.

Content typeValue
application/json

BuildData

Delete a build by key

DELETE /rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}

Delete the build data currently stored for the given pipelineId and buildNumber combination.

Deletion is performed asynchronously. The getBuildByKey operation can be used to confirm that data has been deleted successfully (if needed).

Only Connect apps that define the jiraBuildInfoProvider module, and on-premise integrations, can access this resource. This resource requires the 'DELETE' scope for Connect apps.

Connect app scope requiredDELETE

Request

Path parameters
pipelineId Required

string

The pipelineId of the build to delete.

Max length: 255
buildNumber Required

integer

The buildNumber of the build to delete.

Format: int64
Query parameters
_updateSequenceNumber Deprecated

integer

This parameter usage is no longer supported.

An optional _updateSequenceNumber to use to control deletion.

Only stored data with an updateSequenceNumber less than or equal to that provided will be deleted. This can be used help ensure submit/delete requests are applied correctly if issued close together.

Format: int64
Header parameters
Authorization Required

string

All requests must be signed with either a Connect JWT token or OAuth token for an on-premise integration that corresponds to an app installed in Jira.

If the Connect JWT token corresponds to an app that does not define jiraBuildInfoProvider module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details about Connect JWT tokens. See https://developer.atlassian.com/cloud/jira/software/integrate-jsw-cloud-with-onpremises-tools/ for details about on-premise integrations.

Pattern: JWT \S+

Example

1
2
curl --request DELETE \
  --url 'https://your-domain.atlassian.com/rest/builds/0.1/pipelines/{pipelineId}/builds/{buildNumber}'

Responses

Delete has been accepted. Data will eventually be removed from Jira if it exists.

A schema has not been defined for this response code.

Rate this page: