> ## 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.

# List Rules

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

<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-rules.htm?tocpath=Suite%7CASMS%20API%20reference%7CAFA%20REST%20web%20services%7CRule%20data%20APIs%7C_____1).
</Note>

## 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>

## Example Output

```json theme={"dark"}
[
	{
		"name": "FDT1",
		"type": "DEVICE",
		"rules": [
			{
				"ruleNum": "6",
				"ruleId": "005056AE_94F6_0ed3_0000_000268434437",
				"deviceID": 52650,
				"source": [
					"net_object-10.30.204.24-30"
				],
				"isNegateSource": false,
				"destination": [
					"net_object-10.50.204.48-28"
				],
				"isNegateDestination": false,
				"service": [
					"ser_object-tcp-84-87"
				],
				"isNegateService": false,
				"action": "Allow",
				"enable": "enabled",
				"log": "1",
				"application": [
					"any"
				],
				"user": [
					"any"
				]
			},
			{
				"ruleNum": "7",
				"ruleId": "005056AE_94F6_0ed3_0000_000268434438",
				"deviceID": 52650,
				"source": [
					"ip-10.30.204.30"
				],
				"isNegateSource": false,
				"destination": [
					"ip-10.50.204.90"
				],
				"isNegateDestination": false,
				"service": [
					"ser_group1"
				],
				"isNegateService": false,
				"action": "Allow",
				"enable": "enabled",
				"log": "1",
				"application": [
					"any"
				],
				"user": [
					"any"
				]
			}
		]
	}
]
```

## Workflow Library Example

[List Rules with Algosec Firewall Analyzer and Send Results Via Email](https://library.blinkops.com/workflows/list-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/list-rules-with-algosec-firewall-analyzer-and-send-results-via-email/canvas" />
</div>
