I want to get pipeline details via Bitbucket Cloud rest api
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
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....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks you're answer.
but in pipelines they're default variables.
and I print them it work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I added authorization but it returns 400 error with unexpected response body
I think it is problem of Bitbucket Cloud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.