Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cc70178
fix(makefile): update OpenAPI submodule handling in generate target
tmunzer-AIDE Sep 15, 2026
9dc604d
feat(marvisclient): add Marvis client events definitions API endpoint
tmunzer-AIDE Sep 15, 2026
0a92d9f
feat(orgs): add AOSCX and EdgeConnect register command APIs
tmunzer-AIDE Sep 15, 2026
d9b03b2
fix(oauth): clarify Oauth2 provider name in function docstrings
tmunzer-AIDE Sep 15, 2026
9e6d0c0
feat(devices): add new APIs for searching site device flow records an…
tmunzer-AIDE Sep 15, 2026
3874e44
feat(inventory): add 'magic' filter to searchOrgInventory for device …
tmunzer-AIDE Sep 15, 2026
91f50a8
feat(orgs): enhance searchOrgJsiAssetsAndContracts with additional fi…
tmunzer-AIDE Sep 15, 2026
9656b67
fix(nac_clients): rename edr_provider to edr_providers for consistenc…
tmunzer-AIDE Sep 15, 2026
b74ac9a
feat(iotendpoints): add countSiteIotEndpoints and rejoinSiteIotEndpoi…
tmunzer-AIDE Sep 15, 2026
730e091
fix(nac_clients): correct spelling of "organization" in docstring for…
tmunzer-AIDE Sep 15, 2026
f1be46d
feat(stats): add 'wired' filter to getSiteCallsSummary and listSiteTr…
tmunzer-AIDE Sep 15, 2026
b53576f
feat(mxedge): add utility functions for site-level and organization-l…
tmunzer-AIDE Sep 15, 2026
d6e3337
feat(ap): add remote capture functions to AP utilities
tmunzer-AIDE Sep 15, 2026
afafc2f
feat(shell): reorganize shell imports and add remote capture function…
tmunzer-AIDE Sep 15, 2026
314b791
feat(srx): reorganize shell imports and add remote capture functionality
tmunzer-AIDE Sep 15, 2026
421917f
feat(ssr): reorganize miscellaneous imports and add remote capture fu…
tmunzer-AIDE Sep 15, 2026
c339fc5
feat(orgs): add PcapEvents WebSocket class for organization packet ca…
tmunzer-AIDE Sep 15, 2026
6832e82
feat(tests): add unit tests for remote packet capture utilities
tmunzer-AIDE Sep 15, 2026
110de99
chore: update version to 0.64.0 in project files
tmunzer-AIDE Sep 15, 2026
8f8256c
docs: add 0.64.0 changelog
tmunzer-AIDE Sep 15, 2026
c45840f
docs: document remote capture breaking changes
tmunzer-AIDE Sep 15, 2026
f6724b5
bump dependencies
tmunzer-AIDE Sep 15, 2026
752208c
test: restore lazy import modules after mocking
tmunzer-AIDE Sep 15, 2026
f4b2913
Change wired check to handle None value
tmunzer-AIDE Sep 15, 2026
f6fac7d
docs: update examples in remote pcap functions to use UUID format
tmunzer-AIDE Sep 15, 2026
2fcd5f3
Merge branch '0.64.0' of https://github.com/tmunzer/mistapi_python in…
tmunzer-AIDE Sep 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
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
# CHANGELOG

## Version 0.64.0 (September 2026)

**Released**: September 15, 2026

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.

---

### 1. NEW FEATURES

#### **Remote Packet Capture Utilities**
Added packet capture helpers that start captures and collect streamed results through WebSockets:
- AP wired and wireless captures through `remotePcapWired()` and `remotePcapWireless()`.
- EX, SRX, and SSR interface captures through `remotePcap()`.
- Site-level and organization-level Mist Edge captures through the new `mistapi.device_utils.mxedge` module.
- Organization packet capture events through `mistapi.websockets.orgs.PcapEvents`.

#### **Generated API Additions**
- Added site device flow-record search and Zigbee event management APIs.
- Added IoT endpoint counting and Zigbee rejoin APIs.
- Added AOS-CX and EdgeConnect registration command APIs.
- Added Marvis client event definitions and new JSI asset and contract filters.
- Added the `magic` claim-code filter to organization inventory searches and the `wired` filter to site call summaries and troubleshoot-call listings.

---

### 2. BREAKING CHANGES

#### **Remote Capture Argument Structure**
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.

```python
# Before
ex.remotePcap(
apisession,
site_id,
device_id,
["ge-0/0/0", "ge-0/0/1"],
tcpdump_expression="udp",
)

# Now
ex.remotePcap(
apisession,
site_id,
{
device_id: {
"ge-0/0/0": None,
"ge-0/0/1": "port 443",
}
},
tcpdump_expression="udp",
)
```

