Get the Complete List of Connected Feeds Using the ProGet JSON API

The JSON API is the recommended method for technologies other than .NET to interface with ProGet.

API Use

Before starting with the API, note that traditional NuGet actions are done via the NuGet API. Some examples of API usage that do not require the ProGet JSON API include:

Enabling the API

To enable the API, you must set an API key within ProGet. Simply navigate to "Administration" > "API Configuration". You can set the key to any string with a length of 1 or greater.

Connecting to the JSON API

The JSON API is accessible at the URL:

http://proget-server/api/json

Visiting the page will describe the list of methods that can be called. The arguments can be passed in one of two ways, either via a GET request with the arguments specified in the query string:

http://proget-server/api/json/Method_Name?API_Key=yourKey&Argument_1=value1&Argument_2=value2

Or they may be provided via HTTP POST by supplying a JSON object representing the arguments in the request body.

As an example, to get the list of connectors, we will access the Connectors_GetConnectors method (which according to the overview, does not require any arguments) by browsing to the URL: http://proget-server/api/json/Connectors_GetConnectors?API_Key=myApiKey .

The data returned from my test instance with a single connector and single connector filter yields the following data:

{
"Connectors_Extended": 
[
{ "Connector_Id": 1003, "Connector_Name": "NuGet official package source", "Connector_Url": "https://nuget.org/api/v2", "Feed_Id": 1, "Feed_Name": "Default"}
],
"ConnectorFilters": 
[
{ "Connector_Id": 1003, "Filter_Sequence": 1, "Allow_Indicator": "Y", "Rule_Text": "*", "Connector_Id1": 1003, "Connector_Name": "NuGet official package source", "Connector_Url": "https://nuget.org/api/v2", "Feed_Id": 1}
]
}