<POST> Supply Chain Lineage Check API
1 min
The Supply Chain Lineage Check API helps users determine whether a given GitHub, Hugging Face, or S3 bucket repository has already been scanned. By providing the repository type and URL, users can verify its scan history, avoiding redundant security assessments and optimizing workflow efficiency.
The following parameters are used for supply chain Lineage Check API. To learn more about different input parameters and how to use the API, refer to AI/ML Supply Chain documentation.
Supply Chain Lineage Check API
The Supply Chain Lineage Check API verifies if a given GitHub, Hugging Face, or S3 repository has already been scanned for security assessment.
POST
https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/lineage_check
Header Parameters
- x-api-keystringrequiredDescription
- Org-IdstringrequiredDescription
Body Parameters
- repo_typestringrequiredDescription
- repo_urlstringDescription
- branch_namestringDescription
- depthintegerDescription
- aws_access_key_idstringDescription
- aws_secret_access_keystringDescription
- regionstringDescription
- bucket_namestringDescription
python
import requests
url = "https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/lineage_check"
payload = "{\"repo_type\":\"String\",\"repo_url\":\"String\",\"branch_name\":\"String\",\"depth\":\"Number\",\"aws_access_key_id\":\"String\",\"aws_secret_access_key\":\"String\",\"region\":\"String\",\"bucket_name\":\"String\"}"
headers = {
'x-api-key': 'string',
'Org-Id': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl
curl --location 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/lineage_check' \
--header 'x-api-key: string' \
--header 'Org-Id: string' \
--data '{"repo_type":"String","repo_url":"String","branch_name":"String","depth":"Number","aws_access_key_id":"String","aws_secret_access_key":"String","region":"String","bucket_name":"String"}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/lineage_check',
'headers': {
'x-api-key': 'string',
'Org-Id': 'string'
},
body: '{"repo_type":"String","repo_url":"String","branch_name":"String","depth":"Number","aws_access_key_id":"String","aws_secret_access_key":"String","region":"String","bucket_name":"String"}'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("x-api-key", "string");
myHeaders.append("Org-Id", "string");
var raw = "{\"repo_type\":\"String\",\"repo_url\":\"String\",\"branch_name\":\"String\",\"depth\":\"Number\",\"aws_access_key_id\":\"String\",\"aws_secret_access_key\":\"String\",\"region\":\"String\",\"bucket_name\":\"String\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/lineage_check", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/lineage_check")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "string"
request["Org-Id"] = "string"
request.body = "{\"repo_type\":\"String\",\"repo_url\":\"String\",\"branch_name\":\"String\",\"depth\":\"Number\",\"aws_access_key_id\":\"String\",\"aws_secret_access_key\":\"String\",\"region\":\"String\",\"bucket_name\":\"String\"}"
response = https.request(request)
puts response.read_body
200
// 200 OK: retuns dictionar which will contains the details of lineage details if found else empty.
{
"BranchName": "xxxxx",
"CommitID": "xxxxx",
"CreatedTimestamp": "xxxxx",
"Depth": "xxxxx",
"HashedJobID": "xxxxx",
"ModelID": "xxxxx",
"OrgID": "xxxxx",
"RepoType": "huggingface",
"RepoURL": "https://huggingface.co/achilles1313/test_gguf",
"SupplyChain_VulDetected": 1
} 401
// 401 Unauthorized: Returns an error message if the provided API key or Org-ID is invalid or expired.400
// 400 Bad request Error: Returns an error message if the application cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, etc.)412
// 412 precondition failed: Returns an error message if access to the target resource has been denied. (For example- if any of the parameter value is incorrect or license has expired)