Get License Summary
curl --request GET \
--url https://api.example.com/project/{projectId}/results/sca/licenses/summaryimport requests
url = "https://api.example.com/project/{projectId}/results/sca/licenses/summary"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/project/{projectId}/results/sca/licenses/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/project/{projectId}/results/sca/licenses/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/project/{projectId}/results/sca/licenses/summary"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/project/{projectId}/results/sca/licenses/summary")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/project/{projectId}/results/sca/licenses/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440001",
"totalPackages": 142,
"packagesWithLicenses": 135,
"packagesWithoutLicenses": 7,
"permissiveCount": 120,
"weakCopyleftCount": 8,
"strongCopyleftCount": 3,
"unknownCount": 7,
"ignoredCount": 4,
"licenses": [
{
"spdxId": "MIT",
"name": "MIT License",
"category": "PERMISSIVE",
"risk": "NONE",
"riskDescription": "Minimal restrictions on use, modification, and redistribution",
"count": 85
},
{
"spdxId": "Apache-2.0",
"name": "Apache License 2.0",
"category": "PERMISSIVE",
"risk": "NONE",
"riskDescription": "Minimal restrictions on use, modification, and redistribution",
"count": 25
},
{
"spdxId": "GPL-3.0-only",
"name": "GNU General Public License v3.0 only",
"category": "STRONG_COPYLEFT",
"risk": "HIGH",
"riskDescription": "Requires derivative works to be released under the same license",
"count": 3
}
]
}
}
Project Licenses
Get License Summary
Get aggregated license statistics for all SCA packages in a project
GET
/
project
/
{projectId}
/
results
/
sca
/
licenses
/
summary
Get License Summary
curl --request GET \
--url https://api.example.com/project/{projectId}/results/sca/licenses/summaryimport requests
url = "https://api.example.com/project/{projectId}/results/sca/licenses/summary"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/project/{projectId}/results/sca/licenses/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/project/{projectId}/results/sca/licenses/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/project/{projectId}/results/sca/licenses/summary"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/project/{projectId}/results/sca/licenses/summary")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/project/{projectId}/results/sca/licenses/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440001",
"totalPackages": 142,
"packagesWithLicenses": 135,
"packagesWithoutLicenses": 7,
"permissiveCount": 120,
"weakCopyleftCount": 8,
"strongCopyleftCount": 3,
"unknownCount": 7,
"ignoredCount": 4,
"licenses": [
{
"spdxId": "MIT",
"name": "MIT License",
"category": "PERMISSIVE",
"risk": "NONE",
"riskDescription": "Minimal restrictions on use, modification, and redistribution",
"count": 85
},
{
"spdxId": "Apache-2.0",
"name": "Apache License 2.0",
"category": "PERMISSIVE",
"risk": "NONE",
"riskDescription": "Minimal restrictions on use, modification, and redistribution",
"count": 25
},
{
"spdxId": "GPL-3.0-only",
"name": "GNU General Public License v3.0 only",
"category": "STRONG_COPYLEFT",
"risk": "HIGH",
"riskDescription": "Requires derivative works to be released under the same license",
"count": 3
}
]
}
}
Path Parameters
string
required
The UUID of the project
Query Parameters
string
Filter by Git branch name
string
The UUID of the organization (required for permission resolution)
string[]
Filter by package ecosystem (e.g.,
npm, pip, maven, go). Can be specified multiple times.Authorization
Requiresread_scan_result permission on the project.
Response
boolean
Whether the request succeeded
object
Show License Summary Object
Show License Summary Object
string
The project UUID
number
Total number of SCA packages
number
Number of packages with at least one detected license
number
Number of packages with no detected license
number
Number of packages classified as Permissive
number
Number of packages classified as Weak Copyleft
number
Number of packages classified as Strong Copyleft
number
Number of packages with unknown or unresolved licenses
number
Number of packages marked as ignored for license analysis
array
Show License Item
Show License Item
string
SPDX license identifier (e.g.,
MIT, Apache-2.0)string
Human-readable license name
string
License category:
PERMISSIVE, WEAK_COPYLEFT, STRONG_COPYLEFT, or UNKNOWNstring
Risk level:
NONE, MEDIUM, HIGH, or UNKNOWNstring
Human-readable description of the risk implications
number
Number of packages using this license
{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440001",
"totalPackages": 142,
"packagesWithLicenses": 135,
"packagesWithoutLicenses": 7,
"permissiveCount": 120,
"weakCopyleftCount": 8,
"strongCopyleftCount": 3,
"unknownCount": 7,
"ignoredCount": 4,
"licenses": [
{
"spdxId": "MIT",
"name": "MIT License",
"category": "PERMISSIVE",
"risk": "NONE",
"riskDescription": "Minimal restrictions on use, modification, and redistribution",
"count": 85
},
{
"spdxId": "Apache-2.0",
"name": "Apache License 2.0",
"category": "PERMISSIVE",
"risk": "NONE",
"riskDescription": "Minimal restrictions on use, modification, and redistribution",
"count": 25
},
{
"spdxId": "GPL-3.0-only",
"name": "GNU General Public License v3.0 only",
"category": "STRONG_COPYLEFT",
"risk": "HIGH",
"riskDescription": "Requires derivative works to be released under the same license",
"count": 3
}
]
}
}
⌘I