Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,69 @@
# CHANGELOG
## Version 0.62.0 (May 2026)

**Released**: May 1, 2026

This release updates generated API bindings from the latest OpenAPI spec, adding new endpoints for E911 export, SSO admin management, NAC CoA, Mist Edge upgrades, and site auto-map assignment workflows.

---

### 1. NEW FEATURES

#### **Org Exports: E911 Report Management**
Added a new org exports module with E911 report controls:
- **`getOrgE911Report()`**
- **`enableOrgE911Report()`**
- **`disableOrgE911Report()`**

#### **SSO Admin Removal APIs**
Added explicit SSO admin cleanup endpoints:
- **`deleteOrgSsoAdmins()`**
- **`deleteMspSsoAdmins()`**

#### **NAC Change of Authorization (CoA)**
Added NAC CoA trigger functions:
- **`sendOrgNacClientCoA()`**
- **`sendSiteNacClientCoA()`**

#### **Mist Edge Upgrade Lifecycle APIs**
Added org and site upgrade lifecycle operations:
- Org: **`updateOrgMxEdgeUpgrade()`**, **`cancelOrgMxEdgeUpgrade()`**
- Site: **`listSiteMxEdgeUpgrades()`**, **`upgradeSiteMxEdges()`**, **`getSiteMxEdgeUpgrade()`**, **`updateSiteMxEdgeUpgrade()`**, **`cancelSiteMxEdgeUpgrade()`**

#### **Site Auto-Map Assignment APIs**
Added new site modules and functions for auto-map assignment workflows:
- **`startSiteAutoMapAssignment()`**, **`getSiteAutoMapAssignmentStatus()`**, **`cancelSiteAutoMapAssignment()`**
- **`applySiteAutoMapAssignment()`**
- **`clearSiteAutoMapAssignment()`**

#### **Additional Site API Coverage**
- Added **`enableSiteDeviceZigbeeJoin()`**
- Added **`getSiteChannelScores()`**
- Added **`searchSiteIotEndpoints()`**

---

### 2. IMPROVEMENTS

#### **Expanded Query Parameter Coverage**
- **`countOrgInventory()`** now supports `site_id`, `model`, `version`, and `status` filters.
- **`searchOrgJsiSirt()`** now supports `updated_after`, `updated_before`, `published_after`, `published_before`, `text`, and `sort`.
- **`listOrgSecIntelProfiles()`** now supports `limit` and `page`.

#### **Audit Log API Alignment**
- **`countOrgAuditLogs()`** now maps to `/logs/count` with count-specific filters.
- **`listOrgAuditLogs()`** now maps to `/logs/search` with listing and pagination parameters.

#### **Updated Band Enum Support**
Expanded band values across org/site wireless client and RRM APIs to include:
- `5-dedicated`, `5-selectable`, `6-dedicated`, `6-selectable`

#### **Module Export Updates**
- Added org module export: **`exports`**
- Added site module exports: **`search`**, **`apply_auto_map_assignment`**, **`auto_map_assignment`**, **`clear_auto_map_assignment`**

---

## Version 0.61.5 (April 2026)

**Released**: April 22, 2026
Expand All @@ -14,6 +79,7 @@ Fixed `Privileges.__init__()` to correctly handle lists containing `_Privilege`

---


## Version 0.61.4 (April 2026)

**Released**: April 1, 2026
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ setup-openapi: ## Initialize or update OpenAPI submodule
git submodule update --remote mist_openapi

