Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

List ApiKeys

Modified on July 26, 2024view on GitHub

List ApiKeys is available as both a pgutil command and an HTTP Request, and will list the API keys in ProGet.

This API requires ProGet 2024.3 or later.

Command Specification (CLI)

The apikeys list has an optional --source and related authentication options (i.e. --api-key or --username / --password). See Working with Sources in pgutil to learn more.

Running the command will print API Key and related fields to the standard output.

$> pgutil apikeys list
(unnamed key)
  Id:          1000
  Expiration:  None
  Logging:     None
  Type:        Personal
  User:        Admin

Note source options must also be specified unless you have the "Default" source configured, and that a feed may be instead specified in the source. See Working with Sources to learn more.

HTTP Request Specification

To get a list of ApiKeys, simply GET to /api/api-keys/list and an array of ApiKeyInfo JSON object (see ApiKeyInfo.cs) will be returned.

HTTP Response Specification

Response Details
200 (Success) the body will contain an array of ApiKeyInfo objects
403 (Unauthorized API Key) indicates a missing, unknown, or unauthorized API Key
500 (Server Error) indicates an unexpected error; the body will contain the message and stack trace, and this will also be logged