Get Custom Compliance Checks
GET/api/v33.01/custom-compliance
x-prisma-cloud-target-env: {"permission":"policyComplianceCustomRules"}
Returns a list of all custom compliance checks.
This endpoint maps to Defend > Compliance > Custom in the Console UI.
cURL Request
Refer to the following example curl command that gets the list of custom compliance checks:
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X GET \
https://<CONSOLE>/api/v<VERSION>/custom-compliance
Response
[
{
"modified": "2019-03-07T17:01:12.355Z",
"owner": "pierre",
"name": "apitest",
"previousName": "",
"_id": 9000,
"title": "apitest",
"script": "if [ $(stat -c %a /bin/busybox) -eq 755 ]; then\n echo 'test permission failure' && exit 1;\nfi",
"severity": "high"
}
]
Responses
- 200
- default
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
_id integer
ID is the compliance check ID.
disabled boolean
Indicates whether the rule is currently disabled. Values: true (disabled) or false (enabled).
modified date-time
Specifies the date and time when the rule was last modified.
name string
Name of the rule.
notes string
Describes any noteworthy points for a rule. You can include any text.
owner string
User who created or last modified the rule.
previousName string
Previous name of the rule. Required for rule renaming.
script string
Script is the custom check script.
severity string
Severity is the custom check defined severity.
title string
Title is the custom check title.
[
{
"_id": 0,
"disabled": true,
"modified": "2024-07-29T15:51:28.071Z",
"name": "string",
"notes": "string",
"owner": "string",
"previousName": "string",
"script": "string",
"severity": "string",
"title": "string"
}
]
Loading...