generate: setup-openapi ## Run the code generation script
git submodule update --remote mist_openapi
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.61.5"
version = "0.62.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.61.5"
__version__ = "0.62.0"
__author__ = "Thomas Munzer <tmunzer@juniper.net>"
32 changes: 32 additions & 0 deletions src/mistapi/api/v1/msps/ssos.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,38 @@ def updateMspSso(
return resp


def deleteMspSsoAdmins(
mist_session: _APISession, msp_id: str, sso_id: str, body: dict | list
) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/msps/sso/delete-msp-sso-admins

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

PATH PARAMS
-----------
msp_id : str
sso_id : str

BODY PARAMS
-----------
body : dict
JSON object to send to Mist Cloud (see API doc above for more details)

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

uri = f"/api/v1/msps/{msp_id}/ssos/{sso_id}/delete_admins"
resp = mist_session.mist_post(uri=uri, body=body)
return resp


def listMspSsoLatestFailures(
mist_session: _APISession, msp_id: str, sso_id: str
) -> _APIResponse:
Expand Down
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 @@ -31,6 +31,7 @@
devices,
events,
evpn_topologies,
exports,
gatewaytemplates,
guests,
idpprofiles,
Expand Down Expand Up @@ -114,6 +115,7 @@
"devices",
"events",
"evpn_topologies",
"exports",
"gatewaytemplates",
"guests",
"idpprofiles",
Expand Down
8 changes: 4 additions & 4 deletions src/mistapi/api/v1/orgs/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def countOrgWirelessClientEvents(
ap : str
proto : str{'a', 'ac', 'ax', 'b', 'be', 'g', 'n'}
a / b / g / n / ac / ax
band : str{'24', '5', '6'}
band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'}
802.11 Band
wlan_id : str
site_id : str
Expand Down Expand Up @@ -227,7 +227,7 @@ def searchOrgWirelessClientEvents(
Key Management Protocol, e.g. WPA2-PSK, WPA3-SAE, WPA2-Enterprise
proto : str{'a', 'ac', 'ax', 'b', 'be', 'g', 'n'}
a / b / g / n / ac / ax
band : str{'24', '5', '6'}
band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'}
802.11 Band
wlan_id : str
nacrule_id : str
Expand Down Expand Up @@ -428,7 +428,7 @@ def countOrgWirelessClientsSessions(
------------
distinct : str{'ap', 'device', 'hostname', 'ip', 'model', 'os', 'ssid', 'vlan'}, default: device
ap : str
band : str{'24', '5', '6'}
band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'}
802.11 Band
client_family : str
client_manufacture : str
Expand Down Expand Up @@ -515,7 +515,7 @@ def searchOrgWirelessClientSessions(
QUERY PARAMS
------------
ap : str
band : str{'24', '5', '6'}
band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'}
802.11 Band
client_family : str
client_manufacture : str
Expand Down
88 changes: 88 additions & 0 deletions src/mistapi/api/v1/orgs/exports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
"""
--------------------------------------------------------------------------------
------------------------- 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 getOrgE911Report(mist_session: _APISession, org_id: str) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/reports/get-org-e911-report

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}/exports/e911_report"
query_params: dict[str, str] = {}
resp = mist_session.mist_get(uri=uri, query=query_params)
return resp


def disableOrgE911Report(mist_session: _APISession, org_id: str) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/reports/disable-org-e911-report

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}/exports/e911_report"
query_params: dict[str, str] = {}
resp = mist_session.mist_delete(uri=uri, query=query_params)
return resp


def enableOrgE911Report(mist_session: _APISession, org_id: str) -> _APIResponse:
"""
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/reports/enable-org-e911-report

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}/exports/e911_report"
resp = mist_session.mist_post(uri=uri)
return resp
24 changes: 20 additions & 4 deletions src/mistapi/api/v1/orgs/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,12 @@ def updateOrgInventoryAssignment(
def countOrgInventory(
mist_session: _APISession,
org_id: str,
type: str | None = None,
distinct: str | None = None,
type: str | None = None,
site_id: str | None = None,
model: str | None = None,
version: str | None = None,
status: str | None = None,
limit: int | None = None,
) -> _APIResponse:
"""
Expand All @@ -172,8 +176,12 @@ def countOrgInventory(

QUERY PARAMS
------------
type : str{'ap', 'gateway', 'switch'}, default: ap
distinct : str{'model', 'status', 'site_id', 'sku', 'version'}, default: model
type : str{'ap', 'gateway', 'switch'}, default: ap
site_id : str
model : str
version : str
status : str{'connected', 'disconnected'}
limit : int, default: 100

RETURN
Expand All @@ -184,10 +192,18 @@ def countOrgInventory(

uri = f"/api/v1/orgs/{org_id}/inventory/count"
query_params: dict[str, str] = {}
if type:
query_params["type"] = str(type)
if distinct:
query_params["distinct"] = str(distinct)
if type:
query_params["type"] = str(type)
if site_id:
query_params["site_id"] = str(site_id)
if model:
query_params["model"] = str(model)
if version:
query_params["version"] = str(version)
if status:
query_params["status"] = str(status)
if limit:
query_params["limit"] = str(limit)
resp = mist_session.mist_get(uri=uri, query=query_params)
Expand Down
Loading
Loading