UrlCategory
Url Category resource for Zscaler Internet Access.
This resource supports the following standard methods: create(), load(), update(), delete(). They operate on the instance state — set properties with dot notation, then call the method with no arguments. Any other action listed below is a custom action that takes explicit keyword arguments and returns a value.
Quick Start
import zssdk
import logging
# Enable debug logging for UrlCategory
logging.getLogger('zssdk.zia').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)
session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)
# Get a specific UrlCategory
resource = session.zia.UrlCategory(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
add_url_categories_with_matching_domains()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
body | UrlCategoriesGetCategoriesWithMatchingDomainsRequestBody | Yes | - |
Returns: UrlDomainReview
Example:
resource = session.zia.UrlCategory()
result = resource.add_url_categories_with_matching_domains(body=["value"])
print(result)
create()
Creates a new UrlCategory. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
category_scope | string | No | - |
configured_name | string | No | - |
custom_category | boolean | No | - |
custom_ip_ranges_count | integer | No | - |
custom_urls_count | integer | No | - |
db_categorized_urls | stringCollection | No | - |
description | string | No | - |
editable | boolean | No | - |
id | string | No | - |
ip_ranges | stringCollection | No | - |
ip_ranges_retaining_parent_category | stringCollection | No | - |
ip_ranges_retaining_parent_category_count | integer | No | - |
keywords | stringCollection | No | - |
keywords_retaining_parent_category | stringCollection | No | - |
regex_patterns | stringCollection | No | - |
regex_patterns_retaining_parent_category | stringCollection | No | - |
scopes | AdminScopeWrapperCollection | No | - |
super_category | string | No | - |
template_synced_category | boolean | No | - |
type | string | No | - |
url_keyword_counts | UrlKeywordCounts | No | - |
url_type | string | No | - |
urls | stringCollection | No | - |
urls_retaining_parent_category_count | integer | No | - |
val | integer | No | - |
Returns: UrlCategory
Example:
resource = session.zia.UrlCategory()
resource.category_scope = "value"
resource.configured_name = "example-configured-name"
resource.custom_category = True
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a UrlCategory by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zia.UrlCategory(id="your-resource-id")
resource.delete()
get_url_category_max_custom_count()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
group | string | Yes | - |
Example:
resource = session.zia.UrlCategory()
result = resource.get_url_category_max_custom_count(group="value")
print(result)
get_url_category_quota()
Returns: UrlsQuotaDOM
Example:
resource = session.zia.UrlCategory()
result = resource.get_url_category_quota()
print(result)
lookup_url_categories()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
body | UrlCategoriesUrlLookupRequestBody | Yes | - |
Returns: UrlCategory
Example:
resource = session.zia.UrlCategory()
result = resource.lookup_url_categories(body=["value"])
print(result)
load()
Fetches an existing UrlCategory by id. Only the id identifier is required; load() takes no other arguments.
Returns: UrlCategory
Example:
resource = session.zia.UrlCategory(id="your-resource-id")
resource.load()
print(resource.configured_name)
update()
Updates an existing UrlCategory. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
action | string | No | - |
category_scope | string | No | - |
configured_name | string | No | - |
custom_category | boolean | No | - |
custom_ip_ranges_count | integer | No | - |
custom_urls_count | integer | No | - |
db_categorized_urls | stringCollection | No | - |
description | string | No | - |
editable | boolean | No | - |
id | string | No | - |
ip_ranges | stringCollection | No | - |
ip_ranges_retaining_parent_category | stringCollection | No | - |
ip_ranges_retaining_parent_category_count | integer | No | - |
keywords | stringCollection | No | - |
keywords_retaining_parent_category | stringCollection | No | - |
regex_patterns | stringCollection | No | - |
regex_patterns_retaining_parent_category | stringCollection | No | - |
scopes | AdminScopeWrapperCollection | No | - |
super_category | string | No | - |
template_synced_category | boolean | No | - |
type | string | No | - |
url_keyword_counts | UrlKeywordCounts | No | - |
url_type | string | No | - |
urls | stringCollection | No | - |
urls_retaining_parent_category_count | integer | No | - |
val | integer | No | - |
Returns: UrlCategory
Example:
resource = session.zia.UrlCategory(id="your-resource-id")
resource.load()
resource.configured_name = "Updated value"
resource.update()
update_url_categories_with_matching_domains()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
body | UrlCategoriesUpdateCategoriesWithMatchingDomainsRequestBody | Yes | - |
Example:
resource = session.zia.UrlCategory()
result = resource.update_url_categories_with_matching_domains(body=[{"domain_type": "value", "matches": [{"id": "resource-id", "name": "example-name"}], "url": "https://example.com"}])
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
category_scope | string | No | - |
configured_name | string | No | - |
custom_category | boolean | No | - |
custom_ip_ranges_count | integer | No | - |
custom_urls_count | integer | No | - |
db_categorized_urls | stringCollection | No | - |
description | string | No | - |
editable | boolean | No | - |
id | string | No | - |
ip_ranges | stringCollection | No | - |
ip_ranges_retaining_parent_category | stringCollection | No | - |
ip_ranges_retaining_parent_category_count | integer | No | - |
keywords | stringCollection | No | - |
keywords_retaining_parent_category | stringCollection | No | - |
regex_patterns | stringCollection | No | - |
regex_patterns_retaining_parent_category | stringCollection | No | - |
scopes | AdminScopeWrapperCollection | No | - |
super_category | string | No | - |
template_synced_category | boolean | No | - |
type | string | No | - |
url_keyword_counts | UrlKeywordCounts | No | - |
url_type | string | No | - |
urls | stringCollection | No | - |
urls_retaining_parent_category_count | integer | No | - |
val | integer | No | - |
action | string | No | - |
Related
- UrlCategory - Data structure definition
- Logging guide - enable verbose logs while debugging this resource