API Endpoints & Methods
  • 25 Apr 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

API Endpoints & Methods

  • Dark
    Light
  • PDF

Article Summary

🚧 Documentation in Progress 🚧

We're still working on finishing up the documentation for ProGet 2024 and this article is on our TODO list. It's pretty rough outline/draft, but we figured it'd be better than nothing.

ProGet provides a variety of API methods and endpoints to upload/download packages, manage feeds, audit package compliance, assess vulnerabilities, etc.

The easiest way to work with the ProGet API is by using pgutil a cross-platform Command-line Interface (CLI) tool. You can also use HTTP Endpoints and the .NET library (NuGet package) that pgutil uses under-the-hood.

pgutil Command-line Interface

pgutil is an open-source (github.com), cross-platform command line tool that's easy to download and install.

🚀 Quick Installation Guide for pgutil

If you've already got dotnet installed, just run this command to install the tool locally.

dotnet tool install pgutil

You can also download stand-alone executable for Windows and Linux on the pgutil GitHub Releases page.

Once you've installed pgutil, you can simply type pgutil help to get a list of all of the commands and options available. You can also register sources so that you don't always have to specify urls, feeds, and API keys, etc.

🚀 Quick pgutil Example: Uploading a Package
pgutil packages upload --source=corpx-dev --input-file=Newtonsoft.Json.13.0.3.nupkg

See the Getting Started with pgutil guide to learn more.

HTTP Endpoints

TODO

.NET library (NuGet package)

TODO
  • this is currently hosted in the same repository as pgutil
  • give basic instructions on how to add to .NET project and give a very quick code example
  • mention the best way to see how code is used is to go to pgutil code base
    • for example (link to specific place in code)