Skip to content

Commit f5976f6

Browse files
0.64.1 (#38)
* fix(pagination): ensure get_all stops fetching when next page returns None * feat(countSiteCalls): add mac and ap_mac filters, update rating type to string * fix(deprecation): update current_version to 0.64.1 for deprecated functions * feat(rrm): add optional AP MAC address parameter to getSiteChannelScores * feat(mapstacks): implement CRUD operations for site map stacks * refactor(insights): remove unused countSiteClientFingerprints and searchSiteClientFingerprints functions * feat(flow_capture): add functions to manage site flow capture status * feat(api): add flow_capture to module exports * feat(vars): add countOrgVars function with detailed API documentation * feat(scep): add searchOrgScepEvents function with detailed API documentation * feat(securityzones): implement CRUD operations for organization security zones with API documentation * feat(inventory): enhance searchOrgInventory with additional filtering options * feat(insights): add countOrgClientFingerprints and searchOrgClientFingerprints functions with detailed API documentation * feat(orgs): add securityzones to imports and __all__ for module exposure * chore: bump version to 0.64.1 and update related files * chore: update CHANGELOG for version 0.64.1 with new features, improvements, breaking changes, and bug fixes --------- Co-authored-by: Thomas Munzer <tmunzer@juniper.net>
1 parent 66a57a6 commit f5976f6

20 files changed

Lines changed: 781 additions & 168 deletions

‎CHANGELOG.md‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# CHANGELOG
22

3+
## Version 0.64.1 (October 2026)
4+
5+
This patch release expands organization and site API coverage, updates generated API bindings, and fixes pagination when a next-page request returns no response.
6+
7+
---
8+
9+
### 1. NEW FEATURES
10+
11+
#### **Organization APIs**
12+
- Added organization security zone list, get, create, update, and delete operations.
13+
- Added organization SCEP event search and organization variable counting.
14+
- Added organization client fingerprint count and search operations.
15+
16+
#### **Site APIs**
17+
- Added helpers to start and stop site flow capture.
18+
- Added site map stack list, get, create, update, and delete operations.
19+
20+
---
21+
22+
### 2. IMPROVEMENTS
23+
24+
- Expanded organization inventory search filters.
25+
- Added MAC and AP MAC filters to site call analytics and updated the call rating type.
26+
- Added an optional AP MAC filter to site channel score queries.
27+
- Updated generated organization and site API bindings.
28+
29+
---
30+
31+
### 3. BREAKING CHANGES
32+
33+
#### **Client Fingerprint API Scope**
34+
Client fingerprint count and search helpers are now exposed at the organization level as `countOrgClientFingerprints()` and `searchOrgClientFingerprints()`. The former site-level helpers have been removed.
35+
36+
---
37+
38+
### 4. BUG FIXES
39+
40+
#### **Pagination Termination**
41+
`get_all()` now stops when fetching a next page returns `None`, preventing repeated requests against the same next-page link.
42+
43+
---
44+
345
## Version 0.64.0 (September 2026)
446

547
**Released**: September 15, 2026

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "mistapi"
7-
version = "0.64.0"
7+
version = "0.64.1"
88
authors = [{ name = "Thomas Munzer", email = "tmunzer@juniper.net" }]
99
description = "Python package to simplify the Mist System APIs usage"
1010
keywords = ["Mist", "Juniper", "API"]

‎src/mistapi/__pagination.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ def get_all(mist_session: _APISession, response: _APIResponse) -> list:
6060
if tmp:
6161
response = tmp
6262
data += response.data
63+
else:
64+
break
6365
elif isinstance(response.data, dict) and "results" in response.data:
6466
data = response.data["results"].copy()
6567
while response.next:
6668
tmp = get_next(mist_session, response)
6769
if tmp:
6870
response = tmp
6971
data += response.data["results"]
72+
else:
73+
break
7074
return data

‎src/mistapi/__version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.64.0"
1+
__version__ = "0.64.1"
22
__author__ = "Thomas Munzer <tmunzer@juniper.net>"

‎src/mistapi/api/v1/orgs/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
sdktemplates,
6969
secintelprofiles,
7070
secpolicies,
71+
securityzones,
7172
servicepolicies,
7273
services,
7374
setting,
@@ -155,6 +156,7 @@
155156
"sdktemplates",
156157
"secintelprofiles",
157158
"secpolicies",
159+
"securityzones",
158160
"servicepolicies",
159161
"services",
160162
"setting",

‎src/mistapi/api/v1/orgs/insights.py‎

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,163 @@
1414
from mistapi.__api_response import APIResponse as _APIResponse
1515

1616

17+
def countOrgClientFingerprints(
18+
mist_session: _APISession,
19+
org_id: str,
20+
distinct: str | None = None,
21+
start: str | None = None,
22+
end: str | None = None,
23+
duration: str | None = None,
24+
limit: int | None = None,
25+
) -> _APIResponse:
26+
"""
27+
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/nac-fingerprints/count-org-client-fingerprints
28+
29+
PARAMS
30+
-----------
31+
mistapi.APISession : mist_session
32+
mistapi session including authentication and Mist host information
33+
34+
PATH PARAMS
35+
-----------
36+
org_id : str
37+
38+
QUERY PARAMS
39+
------------
40+
distinct : str{'family', 'model', 'os', 'os_type'}, default: family
41+
Field used to group this count response. enum: `family`, `model`, `os`, `os_type`
42+
start : str
43+
Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d` or `-1w`
44+
end : str
45+
Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d`, `-2h`, or `now`
46+
duration : str, default: 1d
47+
Time range duration for the query, using relative units such as `10m`, `7d`, or `2w`
48+
limit : int, default: 100
49+
Maximum number of results to return per page
50+
51+
RETURN
52+
-----------
53+
mistapi.APIResponse
54+
response from the API call
55+
"""
56+
57+
uri = f"/api/v1/orgs/{org_id}/insights/fingerprints/count"
58+
query_params: dict[str, str] = {}
59+
if distinct:
60+
query_params["distinct"] = str(distinct)
61+
if start:
62+
query_params["start"] = str(start)
63+
if end:
64+
query_params["end"] = str(end)
65+
if duration:
66+
query_params["duration"] = str(duration)
67+
if limit:
68+
query_params["limit"] = str(limit)
69+
resp = mist_session.mist_get(uri=uri, query=query_params)
70+
return resp
71+
72+
73+
def searchOrgClientFingerprints(
74+
mist_session: _APISession,
75+
org_id: str,
76+
family: str | None = None,
77+
client_type: str | None = None,
78+
model: str | None = None,
79+
mfg: str | None = None,
80+
os: str | None = None,
81+
os_type: str | None = None,
82+
mac: str | None = None,
83+
limit: int | None = None,
84+
start: str | None = None,
85+
end: str | None = None,
86+
duration: str | None = None,
87+
interval: str | None = None,
88+
sort: str | None = None,
89+
search_after: str | None = None,
90+
) -> _APIResponse:
91+
"""
92+
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/nac-fingerprints/search-org-client-fingerprints
93+
94+
PARAMS
95+
-----------
96+
mistapi.APISession : mist_session
97+
mistapi session including authentication and Mist host information
98+
99+
PATH PARAMS
100+
-----------
101+
org_id : str
102+
103+
QUERY PARAMS
104+
------------
105+
family : str
106+
Device Category of the client device
107+
client_type : str{'wireless', 'wired', 'vty'}
108+
Filter results by client type. enum: `wireless`, `wired`, `vty`
109+
model : str
110+
Filter results by device model
111+
mfg : str
112+
Manufacturer name of the client device
113+
os : str
114+
Operating System name and version of the client device
115+
os_type : str
116+
Operating system name of the client device
117+
mac : str
118+
Filter results by MAC address
119+
limit : int, default: 100
120+
Maximum number of results to return per page
121+
start : str
122+
Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d` or `-1w`
123+
end : str
124+
Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d`, `-2h`, or `now`
125+
duration : str, default: 1d
126+
Time range duration for the query, using relative units such as `10m`, `7d`, or `2w`
127+
interval : str
128+
Aggregation works by giving a time range plus interval (e.g. 1d, 1h, 10m) where aggregation function would be applied to.
129+
sort : str, default: wxid
130+
On which field the list should be sorted, -prefix represents DESC order.
131+
search_after : str
132+
Pagination cursor for retrieving subsequent pages of results. This value is automatically populated by Mist in the `next` URL from the previous response and should not be manually constructed.
133+
134+
RETURN
135+
-----------
136+
mistapi.APIResponse
137+
response from the API call
138+
"""
139+
140+
uri = f"/api/v1/orgs/{org_id}/insights/fingerprints/search"
141+
query_params: dict[str, str] = {}
142+
if family:
143+
query_params["family"] = str(family)
144+
if client_type:
145+
query_params["client_type"] = str(client_type)
146+
if model:
147+
query_params["model"] = str(model)
148+
if mfg:
149+
query_params["mfg"] = str(mfg)
150+
if os:
151+
query_params["os"] = str(os)
152+
if os_type:
153+
query_params["os_type"] = str(os_type)
154+
if mac:
155+
query_params["mac"] = str(mac)
156+
if limit:
157+
query_params["limit"] = str(limit)
158+
if start:
159+
query_params["start"] = str(start)
160+
if end:
161+
query_params["end"] = str(end)
162+
if duration:
163+
query_params["duration"] = str(duration)
164+
if interval:
165+
query_params["interval"] = str(interval)
166+
if sort:
167+
query_params["sort"] = str(sort)
168+
if search_after:
169+
query_params["search_after"] = str(search_after)
170+
resp = mist_session.mist_get(uri=uri, query=query_params)
171+
return resp
172+
173+
17174
def getOrgMarvisClientInsights(
18175
mist_session: _APISession,
19176
org_id: str,

‎src/mistapi/api/v1/orgs/inventory.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ def searchOrgInventory(
355355
org_id: str,
356356
type: str | None = None,
357357
mac: str | None = None,
358+
vc_mac: str | None = None,
359+
master_mac: str | None = None,
358360
model: str | None = None,
359361
name: str | None = None,
360362
site_id: str | None = None,
@@ -365,6 +367,8 @@ def searchOrgInventory(
365367
version: str | None = None,
366368
status: str | None = None,
367369
text: str | None = None,
370+
modified_after: int | None = None,
371+
disconnected_before: int | None = None,
368372
limit: int | None = None,
369373
sort: str | None = None,
370374
search_after: str | None = None,
@@ -387,6 +391,10 @@ def searchOrgInventory(
387391
Filter results by type. enum: `ap`, `gateway`, `switch`
388392
mac : str
389393
Filter by MAC address. Partial matches may use `*` wildcards (e.g. `*5b35*` matches `5c5b350e0001` and `5c5b35000301`). Accepts multiple comma-separated values.
394+
vc_mac : str
395+
Virtual Chassis MAC address. Accepts multiple comma-separated values.
396+
master_mac : str
397+
MAC address of the Virtual Chassis master device. Accepts multiple comma-separated values.
390398
model : str
391399
Partial / full Device model. Use `prefix*` for prefix search or `*substring*` for contains search (e.g. `AP4*` and `*P4*` match `AP43`). Suffix-only wildcards (e.g. `*43`) are not supported. Accepts multiple comma-separated values.
392400
name : str
@@ -407,6 +415,10 @@ def searchOrgInventory(
407415
Device status. enum: `connected`, `disconnected`. Accepts multiple comma-separated values.
408416
text : str
409417
Wildcards for name, mac, serial
418+
modified_after : int
419+
Filter on inventory last modified time, in epoch
420+
disconnected_before : int
421+
Filter results to devices that were last disconnected before this time, in epoch seconds
410422
limit : int, default: 100
411423
Maximum number of results to return per page
412424
sort : str, default: timestamp
@@ -426,6 +438,10 @@ def searchOrgInventory(
426438
query_params["type"] = str(type)
427439
if mac:
428440
query_params["mac"] = str(mac)
441+
if vc_mac:
442+
query_params["vc_mac"] = str(vc_mac)
443+
if master_mac:
444+
query_params["master_mac"] = str(master_mac)
429445
if model:
430446
query_params["model"] = str(model)
431447
if name:
@@ -446,6 +462,10 @@ def searchOrgInventory(
446462
query_params["status"] = str(status)
447463
if text:
448464
query_params["text"] = str(text)
465+
if modified_after:
466+
query_params["modified_after"] = str(modified_after)
467+
if disconnected_before:
468+
query_params["disconnected_before"] = str(disconnected_before)
449469
if limit:
450470
query_params["limit"] = str(limit)
451471
if sort:

0 commit comments

Comments
 (0)