Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Is it possible to access the variables used for a custom pipeline via BitBucket API?

I'm running custom pipelines that take variables, and I'd like to be able to retrieve the {key:  val} pairs for the variables when fetching a pipeline from the API.

I can see that there's endpoints for repository, workspace and environment variables, but I need the key-value pairs specified when the pipeline is launched.

I've looked through the pipeline response from

GET /2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}

and step response from

GET /2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}

and they don't seem to be included. Pipeline response does have a 'has_variables' boolean, but I'm not sure if this refers to the custom pipeline variables or other types.

Just want to know if this is possible, as I can work around it otherwise.


1 answer

1 accepted

0 votes
Answer accepted

Hi @Brenainn Moushall,

I'm afraid that this is not possible with the pipeline or step endpoint.

The values of these variables are visible in the Pipelines log, in the "Build setup", which can be retrieved with the endpoint

GET /2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log

You would then need to parse the log to get the value of each variable.

Kind regards,

No problem, thanks for letting me know

You are very welcome, please feel free to reach out if you ever need anything else!

Kind regards,

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events