Skip to content

Commit 1efbd78

Browse files
authored
feat: Added New ZPA Endpoints, Cloud Connector OneAPI Support and Fixes (#287)
* fix: Fixed ZCC, ZPA, ZIA models and added other checks * fix: Fixed Legacy Client Logger and response parsing * feat: Added New ZPA Endpoints, Cloud Connector OneAPI Support and Fixes * fix: Fixed ZIA url_categories add_category function * fix: Fixed ZCC zcc_param_mapper * fix: Consolidated Application Segment Models * fix: Fixed App Protection models and functions * fix: Fixed Application Segment model udp_port_range issue * fix: Fixed segment group model reference
1 parent 7ae8da9 commit 1efbd78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+5357
-1955
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# Zscaler Python SDK Changelog
22

3+
## 1.4.0 (May, 26 2025)
4+
5+
### Notes
6+
7+
- Python Versions: **v3.8, v3.9, v3.10, v3.11**
8+
9+
#### Zscaler OneAPI Support for Cloud & Branch Connector API
10+
[PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287): Cloud & Branch Connector API are now supported via [OneAPI](https://help.zscaler.com/oneapi/understanding-oneapi) with Oauth2 authentication support through [Zidentity](https://help.zscaler.com/zidentity/what-zidentity)
11+
12+
### ZPA Application Segment Provision
13+
[PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added the following new ZPA API Endpoints:
14+
- Added `POST /provision` Provision a new application for a given customer by creating all related objects if necessary
15+
16+
### ZPA Application Segment Weighted Load Balancer
17+
[PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added the following new ZPA API Endpoints:
18+
- Added `GET /weightedLbConfig` Get Weighted Load Balancer Config for AppSegment
19+
- Added `PUT /weightedLbConfig` Update Weighted Load Balancer Config for AppSegment
20+
21+
### ZPA Browser Access Application Segment
22+
[PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added dedicated resource `app_segments_ba` for ZPA Browser Access Application Segment provisioning.
23+
[PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added dedicated resource `app_segments_ba_v2` for ZPA Browser Access Application Segment provisioning using newly recommended format via block `common_apps_dto.apps_config`
24+
25+
### ZPA Policy-Set-Controller Condition - New Object Type
26+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added the following new `object_types` to function `_create_conditions_v2` in the `policies` package: `CHROME_ENTERPRISE` and `CHROME_POSTURE_PROFILE`
27+
28+
### Zscaler Client Connector (Legacy) New Rate Limiting Headers
29+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Enhanced `LegacyZCCClientHelper` rate limiting logic with new headers for more accurate retry-calculations.
30+
- `X-Rate-Limit-Retry-After-Seconds` - This header is only returned when rate limit for `/downloadDevices` and `downloadServiceStatus` is reached.
31+
- The endpoint handler `/downloadDevices` and `downloadServiceStatus` has a rate limit of 3 calls per day.
32+
- `X-Rate-Limit-Remaining` - This header is returned for all other endpoints. ZCC endpoints called from a specific IP address are subjected to a rate limit of 100 calls per hour. See [Zscaler Client Connector API](https://help.zscaler.com/oneapi/understanding-rate-limiting)
33+
34+
### Bug Fixes:
35+
36+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Fixed ZCC functions `remove_devices` and `force_remove_devices` to use custom decorator `zcc_param_mapper` for `os_type` attribute
37+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Removed incorrect validation from ZIA `url_categories` function `add_url_category` - [Issue #284](https://github.com/zscaler/zscaler-sdk-python/issues/284)
38+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Fixed ZPA `application_segment_pra` model attribute `common_apps_dto`.
39+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Fixed ZPA resources `add_privileged_credential_rule_v2`, and `update_privileged_credential_rule_v2`
40+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Fixed ZPA Application segment v2 Port formatting issue: [Issue #288](https://github.com/zscaler/zscaler-sdk-python/issues/288)
41+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added new ZPA attribute models to support `extranet` features across `server_groups` and `application_segments`
42+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added pre-check on all ZPA `application_segment` resources to prevent port overlap configuration.
43+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Added additional `CLIENT_TYPE` validation within the ZPA policy functions `add_redirection_rule_v2` and `update_redirection_rule_v2`
44+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Enhanced `_create_conditions_v2` function used on ZPA Policy v2 condition block.
45+
46+
### Internal Enhancements
47+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Enhanced `check_response_for_error` function to parse and display API error messages more clearly.
48+
* [PR #287](https://github.com/zscaler/zscaler-sdk-python/pull/287) - Consolidated all application segment resource models into a single model shared across all Application Segment package resources.
49+
350
## 1.3.0 (May, 12 2025)
451

552
### Notes

docsrc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
html_title = ""
2929

3030
# The short X.Y version
31-
version = "1.2.4"
31+
version = "1.4.0"
3232
# The full version, including alpha/beta/rc tags
33-
release = "1.2.4"
33+
release = "1.4.0"
3434

3535
# -- General configuration ---------------------------------------------------
3636

docsrc/dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ arrow==1.3.0 ; python_version >= "3.9.2" and python_version < "4.0"
1717
certifi==2025.4.26 ; python_version >= "3.9.2" and python_version < "4.0"
1818
cffi==1.17.1 ; python_version >= "3.9.2" and python_version < "4.0" and platform_python_implementation != "PyPy"
1919
charset-normalizer==3.4.2 ; python_version >= "3.9.2" and python_version < "4.0"
20-
cryptography==43.0.3 ; python_version >= "3.9.2" and python_version < "4.0"
20+
cryptography==45.0.2 ; python_version >= "3.9.2" and python_version < "4.0"
2121
idna==3.10 ; python_version >= "3.9.2" and python_version < "4.0"
2222
pycparser==2.22 ; python_version >= "3.9.2" and python_version < "4.0" and platform_python_implementation != "PyPy"
2323
pydash==8.0.5 ; python_version >= "3.9.2" and python_version < "4.0"

docsrc/zs/guides/release_notes.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,64 @@ Release Notes
66
Zscaler Python SDK Changelog
77
----------------------------
88

9+
1.4.0 (May, 22 2025)
10+
-------------------------
11+
12+
Notes
13+
-----
14+
15+
- Python Versions: **v3.8, v3.9, v3.10, v3.11**
16+
17+
Zscaler OneAPI Support for Cloud & Branch Connector API
18+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19+
20+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_): Cloud & Branch Connector API are now supported via (`OneAPI<https://help.zscaler.com/oneapi/understanding-oneapi>`_) with Oauth2 authentication support through (`Zidentity<https://help.zscaler.com/zidentity/what-zidentity>`_)
21+
22+
ZPA Application Segment Provision
23+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Added the following new ZPA API Endpoints:
26+
- Added `POST /provision` Provision a new application for a given customer by creating all related objects if necessary
27+
28+
ZPA Application Segment Weighted Load Balancer
29+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
31+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Added the following new ZPA API Endpoints:
32+
- Added `GET /weightedLbConfig` Get Weighted Load Balancer Config for AppSegment
33+
- Added `PUT /weightedLbConfig` Update Weighted Load Balancer Config for AppSegment
34+
35+
ZPA Policy-Set-Controller Condition - New Object Type
36+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37+
38+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Added the following new `object_types` to function `_create_conditions_v2` in the `policies` package: `CHROME_ENTERPRISE` and `CHROME_POSTURE_PROFILE`
39+
40+
Zscaler Client Connector (Legacy) New Rate Limiting Headers
41+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Enhanced `LegacyZCCClientHelper` rate limiting logic with new headers for more accurate retry-calculations.
44+
- `X-Rate-Limit-Retry-After-Seconds` - This header is only returned when rate limit for `/downloadDevices` and `downloadServiceStatus` is reached.
45+
- The endpoint handler `/downloadDevices` and `downloadServiceStatus` has a rate limit of 3 calls per day.
46+
- `X-Rate-Limit-Remaining` - This header is returned for all other endpoints. ZCC endpoints called from a specific IP address are subjected to a rate limit of 100 calls per hour. See (`Zscaler Client Connector API <https://help.zscaler.com/oneapi/understanding-rate-limiting>`_)
47+
48+
Bug Fixes:
49+
---------------
50+
51+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Fixed ZCC functions `remove_devices` and `force_remove_devices` to use custom decorator `zcc_param_mapper` for `os_type` attribute
52+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Removed incorrect validation from ZIA `url_categories` function `add_url_category` - [Issue #284](https://github.com/zscaler/zscaler-sdk-python/issues/284)
53+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Fixed ZPA `application_segment_pra` model attribute `common_apps_dto`.
54+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Fixed ZPA resources `add_privileged_credential_rule_v2`, and `update_privileged_credential_rule_v2`
55+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Fixed ZPA Application segment v2 Port formatting issue: [Issue #288](https://github.com/zscaler/zscaler-sdk-python/issues/288)
56+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Added new ZPA attribute models to support `extranet` features across `server_groups` and `application_segments`
57+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Added pre-check on all ZPA `application_segment` resources to prevent port overlap configuration.
58+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Added additional `CLIENT_TYPE` validation within the ZPA policy functions `add_redirection_rule_v2` and `update_redirection_rule_v2`
59+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Enhanced `_create_conditions_v2` function used on ZPA Policy v2 condition block.
60+
61+
Internal Enhancements
62+
-----------------------
63+
64+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Enhanced `check_response_for_error` function to parse and display API error messages more clearly.
65+
* (`#287 <https://github.com/zscaler/zscaler-sdk-python/pull/287>`_) - Consolidated all application segment resource models into a single model shared across all Application Segment package resources.
66+
967
1.3.0 (May, 12 2025)
1068
-------------------------
1169

docsrc/zs/zpa/app_segments_ba.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
app_segments_ba
2+
-----------------------
3+
4+
The following methods allow for interaction with the ZPA
5+
Browser Access Application Segment API endpoints.
6+
7+
Methods are accessible via ``zpa.app_segments_ba``
8+
9+
.. _zpa-app_segments_ba:
10+
11+
.. automodule:: zscaler.zpa.app_segments_ba
12+
:members:
13+
:undoc-members:
14+
:show-inheritance:

docsrc/zs/zpa/app_segments_ba_v2.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
app_segments_ba_v2
2+
-----------------------
3+
4+
The following methods allow for interaction with the ZPA
5+
Browser Access Application Segment v2 API endpoints.
6+
7+
Methods are accessible via ``zpa.app_segments_ba_v2``
8+
9+
.. _zpa-app_segments_ba_v2:
10+
11+
.. automodule:: zscaler.zpa.app_segments_ba_v2
12+
:members:
13+
:undoc-members:
14+
:show-inheritance:

0 commit comments

Comments
 (0)