This change also allows one capture request to target multiple EX, SRX, or SSR devices. The AP `remotePcapWired()` and `remotePcapWireless()` signatures are unchanged.

#### **Generated Naming Corrections**
- Renamed the organization `aos` API module to `aoscx` to match the platform name.
- Renamed the NAC client query argument from `edr_provider` to `edr_providers` to match the API parameter.

---

## Version 0.63.3 (July 2026)

**Released**: July 14, 2026
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ help: ## Show this help message
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

update-openapi:
git submodule sync --recursive
git submodule update --init --recursive --remote --checkout mist_openapi

setup-openapi: ## Initialize or update OpenAPI submodule
@if [ ! -d "mist_openapi/.git" ]; then \
echo "Initializing OpenAPI submodule..."; \
Expand All @@ -23,7 +27,7 @@ setup-openapi: ## Initialize or update OpenAPI submodule
@echo "Updating OpenAPI submodule..."; \
git submodule update --remote mist_openapi

generate: setup-openapi ## Run the code generation script
generate: update-openapi ## Run the code generation script
echo "Updating version in pyproject.toml to $(VERSION)"
sed -e "s/version = .*/version = \"$(VERSION)\"/g" pyproject.toml > new_pyproject.toml
mv new_pyproject.toml pyproject.toml
Expand Down
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.63.3"
version = "0.64.0"
authors = [{ name = "Thomas Munzer", email = "tmunzer@juniper.net" }]
description = "Python package to simplify the Mist System APIs usage"
keywords = ["Mist", "Juniper", "API"]
Expand Down
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.63.3"
__version__ = "0.64.0"
__author__ = "Thomas Munzer <tmunzer@juniper.net>"
2 changes: 2 additions & 0 deletions src/mistapi/api/v1/const/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
insight_metrics,
languages,
license_types,
marvisclient_events,
marvisclient_versions,
mxedge_events,
mxedge_models,
Expand Down Expand Up @@ -58,6 +59,7 @@
"insight_metrics",
"languages",
"license_types",
"marvisclient_events",
"marvisclient_versions",
"mxedge_events",
"mxedge_models",
Expand Down
35 changes: 35 additions & 0 deletions src/mistapi/api/v1/const/marvisclient_events.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
--------------------------------------------------------------------------------
------------------------- Mist API Python CLI Session --------------------------

Written by: Thomas Munzer (tmunzer@juniper.net)
Github : https://github.com/tmunzer/mistapi_python

This package is licensed under the MIT License.

--------------------------------------------------------------------------------
"""

from mistapi import APISession as _APISession
from mistapi.__api_response import APIResponse as _APIResponse


def listMarvisClientEventsDefinitions(mist_session: _APISession) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/constants/definitions/list-marvis-client-events-definitions

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

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

uri = "/api/v1/const/marvisclient_events"
query_params: dict[str, str] = {}
resp = mist_session.mist_get(uri=uri, query=query_params)
return resp
3 changes: 3 additions & 0 deletions src/mistapi/api/v1/login/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def getOauth2AuthorizationUrlForLogin(
PATH PARAMS
-----------
provider : str
Oauth2 provider name

QUERY PARAMS
------------
Expand Down Expand Up @@ -60,6 +61,7 @@ def unlinkOauth2Provider(mist_session: _APISession, provider: str) -> _APIRespon
PATH PARAMS
-----------
provider : str
Oauth2 provider name

RETURN
-----------
Expand Down Expand Up @@ -87,6 +89,7 @@ def loginOauth2(
PATH PARAMS
-----------
provider : str
Oauth2 provider name

BODY PARAMS
-----------
Expand Down
6 changes: 4 additions & 2 deletions src/mistapi/api/v1/orgs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
admins,
alarms,
alarmtemplates,
aos,
aoscx,
apitokens,
aptemplates,
assetfilters,
Expand All @@ -30,6 +30,7 @@
crl,
deviceprofiles,
devices,
edgeconnect,
events,
evpn_topologies,
exports,
Expand Down Expand Up @@ -102,7 +103,7 @@
"admins",
"alarms",
"alarmtemplates",
"aos",
"aoscx",
"apitokens",
"aptemplates",
"assetfilters",
Expand All @@ -116,6 +117,7 @@
"crl",
"deviceprofiles",
"devices",
"edgeconnect",
"events",
"evpn_topologies",
"exports",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from mistapi.__api_response import APIResponse as _APIResponse


def getOrgAosRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse:
def getOrgAoscxRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/aos/get-org-aos-register-cmd
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/aoscx/get-org-aoscx-register-cmd

PARAMS
-----------
Expand All @@ -33,7 +33,7 @@ def getOrgAosRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse
response from the API call
"""

