I'm aware that I can curl with username and password to download an artifact, but how can I do this with a Bitbucket Access Token?
Hi Deya and welcome to the community!
I'm a bit confused by what you mean when you say artifact. Your post's title mentions builds; however, there are is no API endpoint to get artifacts of a Pipelines build.
Are you uploading files to the Downloads section of a Bitbucket repo and downloading them from there? If so, a sample call with curl and an access token is the following:
curl -s -L -O -H "Authorization: Bearer {access_token}" https://api.bitbucket.org/2.0/repositories/{workspace-id}/{repo-slug}/downloads/{filename}
Replace:
Please feel free to reach out if you have any questions.
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.