1

I'm trying to retrieve a list of used licences from ProGet to build a summary report.

I'm looking in the dbo.FeedLicenseUrls table which appears to have exactly what I want, but it's empty. What is required for this table to be populated?

iprotocol
  • 147
  • 1
  • 11

1 Answers1

1

Do you mean a list of licenses used by all packages in a feed? In that case, it has to be done on a feed-by-feed basis since it is stored in the metadata specific to the feed type (e.g. NpmPackageVersions.PackageJson_Bytes or RubyGemVersions.Metadata_Bytes).

To get this data for NuGet for example, you can query the feed at this URL to get all the license types in XML and parse the response body:

http://proget/nuget/{feedName}/search()?$select=LicenseUrl

As an FYI, The FeedLicenseUrls table is used to filter licenses before they are served to their respective clients, and is verified at request time.

John Rasch
  • 62,489
  • 19
  • 106
  • 139
  • I was trying to get the licences from all requested packages. I managed to get all downloaded packages from the database (packagedownloads table I think it was) and then scraped nuget.org with this information to get the licences. Thanks for your answer, I will check out the feed URL as well. – iprotocol Dec 05 '16 at 16:55