0

I want to get the list of the packages present in Azure DevOps Artifacts with their latest versions. Can I use a Personal Access token to get this list using C#?

I am not able to find a way to get this through the C# code.

Sujith Kumar
  • 872
  • 6
  • 19
Walter
  • 133
  • 1
  • 10

1 Answers1

0

Maybe the Artifact Details API is what you're looking for?

Otherwise, you might include the dotnet list package command in your build pipeline to be able to have a look at that, but that sounds like more manual labor than you're looking to do :)

WerkmanW
  • 86
  • 7
  • How to add Personal Access Token in this API call? Should I add it as a header when making the api call? Because I am getting unauthorized error. @WerkmanW – Walter Jan 25 '23 at 10:35
  • Depends how you're making the call to the API but try and look at this article https://learn.microsoft.com/en-us/rest/api/azure/devops/tokens/?view=azure-devops-rest-7.0&tabs=powershell – WerkmanW Jan 26 '23 at 08:15