@@ -1322,6 +1322,87 @@ paths:
13221322 application/json :
13231323 schema :
13241324 $ref : ' #/components/schemas/PaginatedResults_ImporterReport'
1325+ /api/v2/license :
1326+ get :
1327+ tags :
1328+ - license
1329+ summary : List all licenses from SBOMs
1330+ operationId : listLicenses
1331+ parameters :
1332+ - name : q
1333+ in : query
1334+ description : |-
1335+ Query for advisories defined using the following EBNF grammar (ISO/IEC 14977):
1336+ (* Query Grammar - EBNF Compliant *)
1337+ query = ( values | filter ) , { "&" , query } ;
1338+ values = value , { "|" , value } ;
1339+ filter = field , operator , values ;
1340+ operator = "=" | "!=" | "~" | "!~" | ">=" | ">" | "<=" | "<" ;
1341+ field = ("license")
1342+ value = { value_char } ;
1343+ value_char = escaped_char | normal_char ;
1344+ escaped_char = "\" , special_char ;
1345+ normal_char = ? any character except '&', '|', '=', '!', '~', '>', '<', '\' ? ;
1346+ special_char = "&" | "|" | "=" | "!" | "~" | ">" | "<" | "\" ;
1347+ (* Examples:
1348+ - Simple filter: title=example
1349+ - Multiple values filter: title=foo|bar|baz
1350+ - Complex filter: modified>2024-01-01
1351+ - Combined query: title=foo&average_severity=high
1352+ - Escaped characters: title=foo\&bar
1353+ *)
1354+ required : false
1355+ schema :
1356+ type : string
1357+ - name : sort
1358+ in : query
1359+ description : |-
1360+ EBNF grammar for the _sort_ parameter:
1361+ ```text
1362+ sort = field [ ':', order ] { ',' sort }
1363+ order = ( "asc" | "desc" )
1364+ field = ("license")
1365+ ```
1366+ The optional _order_ should be one of "asc" or "desc". If
1367+ omitted, the order defaults to "asc".
1368+
1369+ Each _field_ name must correspond to one of the columns of the
1370+ table holding the entities being queried. Those corresponding
1371+ to JSON objects in the database may use a ':' to delimit the
1372+ column name and the object key,
1373+ e.g. `purl:qualifiers:type:desc`
1374+ required : false
1375+ schema :
1376+ type : string
1377+ - name : offset
1378+ in : query
1379+ description : |-
1380+ The first item to return, skipping all that come before it.
1381+
1382+ NOTE: The order of items is defined by the API being called.
1383+ required : false
1384+ schema :
1385+ type : integer
1386+ format : int64
1387+ minimum : 0
1388+ - name : limit
1389+ in : query
1390+ description : |-
1391+ The maximum number of entries to return.
1392+
1393+ Zero means: no limit
1394+ required : false
1395+ schema :
1396+ type : integer
1397+ format : int64
1398+ minimum : 0
1399+ responses :
1400+ ' 200 ' :
1401+ description : Matching licenses
1402+ content :
1403+ application/json :
1404+ schema :
1405+ $ref : ' #/components/schemas/PaginatedResults_LicenseText'
13251406 /api/v2/license/spdx/license :
13261407 get :
13271408 tags :
@@ -3991,6 +4072,13 @@ components:
39914072 type : array
39924073 items :
39934074 type : string
4075+ LicenseText :
4076+ type : object
4077+ required :
4078+ - license
4079+ properties :
4080+ license :
4081+ type : string
39944082 Message :
39954083 type : object
39964084 required :
@@ -4237,6 +4325,25 @@ components:
42374325 type : integer
42384326 format : int64
42394327 minimum : 0
4328+ PaginatedResults_LicenseText :
4329+ type : object
4330+ required :
4331+ - items
4332+ - total
4333+ properties :
4334+ items :
4335+ type : array
4336+ items :
4337+ type : object
4338+ required :
4339+ - license
4340+ properties :
4341+ license :
4342+ type : string
4343+ total :
4344+ type : integer
4345+ format : int64
4346+ minimum : 0
42404347 PaginatedResults_Node :
42414348 type : object
42424349 required :
0 commit comments