security#
The following methods allow for interaction with the ZIA Security Policy Settings API endpoints.
Methods are accessible via zia.security
- class SecurityPolicyAPI#
- Bases: - object- add_urls_to_blacklist(url_list)#
- Adds the provided URLs to the blacklist. - Parameters:
- Returns:
- The complete and updated blacklist. 
- Return type:
- BoxList
 - Examples - >>> zia.security.add_urls_to_blacklist(['example.com', 'web.example.com']) 
 - add_urls_to_whitelist(url_list)#
- Adds the provided URLs to the whitelist. - Parameters:
- Returns:
- The complete and updated whitelist. 
- Return type:
- BoxList
 - Examples - >>> zia.security.add_urls_to_whitelist(['example.com', 'web.example.com']) 
 - delete_urls_from_blacklist(url_list)#
- Deletes the provided URLs from the blacklist. - Parameters:
- Returns:
- The status code for the operation. 
- Return type:
 - Examples - >>> zia.security.delete_urls_from_blacklist(['example.com', 'web.example.com']) 
 - delete_urls_from_whitelist(url_list)#
- Deletes the provided URLs from the whitelist. - Parameters:
- Returns:
- The complete and updated whitelist. 
- Return type:
- BoxList
 - Examples - >>> zia.security.delete_urls_from_whitelist(['example.com', 'web.example.com']) 
 - erase_blacklist()#
- Erases all URLs in the blacklist. - Returns:
- The status code for the operation. 
- Return type:
 - Examples - >>> zia.security.erase_blacklist() 
 - erase_whitelist()#
- Erases all URLs in the whitelist. - Returns:
- The status code for the operation. 
- Return type:
 - Examples - >>> zia.security.erase_whitelist() 
 - get_blacklist()#
- Returns a list of blacklisted URLs. - Returns:
- A list of blacklisted URLs 
- Return type:
- BoxList
 - Examples - >>> for url in zia.security.get_blacklist(): ... pprint(url) 
 - get_whitelist()#
- Returns a list of whitelisted URLs. - Returns:
- A list of whitelisted URLs 
- Return type:
- BoxList
 - Examples - >>> for url in zia.security.get_whitelist(): ... pprint(url)