Python examples
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 get get https //historian mycompany com 18000/api/events 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)) sucessful response \[ { "uuid" "9db35e6c 8fd0 11f0 8f00 02cba4236809", "createdby" null, "createdat" "2025 09 12t12 04 21 022914z", "updatedby" null, "updatedat" "2025 09 12t14 01 22 884988z", "attributes" {}, "metadata" {}, "organizationuuid" "fbf184b2 5c29 11ef 8bf9 0242ac12000a", "starttime" "2025 09 12t09 19 52 813z", "parentuuid" null, "stoptime" "2025 09 12t12 03 16 32z", "source" "auto", "status" "processed", "assetuuid" "dc75ab4e 114c 11f0 b8bf 2e673dc3bc0f", "eventconfigurationuuid" "267d7cba 4647 11f0 9122 4672b84d43fa", "eventtypeuuid" "1a998ee8 4647 11f0 bf5e 4672b84d43fa" }, { "uuid" "a2a9c620 8e51 11f0 b62a 02cba4236809", "createdby" null, "createdat" "2025 09 10t14 22 52 10105z", "updatedby" null, "updatedat" "2025 09 10t16 26 23 855728z", "attributes" {}, "metadata" {}, "organizationuuid" "fbf184b2 5c29 11ef 8bf9 0242ac12000a", "starttime" "2025 09 10t13 00 03 957z", "parentuuid" null, "stoptime" "2025 09 10t14 22 25 096z", "source" "auto", "status" "processed", "assetuuid" "dc75ab4e 114c 11f0 b8bf 2e673dc3bc0f", "eventconfigurationuuid" "267d7cba 4647 11f0 9122 4672b84d43fa", "eventtypeuuid" "1a998ee8 4647 11f0 bf5e 4672b84d43fa" } ]