I am using the REST API to attempt to download pipeline artifacts.
I am successfully able to list the artifacts in a build using curl and an API token:
curl -X GET -H "Authorization: Bearer <api_token>" https://<bamboo_url>/rest/api/latest/result/TASP-TASFLATLAND-114?expand=artifacts
From the response, I am able to extract the url link of the artifact: for example (notice the url is a redirect):
https://<bamboo_url>/build/result/artifactUrlRedirect.action?artifactId=960725061
However, when I attempt to access the url I get redirected to an "authentication page" (okta). It does not seem to matter if I use the Bearer API token or normal username/password in curl (i.e., the -u option).
Any clues on what is going on? How can I avoid the redirect link to redirect me to the authentication page and instead provide the artifact in the request?