uri = f"/api/v1/orgs/{org_id}/aos/register_cmd"
uri = f"/api/v1/orgs/{org_id}/aoscx/register_cmd"
query_params: dict[str, str] = {}
resp = mist_session.mist_get(uri=uri, query=query_params)
return resp
9 changes: 7 additions & 2 deletions src/mistapi/api/v1/orgs/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def countOrgDeviceEvents(
model: str | None = None,
text: str | None = None,
type: str | None = None,
includes: str | None = None,
Comment thread
tmunzer-AIDE marked this conversation as resolved.
start: str | None = None,
end: str | None = None,
duration: str | None = None,
Expand All @@ -195,7 +196,7 @@ def countOrgDeviceEvents(
QUERY PARAMS
------------
distinct : str{'ap', 'apfw', 'model', 'org_id', 'site_id', 'text', 'timestamp', 'type'}, default: model
Field used to group this count response. enum: `ap`, `apfw`, `model`, `org_id`, `site_id`, `text`, `timestamp`, `type`
Field used to group this count response. enum: `ap`, `apfw`, `model`, `org_id`, `site_id`, `status`, `text`, `timestamp`, `type`
site_id : str
Filter results by site identifier
ap : str
Expand All @@ -208,6 +209,8 @@ def countOrgDeviceEvents(
Filter results by event message text
type : str
See [List Device Events Definitions](/#operations/listDeviceEventsDefinitions)
includes : str
Keyword to include events from additional indices (e.g. ext_tunnel for ext tunnel events)
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
Expand Down Expand Up @@ -239,6 +242,8 @@ def countOrgDeviceEvents(
query_params["text"] = str(text)
if type:
query_params["type"] = str(type)
if includes:
query_params["includes"] = str(includes)
if start:
query_params["start"] = str(start)
if end:
Expand Down Expand Up @@ -295,7 +300,7 @@ def searchOrgDeviceEvents(
last_by : str
Return last/recent event for passed in field
includes : str
Keyword to include events from additional indices (e.g. ext_tunnel for prisma events)
Keyword to include events from additional indices (e.g. ext_tunnel for ext tunnel events)
limit : int, default: 100
Maximum number of results to return per page
start : str
Expand Down
41 changes: 41 additions & 0 deletions src/mistapi/api/v1/orgs/edgeconnect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""
--------------------------------------------------------------------------------
------------------------- Mist API Python CLI Session --------------------------

Written by: Thomas Munzer (tmunzer@juniper.net)
Github : https://github.com/tmunzer/mistapi_python

This package is licensed under the MIT License.

--------------------------------------------------------------------------------
"""

from mistapi import APISession as _APISession
from mistapi.__api_response import APIResponse as _APIResponse


def getOrgEdgeconnectRegisterCmd(
mist_session: _APISession, org_id: str
) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/edgeconnect/get-org-edgeconnect-register-cmd

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

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

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

uri = f"/api/v1/orgs/{org_id}/edgeconnect/register_cmd"
query_params: dict[str, str] = {}
resp = mist_session.mist_get(uri=uri, query=query_params)
return resp
5 changes: 5 additions & 0 deletions src/mistapi/api/v1/orgs/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ def searchOrgInventory(
name: str | None = None,
site_id: str | None = None,
serial: str | None = None,
magic: str | None = None,
Comment thread
tmunzer-AIDE marked this conversation as resolved.
master: str | None = None,
sku: str | None = None,
version: str | None = None,
Expand Down Expand Up @@ -394,6 +395,8 @@ def searchOrgInventory(
Filter inventory results by site identifier. Accepts multiple comma-separated values.
serial : str
Device serial number. Partial match allowed with wildcard * (e.g. `*123*` will match `AB123CD`, `12345`, `XY123`). Accepts multiple comma-separated values.
magic : str
Device claim code (magic). Accepts multiple comma-separated values.
master : str
Filter inventory results by whether the device is the Virtual Chassis master
sku : str
Expand Down Expand Up @@ -431,6 +434,8 @@ def searchOrgInventory(
query_params["site_id"] = str(site_id)
if serial:
query_params["serial"] = str(serial)
if magic:
query_params["magic"] = str(magic)
if master:
query_params["master"] = str(master)
if sku:
Expand Down
Loading
Loading