With this API, you can create a new mandate report.
Maximum 3 mandate IDs and 10 policies can be selected for generating the compliance framework report.
|
Parameter |
Required/Optional |
Data Type |
Description |
|---|---|---|---|
| mandateIds | Required | Integer | Enter the list of mandate IDs. |
| policyIds | Required | Integer | Enter the policyID. |
| selectionType | Required | String | Select the type of asset source (from sources API). |
| assetGroupIds | Optional | Integer | Enter the asset group ID. Required if assetSource is "Asset Groups". |
| tagsetInputParam | Optional | Integer | Enter the tag set. Required if assetSource is "Asset Tags". |
| title | Required | String | Enter a title for the report. |
| reportFormat | Required | String | Type of output format (JSON or HTML. By default, report type is JSON). |
API Request
curl -X 'POST' \
'<gateway_base_url>/pcrs/1.0/mandate/report' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H "Authorization: <bearer_token>" \
-d '{
"title": "report 1 via api",
"reportFormat": "HTML",
"selectionType": "All Assets In Policy",
"filters": {
"mandateIds": [
10482,4966,2741
],
"policyIds": [
1919419,2296420,1965419,1943420,1949423
]
},
"schedule": {
"scheduleType": "ONDEMAND"
}
}'
JSON Response
{
"reportId": 4036133,
"message": "Report generation is in progress"
}
API Request
curl -X 'POST' \
'<gateway_base_url>/pcrs/1.0/mandate/report' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H "Authorization: <bearer_token>" \
-d '{
"title": "report 1 via api",
"reportFormat": "HTML",
"selectionType": "Asset Groups",
"filters": {
"mandateIds": [
10482,4966,2741
],
"policyIds": [
1919419,2296420,1965419,1943420,1949423
],
"assetGroupIds" : [1111, 2222]
},
"schedule": {
"scheduleType": "ONDEMAND"
}
}'
JSON Response
{
"reportId": 4035396,
"message": "Report generation is in progress"
}
API Request
curl -X 'POST' \
'<gateway_base_url>/pcrs/1.0/mandate/report' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H "Authorization: <bearer_token>" \
-d '{
"title": "report 1 via api",
"reportFormat": "HTML",
"selectionType": "Asset Tags",
"filters": {
"mandateIds": [
10482,4966,2741
],
"policyIds": [
1919419,2296420,1965419,1943420,1949423
],
"tagsetInputParam":{"includeTagResolution":"Any","excludeTagResolution":"Any","includeTagIds":[143936447,143968096,143968094,143968092],"excludeTagIds":[]}},
"schedule": {
"scheduleType": "ONDEMAND"
}
}'
JSON Response
{
"reportId": 4038574,
"message": "Report generation is in progress"
}