Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-23359

Include custom pipeline variables in the pipeline API endpoint

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      With custom pipelines, users can define variables whose value is provided at runtime. There is no API endpoint to retrieve the values of these variables.

      Suggested Solution

      Return a custom pipeline's variables and their values for a certain build in this API endpoint:

      https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-pipeline-uuid-get

      Workaround

      If you want to retrieve this info via API, you can get the step's log with the following endpoint:

      https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-pipeline-uuid-steps-step-uuid-log-get

      And then parse the log to get the values of the variables.

            [BCLOUD-23359] Include custom pipeline variables in the pipeline API endpoint

            Long Ngo added a comment -

            +1

            Long Ngo added a comment - +1

            +1

            Hi There - Scoured the API docs and it is currently really painful having to parse log text to get pipeline variables. Can a "Get variables for a pipeline" be added please?

            Shabirah Abdullah added a comment - Hi There - Scoured the API docs and it is currently really painful having to parse log text to get pipeline variables. Can a "Get variables for a pipeline" be added please?

              Unassigned Unassigned
              tboudale Theodora Boudale
              Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: