Returns the caller org's most recent product events, newest first.
Returns the caller org's most recent product events, newest first.
GET /v1/event/insights/events
| Address | https://api.hanzo.ai/v1/event/insights/events |
| Method | GET |
| Operation | get_event_insights_events |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the caller org's most recent product events, newest first. The console's raw-event view over event.event — the same table the capture doors fill — one row per stored event, with the row's attributes returned as the properties object.
The org is the validated principal's — never a parameter — and a read requires a real bearer, never the write-only publishable key. 403 without a validated bearer, 503 when the warehouse is unreachable.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | — | Limit is how many rows to return, newest first. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | eventList | ok |
200 body — 11 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | productEvent[] | — | Data is the events, newest first. |
data[].distinctId | body | string | — | DistinctID is the person/visitor the event is attributed to. |
data[].event | body | string | — | Event is the event name, e.g. |
data[].id | body | string | — | ID is the row's stable event id — the client's own idempotency id when it sent one, else the server-minted one. |
data[].path | body | string | — | Path is the URL's path component, the key the topPages lens groups by. |
data[].product | body | string | — | Product is the surface that emitted the event. |
data[].properties | body | any | — | Properties is the row's attributes map as a JSON object (string values — the plane stores Map(String,String), so a nested value the caller sent is a… |
data[].sessionId | body | string | — | SessionID groups the events of one visit. |
data[].timestamp | body | string | — | Timestamp is when the event happened, RFC3339 UTC. |
data[].type | body | string | — | Type is the row's kind — the plane's discriminator: page, track, identify or group. |
data[].url | body | string | — | URL is the full page address the event fired on. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, EventApi } from 'hanzoai';
const api = new EventApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEventInsightsEvents();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EventApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EventApi(client).get_event_insights_events()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.EventAPI.GetEventInsightsEvents(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, event_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = event_api::get_event_insights_events(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EventApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new EventApi(client).getEventInsightsEvents();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/event/insights/events \
-H "Authorization: Bearer $HANZO_API_KEY"The door declares no tool for event — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?