---
# @generated by sylphx-gen. Do not edit.
title: "Query a wide event"
description: "`observability.wide_events.query` (POST /v1/{parent}/wide_events:query): Reads an environment's scrubbed wide events over a bounded time range."
type: reference
product: monitoring
summary: "Reads an environment's scrubbed wide events over a bounded time range."
nav: false
---

Reads an environment's scrubbed wide events over a bounded time range.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/wide_events:query`
- **Scope** `observability:read`
- **Effect** `read` — nothing is written.
- **Collection** [wide_events](/docs/api/wide_events)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `parent` | `string` | Resource name of the environment that owns the evidence. Required. |
| `start_time` | `timestamp` | Inclusive UTC event-time lower bound. Required. |
| `end_time` | `timestamp` | Exclusive UTC upper bound, at most 31 days after the start. Required. |
| `filter` | `WideEventFilter` | All populated exact-match predicates are applied together. |
| `page_size` | `int32` | Results per page, default 50 and maximum 100. |
| `page_token` | `string` | Opaque continuation from an earlier page of the exact query. |

### WideEventFilter

| Field | Type | What it is |
| --- | --- | --- |
| `trace_id` | `string` | Nonzero W3C trace identifier. |
| `request_id` | `string` | Opaque request correlation identifier; not an idempotency key. |
| `org_id` | `string` | Organization whose verified grant owns the evidence. |
| `project_id` | `string` | Project whose verified grant owns the evidence. |
| `env_id` | `string` | Environment whose verified grant owns the evidence. |
| `release_sha` | `string` | Full hexadecimal Git revision of the emitting release. |
| `service` | `string` | Service that emitted the evidence or handled the downstream call. |
| `host` | `string` | Effective hostname without scheme, path, userinfo, or port. |
| `route_template` | `string` | Matched router template, never a concrete URL or its query. |
| `status_code` | `int32` | HTTP response status for the unit of work. |
| `error_code` | `string` | Machine-readable failure class. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `wide_events` | `WideEvent[]` | Canonical wide event records. |
| `next_page_token` | `string` | Opaque token for the next page, empty when exhausted. |

### WideEvent

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Resource name, assigned by Observe. |
| `uid` | `string` | Stable TypeID. Output only. |
| `meta` | `ResourceMeta` | Resource metadata. Output only. |
| `schema` | `string` | Exactly sylphx.wide_event.v1. Required. |
| `ts_utc` | `timestamp` | Time the unit of work completed. Required. |
| `trace_id` | `string` | Nonzero lowercase W3C hex identifiers. The parent is empty for a root. Required. |
| `span_id` | `string` | W3C identifier of this span, or this downstream leg. Required. |
| `parent_span_id` | `string` | Parent W3C span; empty at the root. |
| `request_id` | `string` | The opaque request correlation ID. Required. |
| `service` | `string` | Emitting service. Required. |
| `env_id` | `string` | Tenant IDs come from the verified grant; supplied values must agree. |
| `release_sha` | `string` | Full hexadecimal Git revision of the emitting release. Required. |
| `org_id` | `string` | Organization whose verified grant owns the evidence. |
| `project_id` | `string` | Project whose verified grant owns the evidence. |
| `actor_id` | `string` | Opaque actor ID; never contact data or credentials. |
| `weight` | `float` | Inverse probability of inclusion; one for unsampled or forced-kept rows. Required. |
| `host` | `string` | Effective hostname without scheme, path, userinfo, or port. |
| `http_method` | `string` | HTTP method, when this work serves a request. |
| `route_template` | `string` | Matched router template, never a concrete URL or its query. |
| `status_code` | `int32` | HTTP response status for the unit of work. |
| `error_code` | `string` | Machine-readable failure class. |
| `error_reason` | `string` | Bounded, scrubbed diagnostic context for the failure. |
| `latency_ms` | `double` | Elapsed work or leg time in milliseconds. |
| `upstream_status` | `int32` | HTTP status from the upstream dependency, if available. |
| `pool_wait_ms` | `double` | Time waiting for pooled capacity in milliseconds. |
| `downstream_legs` | `WideEventLeg[]` | Bounded list of observed downstream calls. |
| `ai_provider` | `string` | AI provider used by the request. |
| `ai_model` | `string` | Model the provider served. |
| `ttft_ms` | `double` | Time to first token in milliseconds. |
| `tokens_in` | `uint64` | Input token count. |
| `tokens_out` | `uint64` | Output token count. |
| `stream_stall_ms` | `double` | Observed stream stall duration in milliseconds. |
| `tool_fail_code` | `string` | Machine-readable AI tool failure code. |
| `fallback_triggered` | `bool` | Whether a fallback execution path ran. |
| `locale` | `string` | Locale selected for the interaction. |
| `cwv_lcp_ms` | `double` | Largest Contentful Paint in milliseconds. |
| `cwv_cls` | `double` | Unitless cumulative layout shift. |
| `cwv_inp_ms` | `double` | Interaction to Next Paint in milliseconds. |
| `hydration_drift` | `bool` | Whether the server and browser hydration diverged. |
| `app_slug` | `string` | Application slug used to join commercial or UX evidence. |
| `money_intent_id` | `string` | Opaque Money intent identifier. |
| `checkout_session_id` | `string` | Opaque checkout session identifier. |
| `amount_minor` | `int64` | Monetary amount in the currency's minor unit. |
| `currency` | `string` | Three-letter ISO 4217 currency code. |
| `experiment_id` | `string` | Opaque experiment identifier. |
| `attribution_id` | `string` | Opaque attribution join ID, not raw click or customer data. |
| `metered_cash_burn_usd` | `double` | Measured cash burn in US dollars. |
| `prepaid_pool_headroom` | `double` | Remaining prepaid capacity in the source meter's units. |
| `vendor_wallet_usd` | `double` | Observed vendor wallet balance in US dollars. |
| `root_cause_span_id` | `string` | W3C span identified by causal analysis. |
| `top_divergent_dims` | `WideEventDimension[]` | Bounded ranked dimension evidence reported with this event. |
| `actuator_action` | `string` | Action taken for the anomaly, when applicable. |
| `flight_recorder_tail` | `WideEventLeg[]` | Bounded causal prefix accompanying a failed unit of work. |

