openapi: 3.2.0 info: title: Dependency Track License API version: 1.0.0 contact: name: The Dependency-Track Authors url: https://github.com/DependencyTrack/dependency-track license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html description: 'Operations tagged license across 2 of this provider''s published API definitions: dependency-track-openapi-v1.yaml, dependency-track-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: /api tags: - name: License paths: /v1/license: get: operationId: getLicenses parameters: - description: The page to return. To be used in conjunction with pageSize. in: query name: pageNumber schema: type: string default: '1' - description: Number of elements to return per page. To be used in conjunction with pageNumber. in: query name: pageSize schema: type: string default: '100' - description: Offset to start returning elements from. To be used in conjunction with limit. in: query name: offset schema: type: string - description: Number of elements to return per page. To be used in conjunction with offset. in: query name: limit schema: type: string - description: Name of the resource field to sort on. in: query name: sortName schema: type: string - description: Ordering of items when sorting with sortName. in: query name: sortOrder schema: type: string enum: - asc, desc responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/LicenseResponse' description: A list of all licenses with complete metadata for each license headers: X-Total-Count: description: The total number of licenses schema: format: integeger style: simple '401': description: Unauthorized security: - ApiKeyAuth: [] - BearerAuth: [] summary: Returns a list of all licenses with complete metadata for each license tags: - License put: description: Requires permission SYSTEM_CONFIGURATION or SYSTEM_CONFIGURATION_CREATE operationId: createLicense requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateLicenseRequest' responses: '201': content: application/json: schema: $ref: '#/components/schemas/LicenseResponse' description: The created license '401': description: Unauthorized '409': description: A license with the specified ID already exists. security: - ApiKeyAuth: [] - BearerAuth: [] summary: Creates a new custom license tags: - License servers: - url: /api /v1/license/concise: get: operationId: getLicenseListing responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/ConciseLicenseResponse' description: A concise listing of all licenses headers: X-Total-Count: description: The total number of licenses schema: format: integer style: simple '401': description: Unauthorized security: - ApiKeyAuth: [] - BearerAuth: [] summary: Returns a concise listing of all licenses tags: - License servers: - url: /api /v1/license/{licenseId}: delete: description: Requires permission SYSTEM_CONFIGURATION or SYSTEM_CONFIGURATION_DELETE operationId: deleteLicense parameters: - description: The SPDX License ID of the license to delete in: path name: licenseId required: true schema: type: string responses: '204': description: License removed successfully '401': description: Unauthorized '404': description: The license could not be found '409': description: Only custom licenses can be deleted. security: - ApiKeyAuth: [] - BearerAuth: [] summary: Deletes a custom license tags: - License get: operationId: getLicense parameters: - description: The SPDX License ID of the license to retrieve in: path name: licenseId required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/LicenseResponse' description: A specific license '401': description: Unauthorized '404': description: The license could not be found security: - ApiKeyAuth: [] - BearerAuth: [] summary: Returns a specific license tags: - License servers: - url: /api components: schemas: CreateLicenseRequest: type: object properties: isDeprecatedLicenseId: type: boolean description: Whether the licenseId has been deprecated by SPDX isFsfLibre: type: boolean description: Whether the license is FSF libre isOsiApproved: type: boolean description: Whether the license is approved by the OSI licenseComments: type: string description: Comments about the license licenseId: type: string description: Identifier of the license maxLength: 255 minLength: 1 pattern: ^[a-zA-Z0-9_.\-+]*$ licenseText: type: string description: Full license text name: type: string description: Display name of the license maxLength: 255 minLength: 1 pattern: ^[\p{IsWhite_Space}\p{L}\p{M}\p{S}\p{N}\p{P}]*$ seeAlso: type: array description: Additional URLs with information about the license items: type: string description: Additional URLs with information about the license standardLicenseHeader: type: string description: Standard license header typically added to the top of source code standardLicenseTemplate: type: string description: Standard license template used to derive the license text required: - licenseId - name LicenseResponse: type: object properties: isCustomLicense: type: boolean description: Whether the license is a custom license created by a user isDeprecatedLicenseId: type: boolean description: Whether the licenseId has been deprecated by SPDX isFsfLibre: type: boolean description: Whether the license is FSF libre isOsiApproved: type: boolean description: Whether the license is approved by the OSI licenseComments: type: string description: Comments about the license licenseGroups: type: array description: License groups the license belongs to items: $ref: '#/components/schemas/LicenseGroup' licenseId: type: string description: Identifier of the license licenseText: type: string description: Full license text name: type: string description: Display name of the license seeAlso: type: array description: Additional URLs with information about the license items: type: string description: Additional URLs with information about the license standardLicenseHeader: type: string description: Standard license header typically added to the top of source code standardLicenseTemplate: type: string description: Standard license template used to derive the license text uuid: type: string format: uuid description: UUID of the license required: - isCustomLicense - isDeprecatedLicenseId - isFsfLibre - isOsiApproved - licenseGroups - licenseId - name - uuid LicenseGroup: type: object properties: licenses: type: array items: $ref: '#/components/schemas/License' name: type: string maxLength: 255 minLength: 1 pattern: ^[\p{IsWhite_Space}\p{L}\p{M}\p{S}\p{N}\p{P}]*$ riskWeight: type: integer format: int32 uuid: type: string format: uuid required: - name - uuid License: type: object properties: isCustomLicense: type: boolean isDeprecatedLicenseId: type: boolean isFsfLibre: type: boolean isOsiApproved: type: boolean licenseComments: type: string licenseGroups: type: array items: $ref: '#/components/schemas/LicenseGroup' licenseId: type: string maxLength: 255 minLength: 1 pattern: ^[a-zA-Z0-9_.\-+]*$ licenseText: type: string name: type: string maxLength: 255 minLength: 1 pattern: ^[\p{IsWhite_Space}\p{L}\p{M}\p{S}\p{N}\p{P}]*$ seeAlso: type: array items: type: string standardLicenseHeader: type: string standardLicenseTemplate: type: string uuid: type: string format: uuid required: - licenseId - name - uuid ConciseLicenseResponse: type: object properties: isCustomLicense: type: boolean description: Whether the license is a custom license created by a user isDeprecatedLicenseId: type: boolean description: Whether the licenseId has been deprecated by SPDX isFsfLibre: type: boolean description: Whether the license is FSF libre isOsiApproved: type: boolean description: Whether the license is approved by the OSI licenseId: type: string description: Identifier of the license name: type: string description: Display name of the license uuid: type: string format: uuid description: UUID of the license required: - isCustomLicense - isDeprecatedLicenseId - isFsfLibre - isOsiApproved - licenseId - name - uuid securitySchemes: ApiKeyAuth: description: Authentication via API key. in: header name: X-Api-Key type: apiKey BearerAuth: bearerFormat: Opaque description: 'Authentication via opaque server-issued session token. Tokens are obtained from `POST /api/v1/user/login` or `POST /api/v1/user/oidc/login`.' scheme: bearer type: http x-refined-from: - dependency-track-openapi-v1.yaml - dependency-track-openapi.yml