The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Bitbucket Cloud Rest Api for pipelines doesn't work properly

Peter Jeong
August 7, 2023

I want to get pipeline details via Bitbucket Cloud rest api

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

 

But this doesn't work properly. always return 404

 

I using like this on script

curl --request GET \ --url "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_WORKSPACE}/${BITBUCKET_REPO_SLUG}/pipelines/${BITBUCKET_PIPELINE_UUID}" \ --header "Accept: application/json"

 

how to handle it?

 

 

----- added on

 

not only get a pipeline but also list pipeline same as

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Saxea _Flowie_
Atlassian Partner
August 7, 2023

It seems you are not setting the variables with the actual values? You can do it by prepending it to the cmd:

BITBUCKET_WORKSPACE=myWORKSPACE curl --request....

Peter Jeong
August 7, 2023

thanks you're answer.

but in pipelines they're default variables.

and I print them it work

Saxea _Flowie_
Atlassian Partner
August 7, 2023

hmm... right.... have you tried listing the pipelines instead to see if it works? Dunno, but maybe the pipeline isn't still persisted when you try to access it from itself?

Also, are you handling the authentication too?(I would expect 403/401) if this was the problem, not 404

Peter Jeong
August 7, 2023

I added authorization but it returns 400 error with unexpected response body

 

I think it is problem of Bitbucket Cloud

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events