Skip to content

Commit 1a17b6a

Browse files
committed
0.60.4
1 parent 9015c27 commit 1a17b6a

18 files changed

Lines changed: 261 additions & 87 deletions

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "mist_openapi"]
22
path = mist_openapi
33
url = https://github.com/mistsys/mist_openapi.git
4-
branch = 2602.1.2
4+
branch = 2602.1.5

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
11
# CHANGELOG
2+
## Version 0.60.4 (March 2026)
3+
4+
**Released**: March 3, 2026
5+
6+
This release updates the OpenAPI submodule to version 2602.1.4, adds the new Map Stacks API, and includes various API improvements and bug fixes.
7+
8+
---
9+
10+
### 1. NEW FEATURES
11+
12+
##### **Site Map Stacks API**
13+
- Added new `sites/mapstacks.py` module with `listSiteMapStacks()` and `createSiteMapStack()` functions
14+
15+
---
16+
17+
### 2. CHANGES
18+
19+
##### **API Function Updates**
20+
- Updated `searchOrgInventory()` in `orgs/inventory.py`: Added `model` parameter for device model filtering
21+
- Updated `searchOrgJsiAssetsAndContracts()` in `orgs/jsi.py`:
22+
- Replaced `eol_duration` and `eos_duration` with date-based filters: `eol_after`, `eol_before`, `eos_after`, `eos_before`
23+
- Added `version_eos_after` and `version_eos_before` for software version end-of-support filtering
24+
- Added `sirt_id` and `pbn_id` for security advisory filtering
25+
- Updated `searchOrgAlarms()` and `searchSiteAlarms()` documentation with Marvis alarm group details
26+
27+
28+
---
29+
30+
### 3. BUG FIXES
31+
32+
- Fixed `APIResponse.data` type annotation to support both `dict` and `list` responses
33+
- Fixed `_check_next()` method to properly handle list responses in pagination
34+
35+
---
36+
37+
### Breaking Changes
38+
39+
- `searchOrgJsiAssetsAndContracts()`: Parameters `eol_duration` and `eos_duration` have been replaced with `eol_after`, `eol_before`, `eos_after`, and `eos_before`
40+
41+
---
42+
243
## Version 0.60.3 (February 2026)
344

