Get suppressions justifications by policy id and query accounts
Prisma Cloud Code Security supports advanced Suppression rule settings in order to make policy management easier by dismissing or snoozing errors (using time-bounded suppression rules) that are irrelevant in your cloud and code environments. Suppression can be applied at various levels: for all cases (Disable Policy), for a specific Source, for a Specific Resource or by tag.
To use the API request, add your token to the header. Use this API function to fetch details of Prisma Cloud Code Security Suppressions that have been set for the given policyId and accounts (array of strings) mentioned in the path. The output will be -
- success - 200, array of objects { id, policyId, creationDate, comment, suppressionType (Resources, Policy, Tags, Accounts), resources (array of strings, for suppressionType Resources), accountIds (array of string, for suppressionType Accounts), tags (array of objects { id, accountId } for suppressionType Tags)
- error - 400 failed to get suppression
Path Parameters
- policyId string required
Query Parameters
- accounts string[] required
- 200
- 422
- 500
Suppression ID
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
- Array [
- anyOf
- ResourcesSuppressionJustificationData
- AccountsSuppressionData
- PolicySuppressionData
- TagsSuppressionData
comment string requiredcreationDate stringid string requiredpolicyId string requiredresources string[] requiredsuppressionType string requiredPossible values: [
Resources
]accountIds string[] requiredcomment string requiredcreationDate stringid string requiredpolicyId string requiredsuppressionType string requiredPossible values: [
Accounts
]comment string requiredcreationDate stringid string requiredpolicyId string requiredsuppressionType string requiredPossible values: [
Policy
]comment string requiredcreationDate stringid string requiredpolicyId string requiredsuppressionType string requiredPossible values: [
Tags
]tags object[] required
Array [key string requiredvalue string required] - type string required
- ]
[
{
"type": "string",
"comment": "string",
"creationDate": "string",
"id": "string",
"policyId": "string",
"resources": [
"string"
],
"suppressionType": "Resources"
}
]
[
{
"active": true,
"comment": "No justification comment provided.",
"customer": "acme",
"date": 1611276779986,
"id": "7caab873-7400-47f9-8b3f-82b33d0463ed",
"suppressionType": "Policy",
"type": "suppression",
"violationId": "BC_AWS_GENERAL_31"
},
{
"active": true,
"comment": "Known issue - will be fixed soon",
"customer": "acme",
"date": 1611276779986,
"id": "5ed2f9c2-044f-4484-99d1-262b563872ec",
"resources": [
"/terraform/aws/lambda.tf:d70eab08607a4d05faa2d0d6647206599e9abc65"
],
"suppressionType": "Resources",
"type": "suppression",
"violationId": "BC_AWS_GENERAL_26"
},
{
"accountIds": [
"/terraform/aws/lambda.tf:d70eab08607a4d05faa2d0d6647206599e9abc65"
],
"active": true,
"comment": "Known issue - will be fixed soon",
"customer": "acme",
"date": 1611276779986,
"id": "5ed2f9c2-044f-4484-99d1-262b563872ec",
"suppressionType": "Accounts",
"type": "suppression",
"violationId": "BC_AWS_GENERAL_14"
}
]
Request arguments validation error
Failed to get suppression