Query Event Data
Query events
This code queries data from the events where an event property has a certain value using the PropertyFilter (my Swagger). The following script requires an EventTypeUUID to be filled in. The event type UUID can be retrieved either programatically or via the webpage. Also fill in Value and the Property you want to filter on.
def query_events(query):
resp = session.get(f"{BASE_URL}/events", params=query, timeout=60)
resp.raise_for_status()
return resp.json()
querystring = {
"EventTypeUUIDs": ["my-event-type-uuid"],
"PropertyFilter": [{
"Property": "property-name",
"Datatype": "string",
"Operator": "=",
"ScopedVars": "{}",
"Value": "value-of-event-property"
}]
}
events = query_events(querystring)
print(json.dumps(events, indent=2))