<GET> Supply chain get policy
1 min
The Supply Chain Get Policy API allows users to fetch the currently configured security policies for a specified repository type. This includes policies related to scan format suppression, file format suppression, vulnerability types, and tool strictness levels.
get_policy
This API fetches the configured policy.
GET
https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/get_policy
Header Parameters
- x-api-keystringrequiredDescription
- Org-IdstringrequiredDescription
python
import requests
url = "https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/get_policy"
payload = {}
headers = {
'x-api-key': 'string',
'Org-Id': 'string'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl
curl --location 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/get_policy' \
--header 'x-api-key: string' \
--header 'Org-Id: string'nodejs
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/get_policy',
'headers': {
'x-api-key': 'string',
'Org-Id': '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 requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.aws.boschaishield.com/prod/api/ais/v1.5/developer/get_policy", 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/get_policy")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = "string"
request["Org-Id"] = "string"
response = https.request(request)
puts response.read_body
200
//200: policy response as json401
// 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)