Get transitive dependency details
curl --request POST \
--url https://api.example.com/v2/dependencies/transitive/components \
--header 'Content-Type: application/json' \
--data '
{
"depth": 3,
"limit": 50,
"components": [
{
"purl": "pkg:npm/express",
"requirement": "4.18.0"
},
{
"purl": "pkg:npm/lodash",
"requirement": "4.17.0"
}
]
}
'import requests
url = "https://api.example.com/v2/dependencies/transitive/components"
payload = {
"depth": 3,
"limit": 50,
"components": [
{
"purl": "pkg:npm/express",
"requirement": "4.18.0"
},
{
"purl": "pkg:npm/lodash",
"requirement": "4.17.0"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
depth: 3,
limit: 50,
components: [
{purl: 'pkg:npm/express', requirement: '4.18.0'},
{purl: 'pkg:npm/lodash', requirement: '4.17.0'}
]
})
};
fetch('https://api.example.com/v2/dependencies/transitive/components', 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/v2/dependencies/transitive/components",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'depth' => 3,
'limit' => 50,
'components' => [
[
'purl' => 'pkg:npm/express',
'requirement' => '4.18.0'
],
[
'purl' => 'pkg:npm/lodash',
'requirement' => '4.17.0'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/dependencies/transitive/components"
payload := strings.NewReader("{\n \"depth\": 3,\n \"limit\": 50,\n \"components\": [\n {\n \"purl\": \"pkg:npm/express\",\n \"requirement\": \"4.18.0\"\n },\n {\n \"purl\": \"pkg:npm/lodash\",\n \"requirement\": \"4.17.0\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v2/dependencies/transitive/components")
.header("Content-Type", "application/json")
.body("{\n \"depth\": 3,\n \"limit\": 50,\n \"components\": [\n {\n \"purl\": \"pkg:npm/express\",\n \"requirement\": \"4.18.0\"\n },\n {\n \"purl\": \"pkg:npm/lodash\",\n \"requirement\": \"4.17.0\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/dependencies/transitive/components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"depth\": 3,\n \"limit\": 50,\n \"components\": [\n {\n \"purl\": \"pkg:npm/express\",\n \"requirement\": \"4.18.0\"\n },\n {\n \"purl\": \"pkg:npm/lodash\",\n \"requirement\": \"4.17.0\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"dependencies": [
{
"purl": "pkg:npm/express@4.18.2",
"version": "4.18.2"
},
{
"purl": "pkg:npm/body-parser@1.20.1",
"version": "1.20.1"
},
{
"purl": "pkg:npm/cookie@0.5.0",
"version": "0.5.0"
}
],
"status": {
"status": "SUCCESS",
"message": "Transitive dependencies successfully retrieved"
}
}"<string>"{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Dependencies
Get transitive dependency details
POST
/
v2
/
dependencies
/
transitive
/
components
Get transitive dependency details
curl --request POST \
--url https://api.example.com/v2/dependencies/transitive/components \
--header 'Content-Type: application/json' \
--data '
{
"depth": 3,
"limit": 50,
"components": [
{
"purl": "pkg:npm/express",
"requirement": "4.18.0"
},
{
"purl": "pkg:npm/lodash",
"requirement": "4.17.0"
}
]
}
'import requests
url = "https://api.example.com/v2/dependencies/transitive/components"
payload = {
"depth": 3,
"limit": 50,
"components": [
{
"purl": "pkg:npm/express",
"requirement": "4.18.0"
},
{
"purl": "pkg:npm/lodash",
"requirement": "4.17.0"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
depth: 3,
limit: 50,
components: [
{purl: 'pkg:npm/express', requirement: '4.18.0'},
{purl: 'pkg:npm/lodash', requirement: '4.17.0'}
]
})
};
fetch('https://api.example.com/v2/dependencies/transitive/components', 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/v2/dependencies/transitive/components",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'depth' => 3,
'limit' => 50,
'components' => [
[
'purl' => 'pkg:npm/express',
'requirement' => '4.18.0'
],
[
'purl' => 'pkg:npm/lodash',
'requirement' => '4.17.0'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/dependencies/transitive/components"
payload := strings.NewReader("{\n \"depth\": 3,\n \"limit\": 50,\n \"components\": [\n {\n \"purl\": \"pkg:npm/express\",\n \"requirement\": \"4.18.0\"\n },\n {\n \"purl\": \"pkg:npm/lodash\",\n \"requirement\": \"4.17.0\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v2/dependencies/transitive/components")
.header("Content-Type", "application/json")
.body("{\n \"depth\": 3,\n \"limit\": 50,\n \"components\": [\n {\n \"purl\": \"pkg:npm/express\",\n \"requirement\": \"4.18.0\"\n },\n {\n \"purl\": \"pkg:npm/lodash\",\n \"requirement\": \"4.17.0\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/dependencies/transitive/components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"depth\": 3,\n \"limit\": 50,\n \"components\": [\n {\n \"purl\": \"pkg:npm/express\",\n \"requirement\": \"4.18.0\"\n },\n {\n \"purl\": \"pkg:npm/lodash\",\n \"requirement\": \"4.17.0\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"dependencies": [
{
"purl": "pkg:npm/express@4.18.2",
"version": "4.18.2"
},
{
"purl": "pkg:npm/body-parser@1.20.1",
"version": "1.20.1"
},
{
"purl": "pkg:npm/cookie@0.5.0",
"version": "0.5.0"
}
],
"status": {
"status": "SUCCESS",
"message": "Transitive dependencies successfully retrieved"
}
}"<string>"{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Body
application/json
TODO: Add scope filters: repeated string scope_include repeated string scope_exclude Using a list of strings allows filtering by multiple scopes simultaneously (e.g., include both "dev" and "test" dependencies in a single request)
components
List of Purls from the same ecosystem
Supported ecosystems: "composer", "crates", "maven", "npm", "gem" · object[]
Show child attributes
Show child attributes
⌘I