- 17 May 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Connectors Management
- Updated on 17 May 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
The Connectors Management API offers a simple mechanism for querying, creating, and updating connectors, and related data:
- Create Connector - creates a specified connector
- Get Connector - describes an specified connector
- List Connectors - describes all connectors, filtered as specified
- Update Connector - updates a specified connector
- Delete Connector - deletes a specified connector
Authenticating to Connectors Management API
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 Create ConnectorOverwrite/Delete is required for Delete Connector |
Personal API Key | Feeds_ViewFeed is required for all endpointsFeeds_AddPackage is required for the Create ConnectorFeeds_DeletePackage is required for Delete Connector |
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 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 Create Connector, and output for Get Connector and List Connectors.
name
and feedType
properties are required for Create Connector. Unless otherwise indicated, omitting a property or supplying null
as the value will keep the current setting.
Property | Format | Notes |
---|---|---|
name | string | the unique name of the connector; must not include characters that require URL escaping; max 100 characters |
feedType | string | denotes the feed type; valid values are: universal , nuget , chocolatey , npm , maven , powershell , docker , rubygems , vsix , asset , romp , pypi , helm , rpm , conda |
url | string | the URL of the connector |
username | string | the username used for authentication at the connector URL |
password | string | the password used for authentication at the connector URL |
timeout | int | the timeout (in seconds) used when making a request to the connector URL |
filters | string[] | 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 ) |
metadataCacheEnabled | bool | indicates whether metadata caching is enabled on the connector |
metadataCacheMinutes | int | the number of minutes a connector metadata request to a specific URL is cached by ProGet (default: 30 ) |
metadataCacheCount | int | the 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.
orCastle.*
- excludes any packages that start with
Rubbishsoft.