Get Feed
  • 08 May 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Get Feed

  • Dark
    Light
  • PDF

Article summary

Get Feed is available as both a pgutil command and an HTTP Request, and will return a single Feed object for the specified feed.

🚀 Quick Example: Returning a feed with Curl

This example returns a feed named myNugetFeed, authenticating with the API key abc12345:

curl -X GET --header "X-ApiKey: abc12345" "https://proget.corp.local/api/management/feeds/get/myNugetFeed"

Command Specification (CLI)

🚧 Coming Soon 🚧

The feeds get command is coming soon. Similar to the HTTP Request, it will display a feed.

HTTP Request Specification

To return a specified feed, simply GET to the URL with the name of the feed and an appropriate API Key.

GET /api/management/feeds/get/«feed-name»

Getting a NuGet feed requires the feed name (e.g. myNugetFeed)

GET /api/management/feeds/get/myNugetFeed

HTTP Response Specification

A successful (200) response body will contain a single Feed object. For example, to requesting a feed with the name myNugetFeed, the request would return:

GET /api/management/feeds/get/myNugetFeed

{
  "name": "myNugetFeed",
  "feedType": "nuget",
  "active": true,
  "cacheConnectors": true,
  "allowUnknownLicenses": true,
  "allowedLicenses": ["MIT", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0"],
  "blockedLicenses": ["RSGPL"],
  "symbolServerEnabled": true,
  "stripSymbols": true,
  "stripSource": true,
  "connectors": [
    "nuget.org"
  ],
  "vulnerabilitySources": [],
  "retentionRules": [
    {
      "deletePrereleaseVersions": false,
      "keepVersionsCount": 10,
      "keepUsedWithinDays": 90,
      "deletePackageIds": [
        "InedoLib",
        "InedoIcons",
        "Inedo.LicenseCreator"
      ],
      "keepPackageIds": null,
      "keepVersions": null,
      "deleteVersions": null,
      "deleteCached": false,
      "sizeTriggerKb": null,
      "sizeExclusive": true,
      "triggerDownloadCount": 1
    }
  ],
  "packageFilters": {},
  "packageAccessRules": {},
  "replication": {},
  "variables": {}
}
ResponseDetails
200 (Success)body will contain a Feed object
400 (Invalid Input)indicates invalid or missing properties in the request; the body will provide some details as text
403 (Unauthorized API Key)indicates a missing, unknown, or unauthorized API Key; the body will be empty
404 (Feed Not Found)indicates that the specified feed does not exist

Was this article helpful?

What's Next