> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/for-developers/rest-api/core/acl/list-acl-rules.md).

# List ACL rules

```json
{"openapi":"3.1.0","info":{"title":"defguard Core API","version":"2.0.3"},"tags":[{"name":"ACL","description":"Access Control Lists (ACL)."}],"security":[{"cookie":[]},{"api_token":[]}],"components":{"securitySchemes":{"cookie":{"type":"apiKey","in":"cookie","name":"defguard_session"},"api_token":{"type":"http","scheme":"bearer"}},"schemas":{"PaginatedApiResponse_ApiAclRule":{"type":"object","description":"Envelope returned by paginated endpoints.","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"type":"object","description":"An ACL rule. All relations represented as arrays of IDs.","required":["id","state","name","modified_at","modified_by","all_locations","locations","enabled","allow_all_users","deny_all_users","allow_all_groups","deny_all_groups","allow_all_network_devices","deny_all_network_devices","allowed_users","denied_users","allowed_groups","denied_groups","allowed_network_devices","denied_network_devices","use_manual_destination_settings","addresses","ports","protocols","any_address","any_port","any_protocol","aliases","destinations"],"properties":{"addresses":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"all_locations":{"type":"boolean"},"allow_all_groups":{"type":"boolean"},"allow_all_network_devices":{"type":"boolean"},"allow_all_users":{"type":"boolean"},"allowed_groups":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"allowed_network_devices":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"allowed_users":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"any_address":{"type":"boolean"},"any_port":{"type":"boolean"},"any_protocol":{"type":"boolean"},"denied_groups":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"denied_network_devices":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"denied_users":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"deny_all_groups":{"type":"boolean"},"deny_all_network_devices":{"type":"boolean"},"deny_all_users":{"type":"boolean"},"destinations":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"enabled":{"type":"boolean"},"expires":{"type":["string","null"],"format":"date-time"},"id":{"$ref":"#/components/schemas/i64"},"locations":{"type":"array","items":{"$ref":"#/components/schemas/i64"}},"modified_at":{"type":"string","format":"date-time"},"modified_by":{"type":"string"},"name":{"type":"string"},"parent_id":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/i64"}]},"ports":{"type":"string"},"protocols":{"type":"array","items":{"$ref":"#/components/schemas/i32"}},"state":{"$ref":"#/components/schemas/RuleState"},"use_manual_destination_settings":{"type":"boolean"}}},"description":"Items of the requested page."},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}}},"i64":{"type":"integer","format":"int64"},"i32":{"type":"integer","format":"int32"},"RuleState":{"type":"string","description":"ACL rule can be in one of the following states:\n- New: the rule has been created and not yet applied\n- Modified: the rule has been modified and not yet applied\n- Deleted: the rule has been marked for deletion but not yed removed\n- Applied: the rule was applied\n- Expired: the rule is past it's expiration date\n\nApplied state does NOT guarantee that all locations have received the rule\nand performed appropriate operations, only that the next time configuration\nis being sent it will include this rule.","enum":["New","Modified","Deleted","Applied","Expired"]},"PaginationMeta":{"type":"object","description":"Pagination metadata included in the response.","required":["current_page","page_size","total_items","total_pages"],"properties":{"current_page":{"type":"integer","format":"int32","description":"Number of the returned page, starting from 1.","minimum":0},"next_page":{"type":["integer","null"],"format":"int32","description":"Number of the next page, or `null` on the last page.","minimum":0},"page_size":{"type":"integer","format":"int32","description":"Requested page size.","minimum":0},"total_items":{"type":"integer","format":"int32","description":"Total number of items matching the query.","minimum":0},"total_pages":{"type":"integer","format":"int32","description":"Total number of pages for the requested page size.","minimum":0}}},"ApiErrorResponse":{"type":"object","description":"Body returned with error responses.","required":["msg"],"properties":{"code":{"type":["string","null"],"description":"Machine-readable error code, returned for selected errors."},"msg":{"type":"string","description":"Human-readable error message."}}}}},"paths":{"/api/v1/acl/rule":{"get":{"tags":["ACL"],"summary":"List ACL rules","operationId":"list_acl_rules","parameters":[{"name":"page","in":"query","description":"Page number. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"per_page","in":"query","description":"Number of items per page, from 1 to 100. Defaults to 50.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Paginated list of ACL rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedApiResponse_ApiAclRule"}}}},"401":{"description":"Session is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Requires admin privileges and an active enterprise license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unable to list ACL rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```
