> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Risky Rules

Retrieves all the risky rules in a device's or group's policy.

**Note**: Entities in different subscriptions can have the same name. When this used for entities that have the same name, the action returns the list of risky rules of the FIRST entity in the tree.

<Note>
  External Documentation

  To learn more, visit the [AlgoSec Firewall Analyzer documentation](https://techdocs.algosec.com/en/asms/a32.60/asms-help/content/api-guide/retrieving-risky-rules.htm?tocpath=Suite%7CASMS%20API%20reference%7CAFA%20REST%20web%20services%7CRule%20data%20APIs%7C_____2).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter   | Description                                                                                  |
  | ----------- | -------------------------------------------------------------------------------------------- |
  | Entity      | The display name of the device, group, or matrix.<br /><br />For example: `Dev-GW-R71Test1`. |
  | Entity Type | The type of the entity.                                                                      |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter     | Description        |
  | ------------- | ------------------ |
  | Response Type | The output format. |
</div>

## Example Output

```json theme={"dark"}
{
	"riskyRules": [
		{
			"device": "Nachos",
			"ruleId": "2B1EA29F-3ED3-4FAC-BA7C-FC27F1A6305F",
			"ruleNum": "1",
			"source": [
				"n10_20_0_0"
			],
			"destination": [
				"Any"
			],
			"service": [
				"Any"
			],
			"action": "accept",
			"documentation": {
				"documentation": ""
			},
			"risks": [
				{
					"code": "R01",
					"severity": "MEDIUM",
					"title": "\"From somewhere to Any allow Any service\" rules"
				}
			],
			"totalBySeverity": {
				"LOW": 0,
				"HIGH": 0,
				"MEDIUM": 1,
				"SUSP_HIGH": 0
			},
			"trafficCount": "0"
		},
		"…"
	],
	"status": true
}
```

## Workflow Library Example

[Get Risky Rules with Algosec Firewall Analyzer and Send Results Via Email](https://library.blinkops.com/workflows/get-risky-rules-with-algosec-firewall-analyzer-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/get-risky-rules-with-algosec-firewall-analyzer-and-send-results-via-email/canvas" />
</div>
