Get Policy Violations tasks
/iam/governance/selfservice/api/v1/policyviolations/{pvid}/causes
Returns the causes associated with the specified policy violation ID. The attributes that are to be returned can be specified as part of the query parameter named "fields". For example: The URI to get the rule name, rule description, rule condition and status attributes for a particular policy violation is /policyviolations/{pvid}/causes?fields=ruleName,ruleDescription,ruleCondition,status. The attributes are to be spcified in a Comma-separated list. The causes can be filtered based on status, rule name, rule description etc. For example to get all causes for a policy violation which are related to rule named "Invalid Email" the URI is /policyviolations/{pvid}/causes?q=ruleName eq Invalid::Email. Note the status returned as part of the payload have strings like "ACTIVE,RESOLVED, MANUALLY FIXED etc", however if there is a filter to be addedd for filter then the string to be used is "policyviolationcause.status.active, policyviolationcause.status.resolved, policyviolationcause.status.manuallyfixed etc" for ACTIVE
Request
- application/json
-
pvid: string
Policy violation ID
-
fields(optional): string
Attributes to be returned in the result. Comma-separated attributes are accepted. Sample value for attributes is "action, comment, entityType, severity, status"
-
policyDescription(optional): string
The policy violation tasks will be filtered based on the policy description. All the tasks which map to the policy with the given description will be returned.
-
policyName(optional): string
The policy violation tasks will be filtered based on the policy name. All the tasks which map to the policy with the given policy name will be returned.
Response
- application/json
200 Response
-
ResponseTime: string
Captures the time in milliseconds taken for processing the request.
object
-
count(optional):
integer
-
hasMore(optional):
boolean
-
links(optional):
array links
-
policyViolationCauseList(optional):
array policyViolationCauseList
-
totalResult(optional):
integer
object
-
href(optional):
string
-
rel(optional):
string
401 Response
404 Response
500 Response
Default Response
Examples
This example retrieves the causes for a given policy violations. The information shown here is against a pseudo system and serves as a prototype.
cURL Example
curl -H "Content-Type: application/json" -X GET -u username:password https://pseudo.com/iam/governance/selfservice/api/v1/policyviolations/5D4D3C107D7745A8BC21F6DB9888959D/causes
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "links": [ { "rel": "self", "href": "http://pseudo.com/iam/governance/selfservice/api/v1/policyviolations/5D4D3C107D7745A8BC21F6DB9888959D/causes" } ], "totalResult": 1, "policyViolationCauseList": [ { "links": [ { "rel": "self", "href": "http://pseudo.com/iam/governance/selfservice/api/v1/policyviolations/5D4D3C107D7745A8BC21F6DB9888959D/causes/287874BB86344E3DA243FC84029D76AF" } ], "policyViolationCauseId": "287874BB86344E3DA243FC84029D76AF", "policyViolationId": "5D4D3C107D7745A8BC21F6DB9888959D", "status": "ACTIVE" } ] }