curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions', 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://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"profileId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"detectionId": "PLERION-AWS-16",
"provider": "AWS",
"supportsExemptions": true,
"supportedExemptionTypes": [
"NAME_EXEMPTION",
"TAG_EXEMPTION",
"REGION_EXEMPTION"
],
"exemptions": [
{
"type": "NAME_EXEMPTION",
"reason": "ACCEPTED_RISK",
"condition": "starts-with",
"value": "acme-sandbox-",
"tagKey": {
"option": "equals",
"value": "environment"
},
"tagValue": {
"option": "equals",
"value": "test"
},
"regions": [
"<string>"
],
"apiId": "<string>",
"routeKey": "<string>",
"createdBy": "<string>",
"createdAt": "<string>"
}
],
"version": "<string>"
}
}{
"errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"message": "Internal server error"
}Get a detection's exemptions
Read the exemptions configured for one detection on one profile, together with whether that detection accepts exemptions and which types it accepts.
version is an opaque token to send back unchanged as If-Match when replacing the set. It is null when the detection has never been configured on this profile, and a replace request must then omit the header.
Exemptions are reported as stored. A detection whose supportsExemptions is false can still hold entries written while it supported them, and you need to see them to clear them.
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions', 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://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/profiles/{profileId}/detection-settings/{detectionId}/exemptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"profileId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"detectionId": "PLERION-AWS-16",
"provider": "AWS",
"supportsExemptions": true,
"supportedExemptionTypes": [
"NAME_EXEMPTION",
"TAG_EXEMPTION",
"REGION_EXEMPTION"
],
"exemptions": [
{
"type": "NAME_EXEMPTION",
"reason": "ACCEPTED_RISK",
"condition": "starts-with",
"value": "acme-sandbox-",
"tagKey": {
"option": "equals",
"value": "environment"
},
"tagValue": {
"option": "equals",
"value": "test"
},
"regions": [
"<string>"
],
"apiId": "<string>",
"routeKey": "<string>",
"createdBy": "<string>",
"createdAt": "<string>"
}
],
"version": "<string>"
}
}{
"errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"message": "Internal server error"
}Authorizations
Bearer API Key. For example, "Bearer {Tenant API Key}"
Headers
Bearer API Key. For example, "Bearer {Tenant API Key}"
Path Parameters
Profile ID, or the literal string default for the tenant's default profile. default covers only the integrations that have not been given a profile of their own, so on a tenant with more than one profile it does not reach the rest. Use List profiles to get the IDs.
"default"
Detection ID. A finding reports the detection that produced it in its detectionId field.
"PLERION-AWS-16"
Response
The detection's exemptions on the profile
The exemptions configured for one detection on one profile.
Show child attributes
Show child attributes
Was this page helpful?