### ResourceMeta

| Field | Type | What it is |
| --- | --- | --- |
| `generation` | `int64` | Increases by one on every change to `spec`. Output only. |
| `etag` | `string` | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as `If-Match` or `etag` to make Update and Delete conditional; a mismatch fails with ABORTED / 409 `ETAG_MISMATCH`. Output only. |
| `create_time` | `timestamp` | When the Resource was created. Output only. |
| `update_time` | `timestamp` | When the Resource last changed. Output only. |
| `delete_time` | `timestamp` | Set while the Resource is being deleted. Output only. |
| `labels` | `map<string, string>` | Caller-writable, indexed labels (AIP-122 label rules). |
| `annotations` | `map<string, string>` | Caller-writable, unindexed annotations. |
| `display_name` | `string` | Caller-writable human-readable name. |
| `creator` | `string` | The principal that created the Resource. Output only. |

### WideEventLeg

| Field | Type | What it is |
| --- | --- | --- |
| `service` | `string` | Service that emitted the evidence or handled the downstream call. Required. |
| `span_id` | `string` | W3C identifier of this span, or this downstream leg. |
| `request_id` | `string` | Opaque request correlation identifier; not an idempotency key. |
| `latency_ms` | `double` | Elapsed work or leg time in milliseconds. |
| `upstream_status` | `int32` | HTTP status from the upstream dependency, if available. |

### WideEventDimension

| Field | Type | What it is |
| --- | --- | --- |
| `dim_id` | `uint32` | Stable numeric dimension identifier used by the diff engine. Required. |
| `val_id` | `uint64` | Stable unsigned value identifier within that dimension. Required. |
| `dimension` | `string` | Readable name of the dimension, when available. |
| `value` | `string` | Scrubbed readable value, when available. |
| `js_divergence` | `double` | Jensen–Shannon divergence between the cohorts. |
| `lift` | `double` | Anomalous share divided by baseline share, when defined. |
| `e_value` | `double` | Anytime-valid evidence from the statistical engine, when available. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`PAGE_TOKEN_MISMATCH`](/docs/api/errors/PAGE_TOKEN_MISMATCH) — A page token was reused with different parameters.
- [`UNAVAILABLE`](/docs/api/errors/UNAVAILABLE) — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/wide_events:query" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_time":{},"start_time":{}}'
```

**TypeScript**

```ts
const response = await sylphx.observability.wideEvents.query({ endTime: {}, parent: 'orgs/acme/projects/shop/envs/production', startTime: {} })
```

**Rust**

```rust
let mut req = sylphx::observability::QueryWideEventsRequest::default();
req.end_time = Some(Default::default());
req.parent = "orgs/acme/projects/shop/envs/production".to_string();
req.start_time = Some(Default::default());
let response = sx.observability().wide_events().query(req).await?;
```

**CLI**

```bash
sylphx observability wide-events query orgs/acme/projects/shop/envs/production
```

**MCP**

```json
{ "method_id": "observability.wide_events.query", "args": {"end_time":{},"parent":"orgs/acme/projects/shop/envs/production","start_time":{}} }
```
