v1

latestOpenAPI 3.0.1Apache 2.02026-07-1310566642.9 KB
Builds

Submit build data

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.

post/rest/builds/0.1/bulk

Request body

propertiesobject

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 '_'.

Example request

{
  "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",
      "state": "failed",
      "lastUpdated": "2018-01-20T23:27:25.000Z",
      "issueKeys": [
        "ISSUE-123"
      ],
      "associations": [
        {
          "associationType": "issueIdOrKeys",
          "values": [
            "ABC-123",
            "ABC-456"
          ]
        }
      ],
      "testInfo": {
        "totalNumber": 150,
        "numberPassed": 145,
        "numberFailed": 5
      },
      "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"
  }
}

Response

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.

unknownIssueKeysstring[]

Issue keys that are not known on this Jira instance (if any).

These may be invalid keys (e.g. UTF-8 is sometimes incorrectly identified as a Jira issue key), or they may be for projects that no longer exist.

If a build has been associated with issue keys other than those in this array it will still be stored against those valid keys. If a build was only associated with issue keys deemed to be invalid it won't be persisted.

Example response

{
  "acceptedBuilds": [
    {
      "pipelineId": "my-build-plan",
      "buildNumber": 16
    }
  ],
  "rejectedBuilds": [
    {
      "key": {
        "pipelineId": "my-build-plan",
        "buildNumber": 16
      }
    }
  ],
  "unknownIssueKeys": [
    "ISSUE-123"
  ],
  "unknownAssociations": [
    {
      "associationType": "issueIdOrKeys",
      "values": [
        "ABC-123",
        "ABC-456"
      ]
    }
  ]
}