445
**Released**: February 21, 2026

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.60.3"
7+
version = "0.60.4"
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/__api_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
URL of the HTTP Request
3535
"""
3636
self.raw_data: str = ""
37-
self.data: dict = {}
37+
self.data: dict | list = {}
3838
self.url: str = url
3939
self.next: str | None = None
4040
self.headers: CaseInsensitiveDict[str] | None = None
@@ -67,7 +67,7 @@ def __init__(
6767

6868
def _check_next(self) -> None:
6969
logger.debug("apiresponse:_check_next")
70-
if "next" in self.data:
70+
if isinstance(self.data, dict) and "next" in self.data:
7171
self.next = self.data["next"]
7272
logger.debug(f"apiresponse:_check_next:set next to {self.next}")
7373
elif self.headers:

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.60.3"
1+
__version__ = "0.60.4"
22
__author__ = "Thomas Munzer <tmunzer@juniper.net>"

src/mistapi/api/v1/orgs/alarms.py

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -144,38 +144,43 @@ def searchOrgAlarms(
144144
search_after: str | None = None,
145145
) -> _APIResponse:
146146
"""
147-
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/alarms/search-org-alarms
148-
149-
PARAMS
150-
-----------
151-
mistapi.APISession : mist_session
152-
mistapi session including authentication and Mist host information
153-
154-
PATH PARAMS
155-
-----------
156-
org_id : str
157-
158-
QUERY PARAMS
159-
------------
160-
site_id : str
161-
group : str{'infrastructure', 'marvis', 'security'}
162-
Alarm group. enum: `infrastructure`, `marvis`, `security`
163-
severity : str{'critical', 'info', 'warn'}
164-
Severity of the alarm. enum: `critical`, `info`, `warn`
165-
type : str
166-
ack_admin_name : str
167-
acked : bool
168-
start : str
169-
end : str
170-
duration : str, default: 1d
171-
limit : int, default: 100
172-
sort : str, default: timestamp
173-
search_after : str
174-
175-
RETURN
176-
-----------
177-
mistapi.APIResponse
178-
response from the API call
147+
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/alarms/search-org-alarms
148+
149+
PARAMS
150+
-----------
151+
mistapi.APISession : mist_session
152+
mistapi session including authentication and Mist host information
153+
154+
PATH PARAMS
155+
-----------
156+
org_id : str
157+
158+
QUERY PARAMS
159+
------------
160+
site_id : str
161+
group : str{'infrastructure', 'marvis', 'security'}
162+
Alarm group. enum: `infrastructure`, `marvis`, `security`.
163+
The `marvis` group is used to retrieve AI-driven network issue detections.
164+
Known Marvis alarm types include: `bad_cable`, `bad_wan_uplink`, `dns_failure`,
165+
`arp_failure`, `auth_failure`, `dhcp_failure`, `missing_vlan`,
166+
`negotiation_mismatch`, `port_flap`. Results include resolution status
167+
(`status`, `resolved_time`) and affected entity details."
168+
severity : str{'critical', 'info', 'warn'}
169+
Severity of the alarm. enum: `critical`, `info`, `warn`
170+
type : str
171+
ack_admin_name : str
172+
acked : bool
173+
start : str
174+
end : str
175+
duration : str, default: 1d
176+
limit : int, default: 100
177+
sort : str, default: timestamp
178+
search_after : str
179+
180+
RETURN
181+
-----------
182+
mistapi.APIResponse
183+
response from the API call
179184
"""
180185

181186
uri = f"/api/v1/orgs/{org_id}/alarms/search"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def searchOrgDeviceEvents(
260260
------------
261261
mac : str
262262
model : str
263-
device_type : str{'all', 'ap', 'gateway', 'switch'}, default: ap
263+
device_type : str, default: ap
264264
text : str
265265
timestamp : str
266266
type : str

src/mistapi/api/v1/orgs/inventory.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ def searchOrgInventory(
316316
org_id: str,
317317
type: str | None = None,
318318
mac: str | None = None,
319+
model: str | None = None,
319320
vc_mac: str | None = None,
320321
master_mac: str | None = None,
321322
site_id: str | None = None,
@@ -345,6 +346,7 @@ def searchOrgInventory(
345346
------------
346347
type : str{'ap', 'gateway', 'switch'}, default: ap
347348
mac : str
349+
model : str
348350
vc_mac : str
349351
master_mac : str
350352
site_id : str
@@ -370,6 +372,8 @@ def searchOrgInventory(
370372
query_params["type"] = str(type)
371373
if mac:
372374
query_params["mac"] = str(mac)
375+
if model:
376+
query_params["model"] = str(model)
373377
if vc_mac:
374378
query_params["vc_mac"] = str(vc_mac)
375379
if master_mac:

src/mistapi/api/v1/orgs/jsi.py

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,15 @@ def searchOrgJsiAssetsAndContracts(
245245
sku: str | None = None,
246246
status: str | None = None,
247247
warranty_type: str | None = None,
248-
eol_duration: str | None = None,
249-
eos_duration: str | None = None,
248+
eol_after: str | None = None,
249+
eol_before: str | None = None,
250+
eos_after: str | None = None,
251+
eos_before: str | None = None,
252+
version_eos_after: str | None = None,
253+
version_eos_before: str | None = None,
250254
has_support: bool | None = None,
255+
sirt_id: str | None = None,
256+
pbn_id: str | None = None,
251257
text: str | None = None,
252258
limit: int | None = None,
253259
sort: str | None = None,
@@ -275,9 +281,15 @@ def searchOrgJsiAssetsAndContracts(
275281
Device status
276282
warranty_type : str{'Standard Hardware Warranty', 'Enhanced Hardware Warranty', 'Dead On Arrival Warranty', 'Limited Lifetime Warranty', 'Software Warranty', 'Limited Lifetime Warranty for WLA', 'Warranty-JCPO EOL (DOA Not Included)', 'MIST Enhanced Hardware Warranty', 'MIST Standard Warranty', 'Determine Lifetime warranty'}
277283
Device warranty type
278-
eol_duration : str
279-
eos_duration : str
284+
eol_after : str
285+
eol_before : str
286+
eos_after : str
287+
eos_before : str
288+
version_eos_after : str
289+
version_eos_before : str
280290
has_support : bool
291+
sirt_id : str
292+
pbn_id : str
281293
text : str
282294
limit : int, default: 100
283295
sort : str, default: timestamp
@@ -303,12 +315,24 @@ def searchOrgJsiAssetsAndContracts(
303315
query_params["status"] = str(status)
304316
if warranty_type:
305317
query_params["warranty_type"] = str(warranty_type)
306-
if eol_duration:
307-
query_params["eol_duration"] = str(eol_duration)
308-
if eos_duration:
309-
query_params["eos_duration"] = str(eos_duration)
318+
if eol_after:
319+
query_params["eol_after"] = str(eol_after)
320+
if eol_before:
321+
query_params["eol_before"] = str(eol_before)
322+
if eos_after:
323+
query_params["eos_after"] = str(eos_after)
324+
if eos_before:
325+
query_params["eos_before"] = str(eos_before)
326+
if version_eos_after:
327+
query_params["version_eos_after"] = str(version_eos_after)
328+
if version_eos_before:
329+
query_params["version_eos_before"] = str(version_eos_before)
310330
if has_support:
311331
query_params["has_support"] = str(has_support)
332+
if sirt_id:
333+
query_params["sirt_id"] = str(sirt_id)
334+
if pbn_id:
335+
query_params["pbn_id"] = str(pbn_id)
312336
if text:
313337
query_params["text"] = str(text)
314338
if limit:

0 commit comments

Comments
 (0)