Universal Feed API
  • 22 Jan 2024
  • 5 Minutes to read
  • Dark
    Light
  • PDF

Universal Feed API

  • Dark
    Light
  • PDF

Article Summary

Like the package format, the Universal Feed API was designed with simplicity in mind. Because universal packages are designed to be consumed by any language or platform, the API offers several different ways to do the same thing, as some operations are much more difficult in some languages than others.

The API consists of a few different URL endpoints, accessible over HTTP/S. If configured, they can be secured using Integrated Windows Authentication or Basic Authentication using whatever granular feed- or system-level privileges needed.

In ProGet, all endpoints are prefixed with /upack/«feed-name»:

Package Endpoints:

Other Endpoints:

Unsupported Endpoints:

Note that the endpoint prefix itself is not a valid API endpoint, and may return a 404 error, or simply redirect you to this page.

Currently, the API only returns results in JSON format with a standard, 200 (success) status code unless there's an error; future versions (if anyone requests it) may add additional formats, such as XML, which would be specified using a Content-Type request headers and/or an alternate querystring parameter.

All searching and matching is case insensitive. This will most certainly never change, as it's either a mistake or a bad practice to have different packages named SomeThing and someThing.

Authenticating to Asset Directory API Endpoints

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

Access TypeRequirements
System API KeysUse/Manage Feeds
Feed API KeysView/Download is required for all endpoints
Add/Repackage is required for uploading/importing endpoints
Overwrite/Delete is required for deletion endpoints
Personal API KeyFeeds_ViewFeed is required for all endpoints
Feeds_AddPackage is required for uploading/importing endpoints
Feeds_DeletePackage is required for deletion endpoints
No API Keyanonymous 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.

🚀 Quick Example: Authenticating with curl

For example, to authenticate with the API key abc12345 to the "Feed Metadata" endpoint, you could specify the API key as follows:

curl -X GET --header "X-ApiKey: abc12345" "https://proget.corp.local/upack/MyUniversalFeed/meta"

Data Specifications

FeedMetadata Object Attributes

FeedMetadata is a set of key/value pairs that correspond to the metadata fields in a Universal Feed. It's used as output data for the Feed Metadata
Endpoint as a JSON-formatted object.

PropertyFormatNotes
apiVersionstringcontains the supported Universal Feed Version.
namestringcontains the name of the feed.
descriptionstringcontains the description of the feed.
versionstringcontains the Universal Feed API version of the feed.
packageCountintcontains the number of unique package names in the feed.
packageVersionCountintcontains the number of packages in the feed.
servicesarrayarray of strings containing any of the following values:
- VirtualPackages: Supports virtual packages, and injects the isVirtual property in the list endpoints.
- RemotePackages: Supports remote packages (e.g., connectors in ProGet), and injects the isLocal and isCached properties in the list endpoints.
- UploadPackage: Supports simple uploading (a complete package file only).
- UploadContents: Supports partial uploading (contents, metadata, etc).
- Delete: Supports deleting packages
- DownloadContents: Supports downloading of individual files or contentOnly of a package.

JSON Object

{
  "apiVersion": "1.3.0",
  "name": "myUniversalFeed",
  "description": "A Universal Feed",
  "packageCount": 4,
  "packageVersionCount": 5,
  "services": [
    "VirtualPackages",
    "RemotePackages",
    "UploadPackage",
    "UploadContents",
    "Delete",
    "DownloadContents"
  ]
}

PackageData Object Attributes

PackageData is a set of key/value pairs that correspond to the metadata fields in a Universal Package. It's used as output data for the List Packages
Endpoint as a JSON-formatted object.

PropertyFormatNotes
groupstringthe group of the package
namestringthe name of the package
latestVersionfloatthe latest version of the package
titlestringthe title of the package
descriptionstringthe description of the package
downloadsintnumber of downloads performed
isLocalboolindicates if the package is hosted locally
isCachedboolindicates if the package is cached
versionsarrayan array of existing version numbers

JSON Object

[
  {
    "group": "MyGroup",
    "name": "MyUniversalPackage",
    "latestVersion": "2.0.4",
    "title": "Test Package",
    "description": "Test Package for API Documentation",
    "downloads": "5",
    "isLocal": true,
    "isCached": false,
    "versions": ["2.0.4", "1.2.3", "1.0.0"]
  },
  { ... } // other packages
]

VersionData Object Attributes

VersionData is a set of key/value pairs that correspond to the metadata fields in a Universal Package version. It's used as output data for the List Versions
Endpoint as a JSON-formatted object.

PropertyFormatNotes
isLocalboolindicates if the package is hosted locally
isCachedboolindicates if the package is cached
isVirtualboolindicates if the package is a virtual package
sha1stringhash of package
titlestringthe title of the package
descriptionstringthe description of the package
groupstringthe group of the package
namestringthe name of the package
versionfloatthe version of the package
downloadsintnumber of downloads performed
publisheddatetimetimestamp when package was published to the feed
sizeintthe size of the package in bytes
fileListarrayan array of FileData objects

JSON Object

{
  "isLocal": true,
  "isCached": false,
  "isVirtual": false,
  "sha1": "00c1624a6bc2fbed3a8b49c9c90fa4f2b4a1241e",
  "title": "Test Package",
  "description": "Test Package for API Documentation",
  "group": "MyGroup",
  "name": "MyUniversalPackage",
  "version": "1.0.0",
  "downloads": 6,
  "published": "2023-12-11T02:13:47.86Z",
  "size": 1435884,
  "fileList": [ FileData objects ]
}

FileData Object Attributes

FileData is a subset of attributes on the VersionData Object that corresponds to fields of a file within a universal package. It's used as output data for the List Versions
Endpoint as a JSON-formatted object.

PropertyFormatNotes
namestringthe name of the package
sizeintthe size of the package in bytes
datedatetimetimestamp when file was added to package

JSON Object

{
    "name": "example.bin",
    "size": 1543944,
    "date": "2023-12-08T10:25:50Z"
}

Was this article helpful?