Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 117 additions & 51 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ public static void main(String[] args) {
new ProductAnalyticsSankeyDefinition()
.entriesPerStep(10L)
.numberOfSteps(3L)
.source("@view.name")
.target("@view.name"))
.source("""
@type:view @view.name:"/logs"
""")
.target(""))
.search(
new ProductAnalyticsSankeySearch()
.audienceFilters(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,20 @@ public static void main(String[] args) {
+ " @application.name:ecommerce-platform")
.timeFrame(
new QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame()
.end(1761309676L)
.start(1760100076L)))
.end(1761309676000L)
.start(1760100076000L)))
.includeRowCount(true)
.limit(25L)
.query(
"user_org_id:5001 AND first_country_code:US AND"
+ " first_browser_name:Chrome")
.query("first_country_code:US AND first_browser_name:Chrome")
.selectColumns(
Arrays.asList(
"user_id",
"user_email",
"user_name",
"first_seen",
"last_seen",
"first_country_code",
"first_browser_name",
"events_count",
"session_count",
"error_count",
"avg_loading_time")))
"first_browser_name")))
.id("query_event_filtered_users_request")
.type(
QueryEventFilteredUsersRequestDataType.QUERY_EVENT_FILTERED_USERS_REQUEST));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ public ProductAnalyticsJourneyListResponse queryProductAnalyticsJourneyList(
/**
* Return the individual sessions that reached, or dropped off at, a given step of the journey.
* Each row contains the identity join key, the event timestamp, and the columns requested in
* <code>entity_columns</code>.
* <code>entity_columns</code>. This endpoint only lists sessions: omit <code>
* query.search.join_keys</code> or set its <code>primary</code> to <code>@session.id</code>. Any
* other primary join key, such as <code>@usr.id</code>, returns a 400 error. To get the users
* behind the sessions, add <code>@usr.id</code> or <code>@usr.email</code> to <code>
* entity_columns</code>.
*
* @param body (required)
* @return ApiResponse&lt;ProductAnalyticsJourneyListResponse&gt;
Expand Down Expand Up @@ -1049,7 +1053,10 @@ public ProductAnalyticsRetentionListResponse queryProductAnalyticsRetentionList(

/**
* List the individual users or accounts counted in one cell of the retention grid. Set <code>
* computation_scope</code> to the cohort and return period you want to examine.
* computation_scope</code> to the cohort and return period you want to examine. Indexes are
* zero-based, and the cohort index plus the return period index must be lower than the number of
* cohorts between <code>from</code> and <code>to</code>. Make the window long enough to contain
* the return period you ask for.
*
* @param body The retention list query. (required)
* @return ApiResponse&lt;ProductAnalyticsRetentionListResponse&gt;
Expand Down Expand Up @@ -1526,8 +1533,9 @@ public CompletableFuture<ProductAnalyticsSankeyResponse> queryProductAnalyticsSa
}

/**
* Compute a Sankey diagram of how sessions flow between the values of two facets, showing where
* users continue and where they drop off at each step.
* Compute a Sankey diagram of how sessions flow from or to one view, showing where users continue
* and where they drop off at each step. Set either <code>definition.source</code> or <code>
* definition.target</code>, and send the other one as an empty string.
*
* @param body The Sankey diagram query. (required)
* @return ApiResponse&lt;ProductAnalyticsSankeyResponse&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,10 @@ public CompletableFuture<QueryResponse> queryEventFilteredUsersAsync(
}

/**
* Query users filtered by both user properties and event platform data
* Query users filtered by both user properties and event platform data. <code>event_query.query
* </code> selects users who have matching events in <code>event_query.time_frame</code>, which is
* in milliseconds. <code>query</code> and <code>select_columns</code> use user profile attribute
* names, not event facets.
*
* @param body (required)
* @return ApiResponse&lt;QueryResponse&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ public ProductAnalyticsJourneyFunnelResponseAttributes(
@JsonProperty(required = true, value = JSON_PROPERTY_END_TO_END_ELAPSED_TIME)
ProductAnalyticsElapsedTime endToEndElapsedTime,
@JsonProperty(required = true, value = JSON_PROPERTY_FUNNEL_STEPS)
List<ProductAnalyticsJourneyFunnelStep> funnelSteps,
@JsonProperty(required = true, value = JSON_PROPERTY_INITIAL_COUNT) Long initialCount) {
List<ProductAnalyticsJourneyFunnelStep> funnelSteps) {
this.endToEndConversionRate = endToEndConversionRate;
this.endToEndElapsedTime = endToEndElapsedTime;
this.unparsed |= endToEndElapsedTime.unparsed;
this.funnelSteps = funnelSteps;
for (ProductAnalyticsJourneyFunnelStep item : funnelSteps) {
this.unparsed |= item.unparsed;
}
this.initialCount = initialCount;
}

public ProductAnalyticsJourneyFunnelResponseAttributes endToEndConversionRate(
Expand Down Expand Up @@ -152,12 +150,14 @@ public ProductAnalyticsJourneyFunnelResponseAttributes initialCount(Long initial
}

/**
* Number of entities that entered the funnel.
* Number of entities that entered the funnel. The service does not return it today; use the
* <code>value</code> of the first entry in <code>funnel_steps</code> instead.
*
* @return initialCount
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INITIAL_COUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getInitialCount() {
return initialCount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ProductAnalyticsJourneyFunnelStep {
private ProductAnalyticsElapsedTime elapsedTimeToNextStep;

public static final String JSON_PROPERTY_GROUPS = "groups";
private List<ProductAnalyticsJourneyFunnelStepGroup> groups = new ArrayList<>();
private List<ProductAnalyticsJourneyFunnelStepGroup> groups = null;

public static final String JSON_PROPERTY_LABEL = "label";
private String label;
Expand All @@ -52,17 +52,11 @@ public ProductAnalyticsJourneyFunnelStep() {}
public ProductAnalyticsJourneyFunnelStep(
@JsonProperty(required = true, value = JSON_PROPERTY_ELAPSED_TIME_TO_NEXT_STEP)
ProductAnalyticsElapsedTime elapsedTimeToNextStep,
@JsonProperty(required = true, value = JSON_PROPERTY_GROUPS)
List<ProductAnalyticsJourneyFunnelStepGroup> groups,
@JsonProperty(required = true, value = JSON_PROPERTY_LABEL) String label,
@JsonProperty(required = true, value = JSON_PROPERTY_UNIT) String unit,
@JsonProperty(required = true, value = JSON_PROPERTY_VALUE) Double value) {
this.elapsedTimeToNextStep = elapsedTimeToNextStep;
this.unparsed |= elapsedTimeToNextStep.unparsed;
this.groups = groups;
for (ProductAnalyticsJourneyFunnelStepGroup item : groups) {
this.unparsed |= item.unparsed;
}
this.label = label;
this.unit = unit;
this.value = value;
Expand Down Expand Up @@ -96,26 +90,33 @@ public void setElapsedTimeToNextStep(ProductAnalyticsElapsedTime elapsedTimeToNe
public ProductAnalyticsJourneyFunnelStep groups(
List<ProductAnalyticsJourneyFunnelStepGroup> groups) {
this.groups = groups;
for (ProductAnalyticsJourneyFunnelStepGroup item : groups) {
this.unparsed |= item.unparsed;
if (groups != null) {
for (ProductAnalyticsJourneyFunnelStepGroup item : groups) {
this.unparsed |= item.unparsed;
}
}
return this;
}

public ProductAnalyticsJourneyFunnelStep addGroupsItem(
ProductAnalyticsJourneyFunnelStepGroup groupsItem) {
if (this.groups == null) {
this.groups = new ArrayList<>();
}
this.groups.add(groupsItem);
this.unparsed |= groupsItem.unparsed;
return this;
}

/**
* Breakdown of this step by the requested group-by facets.
* Breakdown of this step by the requested group-by facets. Omitted when the query has no
* group-by.
*
* @return groups
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_GROUPS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ProductAnalyticsJourneyFunnelStepGroup> getGroups() {
return groups;
}
Expand Down Expand Up @@ -155,7 +156,8 @@ public ProductAnalyticsJourneyFunnelStep unit(String unit) {
}

/**
* Unit of the elapsed time values.
* The entity counted in <code>value</code>, such as <code>session</code> or <code>user</code>,
* set by the join key.
*
* @return unit
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public ProductAnalyticsJourneyListQuery addEntityColumnsItem(String entityColumn

/**
* Attribute columns to return for each row, in addition to the identity join key and <code>
* timestamp</code>.
* timestamp</code>. For example, <code>@usr.id</code> returns the user of each session.
*
* @return entityColumns
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@

/**
* Narrows a retention query to a single cell, at the intersection of one cohort and one return
* period.
* period. Both indexes are zero-based. The cohort index plus the return period index must be lower
* than the number of cohorts in the query window. For example, return period <code>1</code> of
* cohort <code>0</code> needs a window with at least two cohort intervals, such as two weeks for
* weekly cohorts. Otherwise the request fails with <code>invalid index</code>.
*/
@JsonPropertyOrder({
ProductAnalyticsRetentionCellScope.JSON_PROPERTY_COHORT_TARGET,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public ProductAnalyticsRetentionCompute metric(ProductAnalyticsRetentionComputeM
}

/**
* The retention metric to compute, either an absolute count or a rate.
* The retention metric to compute. Use <code>__dd.retention</code> for the number of retained
* entities, or <code>__dd.retention_rate</code> for the share of the cohort that was retained. No
* other value is accepted.
*
* @return metric
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
import java.util.HashSet;
import java.util.Set;

/** The retention metric to compute, either an absolute count or a rate. */
/**
* The retention metric to compute. Use <code>__dd.retention</code> for the number of retained
* entities, or <code>__dd.retention_rate</code> for the share of the cohort that was retained. No
* other value is accepted.
*/
@JsonSerialize(
using =
ProductAnalyticsRetentionComputeMetric.ProductAnalyticsRetentionComputeMetricSerializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public ProductAnalyticsRetentionIndexTarget value(Long value) {
}

/**
* Zero-based index of the targeted cohort or return period. minimum: 0
* Zero-based index of the targeted cohort or return period. It must be lower than the number of
* cohorts in the query window, which is the number of cohort intervals that start between <code>
* from</code> and <code>to</code>. minimum: 0
*
* @return value
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ public ProductAnalyticsRetentionListQuery computationScope(

/**
* Narrows a retention query to a single cell, at the intersection of one cohort and one return
* period.
* period. Both indexes are zero-based. The cohort index plus the return period index must be
* lower than the number of cohorts in the query window. For example, return period <code>1</code>
* of cohort <code>0</code> needs a window with at least two cohort intervals, such as two weeks
* for weekly cohorts. Otherwise the request fails with <code>invalid index</code>.
*
* @return computationScope
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
import java.util.Objects;

/**
* The shape of the Sankey diagram, expressed as the facets to flow between and how many steps to
* show.
* The shape of the Sankey diagram: the step it is anchored on and how many steps to show. Set
* exactly one of <code>source</code> or <code>target</code> to a step, and send the other one as an
* empty string. Sending both returns <code>Invalid Sankey Mode</code>. Sending both empty starts
* the diagram from any view. Each column of the diagram lists view names.
*/
@JsonPropertyOrder({
ProductAnalyticsSankeyDefinition.JSON_PROPERTY_ENTRIES_PER_STEP,
Expand Down Expand Up @@ -104,7 +106,10 @@ public ProductAnalyticsSankeyDefinition source(String source) {
}

/**
* Facet forming the first column of the diagram.
* The step the diagram starts from. The diagram shows where sessions go after it. It is a value,
* not a facet name: use a view name such as <code>/logs</code>, or a query matching one view such
* as <code>@type:view @view.name:"/logs"</code>. Do not send <code>@view.name</code>. Send an
* empty string when <code>target</code> is set.
*
* @return source
*/
Expand All @@ -124,7 +129,8 @@ public ProductAnalyticsSankeyDefinition target(String target) {
}

/**
* Facet forming the last column of the diagram.
* The step the diagram ends at. The diagram shows the paths sessions take to reach it. It takes
* the same values as <code>source</code>. Send an empty string when <code>source</code> is set.
*
* @return target
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ public ProductAnalyticsSankeyRequestAttributes definition(
}

/**
* The shape of the Sankey diagram, expressed as the facets to flow between and how many steps to
* show.
* The shape of the Sankey diagram: the step it is anchored on and how many steps to show. Set
* exactly one of <code>source</code> or <code>target</code> to a step, and send the other one as
* an empty string. Sending both returns <code>Invalid Sankey Mode</code>. Sending both empty
* starts the diagram from any view. Each column of the diagram lists view names.
*
* @return definition
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ public QueryAccountRequestDataAttributes query(String query) {
}

/**
* Filter expression using account attribute conditions to narrow results.
* Filter expression using account attribute conditions to narrow results. Filter timestamp
* attributes such as <code>first_seen</code> with Unix timestamps in milliseconds, for example
* <code>first_seen:&gt;=1793750400000</code> or <code>first_seen:[1793750400000 TO 1794355200000]
* </code>, or with offsets in milliseconds relative to now, for example <code>
* first_seen:[-604800000 TO 0]</code> for the last 7 days. A range needs an upper bound. Date
* strings such as <code>2026-10-26T00:00:00Z</code> are not supported, because their colons break
* the query syntax.
*
* @return query
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ public QueryEventFilteredUsersRequestDataAttributes query(String query) {
}

/**
* Filter expression using user attribute conditions to narrow results.
* Filter expression on user profile attributes, such as <code>first_country_code:US</code>. It
* uses the same attribute names as <code>select_columns</code>. Filter timestamp attributes such
* as <code>first_seen</code> or <code>last_seen</code> with Unix timestamps in milliseconds, for
* example <code>first_seen:&gt;=1793750400000</code> or <code>
* first_seen:[1793750400000 TO 1794355200000]</code>, or with offsets in milliseconds relative to
* now, for example <code>first_seen:[-604800000 TO 0]</code> for the last 7 days. A range needs
* an upper bound. Date strings such as <code>2026-10-26T00:00:00Z</code> are not supported,
* because their colons break the query syntax.
*
* @return query
*/
Expand Down Expand Up @@ -150,7 +157,12 @@ public QueryEventFilteredUsersRequestDataAttributes addSelectColumnsItem(
}

/**
* List of user attribute column names to include in the response.
* User profile attribute names to include in the response, such as <code>user_id</code>, <code>
* user_email</code>, <code>user_name</code>, <code>first_seen</code>, <code>last_seen</code>, or
* <code>first_country_code</code>. These are profile attributes, not event facets or computed
* metrics. An unknown name returns a 400 error. Use the get mapping endpoint with entity <code>
* users</code> to list the attributes available in your organization. Omit it to return every
* attribute.
*
* @return selectColumns
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public QueryEventFilteredUsersRequestDataAttributesEventQuery timeFrame(
}

/**
* The time window defining the start and end of the event query period as Unix timestamps.
* The time window of the event query, as Unix timestamps in milliseconds.
*
* @return timeFrame
*/
Expand Down
Loading
Loading