Bamboo Rest Api Download Artifact __exclusive__ Info
Before you can download anything, you must retrieve the build result metadata. This response contains the download links ( href ) for all artifacts associated with that build.
: This parameter is critical; it tells Bamboo to include artifact details that are hidden by default.
: The unique identifier for your build plan (e.g., PROJ-MYPLAN ). bamboo rest api download artifact
: The specific build number, or use latest to get the most recent one.
curl -X GET -H "Authorization: Bearer ${BAMBOO_TOKEN}" "${ARTIFACT_HREF}" -o my-artifact.zip ``` ### Authentication Methods Bamboo requires authentication for all API requests to ensure security. * **Personal Access Tokens (PAT):** The most secure and recommended method. Pass it in the header as `Authorization: Bearer `. * **Basic Auth:** Uses `username:password` encoded in Base64 or directly via curl using the `-u` flag. ### Direct URL Short-cut If you already know the artifact name and build key, you can often bypass the "expand" step by constructing the download URL manually: `GET https://{BAMBOO_URL}/browse/{PROJECT_KEY}-{PLAN_KEY}-{BUILD_NUMBER}/artifact/shared/{ARTIFACT_NAME}/{FILENAME}` ### Common Troubleshooting * **Artifact Not Found:** Ensure the artifact is marked as "Shared" in the plan configuration. Only shared artifacts are accessible via the results API for external downloading. * **Expand Parameter Missing:** If you don't see the `artifacts` node, verify you added `?expand=artifacts` to your request URL. * **Permissions:** The user or token being used must have "Read" permissions for the specific plan and "View" permissions for the build results. Are you planning to automate this within a **shell script** or a specific programming language like **Python**? Use code with caution. Stack Overflowhttps://stackoverflow.com Can I download Bamboo built artifacts using Bamboo Rest Before you can download anything, you must retrieve
Once you have the href , you can use tools like curl or wget to perform the actual download.
Downloading build artifacts via the is a standard task for automating CI/CD pipelines, yet the process involves two distinct steps: identifying the artifact's unique URL and then executing the download. Unlike simple API endpoints, Bamboo requires you to query build results first to find the specific "shared" link for each artifact. Step 1: Identify the Artifact with the Results API : The unique identifier for your build plan (e
Look for the artifacts node in the returned JSON. Each artifact will have an href property representing the download path. Step 2: Download the Artifact
GET https://{BAMBOO_URL}/rest/api/latest/result/{PROJECT_KEY}-{PLAN_KEY}-{BUILD_NUMBER}?expand=artifacts