feat: release mistapi 0.64.0 - #35
Conversation
…d managing Zigbee events
…y in query parameters
…ntZigbee functions with detailed API documentation
… mdm_provider parameter
…oubleshootCalls functions
There was a problem hiding this comment.
🟡 Changes recommended
Moderate compatibility and serialization issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Release mistapi 0.64.0 with expanded API bindings and streamed remote packet-capture utilities.
Changes:
- Added remote capture support across AP, EX, SRX, SSR, and Mist Edge workflows.
- Added flow-record, Zigbee, registration, Marvis, JSI, and filtering APIs.
- Updated versioning, generation tooling, tests, and changelog.
File summaries
| File | Description |
|---|---|
tests/unit/test_remote_capture.py |
Tests remote-capture payloads and WebSocket channels. |
src/mistapi/websockets/orgs.py |
Adds organization PCAP event streaming. |
src/mistapi/device_utils/ssr.py |
Exposes SSR remote capture. |
src/mistapi/device_utils/srx.py |
Exposes SRX remote capture. |
src/mistapi/device_utils/mxedge.py |
Adds Mist Edge utilities. |
src/mistapi/device_utils/ex.py |
Exposes EX remote capture. |
src/mistapi/device_utils/ap.py |
Exposes AP remote capture helpers. |
src/mistapi/device_utils/__tools/remote_capture.py |
Implements capture payloads and streaming workflows. |
src/mistapi/device_utils/__init__.py |
Exports Mist Edge utilities. |
src/mistapi/api/v1/sites/stats.py |
Adds wired-call filters. |
src/mistapi/api/v1/sites/sle.py |
Updates deprecation metadata. |
src/mistapi/api/v1/sites/nac_clients.py |
Corrects documentation wording. |
src/mistapi/api/v1/sites/iotendpoints.py |
Adds IoT endpoint and Zigbee APIs. |
src/mistapi/api/v1/sites/devices.py |
Adds flow-record and Zigbee APIs. |
src/mistapi/api/v1/orgs/nac_clients.py |
Renames the EDR provider parameter. |
src/mistapi/api/v1/orgs/jsi.py |
Adds JSI filters and search parameters. |
src/mistapi/api/v1/orgs/inventory.py |
Adds the magic claim-code filter. |
src/mistapi/api/v1/orgs/edgeconnect.py |
Adds EdgeConnect registration support. |
src/mistapi/api/v1/orgs/devices.py |
Adds device-event index filters. |
src/mistapi/api/v1/orgs/aoscx.py |
Renames and updates AOS-CX registration. |
src/mistapi/api/v1/orgs/__init__.py |
Updates organization exports. |
src/mistapi/api/v1/login/oauth.py |
Documents OAuth parameters. |
src/mistapi/api/v1/const/marvisclient_events.py |
Adds Marvis event definitions. |
src/mistapi/api/v1/const/__init__.py |
Exports Marvis event definitions. |
src/mistapi/__version.py |
Sets version 0.64.0. |
pyproject.toml |
Updates package metadata version. |
Makefile |
Updates OpenAPI generation. |
CHANGELOG.md |
Documents the 0.64.0 release. |
Review details
Suppressed comments (6)
src/mistapi/api/v1/orgs/devices.py:199
- The
distinctdeclaration on the preceding line still omitsstatus, while this continuation lists it, so the generated documentation contradicts itself about the accepted values. Addstatusto the declaration as well.
Field used to group this count response. enum: `ap`, `apfw`, `model`, `org_id`, `site_id`, `status`, `text`, `timestamp`, `type`
src/mistapi/api/v1/sites/stats.py:935
- Passing
wired=Falsecurrently omits the query parameter because this guard uses truthiness, so callers cannot request the wired=false filter and receive an unfiltered result instead. Check forNoneso both boolean values are serialized.
if wired:
query_params["wired"] = str(wired)
src/mistapi/api/v1/sites/stats.py:876
- Adding
wiredbefore the existingstart,end,duration,limit, andpageparameters changes how prior positional calls are bound. This is an unlisted breaking change for a public function; append new optional filters after the existing parameters or make the API keyword-only to preserve the positional contract.
wired: bool | None = None,
src/mistapi/device_utils/__tools/remote_capture.py:341
- This example does not match the mapping consumed by
_build_pcap_body: the outer key is treated as a device ID and each inner key as an interface, but this example makesge-0/0/0the device and passes a dict as the interface expression. Users copying it will build an invalid request body; show a device ID containing the interface mapping instead.
ex: {"ge-0/0/0": {"tcpdump_expression": "udp port 67 or udp port 68 -vvv -tttt -en"}}
src/mistapi/device_utils/__tools/remote_capture.py:412
- This example does not match the mapping consumed by
_build_pcap_body: the outer key is treated as a device ID and each inner key as an interface, but this example makesge-0/0/0the device and passes a dict as the interface expression. Users copying it will build an invalid request body; show a device ID containing the interface mapping instead.
ex: {"ge-0/0/0": {"tcpdump_expression": "udp port 67 or udp port 68 -vvv -tttt -en"}}
src/mistapi/device_utils/__tools/remote_capture.py:549
- This example has the same shape mismatch for Mist Edge captures: the implementation expects an outer Mist Edge ID mapped to interface IDs and string/
Noneexpressions, but the example usesport0as the outer key and{}as a value. Copying it produces a malformed payload.
ex: {"port0": {"tcpdump_expression": "udp port 67 or udp port 68 -vvv -tttt -en"}, "oobm": {}}
- Files reviewed: 29/30 changed files
- Comments generated: 8
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved API compatibility and filter-handling issues remain, along with documentation and example fixes.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (9)
src/mistapi/api/v1/orgs/devices.py:178
- This generated function uses positional-or-keyword optional parameters, so inserting
includesbeforestartsilently rebinds existing positionalstart,end,duration, andlimitarguments. Append the new filter (or make it keyword-only) to avoid changing existing requests; this compatibility break is not listed in the release notes.
includes: str | None = None,
src/mistapi/api/v1/orgs/inventory.py:362
searchOrgInventoryaccepts optional filters positionally, so insertingmagicbeforemastersilently binds existing positionalmaster,sku, and later arguments to the wrong parameters. Appendmagicafter the previous signature (or make it keyword-only) to preserve the public API; this additional breaking change is not called out in the release notes.
magic: str | None = None,
src/mistapi/api/v1/orgs/jsi.py:269
- The existing optional parameters are positional-or-keyword, so inserting these six filters before
has_supportsilently shifts all existing positional arguments fromhas_supportonward. Append the new filters aftersearch_after(or make them keyword-only) to preserve callers; this unlisted breaking change affects a public generated API.
contract_end_before: str | None = None,
contract_end_after: str | None = None,
contract_type: str | None = None,
contract_sku: str | None = None,
end_of_service_time: str | None = None,
support_contract_status: str | None = None,
src/mistapi/api/v1/orgs/jsi.py:467
searchOrgJsiPbnalso exposes its optional arguments positionally; addingtextbeforelimitandsortbeforesearch_afterchanges the meaning of existing positional calls. Append both filters after the priorendparameter (or make them keyword-only) to preserve compatibility, and document this additional breaking change if it is intentional.
text: str | None = None,
limit: int | None = None,
page: int | None = None,
sort: str | None = None,
src/mistapi/api/v1/sites/stats.py:934
- When
wired=False, this truthiness check omits the query parameter, so callers cannot request the non-wired subset even thoughFalseis a meaningful boolean filter. Use anis not Nonecheck, as the sibling summary endpoint does.
if wired:
src/mistapi/api/v1/sites/stats.py:818
getSiteCallsSummarykeeps optional parameters positional-or-keyword, so insertingwiredbeforestartsilently rebinds existing calls such asgetSiteCallsSummary(session, site, ap_mac, app, start, end):startis now interpreted aswired. Append this new filter after the existing parameters (or make the API keyword-only) to preserve callers; this compatibility break is not listed in the release notes.
wired: bool | None = None,
src/mistapi/api/v1/sites/stats.py:876
- This generated function also exposes optional parameters positionally, but adding
wiredbeforestartshifts every existing positional argument fromstartonward. Append the new filter after the existing signature (or make it keyword-only) so the release does not silently change callers' requests; this breaking change is not documented.
wired: bool | None = None,
src/mistapi/device_utils/init.py:41
- Adding
mxedgeto the public device-utils exports leaves this module's own documentation inconsistent: the import example and the Supported Devices list above still omit Mist Edge. Update those documented public modules so users can discover the newmxedge.siteRemotePcapandmxedge.orgRemotePcapAPIs.
mxedge,
src/mistapi/device_utils/__tools/remote_capture.py:549
- This new
device_interfacesexample is not valid Python: theoobmkey is written as part of the quoted string ("oobm: None") and lacks a closing quote. Correct the example so users can copy it to construct the request mapping.
ex: {"00000000-0000-0000-1000-0123456789abcd": {"port0": "udp port 67 or udp port 68 -vvv -tttt -en", "oobm: None}}
- Files reviewed: 29/30 changed files
- Comments generated: 1
- Review effort level: Lite
| UUID of the site where the device is located. | ||
| device_interfaces : dict[str, dict[str, str | None]] | ||
| Device IDs mapped to port IDs and their optional tcpdump expressions. | ||
| ex: {"00000000-0000-0000-1000-0123456789abcd": {"port0": "udp port 67 or udp port 68 -vvv -tttt -en", "oobm: None}} |
Summary
Breaking changes
device_idandport_idsarguments in EX, SRX, and SSRremotePcap()with thedevice_interfacesmappingaosAPI module toaoscxedr_providertoedr_providersValidation
python -m pytest tests/unit/test_remote_capture.py -q --no-cov(5 passed)git diff --check