镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
2f4de93
fix(pagination): ensure get_all stops fetching when next page returns…
tmunzer-AIDE Oct 15, 2026
a2e3c7c
feat(countSiteCalls): add mac and ap_mac filters, update rating type …
tmunzer-AIDE Oct 15, 2026
984322d
fix(deprecation): update current_version to 0.64.1 for deprecated fun…
tmunzer-AIDE Oct 15, 2026
59dd5b5
feat(rrm): add optional AP MAC address parameter to getSiteChannelScores
tmunzer-AIDE Oct 15, 2026
4a18308
feat(mapstacks): implement CRUD operations for site map stacks
tmunzer-AIDE Oct 15, 2026
e376697
refactor(insights): remove unused countSiteClientFingerprints and sea…
tmunzer-AIDE Oct 15, 2026
7ab64df
feat(flow_capture): add functions to manage site flow capture status
tmunzer-AIDE Oct 15, 2026
d86e8a9
feat(api): add flow_capture to module exports
tmunzer-AIDE Oct 15, 2026
98ff4ef
feat(vars): add countOrgVars function with detailed API documentation
tmunzer-AIDE Oct 15, 2026
a32dc1f
feat(scep): add searchOrgScepEvents function with detailed API docume…
tmunzer-AIDE Oct 15, 2026
21c936a
feat(securityzones): implement CRUD operations for organization secur…
tmunzer-AIDE Oct 15, 2026
9882696
feat(inventory): enhance searchOrgInventory with additional filtering…
tmunzer-AIDE Oct 15, 2026
4057945
feat(insights): add countOrgClientFingerprints and searchOrgClientFin…
tmunzer-AIDE Oct 15, 2026
e7ab436
feat(orgs): add securityzones to imports and __all__ for module exposure
tmunzer-AIDE Oct 15, 2026
4c4f29e
chore: bump version to 0.64.1 and update related files
tmunzer-AIDE Oct 15, 2026
2c01fed
chore: update CHANGELOG for version 0.64.1 with new features, improve…
tmunzer-AIDE Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# CHANGELOG

## Version 0.64.1 (October 2026)

This patch release expands organization and site API coverage, updates generated API bindings, and fixes pagination when a next-page request returns no response.

---

### 1. NEW FEATURES

#### **Organization APIs**
- Added organization security zone list, get, create, update, and delete operations.
- Added organization SCEP event search and organization variable counting.
- Added organization client fingerprint count and search operations.

#### **Site APIs**
- Added helpers to start and stop site flow capture.
- Added site map stack list, get, create, update, and delete operations.

---

### 2. IMPROVEMENTS

- Expanded organization inventory search filters.
- Added MAC and AP MAC filters to site call analytics and updated the call rating type.
- Added an optional AP MAC filter to site channel score queries.
- Updated generated organization and site API bindings.

---

### 3. BREAKING CHANGES

#### **Client Fingerprint API Scope**
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.

---

### 4. BUG FIXES

#### **Pagination Termination**
`get_all()` now stops when fetching a next page returns `None`, preventing repeated requests against the same next-page link.

---

## Version 0.64.0 (September 2026)

**Released**: September 15, 2026
Expand Down
2 changes: 1 addition & 1 deletion mist_openapi
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "mistapi"
version = "0.64.0"
version = "0.64.1"
authors = [{ name = "Thomas Munzer", email = "tmunzer@juniper.net" }]
description = "Python package to simplify the Mist System APIs usage"
keywords = ["Mist", "Juniper", "API"]
Expand Down
4 changes: 4 additions & 0 deletions src/mistapi/__pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@ def get_all(mist_session: _APISession, response: _APIResponse) -> list:
if tmp:
response = tmp
data += response.data
else:
break
elif isinstance(response.data, dict) and "results" in response.data:
data = response.data["results"].copy()
while response.next:
tmp = get_next(mist_session, response)
if tmp:
response = tmp
data += response.data["results"]
else:
break
return data
2 changes: 1 addition & 1 deletion src/mistapi/__version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.64.0"
__version__ = "0.64.1"
__author__ = "Thomas Munzer <tmunzer@juniper.net>"
2 changes: 2 additions & 0 deletions src/mistapi/api/v1/orgs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
sdktemplates,
secintelprofiles,
secpolicies,
securityzones,
servicepolicies,
services,
setting,
Expand Down Expand Up @@ -155,6 +156,7 @@
"sdktemplates",
"secintelprofiles",
"secpolicies",
"securityzones",
"servicepolicies",
"services",
"setting",
Expand Down
157 changes: 157 additions & 0 deletions src/mistapi/api/v1/orgs/insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,163 @@
from mistapi.__api_response import APIResponse as _APIResponse


def countOrgClientFingerprints(
mist_session: _APISession,
org_id: str,
distinct: str | None = None,
start: str | None = None,
end: str | None = None,
duration: str | None = None,
limit: int | None = None,
) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/nac-fingerprints/count-org-client-fingerprints

PARAMS
-----------
mistapi.APISession : mist_session
mistapi session including authentication and Mist host information

PATH PARAMS
-----------
org_id : str

QUERY PARAMS
------------
distinct : str{'family', 'model', 'os', 'os_type'}, default: family
Field used to group this count response. enum: `family`, `model`, `os`, `os_type`
start : str
Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d` or `-1w`
end : str
Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d`, `-2h`, or `now`
duration : str, default: 1d
Time range duration for the query, using relative units such as `10m`, `7d`, or `2w`
limit : int, default: 100
Maximum number of results to return per page

