Connector Management API
  • 22 Jan 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Connector Management API

  • Dark
    Light
  • PDF

Article Summary

The Connector Management API Endpoints offer a simple mechanism for querying, creating, and updating connectors, and related data:

Authenticating to Connector Management 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 the Create Connector endpoint
Overwrite/Delete is required for the Delete Connector endpoint
Personal API KeyFeeds_ViewFeed is required for all endpoints
Feeds_AddPackage is required for the Create Connector endpoint
Feeds_DeletePackage is required for the Delete Connector endpoint
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 list connectors endpoint, you could specify the API key as follows:

curl -X GET --header "X-ApiKey: abc12345" "https://proget.corp.local/api/management/connectors/list"

Data Specifications

Connector Object Attributes

Connector is a set of key/value pairs that correspond to the fields on a Connector. It's used as input for the Create Connector endpoint, and output for the Get Connector and List Connectors endpoints.

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

PropertyFormatNotes
namestringthe unique name of the connector; must not include characters that require URL escaping; max 100 characters
feedTypestringdenotes the feed type; valid values are: universal, nuget, chocolatey, npm, maven, powershell, docker, rubygems, vsix, asset, romp, pypi, helm, rpm, conda
urlstringthe URL of the connector
usernamestringthe username used for authentication at the connector URL
passwordstringthe password used for authentication at the connector URL
timeoutintthe timeout (in seconds) used when making a request to the connector URL
filtersstring[]array of connector filters; supply an empty array to remove all filters; supports wildcards and negations. Note: adding a filter will give it the default Allow behavior. To add a filter with a Block behavior, use a ! prefix (e.g. !filter )
metadataCacheEnabledboolindicates whether metadata caching is enabled on the connector
metadataCacheMinutesintthe number of minutes a connector metadata request to a specific URL is cached by ProGet (default: 30)
metadataCacheCountintthe number of URL-specific metadata requests cached by ProGet (default: 100)

JSON Object

{
  "name": "example-connector",
  "feedType": "nuget",
  "url": "http://proget.corp.local",
  "username": "jsmith",
  "password": "pass123",
  "timeout": 60,
  "filters": ["filter1", "filter2"],
  "metadataCacheEnabled": true,
  "metadataCacheMinutes": 30,
  "metadataCacheCount": 100
}

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.

Was this article helpful?