Get cryptographic hints across version ranges - legacy endpoint.
curl --request POST \
--url http://api.scanoss.com/v2/cryptography/hints/range/components \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"purl": "pkg:github/scanoss/engine@1.0.0"
},
{
"purl": "pkg:github/scanoss/scanoss.py@v1.30.0"
}
]
}
'import requests
url = "http://api.scanoss.com/v2/cryptography/hints/range/components"
payload = { "components": [{ "purl": "pkg:github/scanoss/engine@1.0.0" }, { "purl": "pkg:github/scanoss/scanoss.py@v1.30.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({
components: [
{purl: 'pkg:github/scanoss/engine@1.0.0'},
{purl: 'pkg:github/scanoss/scanoss.py@v1.30.0'}
]
})
};
fetch('http://api.scanoss.com/v2/cryptography/hints/range/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 => "http://api.scanoss.com/v2/cryptography/hints/range/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([
'components' => [
[
'purl' => 'pkg:github/scanoss/engine@1.0.0'
],
[
'purl' => 'pkg:github/scanoss/scanoss.py@v1.30.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 := "http://api.scanoss.com/v2/cryptography/hints/range/components"
payload := strings.NewReader("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine@1.0.0\"\n },\n {\n \"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.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("http://api.scanoss.com/v2/cryptography/hints/range/components")
.header("Content-Type", "application/json")
.body("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine@1.0.0\"\n },\n {\n \"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.scanoss.com/v2/cryptography/hints/range/components")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine@1.0.0\"\n },\n {\n \"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"components": [
{
"purl": "pkg:github/scanoss/engine",
"versions": [
"5.0.0",
"5.1.0"
],
"hints": [
{
"id": "openssl-hint-001",
"name": "OpenSSL",
"description": "Industry standard cryptographic library",
"category": "library",
"url": "https://www.openssl.org/",
"purl": "pkg:generic/openssl@3.0.0"
}
]
},
{
"purl": "pkg:github/scanoss/scanoss.py",
"versions": [],
"hints": [],
"info_message": "Component not found in database",
"info_code": "COMPONENT_NOT_FOUND"
}
],
"status": {
"status": "SUCCESS",
"message": "Cryptographic hints in range retrieved"
}
}"<string>"{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Cryptography
Get cryptographic hints across version ranges - legacy endpoint.
Legacy method for retrieving cryptographic hints related to protocols, libraries, SDKs and frameworks across version ranges. Use ComponentHintsInRange or ComponentsHintsInRange instead.
POST
/
v2
/
cryptography
/
hints
/
range
/
components
Get cryptographic hints across version ranges - legacy endpoint.
curl --request POST \
--url http://api.scanoss.com/v2/cryptography/hints/range/components \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"purl": "pkg:github/scanoss/engine@1.0.0"
},
{
"purl": "pkg:github/scanoss/scanoss.py@v1.30.0"
}
]
}
'import requests
url = "http://api.scanoss.com/v2/cryptography/hints/range/components"
payload = { "components": [{ "purl": "pkg:github/scanoss/engine@1.0.0" }, { "purl": "pkg:github/scanoss/scanoss.py@v1.30.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({
components: [
{purl: 'pkg:github/scanoss/engine@1.0.0'},
{purl: 'pkg:github/scanoss/scanoss.py@v1.30.0'}
]
})
};
fetch('http://api.scanoss.com/v2/cryptography/hints/range/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 => "http://api.scanoss.com/v2/cryptography/hints/range/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([
'components' => [
[
'purl' => 'pkg:github/scanoss/engine@1.0.0'
],
[
'purl' => 'pkg:github/scanoss/scanoss.py@v1.30.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 := "http://api.scanoss.com/v2/cryptography/hints/range/components"
payload := strings.NewReader("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine@1.0.0\"\n },\n {\n \"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.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("http://api.scanoss.com/v2/cryptography/hints/range/components")
.header("Content-Type", "application/json")
.body("{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine@1.0.0\"\n },\n {\n \"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.scanoss.com/v2/cryptography/hints/range/components")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"components\": [\n {\n \"purl\": \"pkg:github/scanoss/engine@1.0.0\"\n },\n {\n \"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"components": [
{
"purl": "pkg:github/scanoss/engine",
"versions": [
"5.0.0",
"5.1.0"
],
"hints": [
{
"id": "openssl-hint-001",
"name": "OpenSSL",
"description": "Industry standard cryptographic library",
"category": "library",
"url": "https://www.openssl.org/",
"purl": "pkg:generic/openssl@3.0.0"
}
]
},
{
"purl": "pkg:github/scanoss/scanoss.py",
"versions": [],
"hints": [],
"info_message": "Component not found in database",
"info_code": "COMPONENT_NOT_FOUND"
}
],
"status": {
"status": "SUCCESS",
"message": "Cryptographic hints in range retrieved"
}
}"<string>"{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Body
application/json
Represents a list of software component to be analyzed by SCANOSS API services. Allows analysis of multiple software components in a single API call, improving performance over individual requests.
Represents a list of software component to be analyzed by SCANOSS API services. Allows analysis of multiple software components in a single API call, improving performance over individual requests.
Show child attributes
Show child attributes
⌘I