- 22 Jan 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Connector Management API
- Updated on 22 Jan 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
The Connector Management API Endpoints offer 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 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 Type | Requirements |
---|---|
System API Keys | Use/Manage Feeds |
Feed API Keys | View/Download is required for all endpointsAdd/Repackage is required for the Create Connector endpointOverwrite/Delete is required for the Delete Connector endpoint |
Personal API Key | Feeds_ViewFeed is required for all endpointsFeeds_AddPackage is required for the Create Connector endpointFeeds_DeletePackage is required for the Delete Connector endpoint |
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 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.
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.