From 3267f2d6e0fb660913b7257871b4c8f1aff5f3c8 Mon Sep 17 00:00:00 2001 From: Thomas Munzer Date: Fri, 1 May 2026 17:39:10 +0200 Subject: [PATCH 1/3] 0.62.0 --- CHANGELOG.md | 66 ++++++++ Makefile | 2 +- pyproject.toml | 2 +- src/mistapi/__version.py | 2 +- src/mistapi/api/v1/msps/ssos.py | 32 ++++ src/mistapi/api/v1/orgs/__init__.py | 2 + src/mistapi/api/v1/orgs/clients.py | 8 +- src/mistapi/api/v1/orgs/exports.py | 88 +++++++++++ src/mistapi/api/v1/orgs/inventory.py | 24 ++- src/mistapi/api/v1/orgs/jsi.py | 40 ++++- src/mistapi/api/v1/orgs/logs.py | 62 ++++---- src/mistapi/api/v1/orgs/mxedges.py | 59 ++++++++ src/mistapi/api/v1/orgs/nac_clients.py | 32 ++++ src/mistapi/api/v1/orgs/ssos.py | 32 ++++ src/mistapi/api/v1/sites/__init__.py | 8 + .../api/v1/sites/apply_auto_map_assignment.py | 45 ++++++ .../api/v1/sites/auto_map_assignment.py | 99 ++++++++++++ .../api/v1/sites/clear_auto_map_assignment.py | 45 ++++++ src/mistapi/api/v1/sites/clients.py | 10 +- src/mistapi/api/v1/sites/devices.py | 32 ++++ src/mistapi/api/v1/sites/mxedges.py | 143 ++++++++++++++++++ src/mistapi/api/v1/sites/nac_clients.py | 32 ++++ src/mistapi/api/v1/sites/rrm.py | 48 +++++- src/mistapi/api/v1/sites/search.py | 77 ++++++++++ src/mistapi/api/v1/sites/sle.py | 7 +- uv.lock | 2 +- 26 files changed, 937 insertions(+), 62 deletions(-) create mode 100644 src/mistapi/api/v1/orgs/exports.py create mode 100644 src/mistapi/api/v1/sites/apply_auto_map_assignment.py create mode 100644 src/mistapi/api/v1/sites/auto_map_assignment.py create mode 100644 src/mistapi/api/v1/sites/clear_auto_map_assignment.py create mode 100644 src/mistapi/api/v1/sites/search.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 9904fd4..87ae570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -14,6 +79,7 @@ Fixed `Privileges.__init__()` to correctly handle lists containing `_Privilege` --- + ## Version 0.61.4 (April 2026) **Released**: April 1, 2026 diff --git a/Makefile b/Makefile index a9a83ec..e1017a7 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,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: #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 diff --git a/pyproject.toml b/pyproject.toml index d46e9f1..a1a4656 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] diff --git a/src/mistapi/__version.py b/src/mistapi/__version.py index 0a5f5c4..08385b5 100644 --- a/src/mistapi/__version.py +++ b/src/mistapi/__version.py @@ -1,2 +1,2 @@ -__version__ = "0.61.5" +__version__ = "0.62.0" __author__ = "Thomas Munzer " diff --git a/src/mistapi/api/v1/msps/ssos.py b/src/mistapi/api/v1/msps/ssos.py index ab88ee1..6495df8 100644 --- a/src/mistapi/api/v1/msps/ssos.py +++ b/src/mistapi/api/v1/msps/ssos.py @@ -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: diff --git a/src/mistapi/api/v1/orgs/__init__.py b/src/mistapi/api/v1/orgs/__init__.py index 51d8700..c6e76f4 100644 --- a/src/mistapi/api/v1/orgs/__init__.py +++ b/src/mistapi/api/v1/orgs/__init__.py @@ -31,6 +31,7 @@ devices, events, evpn_topologies, + exports, gatewaytemplates, guests, idpprofiles, @@ -114,6 +115,7 @@ "devices", "events", "evpn_topologies", + "exports", "gatewaytemplates", "guests", "idpprofiles", diff --git a/src/mistapi/api/v1/orgs/clients.py b/src/mistapi/api/v1/orgs/clients.py index 9e765f5..8654b5c 100644 --- a/src/mistapi/api/v1/orgs/clients.py +++ b/src/mistapi/api/v1/orgs/clients.py @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/src/mistapi/api/v1/orgs/exports.py b/src/mistapi/api/v1/orgs/exports.py new file mode 100644 index 0000000..5da0077 --- /dev/null +++ b/src/mistapi/api/v1/orgs/exports.py @@ -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 diff --git a/src/mistapi/api/v1/orgs/inventory.py b/src/mistapi/api/v1/orgs/inventory.py index 85103b0..f5fd203 100644 --- a/src/mistapi/api/v1/orgs/inventory.py +++ b/src/mistapi/api/v1/orgs/inventory.py @@ -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: """ @@ -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 @@ -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) diff --git a/src/mistapi/api/v1/orgs/jsi.py b/src/mistapi/api/v1/orgs/jsi.py index dde8c0b..e3df9d5 100644 --- a/src/mistapi/api/v1/orgs/jsi.py +++ b/src/mistapi/api/v1/orgs/jsi.py @@ -515,12 +515,18 @@ def countOrgJsiSirt( def searchOrgJsiSirt( mist_session: _APISession, org_id: str, - versions: str | None = None, - models: str | None = None, severity: str | None = None, id: str | None = None, + updated_after: str | None = None, + updated_before: str | None = None, + published_after: str | None = None, + published_before: str | None = None, + models: str | None = None, + versions: str | None = None, + text: str | None = None, limit: int | None = None, page: int | None = None, + sort: str | None = None, search_after: str | None = None, start: str | None = None, end: str | None = None, @@ -539,12 +545,18 @@ def searchOrgJsiSirt( QUERY PARAMS ------------ - versions : str - models : str severity : str id : str + updated_after : str + updated_before : str + published_after : str + published_before : str + models : str + versions : str + text : str limit : int, default: 100 page : int, default: 1 + sort : str, default: timestamp search_after : str start : str end : str @@ -557,18 +569,30 @@ def searchOrgJsiSirt( uri = f"/api/v1/orgs/{org_id}/jsi/sirt/search" query_params: dict[str, str] = {} - if versions: - query_params["versions"] = str(versions) - if models: - query_params["models"] = str(models) if severity: query_params["severity"] = str(severity) if id: query_params["id"] = str(id) + if updated_after: + query_params["updated_after"] = str(updated_after) + if updated_before: + query_params["updated_before"] = str(updated_before) + if published_after: + query_params["published_after"] = str(published_after) + if published_before: + query_params["published_before"] = str(published_before) + if models: + query_params["models"] = str(models) + if versions: + query_params["versions"] = str(versions) + if text: + query_params["text"] = str(text) if limit: query_params["limit"] = str(limit) if page: query_params["page"] = str(page) + if sort: + query_params["sort"] = str(sort) if search_after: query_params["search_after"] = str(search_after) if start: diff --git a/src/mistapi/api/v1/orgs/logs.py b/src/mistapi/api/v1/orgs/logs.py index c5fe638..f4764ad 100644 --- a/src/mistapi/api/v1/orgs/logs.py +++ b/src/mistapi/api/v1/orgs/logs.py @@ -14,21 +14,21 @@ from mistapi.__api_response import APIResponse as _APIResponse -def listOrgAuditLogs( +def countOrgAuditLogs( mist_session: _APISession, org_id: str, - site_id: str | None = None, + distinct: str | None = None, + admin_id: str | None = None, admin_name: str | None = None, + site_id: str | None = None, message: str | None = None, - sort: str | None = None, start: str | None = None, end: str | None = None, duration: str | None = None, limit: int | None = None, - page: int | None = None, ) -> _APIResponse: """ - API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/logs/list-org-audit-logs + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/logs/count-org-audit-logs PARAMS ----------- @@ -41,16 +41,15 @@ def listOrgAuditLogs( QUERY PARAMS ------------ - site_id : str + distinct : str{'admin_id', 'admin_name', 'message', 'site_id'}, default: admin_name + admin_id : str admin_name : str + site_id : str message : str - sort : str{'-timestamp', 'admin_id', 'site_id', 'timestamp'} - Sort order start : str end : str duration : str, default: 1d limit : int, default: 100 - page : int, default: 1 RETURN ----------- @@ -58,16 +57,18 @@ def listOrgAuditLogs( response from the API call """ - uri = f"/api/v1/orgs/{org_id}/logs" + uri = f"/api/v1/orgs/{org_id}/logs/count" query_params: dict[str, str] = {} - if site_id: - query_params["site_id"] = str(site_id) + if distinct: + query_params["distinct"] = str(distinct) + if admin_id: + query_params["admin_id"] = str(admin_id) if admin_name: query_params["admin_name"] = str(admin_name) + if site_id: + query_params["site_id"] = str(site_id) if message: query_params["message"] = str(message) - if sort: - query_params["sort"] = str(sort) if start: query_params["start"] = str(start) if end: @@ -76,27 +77,25 @@ def listOrgAuditLogs( query_params["duration"] = str(duration) if limit: query_params["limit"] = str(limit) - if page: - query_params["page"] = str(page) resp = mist_session.mist_get(uri=uri, query=query_params) return resp -def countOrgAuditLogs( +def listOrgAuditLogs( mist_session: _APISession, org_id: str, - distinct: str | None = None, - admin_id: str | None = None, - admin_name: str | None = None, site_id: str | None = None, + admin_name: str | None = None, message: str | None = None, + sort: str | None = None, start: str | None = None, end: str | None = None, duration: str | None = None, limit: int | None = None, + page: int | None = None, ) -> _APIResponse: """ - API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/logs/count-org-audit-logs + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/logs/list-org-audit-logs PARAMS ----------- @@ -109,15 +108,16 @@ def countOrgAuditLogs( QUERY PARAMS ------------ - distinct : str{'admin_id', 'admin_name', 'message', 'site_id'}, default: admin_name - admin_id : str - admin_name : str site_id : str + admin_name : str message : str + sort : str{'-timestamp', 'admin_id', 'site_id', 'timestamp'} + Sort order start : str end : str duration : str, default: 1d limit : int, default: 100 + page : int, default: 1 RETURN ----------- @@ -125,18 +125,16 @@ def countOrgAuditLogs( response from the API call """ - uri = f"/api/v1/orgs/{org_id}/logs/count" + uri = f"/api/v1/orgs/{org_id}/logs/search" query_params: dict[str, str] = {} - if distinct: - query_params["distinct"] = str(distinct) - if admin_id: - query_params["admin_id"] = str(admin_id) - if admin_name: - query_params["admin_name"] = str(admin_name) if site_id: query_params["site_id"] = str(site_id) + if admin_name: + query_params["admin_name"] = str(admin_name) if message: query_params["message"] = str(message) + if sort: + query_params["sort"] = str(sort) if start: query_params["start"] = str(start) if end: @@ -145,5 +143,7 @@ def countOrgAuditLogs( query_params["duration"] = str(duration) if limit: query_params["limit"] = str(limit) + if page: + query_params["page"] = str(page) resp = mist_session.mist_get(uri=uri, query=query_params) return resp diff --git a/src/mistapi/api/v1/orgs/mxedges.py b/src/mistapi/api/v1/orgs/mxedges.py index 4fc974f..27b16d4 100644 --- a/src/mistapi/api/v1/orgs/mxedges.py +++ b/src/mistapi/api/v1/orgs/mxedges.py @@ -578,6 +578,65 @@ def getOrgMxEdgeUpgrade( return resp +def updateOrgMxEdgeUpgrade( + mist_session: _APISession, org_id: str, upgrade_id: str, body: dict +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/utilities/upgrade/update-org-mx-edge-upgrade + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + org_id : str + upgrade_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/orgs/{org_id}/mxedges/upgrade/{upgrade_id}" + resp = mist_session.mist_put(uri=uri, body=body) + return resp + + +def cancelOrgMxEdgeUpgrade( + mist_session: _APISession, org_id: str, upgrade_id: str +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/utilities/upgrade/cancel-org-mx-edge-upgrade + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + org_id : str + upgrade_id : str + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/orgs/{org_id}/mxedges/upgrade/{upgrade_id}/cancel" + resp = mist_session.mist_post(uri=uri) + return resp + + def getOrgMxEdgeUpgradeInfo( mist_session: _APISession, org_id: str, diff --git a/src/mistapi/api/v1/orgs/nac_clients.py b/src/mistapi/api/v1/orgs/nac_clients.py index 24e6515..3a065a6 100644 --- a/src/mistapi/api/v1/orgs/nac_clients.py +++ b/src/mistapi/api/v1/orgs/nac_clients.py @@ -518,3 +518,35 @@ def searchOrgNacClients( query_params["search_after"] = str(search_after) resp = mist_session.mist_get(uri=uri, query=query_params) return resp + + +def sendOrgNacClientCoA( + mist_session: _APISession, org_id: str, client_mac: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/clients/nac/send-org-nac-client-co-a + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + org_id : str + client_mac : 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/orgs/{org_id}/nac_clients/{client_mac}/coa" + resp = mist_session.mist_post(uri=uri, body=body) + return resp diff --git a/src/mistapi/api/v1/orgs/ssos.py b/src/mistapi/api/v1/orgs/ssos.py index e0e2922..d3a8dea 100644 --- a/src/mistapi/api/v1/orgs/ssos.py +++ b/src/mistapi/api/v1/orgs/ssos.py @@ -168,6 +168,38 @@ def updateOrgSso( return resp +def deleteOrgSsoAdmins( + mist_session: _APISession, org_id: str, sso_id: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/sso/delete-org-sso-admins + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + org_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/orgs/{org_id}/ssos/{sso_id}/delete_admins" + resp = mist_session.mist_post(uri=uri, body=body) + return resp + + def listOrgSsoLatestFailures( mist_session: _APISession, org_id: str, diff --git a/src/mistapi/api/v1/sites/__init__.py b/src/mistapi/api/v1/sites/__init__.py index 8ebdbb5..65e2528 100644 --- a/src/mistapi/api/v1/sites/__init__.py +++ b/src/mistapi/api/v1/sites/__init__.py @@ -12,16 +12,20 @@ from mistapi.api.v1.sites import ( sites, + search, aamwprofiles, alarms, analyze_spectrum, anomaly, + apply_auto_map_assignment, apps, aptemplates, assetfilters, assets, + auto_map_assignment, avprofiles, beacons, + clear_auto_map_assignment, clients, deviceprofiles, devices, @@ -78,16 +82,20 @@ __all__ = [ "sites", + "search", "aamwprofiles", "alarms", "analyze_spectrum", "anomaly", + "apply_auto_map_assignment", "apps", "aptemplates", "assetfilters", "assets", + "auto_map_assignment", "avprofiles", "beacons", + "clear_auto_map_assignment", "clients", "deviceprofiles", "devices", diff --git a/src/mistapi/api/v1/sites/apply_auto_map_assignment.py b/src/mistapi/api/v1/sites/apply_auto_map_assignment.py new file mode 100644 index 0000000..0537be0 --- /dev/null +++ b/src/mistapi/api/v1/sites/apply_auto_map_assignment.py @@ -0,0 +1,45 @@ +""" +-------------------------------------------------------------------------------- +------------------------- 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 applySiteAutoMapAssignment( + mist_session: _APISession, site_id: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/auto-map-assignment/apply-site-auto-map-assignment + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_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/sites/{site_id}/apply_auto_map_assignment" + resp = mist_session.mist_post(uri=uri, body=body) + return resp diff --git a/src/mistapi/api/v1/sites/auto_map_assignment.py b/src/mistapi/api/v1/sites/auto_map_assignment.py new file mode 100644 index 0000000..7c7cff9 --- /dev/null +++ b/src/mistapi/api/v1/sites/auto_map_assignment.py @@ -0,0 +1,99 @@ +""" +-------------------------------------------------------------------------------- +------------------------- 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 getSiteAutoMapAssignmentStatus( + mist_session: _APISession, site_id: str +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/auto-map-assignment/get-site-auto-map-assignment-status + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/sites/{site_id}/auto_map_assignment" + query_params: dict[str, str] = {} + resp = mist_session.mist_get(uri=uri, query=query_params) + return resp + + +def cancelSiteAutoMapAssignment( + mist_session: _APISession, site_id: str +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/auto-map-assignment/cancel-site-auto-map-assignment + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/sites/{site_id}/auto_map_assignment" + query_params: dict[str, str] = {} + resp = mist_session.mist_delete(uri=uri, query=query_params) + return resp + + +def startSiteAutoMapAssignment( + mist_session: _APISession, site_id: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/auto-map-assignment/start-site-auto-map-assignment + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_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/sites/{site_id}/auto_map_assignment" + resp = mist_session.mist_post(uri=uri, body=body) + return resp diff --git a/src/mistapi/api/v1/sites/clear_auto_map_assignment.py b/src/mistapi/api/v1/sites/clear_auto_map_assignment.py new file mode 100644 index 0000000..29df112 --- /dev/null +++ b/src/mistapi/api/v1/sites/clear_auto_map_assignment.py @@ -0,0 +1,45 @@ +""" +-------------------------------------------------------------------------------- +------------------------- 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 clearSiteAutoMapAssignment( + mist_session: _APISession, site_id: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/auto-map-assignment/clear-site-auto-map-assignment + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_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/sites/{site_id}/clear_auto_map_assignment" + resp = mist_session.mist_post(uri=uri, body=body) + return resp diff --git a/src/mistapi/api/v1/sites/clients.py b/src/mistapi/api/v1/sites/clients.py index 8a52fcc..194993c 100644 --- a/src/mistapi/api/v1/sites/clients.py +++ b/src/mistapi/api/v1/sites/clients.py @@ -165,7 +165,7 @@ def countSiteWirelessClientEvents( 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 start : str @@ -247,7 +247,7 @@ def searchSiteWirelessClientEvents( 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 nacrule_id : str @@ -442,7 +442,7 @@ def countSiteWirelessClientSessions( ------------ distinct : str{'ap', 'client_family', 'client_manufacture', 'client_model', 'client_os', 'mac', 'ssid', 'wlan_id'}, default: mac 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 @@ -529,7 +529,7 @@ def searchSiteWirelessClientSessions( 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 @@ -712,7 +712,7 @@ def getSiteEventsForClient( type : 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 channel : str wlan_id : str diff --git a/src/mistapi/api/v1/sites/devices.py b/src/mistapi/api/v1/sites/devices.py index 026a4eb..5fa1af2 100644 --- a/src/mistapi/api/v1/sites/devices.py +++ b/src/mistapi/api/v1/sites/devices.py @@ -3522,3 +3522,35 @@ def setSiteVcPort( uri = f"/api/v1/sites/{site_id}/devices/{device_id}/vc/vc_port" resp = mist_session.mist_post(uri=uri, body=body) return resp + + +def enableSiteDeviceZigbeeJoin( + mist_session: _APISession, site_id: str, device_id: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/devices/wireless/enable-site-device-zigbee-join + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + device_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/sites/{site_id}/devices/{device_id}/zigbee_join" + resp = mist_session.mist_post(uri=uri, body=body) + return resp diff --git a/src/mistapi/api/v1/sites/mxedges.py b/src/mistapi/api/v1/sites/mxedges.py index fc3dbea..351c5dd 100644 --- a/src/mistapi/api/v1/sites/mxedges.py +++ b/src/mistapi/api/v1/sites/mxedges.py @@ -195,6 +195,149 @@ def searchSiteMistEdgeEvents( return resp +def listSiteMxEdgeUpgrades(mist_session: _APISession, site_id: str) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/utilities/upgrade/list-site-mx-edge-upgrades + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/sites/{site_id}/mxedges/upgrade" + query_params: dict[str, str] = {} + resp = mist_session.mist_get(uri=uri, query=query_params) + return resp + + +def upgradeSiteMxEdges( + mist_session: _APISession, site_id: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/utilities/upgrade/upgrade-site-mx-edges + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_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/sites/{site_id}/mxedges/upgrade" + resp = mist_session.mist_post(uri=uri, body=body) + return resp + + +def getSiteMxEdgeUpgrade( + mist_session: _APISession, site_id: str, upgrade_id: str +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/utilities/upgrade/get-site-mx-edge-upgrade + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + upgrade_id : str + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/sites/{site_id}/mxedges/upgrade/{upgrade_id}" + query_params: dict[str, str] = {} + resp = mist_session.mist_get(uri=uri, query=query_params) + return resp + + +def updateSiteMxEdgeUpgrade( + mist_session: _APISession, site_id: str, upgrade_id: str, body: dict +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/utilities/upgrade/update-site-mx-edge-upgrade + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + upgrade_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/sites/{site_id}/mxedges/upgrade/{upgrade_id}" + resp = mist_session.mist_put(uri=uri, body=body) + return resp + + +def cancelSiteMxEdgeUpgrade( + mist_session: _APISession, site_id: str, upgrade_id: str +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/utilities/upgrade/cancel-site-mx-edge-upgrade + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + upgrade_id : str + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/sites/{site_id}/mxedges/upgrade/{upgrade_id}/cancel" + resp = mist_session.mist_post(uri=uri) + return resp + + def getSiteMxEdge( mist_session: _APISession, site_id: str, mxedge_id: str ) -> _APIResponse: diff --git a/src/mistapi/api/v1/sites/nac_clients.py b/src/mistapi/api/v1/sites/nac_clients.py index e5a0e81..1facb91 100644 --- a/src/mistapi/api/v1/sites/nac_clients.py +++ b/src/mistapi/api/v1/sites/nac_clients.py @@ -506,3 +506,35 @@ def searchSiteNacClients( query_params["search_after"] = str(search_after) resp = mist_session.mist_get(uri=uri, query=query_params) return resp + + +def sendSiteNacClientCoA( + mist_session: _APISession, site_id: str, client_mac: str, body: dict | list +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/clients/nac/send-site-nac-client-co-a + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + client_mac : 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/sites/{site_id}/nac_clients/{client_mac}/coa" + resp = mist_session.mist_post(uri=uri, body=body) + return resp diff --git a/src/mistapi/api/v1/sites/rrm.py b/src/mistapi/api/v1/sites/rrm.py index 7d6234b..35485e7 100644 --- a/src/mistapi/api/v1/sites/rrm.py +++ b/src/mistapi/api/v1/sites/rrm.py @@ -14,6 +14,48 @@ from mistapi.__api_response import APIResponse as _APIResponse +def getSiteChannelScores( + mist_session: _APISession, + site_id: str, + band: str, + start: str | None = None, + end: str | None = None, +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/rrm/get-site-channel-scores + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'} + 802.11 Band + + QUERY PARAMS + ------------ + start : str + end : str + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/sites/{site_id}/rrm/channel_scores/band/{band}" + query_params: dict[str, str] = {} + if start: + query_params["start"] = str(start) + if end: + query_params["end"] = str(end) + resp = mist_session.mist_get(uri=uri, query=query_params) + return resp + + def getSiteCurrentChannelPlanning( mist_session: _APISession, site_id: str ) -> _APIResponse: @@ -56,7 +98,7 @@ def getSiteCurrentRrmConsiderations( ----------- site_id : str device_id : str - band : str{'24', '5', '6'} + band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'} 802.11 Band RETURN @@ -95,7 +137,7 @@ def listSiteRrmEvents( QUERY PARAMS ------------ - band : str{'24', '5', '6'} + band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'} 802.11 Band start : str end : str @@ -145,7 +187,7 @@ def listSiteCurrentRrmNeighbors( PATH PARAMS ----------- site_id : str - band : str{'24', '5', '6'} + band : str{'24', '5', '5-dedicated', '5-selectable', '6', '6-dedicated', '6-selectable'} 802.11 Band QUERY PARAMS diff --git a/src/mistapi/api/v1/sites/search.py b/src/mistapi/api/v1/sites/search.py new file mode 100644 index 0000000..e35a55f --- /dev/null +++ b/src/mistapi/api/v1/sites/search.py @@ -0,0 +1,77 @@ +""" +-------------------------------------------------------------------------------- +------------------------- 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 searchSiteIotEndpoints( + mist_session: _APISession, + site_id: str, + ap_mac: str | None = None, + mac: str | None = None, + type: str | None = None, + mfg: str | None = None, + limit: int | None = None, + start: str | None = None, + end: str | None = None, + duration: str | None = None, +) -> _APIResponse: + """ + API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/sites/stats/iot-endpoints/search-site-iot-endpoints + + PARAMS + ----------- + mistapi.APISession : mist_session + mistapi session including authentication and Mist host information + + PATH PARAMS + ----------- + site_id : str + + QUERY PARAMS + ------------ + ap_mac : str + mac : str + type : str + mfg : str + limit : int, default: 100 + start : str + end : str + duration : str, default: 1d + + RETURN + ----------- + mistapi.APIResponse + response from the API call + """ + + uri = f"/api/v1/sites/{site_id}//search" + query_params: dict[str, str] = {} + if ap_mac: + query_params["ap_mac"] = str(ap_mac) + if mac: + query_params["mac"] = str(mac) + if type: + query_params["type"] = str(type) + if mfg: + query_params["mfg"] = str(mfg) + 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) + resp = mist_session.mist_get(uri=uri, query=query_params) + return resp diff --git a/src/mistapi/api/v1/sites/sle.py b/src/mistapi/api/v1/sites/sle.py index c5f2eec..286c25d 100644 --- a/src/mistapi/api/v1/sites/sle.py +++ b/src/mistapi/api/v1/sites/sle.py @@ -10,15 +10,16 @@ -------------------------------------------------------------------------------- """ +import deprecation + from mistapi import APISession as _APISession from mistapi.__api_response import APIResponse as _APIResponse -import deprecation @deprecation.deprecated( deprecated_in="0.59.2", removed_in="0.65.0", - current_version="0.61.5", + current_version="0.62.0", details="function replaced with getSiteSleClassifierSummaryTrend", ) def getSiteSleClassifierDetails( @@ -690,7 +691,7 @@ def listSiteSleImpactedWirelessClients( @deprecation.deprecated( deprecated_in="0.59.2", removed_in="0.65.0", - current_version="0.61.5", + current_version="0.62.0", details="function replaced with getSiteSleSummaryTrend", ) def getSiteSleSummary( diff --git a/uv.lock b/uv.lock index 088578f..ed87946 100644 --- a/uv.lock +++ b/uv.lock @@ -567,7 +567,7 @@ wheels = [ [[package]] name = "mistapi" -version = "0.61.5" +version = "0.62.0" source = { editable = "." } dependencies = [ { name = "deprecation" }, From ec98debafdc80ed2f12ddc4bd74ecd198d330f5e Mon Sep 17 00:00:00 2001 From: Thomas Munzer Date: Fri, 1 May 2026 17:45:13 +0200 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e1017a7..30939f1 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,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 - git submodule update --remote mist_openapi +generate: setup-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 From ce4ab8313e97c113e7d7453e40c2304c3aea9716 Mon Sep 17 00:00:00 2001 From: Thomas Munzer Date: Fri, 1 May 2026 17:52:28 +0200 Subject: [PATCH 3/3] fix the searchSiteIotEndpoints path --- src/mistapi/api/v1/sites/__init__.py | 4 ++-- src/mistapi/api/v1/sites/{search.py => iotendpoints.py} | 2 +- src/mistapi/api/v1/sites/sle.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) rename src/mistapi/api/v1/sites/{search.py => iotendpoints.py} (97%) diff --git a/src/mistapi/api/v1/sites/__init__.py b/src/mistapi/api/v1/sites/__init__.py index 65e2528..71cd926 100644 --- a/src/mistapi/api/v1/sites/__init__.py +++ b/src/mistapi/api/v1/sites/__init__.py @@ -12,7 +12,6 @@ from mistapi.api.v1.sites import ( sites, - search, aamwprofiles, alarms, analyze_spectrum, @@ -35,6 +34,7 @@ guests, idpprofiles, insights, + iotendpoints, licenses, location, maps, @@ -82,7 +82,6 @@ __all__ = [ "sites", - "search", "aamwprofiles", "alarms", "analyze_spectrum", @@ -105,6 +104,7 @@ "guests", "idpprofiles", "insights", + "iotendpoints", "licenses", "location", "maps", diff --git a/src/mistapi/api/v1/sites/search.py b/src/mistapi/api/v1/sites/iotendpoints.py similarity index 97% rename from src/mistapi/api/v1/sites/search.py rename to src/mistapi/api/v1/sites/iotendpoints.py index e35a55f..248ae75 100644 --- a/src/mistapi/api/v1/sites/search.py +++ b/src/mistapi/api/v1/sites/iotendpoints.py @@ -55,7 +55,7 @@ def searchSiteIotEndpoints( response from the API call """ - uri = f"/api/v1/sites/{site_id}//search" + uri = f"/api/v1/sites/{site_id}/iotendpoints/search" query_params: dict[str, str] = {} if ap_mac: query_params["ap_mac"] = str(ap_mac) diff --git a/src/mistapi/api/v1/sites/sle.py b/src/mistapi/api/v1/sites/sle.py index 286c25d..078cc0e 100644 --- a/src/mistapi/api/v1/sites/sle.py +++ b/src/mistapi/api/v1/sites/sle.py @@ -10,10 +10,9 @@ -------------------------------------------------------------------------------- """ -import deprecation - from mistapi import APISession as _APISession from mistapi.__api_response import APIResponse as _APIResponse +import deprecation @deprecation.deprecated(