Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get specific pipeline info from curl request

Avtandil Chachanidze
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2025

I'm trying to get specific pipeline info, but I get error Bad request.

This command successfully returns pipelines info


 

curl -H 'Authorization: Bearer $TOKEN' -s https://api.bitbucket.org/2.0/repositories/$workspace/$repo/pipelines > output.json

however this command fails


curl -H 'Authorization: Bearer $TOKEN' -s https://api.bitbucket.org/2.0/repositories/$workspace/$repo/pipelines/$uuid > output.json

Full example of what I run


curl -H 'Authorization: Bearer $TOKEN' -s https://api.bitbucket.org/2.0/repositories/suite/demo/pipelines/{9e752fd7-f4d1-4c88-b6bf-7e29f0a953c4} > output.json

I also tried uuid without curly braces but same result

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2025

Hi Avtandil,

I believe the error occurs because of the curly brackets around the pipeline UUID, I've seen this happen as well with some clients.

You can replace the character { with %7B and the character } with %7D, so the URL would look as follows:

https://api.bitbucket.org/2.0/repositories/suite/demo/pipelines/%7B9e752fd7-f4d1-4c88-b6bf-7e29f0a953c4%7D

Does it work this way?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events