Get License Classifications
curl --request GET \
--url https://api.example.com/organization/{organizationId}/licenses/classificationsimport requests
url = "https://api.example.com/organization/{organizationId}/licenses/classifications"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/organization/{organizationId}/licenses/classifications', 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/organization/{organizationId}/licenses/classifications",
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/organization/{organizationId}/licenses/classifications"
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/organization/{organizationId}/licenses/classifications")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organization/{organizationId}/licenses/classifications")
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": {
"licenses": [
{
"spdxId": "MIT",
"name": "MIT License",
"defaultCategory": "PERMISSIVE",
"currentCategory": "PERMISSIVE",
"isOverridden": false
},
{
"spdxId": "BUSL-1.1",
"name": "Business Source License 1.1",
"defaultCategory": "WEAK_COPYLEFT",
"currentCategory": "STRONG_COPYLEFT",
"isOverridden": true
}
]
}
}
Organization Classifications
Get License Classifications
Get all license classifications for an organization, including defaults and overrides
GET
/
organization
/
{organizationId}
/
licenses
/
classifications
Get License Classifications
curl --request GET \
--url https://api.example.com/organization/{organizationId}/licenses/classificationsimport requests
url = "https://api.example.com/organization/{organizationId}/licenses/classifications"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/organization/{organizationId}/licenses/classifications', 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/organization/{organizationId}/licenses/classifications",
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/organization/{organizationId}/licenses/classifications"
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/organization/{organizationId}/licenses/classifications")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organization/{organizationId}/licenses/classifications")
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": {
"licenses": [
{
"spdxId": "MIT",
"name": "MIT License",
"defaultCategory": "PERMISSIVE",
"currentCategory": "PERMISSIVE",
"isOverridden": false
},
{
"spdxId": "BUSL-1.1",
"name": "Business Source License 1.1",
"defaultCategory": "WEAK_COPYLEFT",
"currentCategory": "STRONG_COPYLEFT",
"isOverridden": true
}
]
}
}
Path Parameters
string
required
The UUID of the organization
Authorization
Requiresread permission on the organization.
Response
boolean
Whether the request succeeded
object
Show Classifications Object
Show Classifications Object
array
Show License Classification
Show License Classification
string
SPDX license identifier
string
Human-readable license name
string
CybeDefend’s default category:
PERMISSIVE, WEAK_COPYLEFT, STRONG_COPYLEFT, or UNKNOWNstring
Currently active category (may differ from default if overridden)
boolean
Whether this license has been overridden at the organization level
{
"success": true,
"data": {
"licenses": [
{
"spdxId": "MIT",
"name": "MIT License",
"defaultCategory": "PERMISSIVE",
"currentCategory": "PERMISSIVE",
"isOverridden": false
},
{
"spdxId": "BUSL-1.1",
"name": "Business Source License 1.1",
"defaultCategory": "WEAK_COPYLEFT",
"currentCategory": "STRONG_COPYLEFT",
"isOverridden": true
}
]
}
}
⌘I