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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.