-
It's been a good day or 365+ since I've had much to do with PowerFGT but I have a need right now to find objects (for example, an address or address-group) that have a zero reference count. In the web interface you can see this easily. I was hoping to find an easy way to do that. Anyone done anything like that ? It could be an easy thing, but I can't see it right now... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @poundy Welcome back :) You can use with_meta=1 on uri for get the ref... (Invoke-FGTRestMethod "api/v2/cmdb/firewall/address/H_10.200.1.22?with_meta=1&datasrouce=1").results
name : H_10.200.1.22
q_origin_key : H_10.200.1.22
uuid : 9272cdf2-a115-51eb-e31e-5f655998e2eb
subnet : 10.200.1.22 255.255.255.255
type : ipmask
sub-type : sdn
clearpass-spt : unknown
start-mac : 00:00:00:00:00:00
end-mac : 00:00:00:00:00:00
country :
cache-ttl : 0
sdn :
fsso-group : {}
interface :
obj-type : ip
comment :
associated-interface : LAN
color : 0
filter :
sdn-addr-type : private
obj-id :
list : {}
tagging : {}
allow-routing : disable
fabric-object : disable
q_ref : 1
q_static : False
q_no_rename : False
q_global_entry : False
q_type : 30
q_path : firewall
q_name : address
q_mkey_type : string
q_no_edit : False
q_class : ftnt-address ftnt-color-0 Adding q_xxx object (on this case, there is 1 ref) and for get usage, you can use this API Call (Invoke-FGTRestMethod "api/v2/monitor/system/object/usage?mkey=H_10.200.1.22&qtypes=[30]&scope=vdom").results.currently_using
path : firewall
name : policy
reference_count : 0
static : False
table_type : table
mkey : 60
vdom : root
range : vdom
attribute : srcaddr => mkey is the rule id of policy use this object Patchs are welcome to add some Get function :) (or update -meta parameter to Get function !) |
Beta Was this translation helpful? Give feedback.
Hi @poundy
Welcome back :)
You can use with_meta=1 on uri for get the ref...