Hi Ryna,
I am using the "query_paged" endpoint. Sorry I should have provided more context.
Snippet below;
def search():
payload={"filters": [
{
"conditions": [
{
"method": "equals",
"field_name": "creator.email" ,
"value": "user@email.com"
}
]
}
],
"sorts": [{ "field_name": "name", "type": "desc" }],
"start": 0,
"length": 0,
"recordsTotal": 0
}
}
client = resilient.get_client(config)
url = "/incidents/query_paged?return_level=full&field_handle=-1"
try:
res = client.post(url, payload)
return res
except Exception as e:
print(e)
return "error"
Funny thing is, this field works "
properties.c_requester_internet_email"
Thanks
------------------------------
Apronti Gilbert
------------------------------
Original Message:
Sent: Tue May 19, 2020 10:24 AM
From: Ryan Gordon
Subject: How to query for nested fields
Hi Apronti,
Are you trying to perform this query using the search_ex API endpoint ?
If so this query should help you.
{ "query": "creator.lname='Ryan'", "org_id": <your_org_id>, "filters": { "incident": [ { "conditions": [] } ] }, "types": [ "incident" ]}Note the "types" attribute meaning this query will only be done on incidents. Remove the term incident for a fuller search but this may take longer.
If this is what you're looking for could you 'Recommend' the answer or mark it as best answer so others can find this info in future.
Hope this helps,
Ryan
------------------------------
Ryan Gordon
Security Software Engineer
IBM
------------------------------