Shelved alarms counter filter

hello, is there any way to use system.alarms.getShelvedPath with filters ?

I wanted to know the number of shelved alarms with different priorities.

thanks you

Not built in to the call but it returns a list.
You can loop the list and filter it that way.

paths = system.alarm.getShelvedPaths()
for p in paths:
   print "Path: %s, Shelved by: %s, expires: %s, is expired? %s, Shelved Time: %s" % (p.getPath(), p.getUser(), p.getExpiration(), p.isExpired(), p.getShelveTime())
for p in system.alarm.getShelvedPaths():
		
		alarmPath=p.getPath() 
		path=str(alarmPath).rsplit(':',3)[1] 
	
		tagConfig = system.tag.getConfiguration(path)
	
		print tagConfig[0]['alarms'][0]['priority'])