Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Feeds Management API

view on GitHub

The Feeds Management API provides several pgutil commands (available as pgutil feeds) and HTTP endpoints to query, create, and update feeds, and related data:

pgutil Commands

All HTTP endpoints of the Feeds Management API are available as pgutil commands.

To find the list of commands available in pgutil, simply run pgutil feeds. See Getting started with pgutil to learn more.

Available HTTP Endpoints

📁 Feed Endpoints

🗄 Feed Storage Endpoints

Authenticating to Feeds Management API

The following is a summary of access types and their corresponding requirements for various API keys types and endpoints within this API.

Access Type Requirements
System API Keys Use/Manage Feeds
Feed API Keys View/Download is required for all endpoints
Add/Repackage is required for Create Feed
Overwrite/Delete is required for Delete Feed
Personal API Key Feeds_ViewFeed is required for all endpoints
Feeds_AddPackage is required for the Create Feed
Feeds_DeletePackage is required for the Delete Feed
No API Key anonymous or authenticated user must have at least Feeds_ViewFeed

To specify an API Key, use the request header (X-ApiKey), querystring (key), or api:«api-key» as the username. See API Key Usage to learn more.

Data Specifications

ProgetFeed Object Attributes

ProgetFeed is a JSON object (see ProgetFeed.cs) that corresponds to the fields on a feed. It's used as input for Create Feed and Update Feed, and output for Get Feed and List Feeds.

name and feedType properties are required for Create Feed. Unless otherwise indicated, omitting a property or supplying null as the value will keep the current setting.

Example JSON Object:

{
   "name":"myNugetFeed",
   "alternateNames":[],
   "feedType":"nuget",
   "active":true,
   "cacheConnectors":true,
   "symbolServerEnabled":false,
   "stripSymbols":false,
   "stripSource":false,
   "endpointUrl":"https://proget.corp.local/nuget/public-nuget/v3/index.json",
   "connectors":["nuget.org"],
   "retentionRules":[],
   "variables":{},
   "canPublish":true,
   "packageStatisticsEnabled":false,
   "restrictPackageStatistics":false,
   "deploymentRecordsEnabled":true,
   "usageRecordsEnabled":true,
   "vulnerabilitiesEnabled":true,
   "licensesEnabled":true,
   "useWithProjects":true
}

Nuget Packages Only:

{
  "symbolServerEnabled": true,
  "stripSymbols": false,
  "stripSource": true,
  "stripSignature": false,
  "useApiV3": true
}

RetentionRule Object Attributes

RetentionRule is a JSON object (see RetentionRule.cs), used as a parameter on a ProgetFeed.cs object. It corresponds to the fields on a Retention rule and is used as input for Update Feed, and output for Get Feed and List Feeds.

Example JSON Object

{
  "deletePrereleaseVersions": false,
  "deleteCached": true,
  "keepVersionsCount": 5,
  "keepUsedWithinDays": 30,
  "triggerDownloadCount": 100,
  "keepPackageIds": ["package1", "package2"],
  "deletePackageIds": [],
  "keepVersions": ["1.0.0", "2.0.0"],
  "deleteVersions": [],
  "sizeTriggerKb": 1024,
  "sizeExclusive": true
}

FeedStorageConfiguration Object Attributes

FeedStorageConfiguration is a JSON object (see FeedStorageConfiguration.cs) used as input for Update Feed Storage, and output for Get Feed Storage.

Example JSON Object

{
  "id": "disk",
  "properties": {
    "StoragePath": null
  }
}

FeedStorageType Object Attributes

FeedStorageType is a JSON object (see FeedStorageType.cs) used as output for List Feed Storage Types.

Example JSON Object

{
"id": "azure",
"name": "Microsoft Azure",
"description": "A file system backed by Microsoft Azure Blob Storage.",
"properties": {
    "ConnectionString": {
    "required": true,
    "name": "Connection string",
    "description": "A Microsoft Azure connection string"
    },
    "ContainerName": {
    "required": true,
    "name": "Container",
    "description": "The name of the Azure Blob Container"
    },
    "TargetPath": {
    "name": "Target path",
    "description": "The path in the specified Azure Blob Container"
    }
  }
},

Notes about Data

Wildcards and Negations

Certain fields noted above support wildcard and negation syntax. For example, the value ["Microsoft.*", "Castle.*", "!Rubbishsoft.*"] has the following properties:

  • includes any packages that start with Microsoft. or Castle.*
  • excludes any packages that start with Rubbishsoft.

Feed & Package Types

In ProGet UI, Chocolatey and PowerShell are represented as separate feed types, even though they only contain NuGet packages and use the same NuGet API. For this reason, in ProGet UI, you can switch the type of a feed' between NuGet, Chocolatey, and PowerShell at any time, but not between other feed types.

The API allows feed types to be changed only within the following feed type groups (anything else generates a 400 error):

  • universal and romp
  • nuget, chocolatey, and powershell

Persisted XML Configuration

Because package stores, package filters, and package access rules are implemented by extensible runtime components (i.e., you can create your own using the Inedo SDK), ProGet stores configuration for these components in "Persisted XML", which is a lightweight object serialization format that Inedo products use.

The easiest way to see what an object's persisted XML will look like is to create it in the UI, then look at the XML in either the database or the API List Feeds or Get Feed request. As a reference, we've provided the persisted XML for both supported package stores and a general example:

AWS

<Inedo.ProGet.Extensions.AWS.PackageStores.S3FileSystem Assembly="AWS">
  <Properties AccessKey="{publicAccessKey}" SecretAccessKey="{privateAccessKey}" BucketName="{bucketName}" TargetPath="{pathInsideBucketDefaultIsRoot}" ReducedRedundancy="{False}" MakePublic="{False}" Encrypted="False" RegionEndpoint="{us-east-1}" CustomServiceUrl="{customServiceUrl}" />
</Inedo.ProGet.Extensions.AWS.PackageStores.S3FileSystem>

Azure Blob Storage

<Inedo.ProGet.Extensions.Azure.PackageStores.AzureFileSystem Assembly="Azure">
  <Properties ConnectionString="{DefaultEndpointsProtocol=https;AccountName=account-name;AccountKey=account-key}" ContainerName="{blobContainerName}" TargetPath="{pathToFilesDefaultIsRoot}" />
</Inedo.ProGet.Extensions.Azure.PackageStores.AzureFileSystem>

Custom Extension Format

<{FullNamespace.ClassName} Assembly="AssemblyName">
  <Properties PropertyNameA="{property value}" PropertyNameB="1000" />
</{FullNamespace.ClassName}>

Default Feed Disk Path

If you don't specify a disk path for a feed to use, ProGet uses a path 'based on the 'system-generated ID. This means that, just as in UI, if you delete a feed and then recreate it with the same name, the disk path will be different.