Last updated Jul 16, 2025

Build

The Build object type represents a build object. atlassian:build should be used to ingest build-specific fields.

Payload structure

1
2
  objects {}
  ├─ schemaVersion (string) [Required]
  ├─ id (string) [Required]
  ├─ updateSequenceNumber (long) [Required]
  ├─ displayName (string) [Required]
  ├─ description (string) [Optional]
  ├─ url (string) [Required]
  ├─ createdAt (Instant (ISO8601 / RFC3339)) [Required]
  └─ createdBy [] [Optional]
      ├─ accountId (string)
      └─ ari (string)
  └─ lastUpdatedAt (Instant (ISO8601 / RFC3339)) [Required]
  └─ lastUpdatedBy [] [Required]
      ├─accountId (string)
      └─ ari
  └─ containerKey ()[Optional]
      ├─ type
      ├─ value
      └─ repositoryId
  └─ permissions 
      └─ accessControls
         └─ principals
            └─type
  └─ associations [] [Optional]
      ├─ associationType (string)
      └─ values []
      
  atlassian:build
  ├─ pipelineId (string) [Required]
  ├─ buildNumber (integer) [Required]
  ├─ label (string) [Optional]
  ├─ state (string) [Required]
  ├─ duration (integer) [Optional]
  └─ testInfo [Optional]
     ├─ totalNumber (integer) [Required]
     ├─ numberPassed (integer) [Required]
     ├─ numberFailed (integer) [Required]
     └─ numberSkipped (integer) [Required]
  └─ references [] [Optional]
     └─ commit [Optional]
        ├─ id (string) [Required]
        └─ repositoryUri (string) [Required]
     └─ ref [Optional]
        ├─ name (string) [Required]
        └─ uri (string) [Required]

You may send the container repository as a separate entity in the same payload or in a separate request.

Common properties

PropertyTypeRequiredDescription
schemaVersion

string

YesThe schema version of the object.
id

string

YesThe ID of the object in the source system.
updateSequenceNumberlongYesA sequence number to compare when writing to the database. Objects are written following a last write wins strategy, therefore an object with a greater UpdateSequenceNumber is considered a more recently updated object.
displayNamestringYesThe display name of the object.
descriptionstringNoThe description of the object.
urlstringYesThe URL from the provider which the object is accessible from.
createdAtstringYes

The date the object was created.

Format: Instant (ISO8601 / RFC3339)

createdByuserNo

The user that created the object.

See User to learn more.

lastUpdatedAtstringYes

The date the object was last updated.

Format: Instant (ISO8601 / RFC3339)

lastUpdatedByuserNo

The user that last updated the object.

See User to learn more.

ownerslist<User>NoList of users that own the object.
thumbnailthumbnailNo

The thumbnail of the object.

See Thumbnail to learn more.

parentKeyentityKeyNo

The ID of the parent object. If null, it is a standalone object.

See Entity key to learn more.

containerKeyentityKeyYes

The container identifier that this object belongs to.

See Entity key to learn more.

permissionslist<Permissions>Yes

The permissions configuration of the object.

See Permissions to learn more.

associationsassociationNo

List of objects associated with the object. Generally used to link an external object to a Atlassian object.

See Association to learn more.

Build properties

PropertyTypeRequiredDescription
pipelineId

string

Yes

An ID that relates a sequence of builds. Depending on the use case, this might be a project ID, pipeline ID, plan key, or whichever logical unit you use to group a sequence of builds.

The combination of pipelineId and buildNumber must uniquely identify the provided build.

Maximum length: 255

buildNumber

integer

Yes

Identifies a build within the sequence of builds with the same pipelineId. Used to identify the most recent build in that sequence of builds.

The combination of pipelineId and buildNumber must uniquely identify the provided build.

Format: int64

labelstringNo

A human-readable text label that provides information about the build.

Maximum length: 255

statestringYes

The state of the build. Allowed values:

  • pending
  • in_progress
  • successful
  • failed
  • cancelled
  • unknown
  • durationintegerNo

    The duration of the build in seconds.

    Format: int64

    testInfoTestInfoNoSummary of tests executed as part of the build.
    testInfo.totalNumber

    integer

    Yes

    The total number of tests considered during the build.

    Format: int32

    testInfo.numberPassed

    integer

    Yes

    The number of tests that passed during the build.

    Format: int32

    testInfo.numberFailed

    integer

    Yes

    The number of tests that failed during the build.

    Format: int32

    testInfo.numberSkipped

    integer

    Yes

    The number of tests that were skipped during the build.

    Format: int32

    referencesListNo

    The references of the build.

    Minimum length: 1

    Maximum length: 5

    references.commit

    BuildCommitReference

    No

    references.commit.id

    string

    Yes

    The ID of the commit. This must be the same as the commit hash. For example, for a Git repository this would be the SHA1 hash.

    Maximum length: 255

    references.commit. repositoryUri

    string

    Yes

    An identifier for the repository containing the commit. In most cases, this should be the URL of the repository in the SCM provider. For cases where the build was executed against a local repository, this should be an identifier unique to the repository.

    references.ref

    BuildRefReference

    No

    references.ref.name

    string

    Yes

    The name of the reference the build ran on.

    Maximum length: 255

    references.ref.uri

    string

    Yes

    An identifier for the reference. In most cases this should be the URL of the tag/branch in the SCM provider. For cases where the build was executed against a local repository, this should be an identifier unique to the reference.

    Example payload

    1
    2
    {
      "objects" : [ {
        "schemaVersion" : "2.0",
        "id" : "pipelineId/my-build-plan/buildId/16",
        "updateSequenceNumber" : 1,
        "displayName" : "My Project build #16",
        "description" : "My Project build #16: Failed",
        "url" : "https://build.example.com/1",
        "createdAt" : "2024-07-01T05:00:45Z",
        "createdBy" : {
          "externalId" : "external-id-1"
        },
        "lastUpdatedAt" : "2024-07-09T14:27:37.000Z",
        "lastUpdatedBy" : {
          "externalId" : "external-id-1"
        },
        "containerKey" : {
          "type" : "atlassian:repository",
          "value" : {
            "repositoryId" : "my-repo-1"
          }
        },
        "permissions" : [ {
          "action" : "read",
          "accessControls" : [ {
            "principals" : [ {
              "type" : "EVERYONE"
            } ]
          } ]
        } ],
        "atlassian:build" : {
          "pipelineId" : "my-build-plan",
          "buildNumber" : 16,
          "label" : "<string>",
          "duration" : 47,
          "state" : "failed",
          "testInfo" : {
            "totalNumber" : 150,
            "numberPassed" : 145,
            "numberFailed" : 5,
            "numberSkipped" : 0
          },
          "references" : [ {
            "commit" : {
              "id" : "08cd9c26b2b8d7cf6e6af6b49da8895d065c259f",
              "repositoryUri" : "https://bitbucket.org/myproject/my-repo"
            },
            "ref" : {
              "name" : "feature/ISSUE-123-some-work",
              "uri" : "https://bitbucket.org/myproject/my-repo/refs/feature/ISSUE-123-some-work"
            }
          } ]
        }
      } ],
      "operationType" : "NORMAL"
    }
    

    Rate this page: