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.

Licenses

view on GitHub

The Licenses API provides several pgutil commands (available as pgutil licenses) and HTTP endpoints for querying, creating, and updating licenses, and related data:

pgutil Commands

All HTTP endpoints of the Licenses API are available as pgutil commands.

To find the list of commands available in pgutil, simply run pgutil licenses. See Getting started with pgutil to learn more.

Available HTTP Endpoints

Authenticating to Licenses 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 endpoints
Add/Repackage is required for Create License
Overwrite/Delete is required for Delete License
Personal API Key Feeds_ViewFeed is required for all endpoints
Feeds_AddPackage is required for Create License
Feeds_DeletePackage is required for Delete License
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.

Data Specifications

LicenseInfo Object Attributes

LicenseInfo is a JSON object (see LicenseInfo.cs) that corresponds to the fields on a license. It's used as input for Create License, and output for Get License and List Licenses.

code and title properties are required for Create License. Unless otherwise indicated, omitting a property or supplying null as the value will keep the current setting.

Example JSON Object

{
  "code": "MIT",
  "title": "MIT License",
  "urls": [
    "https://spdx.org/licenses/MIT.html"
  ],
  "spdx": ["MIT"]
}