Gets a list of all policies, or policies associated with a specified site, site group, or domain list.
GET https://api-<DNS.Edge.URL>/v5/api/policies?siteId=siteId Authorization: Bearer token
Parameters
If no parameters are provided, a list of all sites is returned.
Name | Description | Type | Required |
siteId | Specify a site by site ID to search for policies associated with one site. | String | Optional |
siteGroupId | Specify a site group by site group ID to search for policies associated with a site group. | String | Optional |
domainListId | Specify a domain list by domain list ID to search for policies associated with a domain list. | String | Optional |
200 OK Content-Type: application/JSON [ { "id": "id", "timestamp": "unix timestamp ms", "name": "name", "description": "description", "appliedTo": [{ "type": "siteName", "name": "name" }], "domain": [ { "type": "list", "listId": "dns-list-id" }], "action": { "type":"block | monitor | allow" }, "exceptionDomainLists":[{ "type": "list", "listId": "dns-list-id" }], "active": "true | false", "sourceIps": { "type": "INCLUDE | EXCLUDE", "ranges": [ "192.168.0.1", "1.2.3.4" ] }, "timeRanges":[{ "start": "01:00", "end": "20:00", "days": ["Monday", "Tuesday", "Wednesday", "Thursday"], }], "queryTypes": ["15", "A"] "redirectTarget": "valid FQDN domain", "threats": {[ "type": "DGA" }, { "type": "DNS_Tunneling" }], "matchAnswer": "true | false", "matchAuthority": "true | false", "matchResponseIpListIds": [ "IPList1" ], "exceptionResponseIpListIds": [ "IPList2" ] }, .... ]
Possible error codes
- 401 Unauthorized - Missing or invalid token