---
title: Query Event Data
slug: api-v7/query-event-data
docTags: 
createdAt: 2025-09-19T13:36:00.633Z
---

# Query events

This code queries data from the events where an event property has a certain value using the PropertyFilter ([my Swagger](https://historian.mycompany.com:18000/api/swagger/swagger/#/events/getEvents)).
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.

<font color="#6366F1">**GET** </font>[https://historian.mycompany.com:18000/api/events](https://historian.mycompany.com:18000/api/collector/collectors/\{collector_uuid}/points)

```python
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))

```

:::ExpandableHeading
### Sucessful response

```json
[
  {
    "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"
  }
]

```
:::

