Deployments

Submit deployment data

Changed on

Update / insert deployment data.

Deployments are identified by the combination of pipelineId, environmentId and deploymentSequenceNumber, and existing deployment data for the same deployment will be replaced if it exists and the updateSequenceNumber of existing data is less than the incoming data.

Submissions are processed 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 getDeploymentByKey operation can be used to confirm that data has been stored successfully (if needed).

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

post/rest/deployments/0.1/bulk

Request

  • Base URL
    https://your-domain.atlassian.net
  • URL
    https://your-domain.atlassian.net/rest/deployments/0.1/bulk
  • Auth
    • HTTP basic
    • or OAuth 2
      Authorization code: https://auth.atlassian.com/authorize
      Token URL: https://auth.atlassian.com/oauth/token scopes: write:deployment-info:jira

Request body

propertiesobject

Properties assigned to deployment 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.

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

Example request

{
  "properties": {
    "accountId": "account-234",
    "projectId": "project-123"
  },
  "deployments": [
    {
      "deploymentSequenceNumber": 100,
      "updateSequenceNumber": 1,
      "issueKeys": [
        "ABC-123"
      ],
      "associations": [
        {
          "associationType": "issueIdOrKeys",
          "values": [
            "ABC-123",
            "ABC-456"
          ]
        }
      ],
      "displayName": "Deployment number 16 of Data Depot",
      "url": "http://mydeployer.com/project1/1111-222-333/prod-east",
      "description": "The bits are being transferred",
      "lastUpdated": "2018-01-20T23:27:25.000Z",
      "label": "Release 2018-01-20_08-47-bc2421a",
      "duration": 47,
      "state": "in_progress",
      "pipeline": {
        "id": "e9c906a7-451f-4fa6-ae1a-c389e2e2d87c",
        "displayName": "Data Depot Deployment",
        "url": "http://mydeployer.com/project1"
      },
      "environment": {
        "id": "8ec94d72-a4fc-4ac0-b31d-c5a595f373ba",
        "displayName": "US East",
        "type": "production"
      },
      "commands": [
        {
          "command": "initiate_deployment_gating"
        }
      ],
      "schemaVersion": "1.0"
    }
  ],
  "providerMetadata": {
    "product": "Bamboo 6.10.2"
  }
}

Response

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

Details of which deployments 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 deployment has been associated with issue keys other than those in this array it will still be stored against those valid keys. If a deployment was only associated with issue keys deemed to be invalid it won't be persisted.

Example response

{
  "acceptedDeployments": [
    {
      "pipelineId": "e9c906a7-451f-4fa6-ae1a-c389e2e2d87c",
      "environmentId": "8ec94d72-a4fc-4ac0-b31d-c5a595f373ba",
      "deploymentSequenceNumber": 100
    }
  ],
  "rejectedDeployments": [
    {
      "key": {
        "pipelineId": "e9c906a7-451f-4fa6-ae1a-c389e2e2d87c",
        "environmentId": "8ec94d72-a4fc-4ac0-b31d-c5a595f373ba",
        "deploymentSequenceNumber": 100
      }
    }
  ],
  "unknownIssueKeys": [
    "ABC-123"
  ],
  "unknownAssociations": [
    {
      "associationType": "issueIdOrKeys",
      "values": [
        "ABC-123",
        "ABC-456"
      ]
    }
  ]
}

Changes

    • breaking

      removed subschema #3 from the /// request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the /// request property oneOf list

    • warning

      removed the request property //

    • info

      the endpoint scheme security OAuth2 was added to the API

    • info

      the endpoint scheme security basicAuth was added to the API

    • info

      added the new optional request property //

    • info

      added to the /// request property anyOf list

    • info

      added to the / response property anyOf list for the response status

    • info

      removed subschema #3 from the / response property anyOf list for the response status

    • info

      added the new optional request property //