Skip to content

Commit 66a57a6

Browse files
feat: release mistapi 0.64.0 (#35)
* fix(makefile): update OpenAPI submodule handling in generate target * feat(marvisclient): add Marvis client events definitions API endpoint * feat(orgs): add AOSCX and EdgeConnect register command APIs * fix(oauth): clarify Oauth2 provider name in function docstrings * feat(devices): add new APIs for searching site device flow records and managing Zigbee events * feat(inventory): add 'magic' filter to searchOrgInventory for device claim codes * feat(orgs): enhance searchOrgJsiAssetsAndContracts with additional filtering options * fix(nac_clients): rename edr_provider to edr_providers for consistency in query parameters * feat(iotendpoints): add countSiteIotEndpoints and rejoinSiteIotEndpointZigbee functions with detailed API documentation * fix(nac_clients): correct spelling of "organization" in docstring for mdm_provider parameter * feat(stats): add 'wired' filter to getSiteCallsSummary and listSiteTroubleshootCalls functions * feat(mxedge): add utility functions for site-level and organization-level Mist Edges * feat(ap): add remote capture functions to AP utilities * feat(shell): reorganize shell imports and add remote capture functionality * feat(srx): reorganize shell imports and add remote capture functionality * feat(ssr): reorganize miscellaneous imports and add remote capture functionality * feat(orgs): add PcapEvents WebSocket class for organization packet capture * feat(tests): add unit tests for remote packet capture utilities * chore: update version to 0.64.0 in project files * docs: add 0.64.0 changelog * docs: document remote capture breaking changes * bump dependencies * test: restore lazy import modules after mocking * Change wired check to handle None value Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * docs: update examples in remote pcap functions to use UUID format --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 67b5ec2 commit 66a57a6

30 files changed

Lines changed: 1466 additions & 479 deletions

‎CHANGELOG.md‎

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

3+
## Version 0.64.0 (September 2026)
4+
5+
**Released**: September 15, 2026
6+
7+
This release updates the generated API bindings and adds remote packet capture helpers for AP, EX, SRX, SSR, and Mist Edge devices, including streamed organization-level capture events.
8+
9+
---
10+
11+
### 1. NEW FEATURES
12+
13+
#### **Remote Packet Capture Utilities**
14+
Added packet capture helpers that start captures and collect streamed results through WebSockets:
15+
- AP wired and wireless captures through `remotePcapWired()` and `remotePcapWireless()`.
16+
- EX, SRX, and SSR interface captures through `remotePcap()`.
17+
- Site-level and organization-level Mist Edge captures through the new `mistapi.device_utils.mxedge` module.
18+
- Organization packet capture events through `mistapi.websockets.orgs.PcapEvents`.
19+
20+
#### **Generated API Additions**
21+
- Added site device flow-record search and Zigbee event management APIs.
22+
- Added IoT endpoint counting and Zigbee rejoin APIs.
23+
- Added AOS-CX and EdgeConnect registration command APIs.
24+
- Added Marvis client event definitions and new JSI asset and contract filters.
25+
- Added the `magic` claim-code filter to organization inventory searches and the `wired` filter to site call summaries and troubleshoot-call listings.
26+
27+
---
28+
29+
### 2. BREAKING CHANGES
30+
31+
#### **Remote Capture Argument Structure**
32+
The `remotePcap()` helpers for EX, SRX, and SSR devices now accept a single `device_interfaces` mapping instead of separate `device_id` and `port_ids` arguments. Each device ID maps to its interfaces, and each interface maps to an optional per-interface tcpdump expression. Use `None` when an interface does not need its own expression; the existing `tcpdump_expression` argument remains the capture-wide filter.
33+
34+
```python
35+
# Before
36+
ex.remotePcap(
37+
apisession,
38+
site_id,
39+
device_id,
40+
["ge-0/0/0", "ge-0/0/1"],
41+
tcpdump_expression="udp",
42+
)
43+
44+
# Now
45+
ex.remotePcap(
46+
apisession,
47+
site_id,
48+
{
49+
device_id: {
50+
"ge-0/0/0": None,
51+
"ge-0/0/1": "port 443",
52+
}
53+
},
54+
tcpdump_expression="udp",
55+
)
56+
```
57+
58+
This change also allows one capture request to target multiple EX, SRX, or SSR devices. The AP `remotePcapWired()` and `remotePcapWireless()` signatures are unchanged.
59+
60+
#### **Generated Naming Corrections**
61+
- Renamed the organization `aos` API module to `aoscx` to match the platform name.
62+
- Renamed the NAC client query argument from `edr_provider` to `edr_providers` to match the API parameter.
63+
64+
---
65+
366
## Version 0.63.3 (July 2026)
467

568
**Released**: July 14, 2026

‎Makefile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ help: ## Show this help message
1515
@echo 'Targets:'
1616
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
1717

18+
update-openapi:
19+
git submodule sync --recursive
20+
git submodule update --init --recursive --remote --checkout mist_openapi
21+
1822
setup-openapi: ## Initialize or update OpenAPI submodule
1923
@if [ ! -d "mist_openapi/.git" ]; then \
2024
echo "Initializing OpenAPI submodule..."; \
@@ -23,7 +27,7 @@ setup-openapi: ## Initialize or update OpenAPI submodule
2327
@echo "Updating OpenAPI submodule..."; \
2428
git submodule update --remote mist_openapi
2529

26-
generate: setup-openapi ## Run the code generation script
30+
generate: update-openapi ## Run the code generation script
2731
echo "Updating version in pyproject.toml to $(VERSION)"
2832
sed -e "s/version = .*/version = \"$(VERSION)\"/g" pyproject.toml > new_pyproject.toml
2933
mv new_pyproject.toml pyproject.toml

‎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.63.3"
7+
version = "0.64.0"
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/__version.py‎

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
insight_metrics,
2929
languages,
3030
license_types,
31+
marvisclient_events,
3132
marvisclient_versions,
3233
mxedge_events,
3334
mxedge_models,
@@ -58,6 +59,7 @@
5859
"insight_metrics",
5960
"languages",
6061
"license_types",
62+
"marvisclient_events",
6163
"marvisclient_versions",
6264
"mxedge_events",
6365
"mxedge_models",
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""
2+
--------------------------------------------------------------------------------
3+
------------------------- Mist API Python CLI Session --------------------------
4+
5+
Written by: Thomas Munzer (tmunzer@juniper.net)
6+
Github : https://github.com/tmunzer/mistapi_python
7+
8+
This package is licensed under the MIT License.
9+
10+
--------------------------------------------------------------------------------
11+
"""
12+
13+
from mistapi import APISession as _APISession
14+
from mistapi.__api_response import APIResponse as _APIResponse
15+
16+
17+
def listMarvisClientEventsDefinitions(mist_session: _APISession) -> _APIResponse:
18+
"""
19+
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/constants/definitions/list-marvis-client-events-definitions
20+
21+
PARAMS
22+
-----------
23+
mistapi.APISession : mist_session
24+
mistapi session including authentication and Mist host information
25+
26+
RETURN
27+
-----------
28+
mistapi.APIResponse
29+
response from the API call
30+
"""
31+
32+
uri = "/api/v1/const/marvisclient_events"
33+
query_params: dict[str, str] = {}
34+
resp = mist_session.mist_get(uri=uri, query=query_params)
35+
return resp

‎src/mistapi/api/v1/login/oauth.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def getOauth2AuthorizationUrlForLogin(
2828
PATH PARAMS
2929
-----------
3030
provider : str
31+
Oauth2 provider name
3132
3233
QUERY PARAMS
3334
------------
@@ -60,6 +61,7 @@ def unlinkOauth2Provider(mist_session: _APISession, provider: str) -> _APIRespon
6061
PATH PARAMS
6162
-----------
6263
provider : str
64+
Oauth2 provider name
6365
6466
RETURN
6567
-----------
@@ -87,6 +89,7 @@ def loginOauth2(
8789
PATH PARAMS
8890
-----------
8991
provider : str
92+
Oauth2 provider name
9093
9194
BODY PARAMS
9295
-----------

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
admins,
1717
alarms,
1818
alarmtemplates,
19-
aos,
19+
aoscx,
2020
apitokens,
2121
aptemplates,
2222
assetfilters,
@@ -30,6 +30,7 @@
3030
crl,
3131
deviceprofiles,
3232
devices,
33+
edgeconnect,
3334
events,
3435
evpn_topologies,
3536
exports,
@@ -102,7 +103,7 @@
102103
"admins",
103104
"alarms",
104105
"alarmtemplates",
105-
"aos",
106+
"aoscx",
106107
"apitokens",
107108
"aptemplates",
108109
"assetfilters",
@@ -116,6 +117,7 @@
116117
"crl",
117118
"deviceprofiles",
118119
"devices",
120+
"edgeconnect",
119121
"events",
120122
"evpn_topologies",
121123
"exports",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
from mistapi.__api_response import APIResponse as _APIResponse
1515

1616

17-
def getOrgAosRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse:
17+
def getOrgAoscxRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse:
1818
"""
19-
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/aos/get-org-aos-register-cmd
19+
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/aoscx/get-org-aoscx-register-cmd
2020
2121
PARAMS
2222
-----------
@@ -33,7 +33,7 @@ def getOrgAosRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse
3333
response from the API call
3434
"""
3535

36-
uri = f"/api/v1/orgs/{org_id}/aos/register_cmd"
36+
uri = f"/api/v1/orgs/{org_id}/aoscx/register_cmd"
3737
query_params: dict[str, str] = {}
3838
resp = mist_session.mist_get(uri=uri, query=query_params)
3939
return resp

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def countOrgDeviceEvents(
175175
model: str | None = None,
176176
text: str | None = None,
177177
type: str | None = None,
178+
includes: str | None = None,
178179
start: str | None = None,
179180
end: str | None = None,
180181
duration: str | None = None,
@@ -195,7 +196,7 @@ def countOrgDeviceEvents(
195196
QUERY PARAMS
196197
------------
197198
distinct : str{'ap', 'apfw', 'model', 'org_id', 'site_id', 'text', 'timestamp', 'type'}, default: model
198-
Field used to group this count response. enum: `ap`, `apfw`, `model`, `org_id`, `site_id`, `text`, `timestamp`, `type`
199+
Field used to group this count response. enum: `ap`, `apfw`, `model`, `org_id`, `site_id`, `status`, `text`, `timestamp`, `type`
199200
site_id : str
200201
Filter results by site identifier
201202
ap : str
@@ -208,6 +209,8 @@ def countOrgDeviceEvents(
208209
Filter results by event message text
209210
type : str
210211
See [List Device Events Definitions](/#operations/listDeviceEventsDefinitions)
212+
includes : str
213+
Keyword to include events from additional indices (e.g. ext_tunnel for ext tunnel events)
211214
start : str
212215
Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as `-1d` or `-1w`
213216
end : str
@@ -239,6 +242,8 @@ def countOrgDeviceEvents(
239242
query_params["text"] = str(text)
240243
if type:
241244
query_params["type"] = str(type)
245+
if includes:
246+
query_params["includes"] = str(includes)
242247
if start:
243248
query_params["start"] = str(start)
244249
if end:
@@ -295,7 +300,7 @@ def searchOrgDeviceEvents(
295300
last_by : str
296301
Return last/recent event for passed in field
297302
includes : str
298-
Keyword to include events from additional indices (e.g. ext_tunnel for prisma events)
303+
Keyword to include events from additional indices (e.g. ext_tunnel for ext tunnel events)
299304
limit : int, default: 100
300305
Maximum number of results to return per page
301306
start : str

0 commit comments

Comments
 (0)