Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

598
Views
How to download the latest build artifacts from Azure DevOps programmatically?

I have a .NET C# application and I would like to download the latest artifacts generated by the latest build of this public Azure DevOps project:

https://dev.azure.com/LumiaWoA/Boot%20Shim/_build?definitionId=3

How does one interface with Azure DevOps to download the artifacts for such a task?

I have in mind to use an HttpClient to download the zipped artifacts using some special URL.

over 4 years ago · Santiago Trujillo
6 answers
Answer question

0

You would need to use Azure DevOps REST Api for that. This rest call retrieves artifacts from the build:

GET https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/artifacts?artifactName={artifactName}&api-version=5.0

this REST call would give you latest build:

GET https://dev.azure.com/{organization}/{project}/_apis/build/latest/{definition}?branchName={branchName}&api-version=5.0-preview.1

Here's an article (with some samples) talking about how you would authenticate to the API. As from the code perspective, its a simple HTTP request, so should be fairly easy.

over 4 years ago · Santiago Trujillo Report

0

Here are the steps to download latest artifacts of DevOps build using Azure DevOps UI.

  1. Click on build logs.
  2. Next, click on summary option of the build.
  3. After step 2, on top right side of UI, Artifacts option would be visible, so click on that.
  4. Next, select drop to download the ZIP of the latest artifacts of the build.

Using the beta UI as of 2019-11-09, the steps are as follows.

  1. Click on the completed build (not the whole pipeline) and you will be taken to the Summary tab on the Build page.
  2. In the top box, to the extreme right, click the link under the Artifacts column. It’s an icon of a box with text like 1 published. You will then be taken to the Artifacts page.
  3. The page displays all the available artifacts. Click the download icon to download any of the artifacts.
over 4 years ago · Santiago Trujillo Report

0

In the Pipelines when one selects a successful run and drills down to Agent job X and selects that agent, it can be found in the log information of that agent.

In the agent Job Information, one can get a link to the download location where items can be downloaded thanks to the X artifact produced link:

enter image description here

over 4 years ago · Santiago Trujillo Report

0

Releases > Select a Release

enter image description here

Click the Artifact link (in blue eg: 20191125.1)

The new screen is the log. In the top right hand side, click the blue [Artifacts] button.

Choose Drop, expand the tree, and right click to download the file you want (probably the zip of the build)

over 4 years ago · Santiago Trujillo Report

0

This is how I got it to work using PowerShell.

$MyPat = '********************************'
$B64Pat = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$MyPat"))
$h = @{'Authorization' = 'Basic ' + $B64Pat}
$response = Invoke-WebRequest -Uri "https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/artifacts?artifactName={artifactName}&api-version=4.1" -Method 'GET' -Headers $h
$response_json = ($response.Content | ConvertFrom-Json)
$response_artifact = Invoke-WebRequest -Uri $response_json.resource.downloadUrl -Method 'GET' -Headers $h
over 4 years ago · Santiago Trujillo Report

0

Pick your pipeline

AzureDevops pipeline selection

Select your run.

AzureDevops pipeline run

Now look for Published. Click it. If something is there, you should be able to download it.

enter image description here

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!