Universal Feed API
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:
- List Universal Packages - describes specified packages
- Upload Universal Package - uploads a specified package
- Delete Universal Package - deletes a specified package
- Download Universal Package - downloads a specified package
- Download Virtual Package - downloads a specified virtual package
- Import Universal Package - imports a package from specified source
Other Endpoints:
- Download Universal Package File - downloads a specified file within a package
- Universal Feed Metadata - describes a specified feed
- List Universal Package Versions - describes versions of specified packages
Unsupported Endpoints:
- Search Packages (Unsupported) - describes a list of packages
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 Type | Requirements |
---|---|
System API Keys | Use/Manage Feeds |
Feed API Keys | View/Download is required for all endpointsAdd/Repackage is required for uploading/importing endpointsOverwrite/Delete is required for deletion endpoints |
Personal API Key | Feeds_ViewFeed is required for all endpointsFeeds_AddPackage is required for uploading/importing endpointsFeeds_DeletePackage is required for deletion endpoints |
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.
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.
Property | Format | Notes |
---|---|---|
apiVersion |
string | contains the supported Universal Feed Version. |
name |
string | contains the name of the feed. |
description |
string | contains the description of the feed. |
version |
string | contains the Universal Feed API version of the feed. |
packageCount |
int | contains the number of unique package names in the feed. |
packageVersionCount |
int | contains the number of packages in the feed. |
services |
array | array 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.
Property | Format | Notes |
---|---|---|
group |
string | the group of the package |
name |
string | the name of the package |
latestVersion |
float | the latest version of the package |
title |
string | the title of the package |
description |
string | the description of the package |
downloads |
int | number of downloads performed |
isLocal |
bool | indicates if the package is hosted locally |
isCached |
bool | indicates if the package is cached |
versions |
array | an 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.
Property | Format | Notes |
---|---|---|
isLocal |
bool | indicates if the package is hosted locally |
isCached |
bool | indicates if the package is cached |
isVirtual |
bool | indicates if the package is a virtual package |
sha1 |
string | hash of package |
title |
string | the title of the package |
description |
string | the description of the package |
group |
string | the group of the package |
name |
string | the name of the package |
version |
float | the version of the package |
downloads |
int | number of downloads performed |
published |
datetime | timestamp when package was published to the feed |
size |
int | the size of the package in bytes |
fileList |
array | an 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.
Property | Format | Notes |
---|---|---|
name |
string | the name of the package |
size |
int | the size of the package in bytes |
date |
datetime | timestamp when file was added to package |
JSON Object
{
"name": "example.bin",
"size": 1543944,
"date": "2023-12-08T10:25:50Z"
}