post
https://sandbox.saner.secpod.com/AncorWebService/perform
Assign a compliance benchmark to one account, or to all accounts in the organization.
To copy the settings of a benchmark that an account already has, use Provision Benchmark instead.
This method is used to assign compliance benchmarks to one or more accounts.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| account_name | Name of the source account from which the benchmark is applied. | Yes | string |
| benchmarkname | Name of the benchmark that needs to be assigned. | Yes | string |
| target_account_name | Name of the target account where the benchmark will be applied. "ALL" can be used to apply to all accounts. | Yes | string |
| target_group | Name of the target device group where the benchmark should be applied. | Yes | string |
Python SDK code
Install:
pip install secpod-saner-sdkCall this endpoint:
from saner.cvem import CvemClient
client = CvemClient(
api_key="<YOUR_API_KEY>",
accountid="<YOUR_ACCOUNT_ID>",
base_url="https://saner.secpod.com"
)
response=client.Compliance.addBenchmark(
account_name="Default",
benchmarkname="Amazon linux 2 general compliance",
target_group="windows 7",
target_account_name="ALL"
)
print(response)
client.close()Requires Python 3.9 or later.