RETURN
-----------
mistapi.APIResponse
response from the API call
"""

uri = f"/api/v1/orgs/{org_id}/insights/fingerprints/count"
query_params: dict[str, str] = {}
if distinct:
query_params["distinct"] = str(distinct)
if start:
query_params["start"] = str(start)
if end:
query_params["end"] = str(end)
if duration:
query_params["duration"] = str(duration)
if limit:
query_params["limit"] = str(limit)
resp = mist_session.mist_get(uri=uri, query=query_params)
return resp


def searchOrgClientFingerprints(
mist_session: _APISession,
org_id: str,
family: str | None = None,
client_type: str | None = None,
model: str | None = None,
mfg: str | None = None,
os: str | None = None,
os_type: str | None = None,
mac: str | None = None,
limit: int | None = None,
start: str | None = None,
end: str | None = None,
duration: str | None = None,
interval: str | None = None,
sort: str | None = None,
search_after: str | None = None,
) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/nac-fingerprints/search-org-client-fingerprints

PARAMS
-----------
mistapi.APISession : mist_session
mistapi session including authentication and Mist host information

PATH PARAMS
-----------
org_id : str

QUERY PARAMS
------------
family : str
Device Category of the client device
client_type : str{'wireless', 'wired', 'vty'}
Filter results by client type. enum: `wireless`, `wired`, `vty`
model : str
Filter results by device model
mfg : str
Manufacturer name of the client device
os : str
Operating System name and version of the client device
os_type : str
Operating system name of the client device
mac : str
Filter results by MAC address
limit : int, default: 100
Maximum number of results to return per page
start : str
Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d` or `-1w`
end : str
Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d`, `-2h`, or `now`
duration : str, default: 1d
Time range duration for the query, using relative units such as `10m`, `7d`, or `2w`
interval : str
Aggregation works by giving a time range plus interval (e.g. 1d, 1h, 10m) where aggregation function would be applied to.
sort : str, default: wxid
On which field the list should be sorted, -prefix represents DESC order.
search_after : str
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.

RETURN
-----------
mistapi.APIResponse
response from the API call
"""

uri = f"/api/v1/orgs/{org_id}/insights/fingerprints/search"
query_params: dict[str, str] = {}
if family:
query_params["family"] = str(family)
if client_type:
query_params["client_type"] = str(client_type)
if model:
query_params["model"] = str(model)
if mfg:
query_params["mfg"] = str(mfg)
if os:
query_params["os"] = str(os)
if os_type:
query_params["os_type"] = str(os_type)
if mac:
query_params["mac"] = str(mac)
if limit:
query_params["limit"] = str(limit)
if start:
query_params["start"] = str(start)
if end:
query_params["end"] = str(end)
if duration:
query_params["duration"] = str(duration)
if interval:
query_params["interval"] = str(interval)
if sort:
query_params["sort"] = str(sort)
if search_after:
query_params["search_after"] = str(search_after)
resp = mist_session.mist_get(uri=uri, query=query_params)
return resp


def getOrgMarvisClientInsights(
mist_session: _APISession,
org_id: str,
Expand Down
20 changes: 20 additions & 0 deletions src/mistapi/api/v1/orgs/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ def searchOrgInventory(
org_id: str,
type: str | None = None,
mac: str | None = None,
vc_mac: str | None = None,
master_mac: str | None = None,
model: str | None = None,
name: str | None = None,
site_id: str | None = None,
Expand All @@ -365,6 +367,8 @@ def searchOrgInventory(
version: str | None = None,
status: str | None = None,
text: str | None = None,
modified_after: int | None = None,
disconnected_before: int | None = None,
limit: int | None = None,
sort: str | None = None,
search_after: str | None = None,
Expand All @@ -387,6 +391,10 @@ def searchOrgInventory(
Filter results by type. enum: `ap`, `gateway`, `switch`
mac : str
Filter by MAC address. Partial matches may use `*` wildcards (e.g. `*5b35*` matches `5c5b350e0001` and `5c5b35000301`). Accepts multiple comma-separated values.
vc_mac : str
Virtual Chassis MAC address. Accepts multiple comma-separated values.
master_mac : str
MAC address of the Virtual Chassis master device. Accepts multiple comma-separated values.
model : str
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.
name : str
Expand All @@ -407,6 +415,10 @@ def searchOrgInventory(
Device status. enum: `connected`, `disconnected`. Accepts multiple comma-separated values.
text : str
Wildcards for name, mac, serial
modified_after : int
Filter on inventory last modified time, in epoch
disconnected_before : int
Filter results to devices that were last disconnected before this time, in epoch seconds
limit : int, default: 100
Maximum number of results to return per page
sort : str, default: timestamp
Expand All @@ -426,6 +438,10 @@ def searchOrgInventory(
query_params["type"] = str(type)
if mac:
query_params["mac"] = str(mac)
if vc_mac:
query_params["vc_mac"] = str(vc_mac)
if master_mac:
query_params["master_mac"] = str(master_mac)
if model:
query_params["model"] = str(model)
if name:
Expand All @@ -446,6 +462,10 @@ def searchOrgInventory(
query_params["status"] = str(status)
if text:
query_params["text"] = str(text)
if modified_after:
query_params["modified_after"] = str(modified_after)
if disconnected_before:
query_params["disconnected_before"] = str(disconnected_before)
if limit:
query_params["limit"] = str(limit)
if sort:
Expand Down
Loading
Loading