This post is a few months old, but in case you never got the answer, I figured out the syntax of the object filter recently.
# Aruba OBJECT filter expressions
# The following sample request shows how to return sub-objects of "ipaddress" and "mtu" value configured
# for all interface VLAN (GET /object/int_vlan) at this particular node (or as derived from higher in the hierarchy)
# [{"OBJECT":{ "$eq":["int_vlan.int_vlan_ip","int_vlan.int_vlan_mtu"]}}]
# refer to ArubaOS API Guide under the section GET modifiers > Object Filter
# filter example using GET /object/int_gig:
# [{"OBJECT":{ "$eq":["int_gig.slot/module/port"]}}]
# this returns 0/0/0, 0/0/1, etc
You can see in both of these examples that "OBJECT" is a literal string. The "filter" being used here is not a standard JSON filter expression; I'm guessing it's proprietary syntax.
Here is my python using the int_gig filter above:
myHeaders = {'Content-Type': 'application/json','Accept': 'application/json'}
# UIDARUBA parameter is already stored in myUid
myParams = {'config_path': '/md/00:0b:86:bc:0c:c7',
'UIDARUBA': myUid,
'filter': r'[{"OBJECT":{ "$eq":["int_gig.slot/module/port"]}}]'
}
# the 'session' below <class requests.Session()> has already been declared and logged in
response = session.get(url="https://mm.example.com/v1/configuration/object/int_gig",
headers=myHeaders,
params=myParams,
cookies=session.cookies)
print (response.text)
That produces this result:
{
"_data": {
"int_gig": [
{
"slot/module/port": "0/0/0"
},
{
"slot/module/port": "0/0/1"
},
<snip>
]
}
}