diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 560b3188e9..a26a0e24d5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -82738,6 +82738,166 @@ components: - name - metric type: object + ProductAnalyticsAnalyticsListQuery: + description: |- + The analytics list query definition. It selects the events to return with `query`, then + chooses the columns on each event row, the sort applied to those rows, and a row limit. + Unlike the scalar and timeseries queries, a list query returns raw event rows rather than + aggregates, so it takes no compute or group-by rule. + properties: + audience_filters: + $ref: "#/components/schemas/ProductAnalyticsAudienceFilters" + columns: + description: Attribute columns to include in each event row. + items: + description: The name of an attribute to return as a column. + type: string + type: array + limit: + description: Maximum number of event rows to return. + example: 100 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + sort: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListSort" + required: + - query + type: object + ProductAnalyticsAnalyticsListRecord: + additionalProperties: + description: The value of one column of the event row. + description: A single event row, keyed by column name. + type: object + ProductAnalyticsAnalyticsListRequest: + description: Request for listing the individual event records matching an analytics query. + example: + data: + attributes: + from: 1771232048460 + query: + columns: + - "@view.name" + limit: 100 + query: + data_source: product_analytics + search: + query: "@type:view" + to: 1771836848262 + type: formula_analytics_extended_list_request + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListRequestData" + required: + - data + type: object + ProductAnalyticsAnalyticsListRequestAttributes: + description: Attributes for an analytics list request. + properties: + from: + description: Start time in epoch milliseconds. Must be less than `to`. + example: 1771232048460 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListQuery" + to: + description: End time in epoch milliseconds. + example: 1771836848262 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsAnalyticsListRequestData: + description: Data object for an analytics list request. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsAnalyticsListRequestType: + description: The resource type for analytics list requests. + enum: + - formula_analytics_extended_list_request + example: formula_analytics_extended_list_request + type: string + x-enum-varnames: + - FORMULA_ANALYTICS_EXTENDED_LIST_REQUEST + ProductAnalyticsAnalyticsListResponse: + description: Response for an analytics list query, containing individual event records. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListResponseData" + meta: + $ref: "#/components/schemas/ProductAnalyticsResponseMeta" + required: + - data + type: object + ProductAnalyticsAnalyticsListResponseAttributes: + description: Attributes of an analytics list response, containing the matching event rows. + properties: + records: + description: The event rows, each holding the values of the requested columns. + items: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListRecord" + type: array + total_count: + description: Total number of records matching the query, before the row limit is applied. + format: int64 + type: integer + type: object + ProductAnalyticsAnalyticsListResponseData: + description: Data object for an analytics list response. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListResponseAttributes" + id: + description: Unique identifier for this response data object. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsAnalyticsListResponseType: + description: The resource type identifier for an analytics list response. + enum: + - list_response + example: list_response + type: string + x-enum-varnames: + - LIST_RESPONSE + ProductAnalyticsAnalyticsListSort: + description: The sort applied to the returned event rows. + properties: + facet: + description: Name of the facet to sort the rows by. + type: string + order: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListSortOrder" + type: object + ProductAnalyticsAnalyticsListSortOrder: + description: The direction rows are sorted in. + enum: + - asc + - desc + type: string + x-enum-varnames: + - ASC + - DESC ProductAnalyticsAnalyticsQuery: description: The analytics query definition containing a base query, compute rule, and optional grouping. properties: @@ -82751,7 +82911,10 @@ components: $ref: "#/components/schemas/ProductAnalyticsGroupBy" type: array indexes: - description: Restrict the query to specific indexes. Max 1 entry. + deprecated: true + description: |- + Deprecated. Index selection is a rollout detail and will be removed. + Do not set this field. items: description: Index name to restrict the query to. type: string @@ -82789,6 +82952,10 @@ components: properties: enforced_execution_type: $ref: "#/components/schemas/ProductAnalyticsExecutionType" + deprecated: true + description: |- + Deprecated. Selects the internal query execution infrastructure and will be removed. + Do not set this field. from: description: Start time in epoch milliseconds. Must be less than `to`. example: 1771232048460 @@ -82797,7 +82964,7 @@ components: query: $ref: "#/components/schemas/ProductAnalyticsAnalyticsQuery" request_id: - description: Optional request ID for multi-step query continuation. + description: Unique identifier of the query. type: string to: description: End time in epoch milliseconds. @@ -82873,7 +83040,7 @@ components: type: string segment_id: description: UUID of the segment to filter by. - example: "" + example: 00000000-0000-0000-0000-000000000000 format: uuid type: string required: @@ -82902,6 +83069,50 @@ components: oneOf: - $ref: "#/components/schemas/ProductAnalyticsEventQuery" - $ref: "#/components/schemas/ProductAnalyticsOccurrenceQuery" + ProductAnalyticsCalendarInterval: + description: A calendar-aligned bucket definition, such as "every 1 week starting on Monday". + properties: + alignment: + description: |- + Where each bucket starts within the calendar unit. Use an hour for `day` (for example `1am` or `14`), + a day name for `week` (for example `monday`), or an ordinal for `month` (for example `1st`). + example: monday + type: string + quantity: + description: Number of calendar units per bucket. + example: 1 + format: int64 + minimum: 1 + type: integer + timezone: + description: Timezone used to align the buckets. + example: UTC + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsCalendarIntervalType" + required: + - type + type: object + ProductAnalyticsCalendarIntervalType: + description: Calendar unit used to bucket cohorts. + enum: + - minute + - hour + - day + - week + - month + - quarter + - year + example: week + type: string + x-enum-varnames: + - MINUTE + - HOUR + - DAY + - WEEK + - MONTH + - QUARTER + - YEAR ProductAnalyticsCompute: description: A compute rule for aggregating data. properties: @@ -82910,7 +83121,9 @@ components: example: count type: string interval: - description: Time bucket size in milliseconds. Required for timeseries queries. + description: |- + Time bucket size in milliseconds. Required for timeseries queries; ignored by the + scalar endpoint, which returns a single value. example: 3600000 format: int64 type: integer @@ -82921,6 +83134,29 @@ components: required: - aggregation type: object + ProductAnalyticsElapsedTime: + description: Elapsed time statistics (min/max/avg in milliseconds). + properties: + avg: + description: Average elapsed time to reach the next step, in milliseconds. + example: 5100 + format: int64 + type: integer + max: + description: Maximum elapsed time to reach the next step, in milliseconds. + example: 42000 + format: int64 + type: integer + min: + description: Minimum elapsed time to reach the next step, in milliseconds. + example: 900 + format: int64 + type: integer + required: + - min + - max + - avg + type: object ProductAnalyticsEventQuery: description: A standard Product Analytics event query. properties: @@ -82961,6 +83197,215 @@ components: - BACKGROUND - TRINO_MULTISTEP - MATERIALIZED_VIEW + ProductAnalyticsFormulaJourneyQuery: + description: Query definition for a journey timeseries request. + properties: + compute: + $ref: "#/components/schemas/ProductAnalyticsGraphQueryCompute" + group_by: + description: Segments the results by the values of one or more facets. + items: + $ref: "#/components/schemas/ProductAnalyticsGraphQueryGroupBy" + type: array + query_id: + description: Caller-defined identifier echoed back in the results. + type: string + search: + $ref: "#/components/schemas/ProductAnalyticsJourneySearch" + required: + - search + - compute + type: object + ProductAnalyticsFormulaJourneyRequest: + description: Request body for a journey timeseries query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFormulaJourneyRequestData" + required: + - data + type: object + ProductAnalyticsFormulaJourneyRequestAttributes: + description: Attributes of a journey timeseries request. + properties: + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + interval: + description: Time bucket interval in milliseconds. + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsFormulaJourneyQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsFormulaJourneyRequestData: + description: |- + The single JSON:API resource carrying a journey timeseries query. Its attributes hold the time + window, the bucket interval that splits it, and the journey metric to compute per bucket. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFormulaJourneyRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsFormulaJourneyRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsFormulaJourneyRequestType: + description: The resource type identifier for a journey timeseries or scalar request. + enum: + - formula_journey_request + example: formula_journey_request + type: string + x-enum-varnames: + - FORMULA_JOURNEY_REQUEST + ProductAnalyticsFormulaRetentionQuery: + description: Query definition for a retention scalar or retention timeseries request. + properties: + computation_scope: + $ref: "#/components/schemas/ProductAnalyticsRetentionScope" + compute: + $ref: "#/components/schemas/ProductAnalyticsRetentionCompute" + group_by: + description: Splits the results by the values of one or more facets. + items: + $ref: "#/components/schemas/ProductAnalyticsRetentionGroupBy" + type: array + search: + $ref: "#/components/schemas/ProductAnalyticsRetentionSearch" + required: + - search + - compute + type: object + ProductAnalyticsFormulaRetentionRequest: + description: Request body for a retention scalar or retention timeseries query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFormulaRetentionRequestData" + required: + - data + type: object + ProductAnalyticsFormulaRetentionRequestAttributes: + description: Attributes of a retention scalar or retention timeseries request. + properties: + exclude_anonymous_traffic: + default: false + description: Whether to exclude sessions that are not tied to an identified user. + type: boolean + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsFormulaRetentionQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsFormulaRetentionRequestData: + description: |- + The single JSON:API resource carrying a retention scalar or timeseries query. Its attributes + hold the time window to query and the retention query definition to evaluate. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFormulaRetentionRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsFormulaRetentionRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsFormulaRetentionRequestType: + description: The resource type identifier for a retention scalar or retention timeseries request. + enum: + - formula_retention_request + example: formula_retention_request + type: string + x-enum-varnames: + - FORMULA_RETENTION_REQUEST + ProductAnalyticsGraphQueryCompute: + description: Defines the metric computed over the journey. + properties: + aggregation: + description: |- + Aggregation function: `count`, `cardinality`, `avg`, `median`, `min`, `max`, `sum`, + or a percentile of the form `pc` such as `pc95`. Defaults to `cardinality`. + example: count + pattern: "^(count|cardinality|avg|median|min|max|sum|pc[0-9]{1,2})$" + type: string + interval: + description: Time bucket interval in milliseconds, used by timeseries queries. + format: int64 + type: integer + metric: + description: |- + Metric to aggregate on. Use a facet path such as `@view.time_spent`, or one of the + journey metrics `__dd.conversion`, `__dd.conversion_rate`, `__dd.time_to_convert`, + or `__dd.dropoff_rate`. Defaults to `__dd.conversion`. + type: string + target: + $ref: "#/components/schemas/ProductAnalyticsJourneyTarget" + required: + - aggregation + type: object + ProductAnalyticsGraphQueryGroupBy: + description: Segments journey results by the values of a facet. + properties: + facet: + description: Attribute path to group by. + example: "@geo.country" + type: string + limit: + description: Maximum number of groups to return. Omit it to let the service choose. + format: int64 + minimum: 1 + type: integer + should_exclude_missing: + default: false + description: Whether to exclude entities that have no value for this facet. + type: boolean + sort: + $ref: "#/components/schemas/ProductAnalyticsGroupBySort" + source: + $ref: "#/components/schemas/ProductAnalyticsGraphQueryGroupBySource" + target: + $ref: "#/components/schemas/ProductAnalyticsJourneyTarget" + value_filters: + description: Restricts the results to these facet values. + items: + description: A facet value to keep. + type: string + type: array + required: + - facet + type: object + ProductAnalyticsGraphQueryGroupBySource: + description: Audience dimension to group by, instead of an event facet. + enum: + - product_analytics_audience_filters.users + - product_analytics_audience_filters.accounts + example: product_analytics_audience_filters.users + type: string + x-enum-varnames: + - USERS + - ACCOUNTS ProductAnalyticsGroupBy: description: A group-by rule for segmenting results by facet values. properties: @@ -83020,169 +83465,1882 @@ components: description: The interval type (e.g., fixed or auto-computed bucket size). type: string type: object - ProductAnalyticsOccurrenceFilter: - description: Filter for occurrence-based queries. + ProductAnalyticsJoinKeys: + description: Identity join keys used to stitch events belonging to the same user or session. properties: - meta: - additionalProperties: + primary: + description: Primary identity join key. Defaults to `@session.id`. + example: "@session.id" + type: string + secondary: + description: Additional identity join keys. + items: + description: An identity join key facet. type: string - description: Additional metadata. - type: object - operator: - description: Comparison operator (=, >=, <=, >, <). - example: ">=" + type: array + type: object + ProductAnalyticsJourneyAudienceAccountQuery: + description: A named sub-query selecting a set of accounts. + properties: + name: + description: Unique name for this sub-query, referenced from `formula`. + example: enterprise_accounts type: string - value: - description: The occurrence count threshold as a string. - example: "1" + query: + description: Search query selecting the accounts. type: string required: - - operator - - value + - name type: object - ProductAnalyticsOccurrenceQuery: - description: A Product Analytics occurrence-filtered query. + ProductAnalyticsJourneyAudienceFilters: + description: |- + Restricts the journey to an audience built from named sub-queries. + Sub-query names must be unique across `users`, `segments`, and `accounts`. properties: - data_source: - $ref: "#/components/schemas/ProductAnalyticsOccurrenceQueryDataSource" - search: - $ref: "#/components/schemas/ProductAnalyticsOccurrenceSearch" + accounts: + description: Named account sub-queries. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneyAudienceAccountQuery" + type: array + formula: + description: |- + Boolean expression combining the sub-query names with `AND`, `OR`, and `NOT`. + When empty, all sub-queries are combined with `AND`. + example: power_users AND NOT trial_segment + type: string + segments: + description: Named segment sub-queries. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneyAudienceSegmentQuery" + type: array + users: + description: Named user sub-queries. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneyAudienceUserQuery" + type: array + type: object + ProductAnalyticsJourneyAudienceSegmentQuery: + description: A named sub-query selecting a saved segment. + properties: + name: + description: Unique name for this sub-query, referenced from `formula`. + example: trial_segment + type: string + segment_id: + description: Identifier of the saved segment. + example: 00000000-0000-0000-0000-000000000000 + type: string required: - - data_source - - search + - name + - segment_id type: object - ProductAnalyticsOccurrenceQueryDataSource: - description: The data source identifier for occurrence queries. - enum: - - product_analytics_occurrence - example: product_analytics_occurrence - type: string - x-enum-varnames: - - PRODUCT_ANALYTICS_OCCURRENCE - ProductAnalyticsOccurrenceSearch: - description: Search parameters for an occurrence query. + ProductAnalyticsJourneyAudienceUserQuery: + description: A named sub-query selecting a set of users. properties: - occurrences: - $ref: "#/components/schemas/ProductAnalyticsOccurrenceFilter" + name: + description: Unique name for this sub-query, referenced from `formula`. + example: power_users + type: string query: - description: The search query using Datadog search syntax. - example: "@type:action" + description: Search query selecting the users. type: string + required: + - name type: object - ProductAnalyticsResponseMeta: - description: Metadata for a Product Analytics query response. + ProductAnalyticsJourneyComputedColumn: + description: |- + A computed column added to each row. Requesting `first_conversion_timestamps` adds one + `_timestamp` key per step. properties: - request_id: - description: Unique identifier for the request, used for multi-step query continuation. - type: string - status: - $ref: "#/components/schemas/ProductAnalyticsResponseMetaStatus" + name: + $ref: "#/components/schemas/ProductAnalyticsJourneyComputedColumnName" + required: + - name type: object - ProductAnalyticsResponseMetaStatus: - description: The execution status of a Product Analytics query. + ProductAnalyticsJourneyComputedColumnName: + description: Name of a computed column to add to each row. enum: - - done - - running - - timeout + - first_conversion_timestamps + example: first_conversion_timestamps type: string x-enum-varnames: - - DONE - - RUNNING - - TIMEOUT - ProductAnalyticsScalarColumn: - description: A column in a scalar response. + - FIRST_CONVERSION_TIMESTAMPS + ProductAnalyticsJourneyConversionType: + description: Whether to return the entities that converted at the target step, or those that dropped off. + enum: + - conversion + - drop-off + example: conversion + type: string + x-enum-varnames: + - CONVERSION + - DROP_OFF + ProductAnalyticsJourneyEntity: + description: The kind of entity returned by a journey list query. + enum: + - session + - user + - account + example: session + type: string + x-enum-varnames: + - SESSION + - USER + - ACCOUNT + ProductAnalyticsJourneyFunnelCompute: + description: Defines the metric computed at each funnel step. properties: - meta: - $ref: "#/components/schemas/ProductAnalyticsScalarColumnMeta" - name: - description: Column name (facet name for group-by, or "query"). + aggregation: + description: |- + Aggregation function: `count`, `cardinality`, `avg`, `median`, `min`, `max`, `sum`, + or a percentile of the form `pc` such as `pc95`. Defaults to `cardinality`. + pattern: "^(count|cardinality|avg|median|min|max|sum|pc[0-9]{1,2})$" + type: string + metric: + description: Metric to aggregate on. Defaults to the identity join key. type: string - type: - $ref: "#/components/schemas/ProductAnalyticsScalarColumnType" - values: - description: Column values. - items: - description: A single cell value within the column (string for group-by columns, number for metric columns). - type: array type: object - ProductAnalyticsScalarColumnMeta: - description: Metadata associated with a scalar response column, including optional unit information. + ProductAnalyticsJourneyFunnelQuery: + description: Query definition for a journey funnel request. properties: - unit: - description: Unit definitions for the column values, if applicable. + compute: + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelCompute" + group_by: + description: Segments the funnel by the values of one or more facets. items: - $ref: "#/components/schemas/ProductAnalyticsUnit" - nullable: true + $ref: "#/components/schemas/ProductAnalyticsGraphQueryGroupBy" type: array + search: + $ref: "#/components/schemas/ProductAnalyticsJourneySearch" + required: + - search type: object - ProductAnalyticsScalarColumnType: - description: Column type. - enum: - - number - - group - type: string - x-enum-varnames: - - NUMBER - - GROUP - ProductAnalyticsScalarResponse: - description: Response for a scalar analytics query. + ProductAnalyticsJourneyFunnelRequest: + description: Request body for a journey funnel analysis. properties: data: - $ref: "#/components/schemas/ProductAnalyticsScalarResponseData" - meta: - $ref: "#/components/schemas/ProductAnalyticsResponseMeta" + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelRequestData" + required: + - data type: object - ProductAnalyticsScalarResponseAttributes: - description: Attributes of a scalar analytics response, containing the result columns. + ProductAnalyticsJourneyFunnelRequestAttributes: + description: Attributes of a journey funnel request. properties: - columns: - description: The list of result columns, each containing values and metadata. + exclude_anonymous_traffic: + default: false + description: Whether to exclude sessions that are not tied to an identified user. + type: boolean + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsJourneyFunnelRequestData: + description: |- + The single JSON:API resource carrying a funnel query. Its attributes hold the time window to + query and the journey whose step-to-step conversion should be measured. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsJourneyFunnelResponse: + description: Response for a journey funnel analysis. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelResponseData" + required: + - data + type: object + ProductAnalyticsJourneyFunnelResponseAttributes: + description: Attributes of a journey funnel response. + properties: + end_to_end_conversion_rate: + description: Conversion rate from the first step to the last step. + example: 0.42 + format: double + type: number + end_to_end_elapsed_time: + $ref: "#/components/schemas/ProductAnalyticsElapsedTime" + funnel_steps: + description: The funnel steps, in the order given by the search expression. items: - $ref: "#/components/schemas/ProductAnalyticsScalarColumn" + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelStep" type: array + initial_count: + description: Number of entities that entered the funnel. + example: 1200 + format: int64 + type: integer + required: + - initial_count + - end_to_end_conversion_rate + - end_to_end_elapsed_time + - funnel_steps type: object - ProductAnalyticsScalarResponseData: - description: Data object for a scalar response. + ProductAnalyticsJourneyFunnelResponseData: + description: |- + The single JSON:API resource holding a computed funnel. Its attributes contain the number of + entities that entered, the end-to-end conversion, and one entry per funnel step. properties: attributes: - $ref: "#/components/schemas/ProductAnalyticsScalarResponseAttributes" + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelResponseAttributes" id: - description: Unique identifier for this response data object. + description: Identifier of this result. + example: 00000000-0000-0000-0000-000000000000 type: string type: - $ref: "#/components/schemas/ProductAnalyticsScalarResponseType" + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelResponseType" + required: + - id + - type + - attributes type: object - ProductAnalyticsScalarResponseType: - description: The resource type identifier for a scalar analytics response. + ProductAnalyticsJourneyFunnelResponseType: + description: The resource type identifier for a journey funnel response. enum: - - scalar_response + - funnel_response + example: funnel_response type: string x-enum-varnames: - - SCALAR_RESPONSE - ProductAnalyticsSerie: - description: A series in a timeseries response. + - FUNNEL_RESPONSE + ProductAnalyticsJourneyFunnelStep: + description: A single step of the funnel with its conversion counts and timings. properties: - group_tags: - description: The group-by tag values that identify this series. + elapsed_time_to_next_step: + $ref: "#/components/schemas/ProductAnalyticsElapsedTime" + groups: + description: Breakdown of this step by the requested group-by facets. items: - description: A tag value for a group-by facet. - type: string + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelStepGroup" type: array - query_index: - description: The index of the query that produced this series. + label: + description: Label of the step, derived from the node alias. + example: A + type: string + unit: + description: Unit of the elapsed time values. + example: millisecond + type: string + value: + description: Value of the computed metric at this step. + example: 1200 + format: double + type: number + required: + - value + - label + - unit + - elapsed_time_to_next_step + - groups + type: object + ProductAnalyticsJourneyFunnelStepGroup: + description: Breakdown of a funnel step for one combination of group-by values. + properties: + conversion_count: + description: Number of entities in this group that reached the next step. + example: 210 format: int64 type: integer - unit: - description: Unit definitions for the series values. + elapsed_time_to_next_step: + $ref: "#/components/schemas/ProductAnalyticsElapsedTime" + group_tags: + description: Group-by values identifying this cohort. + example: + - United States items: - $ref: "#/components/schemas/ProductAnalyticsUnit" + description: A group-by value. + type: string type: array + value: + description: Value of the computed metric for this group at this step. + example: 480 + format: double + type: number + required: + - group_tags + - value + - conversion_count + - elapsed_time_to_next_step type: object - ProductAnalyticsServerSideEventError: - description: Error details. + ProductAnalyticsJourneyListQuery: + description: Query definition for a journey list request. properties: - detail: - description: Error message. + computed_columns: + description: Computed columns to add to each row. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneyComputedColumn" + type: array + conversion_type: + $ref: "#/components/schemas/ProductAnalyticsJourneyConversionType" + entity_columns: + description: Attribute columns to return for each row, in addition to the identity join key and `timestamp`. + items: + description: An attribute column to return. + type: string + type: array + entity_filters: + description: Additional search query applied to the returned rows. + type: string + group_by: + description: Segments the results by the values of one or more facets. + items: + $ref: "#/components/schemas/ProductAnalyticsGraphQueryGroupBy" + type: array + limit: + description: Maximum number of rows to return. Omit it to let the service choose. + format: int64 + minimum: 1 + type: integer + search: + $ref: "#/components/schemas/ProductAnalyticsJourneySearch" + sort: + $ref: "#/components/schemas/ProductAnalyticsJourneyListSort" + target: + $ref: "#/components/schemas/ProductAnalyticsJourneyTarget" + required: + - search + type: object + ProductAnalyticsJourneyListRecord: + additionalProperties: {} + description: |- + A single row. Keys are the returned column names: the identity join key, `timestamp`, + each entry of `entity_columns`, and any computed columns. A value is null when the + column has no value for that row. + type: object + ProductAnalyticsJourneyListRequest: + description: Request body for a journey list query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyListRequestData" + required: + - data + type: object + ProductAnalyticsJourneyListRequestAttributes: + description: Attributes of a journey list request. + properties: + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsJourneyListQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsJourneyListRequestData: + description: |- + The single JSON:API resource carrying a journey list query. Its attributes hold the time window + and the journey whose matching entities should be listed, one row each. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyListRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyListRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsJourneyListRequestType: + description: The resource type identifier for a journey list request. + enum: + - journey_list_request + example: journey_list_request + type: string + x-enum-varnames: + - JOURNEY_LIST_REQUEST + ProductAnalyticsJourneyListResponse: + description: Response for a journey list query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyListResponseData" + required: + - data + type: object + ProductAnalyticsJourneyListResponseAttributes: + description: Attributes of a journey list response. + properties: + entity: + $ref: "#/components/schemas/ProductAnalyticsJourneyEntity" + records: + description: The returned rows. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneyListRecord" + type: array + total_count: + description: Total number of rows matching the query, ignoring `limit`. + example: 231 + format: int64 + type: integer + required: + - entity + - total_count + - records + type: object + ProductAnalyticsJourneyListResponseData: + description: |- + The single JSON:API resource holding the entities matching a journey. Its attributes contain + the returned rows and the total number of rows that matched, ignoring `limit`. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyListResponseAttributes" + id: + description: Identifier of this result. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyListResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsJourneyListResponseType: + description: The resource type identifier for a journey list response. + enum: + - journey_list_response + example: journey_list_response + type: string + x-enum-varnames: + - JOURNEY_LIST_RESPONSE + ProductAnalyticsJourneyListSort: + description: |- + Sort configuration for the returned rows. The sort is applied only when `facet` + is one of the returned columns; otherwise it is ignored. + properties: + facet: + description: Column to sort on. + type: string + order: + $ref: "#/components/schemas/QuerySortOrder" + type: object + ProductAnalyticsJourneyNodeTarget: + description: A reference to a single step of the journey. + properties: + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyNodeTargetType" + value: + description: Alias of the targeted node. + example: A + type: string + required: + - type + - value + type: object + ProductAnalyticsJourneyNodeTargetType: + description: The discriminator identifying a target that references a single step. + enum: + - node + example: node + type: string + x-enum-varnames: + - NODE + ProductAnalyticsJourneyPathTarget: + description: A reference to the range of steps between two nodes of the journey. + properties: + end: + description: Alias of the node the path ends at. + example: B + type: string + start: + description: Alias of the node the path starts at. + example: A + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyPathTargetType" + required: + - type + - start + - end + type: object + ProductAnalyticsJourneyPathTargetType: + description: The discriminator identifying a target that references a range of steps. + enum: + - path + example: path + type: string + x-enum-varnames: + - PATH + ProductAnalyticsJourneyRequestType: + description: The resource type identifier for a journey funnel request. + enum: + - journey_request + example: journey_request + type: string + x-enum-varnames: + - JOURNEY_REQUEST + ProductAnalyticsJourneyScalarCompute: + description: Defines the metric computed over the journey for a scalar query. + properties: + aggregation: + description: |- + Aggregation function: `count`, `cardinality`, `avg`, `median`, `min`, `max`, `sum`, + or a percentile of the form `pc` such as `pc95`. Defaults to `cardinality`. + example: count + pattern: "^(count|cardinality|avg|median|min|max|sum|pc[0-9]{1,2})$" + type: string + metric: + description: |- + Metric to aggregate on. Use a facet path such as `@view.time_spent`, or one of the + journey metrics `__dd.conversion`, `__dd.conversion_rate`, `__dd.time_to_convert`, + or `__dd.dropoff_rate`. Defaults to `__dd.conversion`. + type: string + target: + $ref: "#/components/schemas/ProductAnalyticsJourneyTarget" + required: + - aggregation + type: object + ProductAnalyticsJourneyScalarQuery: + description: Query definition for a journey scalar request. + properties: + compute: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarCompute" + group_by: + description: Segments the results by the values of one or more facets. + items: + $ref: "#/components/schemas/ProductAnalyticsGraphQueryGroupBy" + type: array + query_id: + description: Caller-defined identifier echoed back in the results. + type: string + search: + $ref: "#/components/schemas/ProductAnalyticsJourneySearch" + required: + - search + - compute + type: object + ProductAnalyticsJourneyScalarRequest: + description: Request body for a journey scalar query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarRequestData" + required: + - data + type: object + ProductAnalyticsJourneyScalarRequestAttributes: + description: Attributes of a journey scalar request. + properties: + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsJourneyScalarRequestData: + description: |- + The single JSON:API resource carrying a journey scalar query. Its attributes hold the time + window and the journey metric to reduce to one value over that window. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsFormulaJourneyRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsJourneyScalarResponse: + description: Response for a journey scalar query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarResponseData" + required: + - data + type: object + ProductAnalyticsJourneyScalarResponseData: + description: |- + The single JSON:API resource holding journey scalar results. Its attributes contain one value + per group, suitable for a query value or top list widget. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsScalarResponseAttributes" + id: + description: Identifier of this result. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsJourneyScalarResponseType: + description: The resource type identifier for a journey scalar response. + enum: + - journey_scalar_response + example: journey_scalar_response + type: string + x-enum-varnames: + - JOURNEY_SCALAR_RESPONSE + ProductAnalyticsJourneySearch: + description: Defines the steps of the journey and the filters applied to it. + properties: + expression: + description: Expression combining the node aliases in order, for example `A -> B -> C`. + example: A -> B + type: string + filters: + $ref: "#/components/schemas/ProductAnalyticsJourneySearchFilters" + join_keys: + $ref: "#/components/schemas/ProductAnalyticsJoinKeys" + node_objects: + additionalProperties: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + description: |- + Map of node alias to the query matching that step of the journey. + Every alias used in `expression` must have an entry here. + example: + A: + data_source: product_analytics + search: + query: "@type:view @view.name:Login" + B: + data_source: product_analytics + search: + query: "@type:action @action.target.name:Submit" + type: object + required: + - expression + - node_objects + type: object + ProductAnalyticsJourneySearchFilters: + description: Filters applied on top of the journey step expression. + properties: + audience_filters: + $ref: "#/components/schemas/ProductAnalyticsJourneyAudienceFilters" + graph_filters: + description: Filters on journey-level metrics such as time to convert. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneySearchGraphFilter" + type: array + string_filter: + description: Free-text search query applied to the whole journey. + type: string + type: object + ProductAnalyticsJourneySearchGraphFilter: + description: A filter applied to a step, or a range of steps, of the journey graph. + properties: + name: + $ref: "#/components/schemas/ProductAnalyticsJourneySearchGraphFilterName" + operator: + $ref: "#/components/schemas/ProductAnalyticsJourneySearchGraphFilterOperator" + target: + $ref: "#/components/schemas/ProductAnalyticsJourneyTarget" + value: + description: Value compared against the metric. Durations are expressed in milliseconds. + example: 60000 + format: int64 + type: integer + required: + - name + - operator + - value + type: object + ProductAnalyticsJourneySearchGraphFilterName: + description: The journey-level metric the graph filter applies to. + enum: + - __dd.time_to_convert + - __dd.session + - __dd.dropoff_rate + example: __dd.time_to_convert + type: string + x-enum-varnames: + - TIME_TO_CONVERT + - SESSION + - DROPOFF_RATE + ProductAnalyticsJourneySearchGraphFilterOperator: + description: Comparison operator applied to the graph filter value. + enum: + - "=" + - "<" + - ">" + - "<=" + - ">=" + example: "<=" + type: string + x-enum-varnames: + - EQUAL + - LESS_THAN + - GREATER_THAN + - LESS_THAN_OR_EQUAL + - GREATER_THAN_OR_EQUAL + ProductAnalyticsJourneyTarget: + description: |- + A reference to a step, or a range of steps, in the journey. + Use a `node` target to name a single step, or a `path` target to name the range + between two steps. + oneOf: + - $ref: "#/components/schemas/ProductAnalyticsJourneyNodeTarget" + - $ref: "#/components/schemas/ProductAnalyticsJourneyPathTarget" + ProductAnalyticsJourneyTimeseriesResponse: + description: Response for a journey timeseries query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyTimeseriesResponseData" + required: + - data + type: object + ProductAnalyticsJourneyTimeseriesResponseData: + description: |- + The single JSON:API resource holding journey timeseries results. Its attributes contain one + series per group along with the timestamps the points fall on. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsTimeseriesResponseAttributes" + id: + description: Identifier of this result. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyTimeseriesResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsJourneyTimeseriesResponseType: + description: The resource type identifier for a journey timeseries response. + enum: + - journey_timeseries_response + example: journey_timeseries_response + type: string + x-enum-varnames: + - JOURNEY_TIMESERIES_RESPONSE + ProductAnalyticsOccurrenceFilter: + description: Filter for occurrence-based queries. + properties: + meta: + additionalProperties: + type: string + description: Additional metadata. + type: object + operator: + description: Comparison operator (=, >=, <=, >, <). + example: ">=" + type: string + value: + description: The occurrence count threshold as a string. + example: "1" + type: string + required: + - operator + - value + type: object + ProductAnalyticsOccurrenceQuery: + description: A Product Analytics occurrence-filtered query. + properties: + data_source: + $ref: "#/components/schemas/ProductAnalyticsOccurrenceQueryDataSource" + search: + $ref: "#/components/schemas/ProductAnalyticsOccurrenceSearch" + required: + - data_source + - search + type: object + ProductAnalyticsOccurrenceQueryDataSource: + description: The data source identifier for occurrence queries. + enum: + - product_analytics_occurrence + example: product_analytics_occurrence + type: string + x-enum-varnames: + - PRODUCT_ANALYTICS_OCCURRENCE + ProductAnalyticsOccurrenceSearch: + description: Search parameters for an occurrence query. + properties: + occurrences: + $ref: "#/components/schemas/ProductAnalyticsOccurrenceFilter" + query: + description: The search query using Datadog search syntax. + example: "@type:action" + type: string + type: object + ProductAnalyticsResponseMeta: + description: Metadata for a Product Analytics query response. + properties: + request_id: + description: Unique identifier of the query. + type: string + status: + $ref: "#/components/schemas/ProductAnalyticsResponseMetaStatus" + type: object + ProductAnalyticsResponseMetaStatus: + description: The execution status of a Product Analytics query. + enum: + - done + - running + - timeout + type: string + x-enum-varnames: + - DONE + - RUNNING + - TIMEOUT + ProductAnalyticsRetentionAggregationTarget: + description: Selects the rolled-up row that aggregates every cohort, rather than a single cohort. + properties: + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionAggregationTargetType" + value: + description: The aggregation that produced the rolled-up row. + example: weighted_avg + type: string + required: + - type + - value + type: object + ProductAnalyticsRetentionAggregationTargetType: + description: The discriminator identifying a target selected by aggregation. + enum: + - aggregation + example: aggregation + type: string + x-enum-varnames: + - AGGREGATION + ProductAnalyticsRetentionCalendarTimeInterval: + description: A retention interval aligned to calendar boundaries. + properties: + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionCalendarTimeIntervalType" + value: + $ref: "#/components/schemas/ProductAnalyticsCalendarInterval" + required: + - type + - value + type: object + ProductAnalyticsRetentionCalendarTimeIntervalType: + description: The discriminator identifying a calendar-aligned retention interval. + enum: + - calendar + example: calendar + type: string + x-enum-varnames: + - CALENDAR + ProductAnalyticsRetentionCellScope: + description: Narrows a retention query to a single cell, at the intersection of one cohort and one return period. + properties: + cohort_target: + $ref: "#/components/schemas/ProductAnalyticsRetentionCohortTarget" + return_period_target: + $ref: "#/components/schemas/ProductAnalyticsRetentionIndexTarget" + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionCellScopeType" + required: + - type + - cohort_target + - return_period_target + type: object + ProductAnalyticsRetentionCellScopeType: + description: The discriminator identifying a scope narrowed to one grid cell. + enum: + - cell + example: cell + type: string + x-enum-varnames: + - CELL + ProductAnalyticsRetentionCohortCriteria: + description: Defines the event that places an entity into a cohort, and how cohorts are bucketed over time. + properties: + base_query: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + time_interval: + $ref: "#/components/schemas/ProductAnalyticsRetentionTimeInterval" + required: + - base_query + - time_interval + type: object + ProductAnalyticsRetentionCohortScope: + description: Narrows a retention query to a single cohort row. + properties: + target: + $ref: "#/components/schemas/ProductAnalyticsRetentionCohortTarget" + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionCohortScopeType" + required: + - type + - target + type: object + ProductAnalyticsRetentionCohortScopeType: + description: The discriminator identifying a scope narrowed to one cohort. + enum: + - cohort + example: cohort + type: string + x-enum-varnames: + - COHORT + ProductAnalyticsRetentionCohortTarget: + description: Selects a cohort, either by index or by the aggregation that rolls all cohorts together. + oneOf: + - $ref: "#/components/schemas/ProductAnalyticsRetentionIndexTarget" + - $ref: "#/components/schemas/ProductAnalyticsRetentionAggregationTarget" + ProductAnalyticsRetentionCompute: + description: The metric and aggregation applied to a retention query. + properties: + aggregation: + description: The aggregation function applied to the metric, such as `count` or `avg`. + example: count + type: string + metric: + $ref: "#/components/schemas/ProductAnalyticsRetentionComputeMetric" + required: + - metric + - aggregation + type: object + ProductAnalyticsRetentionComputeMetric: + description: The retention metric to compute, either an absolute count or a rate. + enum: + - "__dd.retention" + - "__dd.retention_rate" + example: "__dd.retention_rate" + type: string + x-enum-varnames: + - RETENTION + - RETENTION_RATE + ProductAnalyticsRetentionEntity: + description: The entity whose retention is measured. + enum: + - "@usr.id" + - "@account.id" + example: "@usr.id" + type: string + x-enum-varnames: + - USER_ID + - ACCOUNT_ID + ProductAnalyticsRetentionFilters: + description: Filters narrowing the events considered by a retention query. + properties: + audience_filters: + $ref: "#/components/schemas/ProductAnalyticsAudienceFilters" + string_filter: + description: Free-text search query applied to the events. + type: string + type: object + ProductAnalyticsRetentionFixedTimeInterval: + description: A retention interval of fixed length, such as "7 days". + properties: + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionFixedTimeIntervalType" + unit: + $ref: "#/components/schemas/ProductAnalyticsRetentionFixedTimeIntervalUnit" + value: + description: Length of the interval, expressed in `unit`. + example: 7 + exclusiveMinimum: true + format: double + minimum: 0 + type: number + required: + - type + - value + - unit + type: object + ProductAnalyticsRetentionFixedTimeIntervalType: + description: The discriminator identifying a fixed-length retention interval. + enum: + - fixed + example: fixed + type: string + x-enum-varnames: + - FIXED + ProductAnalyticsRetentionFixedTimeIntervalUnit: + description: Time unit for a fixed-length retention interval. + enum: + - day + - week + - month + example: day + type: string + x-enum-varnames: + - DAY + - WEEK + - MONTH + ProductAnalyticsRetentionGridCohort: + description: One row of the retention grid, holding the results for a single cohort. + properties: + cells: + description: The cells of the row, one per return period. + items: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridCohortCell" + type: array + cohort_end_time: + description: End of the cohort window, in epoch milliseconds. + format: int64 + type: integer + cohort_index: + description: Zero-based index of the cohort in the grid. + format: int64 + type: integer + cohort_size: + description: Number of entities in the cohort. + format: int64 + type: integer + cohort_start_time: + description: Start of the cohort window, in epoch milliseconds. + format: int64 + type: integer + group_tags: + description: The group-by facet values that identify this row. + items: + description: A tag value for a group-by facet. + type: string + type: array + name: + description: Label identifying the cohort, such as the week it started. + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridCohortType" + unit: + description: Unit definitions for the cell values. + items: + $ref: "#/components/schemas/ProductAnalyticsUnit" + type: array + type: object + ProductAnalyticsRetentionGridCohortCell: + description: |- + One cell of the retention grid, holding the result for a single cohort over a single return period. + Aggregated rows omit the time and count fields. + properties: + cell_count: + description: Number of entities that returned during the period. + format: int64 + type: integer + cell_rate: + description: Fraction of the cohort that returned, between `0` and `1`. + format: double + type: number + cell_relative_value_change: + description: Change in the metric relative to the cohort baseline. + format: double + nullable: true + type: number + cell_value: + description: Value of the computed metric, when a metric other than the retention rate is requested. + format: double + nullable: true + type: number + is_partial_data: + description: Whether the return period is still open, so the numbers are not yet final. + type: boolean + return_period_end_time: + description: End of the return period, in epoch milliseconds. + format: int64 + type: integer + return_period_index: + description: Zero-based index of the return period this cell belongs to. + format: int64 + type: integer + return_period_start_time: + description: Start of the return period, in epoch milliseconds. + format: int64 + type: integer + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridCohortType" + type: object + ProductAnalyticsRetentionGridCohortType: + description: |- + Whether the row holds one cohort's own numbers, or the weighted roll-up across every cohort. + enum: + - raw + - aggregated + example: raw + type: string + x-enum-varnames: + - RAW + - AGGREGATED + ProductAnalyticsRetentionGridQuery: + description: Query definition for a retention grid or retention metadata request. + properties: + computation_scope: + $ref: "#/components/schemas/ProductAnalyticsRetentionScope" + compute: + $ref: "#/components/schemas/ProductAnalyticsRetentionCompute" + group_by: + description: Splits the results by the values of one or more facets. + items: + $ref: "#/components/schemas/ProductAnalyticsRetentionGroupBy" + type: array + search: + $ref: "#/components/schemas/ProductAnalyticsRetentionSearch" + required: + - search + - compute + type: object + ProductAnalyticsRetentionGridRequest: + description: Request body for a retention grid query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridRequestData" + required: + - data + type: object + ProductAnalyticsRetentionGridRequestAttributes: + description: Attributes of a retention grid request. + properties: + exclude_anonymous_traffic: + default: false + description: Whether to exclude sessions that are not tied to an identified user. + type: boolean + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsRetentionGridRequestData: + description: |- + The single JSON:API resource carrying a retention grid query. Its attributes hold the time + window to query and the cohort and return criteria that define the grid. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsRetentionGridRequestType: + description: The resource type identifier for a retention grid request. + enum: + - retention_grid_request + example: retention_grid_request + type: string + x-enum-varnames: + - RETENTION_GRID_REQUEST + ProductAnalyticsRetentionGridResponse: + description: Response for a retention grid query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridResponseData" + required: + - data + type: object + ProductAnalyticsRetentionGridResponseAttributes: + description: Attributes of a retention grid response, containing the cohort rows and the period columns. + properties: + cohorts: + description: The cohorts forming the rows of the grid. + items: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridCohort" + type: array + retention_entity: + description: The entity whose retention was measured. + type: string + retention_periods: + description: The return periods forming the columns of the grid. + items: + $ref: "#/components/schemas/ProductAnalyticsRetentionPeriod" + type: array + unit: + description: Unit definitions for the grid values. + items: + $ref: "#/components/schemas/ProductAnalyticsUnit" + type: array + type: object + ProductAnalyticsRetentionGridResponseData: + description: |- + The single JSON:API resource holding a computed retention grid. Its attributes contain the + return periods forming the columns and the cohorts forming the rows. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridResponseAttributes" + id: + description: Unique identifier for this response data object. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsRetentionGridResponseType: + description: The resource type identifier for a retention grid response. + enum: + - retention_grid_response + example: retention_grid_response + type: string + x-enum-varnames: + - RETENTION_GRID_RESPONSE + ProductAnalyticsRetentionGroupBy: + description: Splits retention results by the values of a facet. + properties: + facet: + description: The attribute path to group by. + example: "@geo.country" + type: string + limit: + description: Maximum number of groups to return. Omit it to let the service choose. + example: 10 + format: int64 + minimum: 1 + type: integer + should_exclude_missing: + default: false + description: Whether to drop entities that have no value for the facet. + type: boolean + sort: + $ref: "#/components/schemas/ProductAnalyticsGroupBySort" + source: + description: Audience source backing the group-by, when grouping by an audience rather than a facet. + type: string + target: + $ref: "#/components/schemas/ProductAnalyticsRetentionGroupByTarget" + required: + - target + - facet + type: object + ProductAnalyticsRetentionGroupByTarget: + description: Which axis of the retention grid a group-by applies to. + enum: + - cohort + - return_period + example: cohort + type: string + x-enum-varnames: + - COHORT + - RETURN_PERIOD + ProductAnalyticsRetentionIndexTarget: + description: Selects a cohort or return period by its zero-based position in the grid. + properties: + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionIndexTargetType" + value: + description: Zero-based index of the targeted cohort or return period. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - type + - value + type: object + ProductAnalyticsRetentionIndexTargetType: + description: The discriminator identifying a target selected by index. + enum: + - index + example: index + type: string + x-enum-varnames: + - INDEX + ProductAnalyticsRetentionListColumn: + description: A column to include in each returned entity row. + properties: + field: + $ref: "#/components/schemas/ProductAnalyticsRetentionListColumnField" + type: object + ProductAnalyticsRetentionListColumnField: + description: The attribute selected for a column. + properties: + path: + description: Attribute path of the column. + example: "@usr.email" + type: string + type: object + ProductAnalyticsRetentionListQuery: + description: Query definition for a retention list request. + properties: + columns: + description: The attribute columns to include in each returned row. + items: + $ref: "#/components/schemas/ProductAnalyticsRetentionListColumn" + type: array + computation_scope: + $ref: "#/components/schemas/ProductAnalyticsRetentionCellScope" + limit: + description: Maximum number of rows to return. Use `0` for no limit. + example: 100 + format: int64 + minimum: 0 + type: integer + search: + $ref: "#/components/schemas/ProductAnalyticsRetentionSearch" + required: + - search + - computation_scope + type: object + ProductAnalyticsRetentionListRecord: + additionalProperties: {} + description: A single entity row, keyed by the requested column paths. + type: object + ProductAnalyticsRetentionListRequest: + description: Request body listing the individual entities behind one cell of the retention grid. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsRetentionListRequestData" + required: + - data + type: object + ProductAnalyticsRetentionListRequestAttributes: + description: Attributes of a retention list request. + properties: + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsRetentionListQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsRetentionListRequestData: + description: |- + The single JSON:API resource carrying a retention list query. Its attributes hold the time + window, the cell to list, and the columns to return for each entity. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsRetentionListRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionListRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsRetentionListRequestType: + description: The resource type identifier for a retention list request. + enum: + - retention_list_request + example: retention_list_request + type: string + x-enum-varnames: + - RETENTION_LIST_REQUEST + ProductAnalyticsRetentionListResponse: + description: Response for a retention list query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsRetentionListResponseData" + required: + - data + type: object + ProductAnalyticsRetentionListResponseAttributes: + description: Attributes of a retention list response, containing the matching entity rows. + properties: + records: + description: The matching entity rows. + items: + $ref: "#/components/schemas/ProductAnalyticsRetentionListRecord" + type: array + retention_entity: + description: The entity whose retention was measured. + type: string + type: object + ProductAnalyticsRetentionListResponseData: + description: |- + The single JSON:API resource holding the entities behind one retention cell. Its attributes + contain the entity whose retention was measured and one row per matching entity. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsRetentionListResponseAttributes" + id: + description: Unique identifier for this response data object. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionListResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsRetentionListResponseType: + description: The resource type identifier for a retention list response. + enum: + - retention_list_response + example: retention_list_response + type: string + x-enum-varnames: + - RETENTION_LIST_RESPONSE + ProductAnalyticsRetentionPeriod: + description: A return period definition, such as "1 week". + properties: + unit: + description: Time unit of the period, such as `day`, `week`, `month`, or `year`. + example: week + type: string + value: + description: Length of the period, expressed in `unit`. + example: 1 + format: int64 + type: integer + type: object + ProductAnalyticsRetentionReturnCondition: + description: |- + When an entity counts as having returned. Use `conversion_on` to count only entities that + returned during the period itself, or `conversion_on_or_after` to also count later returns. + enum: + - conversion_on + - conversion_on_or_after + example: conversion_on_or_after + type: string + x-enum-varnames: + - CONVERSION_ON + - CONVERSION_ON_OR_AFTER + ProductAnalyticsRetentionReturnCriteria: + description: Defines the event that counts as a return, and the window in which it must occur. + properties: + base_query: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + time_interval: + $ref: "#/components/schemas/ProductAnalyticsRetentionTimeInterval" + required: + - base_query + type: object + ProductAnalyticsRetentionReturnPeriodScope: + description: Narrows a retention query to a single return-period column. + properties: + target: + $ref: "#/components/schemas/ProductAnalyticsRetentionIndexTarget" + type: + $ref: "#/components/schemas/ProductAnalyticsRetentionReturnPeriodScopeType" + required: + - type + - target + type: object + ProductAnalyticsRetentionReturnPeriodScopeType: + description: The discriminator identifying a scope narrowed to one return period. + enum: + - return_period + example: return_period + type: string + x-enum-varnames: + - RETURN_PERIOD + ProductAnalyticsRetentionScope: + description: |- + Restricts a retention query to part of the grid, so that results can be examined in detail. + Omit it to compute the whole grid. + oneOf: + - $ref: "#/components/schemas/ProductAnalyticsRetentionCohortScope" + - $ref: "#/components/schemas/ProductAnalyticsRetentionReturnPeriodScope" + - $ref: "#/components/schemas/ProductAnalyticsRetentionCellScope" + ProductAnalyticsRetentionSearch: + description: Defines the cohort and return criteria that make up a retention query. + properties: + cohort_criteria: + $ref: "#/components/schemas/ProductAnalyticsRetentionCohortCriteria" + filters: + $ref: "#/components/schemas/ProductAnalyticsRetentionFilters" + retention_entity: + $ref: "#/components/schemas/ProductAnalyticsRetentionEntity" + return_condition: + $ref: "#/components/schemas/ProductAnalyticsRetentionReturnCondition" + return_criteria: + $ref: "#/components/schemas/ProductAnalyticsRetentionReturnCriteria" + required: + - cohort_criteria + - retention_entity + - return_condition + type: object + ProductAnalyticsRetentionTimeInterval: + description: |- + A retention interval, either aligned to calendar boundaries or of a fixed length. + Cohort criteria use calendar intervals; return criteria use fixed intervals. + oneOf: + - $ref: "#/components/schemas/ProductAnalyticsRetentionCalendarTimeInterval" + - $ref: "#/components/schemas/ProductAnalyticsRetentionFixedTimeInterval" + ProductAnalyticsSankeyAggregatedNode: + description: One of the nodes rolled up into an aggregated node, retained so the roll-up can be broken down. + properties: + id: + description: Unique identifier for the node. + type: string + incoming_value: + description: Number of sessions entering the node. + format: int64 + type: integer + name: + description: The facet value the node represents. + type: string + outgoing_value: + description: Number of sessions leaving the node. + format: int64 + type: integer + type: + $ref: "#/components/schemas/ProductAnalyticsSankeyAggregatedNodeType" + value: + description: Number of sessions passing through the node. + format: int64 + type: integer + type: object + ProductAnalyticsSankeyAggregatedNodeType: + description: The resource type identifier for a node rolled up into an aggregated node. + enum: + - aggregated + type: string + x-enum-varnames: + - AGGREGATED + ProductAnalyticsSankeyDefinition: + description: The shape of the Sankey diagram, expressed as the facets to flow between and how many steps to show. + properties: + entries_per_step: + description: |- + Maximum number of nodes to keep in each column. Remaining values are rolled up into an + aggregated node. Omit it, or send `0`, to use the default of `5`. + example: 10 + format: int64 + maximum: 10 + minimum: 0 + type: integer + number_of_steps: + description: |- + Number of intermediate columns between the source and the target. + Omit it, or send `0`, to use the default of `5`. + example: 3 + format: int64 + maximum: 10 + minimum: 0 + type: integer + source: + description: Facet forming the first column of the diagram. + example: "@view.name" + type: string + target: + description: Facet forming the last column of the diagram. + example: "@view.name" + type: string + required: + - source + - target + type: object + ProductAnalyticsSankeyLink: + description: A link of the Sankey diagram, representing the sessions flowing between two nodes. + properties: + column: + description: Zero-based index of the column the link starts from. + format: int64 + type: integer + id: + description: Unique identifier for the link. + type: string + source: + description: Identifier of the node the link starts at. + type: string + target: + description: Identifier of the node the link ends at. + type: string + value: + description: Number of sessions flowing along the link. + format: int64 + type: integer + type: object + ProductAnalyticsSankeyNode: + description: A node of the Sankey diagram, representing one facet value in one column. + properties: + aggregated_nodes: + description: The nodes rolled up into this one, when the node is an aggregate. + items: + $ref: "#/components/schemas/ProductAnalyticsSankeyAggregatedNode" + type: array + column: + description: Zero-based index of the column the node sits in. + format: int64 + type: integer + dropoff_value: + description: Number of sessions that ended at the node. + format: int64 + type: integer + id: + description: Unique identifier for the node. + type: string + incoming_value: + description: Number of sessions entering the node. + format: int64 + type: integer + name: + description: The facet value the node represents. + type: string + outgoing_value: + description: Number of sessions leaving the node. + format: int64 + type: integer + type: + $ref: "#/components/schemas/ProductAnalyticsSankeyNodeType" + value: + description: Number of sessions passing through the node. + format: int64 + type: integer + type: object + ProductAnalyticsSankeyNodeType: + description: |- + The kind of node. `regular` is a single facet value, `other` rolls up the values that did not + fit within `entries_per_step`, and `dropoff` collects the sessions that ended at this column. + enum: + - regular + - other + - dropoff + type: string + x-enum-varnames: + - REGULAR + - OTHER + - DROPOFF + ProductAnalyticsSankeyRequest: + description: Request body for a Sankey diagram query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsSankeyRequestData" + required: + - data + type: object + ProductAnalyticsSankeyRequestAttributes: + description: Attributes of a Sankey request. + properties: + definition: + $ref: "#/components/schemas/ProductAnalyticsSankeyDefinition" + search: + $ref: "#/components/schemas/ProductAnalyticsSankeySearch" + time: + $ref: "#/components/schemas/ProductAnalyticsSankeyTime" + required: + - time + - search + - definition + type: object + ProductAnalyticsSankeyRequestData: + description: |- + The single JSON:API resource carrying a Sankey query. Its attributes hold the time window to + query, the search that selects the sessions, and the definition of the diagram to build. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsSankeyRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsSankeyRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsSankeyRequestType: + description: The resource type identifier for a Sankey request. + enum: + - sankey_request + example: sankey_request + type: string + x-enum-varnames: + - SANKEY_REQUEST + ProductAnalyticsSankeyResponse: + description: Response for a Sankey diagram query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsSankeyResponseData" + required: + - data + type: object + ProductAnalyticsSankeyResponseAttributes: + description: Attributes of a Sankey response, containing the nodes and the links between them. + properties: + links: + description: The links of the diagram, one per pair of connected nodes. + items: + $ref: "#/components/schemas/ProductAnalyticsSankeyLink" + type: array + nodes: + description: The nodes of the diagram, one per facet value and column. + items: + $ref: "#/components/schemas/ProductAnalyticsSankeyNode" + type: array + type: object + ProductAnalyticsSankeyResponseData: + description: |- + The single JSON:API resource holding a computed Sankey diagram. Its attributes contain the + nodes of every column and the links that carry sessions between them. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsSankeyResponseAttributes" + id: + description: Unique identifier for this response data object. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsSankeyResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsSankeyResponseType: + description: The resource type identifier for a Sankey response. + enum: + - sankey_response + example: sankey_response + type: string + x-enum-varnames: + - SANKEY_RESPONSE + ProductAnalyticsSankeySearch: + description: Selects the sessions a Sankey diagram is built from. + properties: + audience_filters: + $ref: "#/components/schemas/ProductAnalyticsAudienceFilters" + join_keys: + $ref: "#/components/schemas/ProductAnalyticsJoinKeys" + query: + description: Datadog search query restricting the events considered. + example: "@type:view" + type: string + type: object + ProductAnalyticsSankeyTime: + description: The time window a Sankey query covers. + properties: + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + type: object + ProductAnalyticsScalarColumn: + description: A column in a scalar response. + properties: + meta: + $ref: "#/components/schemas/ProductAnalyticsScalarColumnMeta" + name: + description: Column name (facet name for group-by, or "query"). + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsScalarColumnType" + values: + description: Column values. + items: + description: A single cell value within the column (string for group-by columns, number for metric columns). + type: array + type: object + ProductAnalyticsScalarColumnMeta: + description: Metadata associated with a scalar response column, including optional unit information. + properties: + unit: + description: Unit definitions for the column values, if applicable. + items: + $ref: "#/components/schemas/ProductAnalyticsUnit" + nullable: true + type: array + type: object + ProductAnalyticsScalarColumnType: + description: Column type. + enum: + - number + - group + type: string + x-enum-varnames: + - NUMBER + - GROUP + ProductAnalyticsScalarResponse: + description: Response for a scalar analytics query. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsScalarResponseData" + meta: + $ref: "#/components/schemas/ProductAnalyticsResponseMeta" + type: object + ProductAnalyticsScalarResponseAttributes: + description: Attributes of a scalar analytics response, containing the result columns. + properties: + columns: + description: The list of result columns, each containing values and metadata. + items: + $ref: "#/components/schemas/ProductAnalyticsScalarColumn" + type: array + type: object + ProductAnalyticsScalarResponseData: + description: Data object for a scalar response. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsScalarResponseAttributes" + id: + description: Unique identifier for this response data object. + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsScalarResponseType" + type: object + ProductAnalyticsScalarResponseType: + description: The resource type identifier for a scalar analytics response. + enum: + - scalar_response + type: string + x-enum-varnames: + - SCALAR_RESPONSE + ProductAnalyticsSerie: + description: A series in a timeseries response. + properties: + group_tags: + description: The group-by tag values that identify this series. + items: + description: A tag value for a group-by facet. + type: string + type: array + query_index: + description: The index of the query that produced this series. + format: int64 + type: integer + unit: + description: Unit definitions for the series values. + items: + $ref: "#/components/schemas/ProductAnalyticsUnit" + type: array + type: object + ProductAnalyticsServerSideEventError: + description: Error details. + properties: + detail: + description: Error message. example: "Malformed payload" type: string status: @@ -83293,7 +85451,9 @@ components: $ref: "#/components/schemas/ProductAnalyticsResponseMeta" type: object ProductAnalyticsTimeseriesResponseAttributes: - description: Attributes of a timeseries analytics response, containing series data, timestamps, and interval definitions. + description: |- + Attributes of a timeseries analytics response, containing series data, timestamps, and + interval definitions. properties: intervals: description: Interval definitions describing the time buckets used in the response. @@ -178604,6 +180764,68 @@ paths: tags: - Rum Audience Management x-unstable: "**Note**: This endpoint may be subject to changes." + /api/v2/product-analytics/analytics/list: + post: + description: |- + List the individual event records matching an analytics query. + Use `columns` to choose the attributes returned on each row, `sort` to order the rows, + and `limit` to cap how many are returned. + operationId: QueryProductAnalyticsList + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1771232048460 + query: + columns: + - "@view.name" + limit: 100 + query: + data_source: product_analytics + search: + query: "@type:view" + to: 1771836848262 + type: formula_analytics_extended_list_request + schema: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + records: [] + total_count: 0 + id: abc-123 + type: list_response + schema: + $ref: "#/components/schemas/ProductAnalyticsAnalyticsListResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List analytics events + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/product-analytics/analytics/scalar: post: description: |- @@ -178718,6 +180940,667 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/product-analytics/journey/funnel: + post: + description: |- + Compute a funnel over an ordered sequence of Product Analytics events. + Returns the per-step conversion counts, conversion rates, and elapsed times, + optionally segmented by group-by facets. + operationId: QueryProductAnalyticsJourneyFunnel + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + compute: + aggregation: count + search: + expression: A -> B + node_objects: + A: + data_source: product_analytics + search: + query: "@type:view @view.name:Login" + B: + data_source: product_analytics + search: + query: "@type:action @action.target.name:Submit" + to: 1756857600000 + type: journey_request + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + end_to_end_conversion_rate: 0.42 + end_to_end_elapsed_time: + avg: 9400 + max: 86400 + min: 1200 + funnel_steps: + - elapsed_time_to_next_step: + avg: 5100 + max: 42000 + min: 900 + groups: [] + label: A + unit: millisecond + value: 1200 + initial_count: 1200 + id: 00000000-0000-0000-0000-000000000000 + type: funnel_response + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyFunnelResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Compute journey funnel analysis + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/journey/list: + post: + description: |- + 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 `entity_columns`. + operationId: QueryProductAnalyticsJourneyList + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + entity_columns: + - "@usr.name" + limit: 50 + search: + expression: A -> B + node_objects: + A: + data_source: product_analytics + search: + query: "@type:view @view.name:Login" + B: + data_source: product_analytics + search: + query: "@type:action @action.target.name:Submit" + to: 1756857600000 + type: journey_list_request + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyListRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + entity: session + records: + - "@session.id": 00000000-0000-0000-0000-000000000001 + "@usr.name": Jane Doe + timestamp: 1756425600000 + total_count: 231 + id: 00000000-0000-0000-0000-000000000000 + type: journey_list_response + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyListResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List journey entities + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/journey/scalar: + post: + description: |- + Compute scalar results for a journey query, such as the conversion count, + the conversion rate, or the time to convert, optionally segmented by group-by facets. + operationId: QueryProductAnalyticsJourneyScalar + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + compute: + aggregation: count + metric: __dd.conversion_rate + search: + expression: A -> B + node_objects: + A: + data_source: product_analytics + search: + query: "@type:view @view.name:Login" + B: + data_source: product_analytics + search: + query: "@type:action @action.target.name:Submit" + to: 1756857600000 + type: formula_journey_request + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + columns: [] + id: 00000000-0000-0000-0000-000000000000 + type: journey_scalar_response + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyScalarResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Compute journey scalar analytics + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/journey/timeseries: + post: + description: |- + Compute timeseries results for a journey query. + Returns one series per group-by combination, bucketed by the requested interval. + operationId: QueryProductAnalyticsJourneyTimeseries + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + interval: 3600000 + query: + compute: + aggregation: count + search: + expression: A -> B + node_objects: + A: + data_source: product_analytics + search: + query: "@type:view @view.name:Login" + B: + data_source: product_analytics + search: + query: "@type:action @action.target.name:Submit" + to: 1756857600000 + type: formula_journey_request + schema: + $ref: "#/components/schemas/ProductAnalyticsFormulaJourneyRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + series: [] + times: [] + id: 00000000-0000-0000-0000-000000000000 + type: journey_timeseries_response + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyTimeseriesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Compute journey timeseries analytics + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/retention/grid: + post: + description: |- + Compute a retention grid, showing how much of each cohort came back over each subsequent period. + Rows are cohorts, columns are return periods, and each cell holds the count and rate of entities that returned. + operationId: QueryProductAnalyticsRetentionGrid + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + compute: + aggregation: count + metric: "__dd.retention_rate" + search: + cohort_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:Signup" + time_interval: + type: calendar + value: + alignment: monday + quantity: 1 + timezone: UTC + type: week + retention_entity: "@usr.id" + return_condition: conversion_on_or_after + return_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view" + to: 1756857600000 + type: retention_grid_request + schema: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridRequest" + description: The retention grid query. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cohorts: [] + retention_entity: "@usr.id" + retention_periods: [] + id: 00000000-0000-0000-0000-000000000000 + type: retention_grid_response + schema: + $ref: "#/components/schemas/ProductAnalyticsRetentionGridResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Compute a retention grid + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/retention/list: + post: + description: |- + List the individual users or accounts counted in one cell of the retention grid. + Set `computation_scope` to the cohort and return period you want to examine. + operationId: QueryProductAnalyticsRetentionList + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + columns: + - field: + path: "@usr.email" + computation_scope: + cohort_target: + type: index + value: 0 + return_period_target: + type: index + value: 1 + type: cell + limit: 100 + search: + cohort_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:Signup" + time_interval: + type: calendar + value: + quantity: 1 + type: week + retention_entity: "@usr.id" + return_condition: conversion_on_or_after + to: 1756857600000 + type: retention_list_request + schema: + $ref: "#/components/schemas/ProductAnalyticsRetentionListRequest" + description: The retention list query. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + records: [] + retention_entity: "@usr.id" + id: 00000000-0000-0000-0000-000000000000 + type: retention_list_response + schema: + $ref: "#/components/schemas/ProductAnalyticsRetentionListResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List the entities behind a retention cell + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/retention/scalar: + post: + description: Compute retention as a single value per group, suitable for a query value or top list widget. + operationId: QueryProductAnalyticsRetentionScalar + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + compute: + aggregation: count + metric: "__dd.retention_rate" + search: + cohort_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:Signup" + time_interval: + type: calendar + value: + alignment: monday + quantity: 1 + timezone: UTC + type: week + retention_entity: "@usr.id" + return_condition: conversion_on_or_after + return_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view" + to: 1756857600000 + type: formula_retention_request + schema: + $ref: "#/components/schemas/ProductAnalyticsFormulaRetentionRequest" + description: The retention scalar query. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + columns: [] + type: scalar_response + schema: + $ref: "#/components/schemas/ProductAnalyticsScalarResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Compute retention scalar values + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/retention/timeseries: + post: + description: |- + Compute retention as a series of values over time, using the same query definition as the + retention grid. + operationId: QueryProductAnalyticsRetentionTimeseries + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + compute: + aggregation: count + metric: "__dd.retention_rate" + search: + cohort_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:Signup" + time_interval: + type: calendar + value: + alignment: monday + quantity: 1 + timezone: UTC + type: week + retention_entity: "@usr.id" + return_condition: conversion_on_or_after + return_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view" + to: 1756857600000 + type: formula_retention_request + schema: + $ref: "#/components/schemas/ProductAnalyticsFormulaRetentionRequest" + description: The retention timeseries query. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + series: [] + times: [] + type: timeseries_response + schema: + $ref: "#/components/schemas/ProductAnalyticsTimeseriesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Compute retention timeseries + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/sankey: + post: + description: |- + 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. + operationId: QueryProductAnalyticsSankey + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + definition: + entries_per_step: 10 + number_of_steps: 3 + source: "@view.name" + target: "@view.name" + search: + query: "@type:view" + time: + from: 1756425600000 + to: 1756857600000 + type: sankey_request + schema: + $ref: "#/components/schemas/ProductAnalyticsSankeyRequest" + description: The Sankey diagram query. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + links: [] + nodes: [] + id: 00000000-0000-0000-0000-000000000000 + type: sankey_response + schema: + $ref: "#/components/schemas/ProductAnalyticsSankeyResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Compute a Sankey diagram + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/product-analytics/users/event_filtered_query: post: description: Query users filtered by both user properties and event platform data diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 30d8cbe03d..56b4374ab4 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -34962,6 +34962,90 @@ datadog\_api\_client.v2.model.process\_timeseries\_query module :members: :show-inheritance: +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_query module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_record module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_record + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_request module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_request\_attributes module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_request\_data module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_request\_type module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_response\_attributes module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_response\_data module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_response\_type module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_sort module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_sort + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_analytics\_list\_sort\_order module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_analytics_list_sort_order + :members: + :show-inheritance: + datadog\_api\_client.v2.model.product\_analytics\_analytics\_query module ------------------------------------------------------------------------- @@ -35032,6 +35116,20 @@ datadog\_api\_client.v2.model.product\_analytics\_base\_query module :members: :show-inheritance: +datadog\_api\_client.v2.model.product\_analytics\_calendar\_interval module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_calendar_interval + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_calendar\_interval\_type module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_calendar_interval_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.product\_analytics\_compute module ---------------------------------------------------------------- @@ -35039,6 +35137,13 @@ datadog\_api\_client.v2.model.product\_analytics\_compute module :members: :show-inheritance: +datadog\_api\_client.v2.model.product\_analytics\_elapsed\_time module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_elapsed_time + :members: + :show-inheritance: + datadog\_api\_client.v2.model.product\_analytics\_event\_query module --------------------------------------------------------------------- @@ -35067,6 +35172,97 @@ datadog\_api\_client.v2.model.product\_analytics\_execution\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.product\_analytics\_formula\_journey\_query module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_journey_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_journey\_request module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_journey_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_journey\_request\_attributes module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_journey_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_journey\_request\_data module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_journey_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_journey\_request\_type module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_journey_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_retention\_query module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_retention_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_retention\_request module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_retention_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_retention\_request\_attributes module +------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_retention_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_retention\_request\_data module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_retention_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_formula\_retention\_request\_type module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_formula_retention_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_graph\_query\_compute module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_graph_query_compute + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_graph\_query\_group\_by module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_graph_query_group_by + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_graph\_query\_group\_by\_source module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_graph_query_group_by_source + :members: + :show-inheritance: + datadog\_api\_client.v2.model.product\_analytics\_group\_by module ------------------------------------------------------------------ @@ -35088,45 +35284,899 @@ datadog\_api\_client.v2.model.product\_analytics\_interval module :members: :show-inheritance: -datadog\_api\_client.v2.model.product\_analytics\_occurrence\_filter module ---------------------------------------------------------------------------- +datadog\_api\_client.v2.model.product\_analytics\_join\_keys module +------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_filter +.. automodule:: datadog_api_client.v2.model.product_analytics_join_keys :members: :show-inheritance: -datadog\_api\_client.v2.model.product\_analytics\_occurrence\_query module --------------------------------------------------------------------------- +datadog\_api\_client.v2.model.product\_analytics\_journey\_audience\_account\_query module +------------------------------------------------------------------------------------------ -.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_query +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_audience_account_query :members: :show-inheritance: -datadog\_api\_client.v2.model.product\_analytics\_occurrence\_query\_data\_source module +datadog\_api\_client.v2.model.product\_analytics\_journey\_audience\_filters module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_audience_filters + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_audience\_segment\_query module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_audience_segment_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_audience\_user\_query module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_audience_user_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_computed\_column module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_computed_column + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_computed\_column\_name module ---------------------------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_query_data_source +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_computed_column_name :members: :show-inheritance: -datadog\_api\_client.v2.model.product\_analytics\_occurrence\_search module ---------------------------------------------------------------------------- +datadog\_api\_client.v2.model.product\_analytics\_journey\_conversion\_type module +---------------------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_search +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_conversion_type :members: :show-inheritance: -datadog\_api\_client.v2.model.product\_analytics\_response\_meta module ------------------------------------------------------------------------ +datadog\_api\_client.v2.model.product\_analytics\_journey\_entity module +------------------------------------------------------------------------ -.. automodule:: datadog_api_client.v2.model.product_analytics_response_meta +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_entity :members: :show-inheritance: -datadog\_api\_client.v2.model.product\_analytics\_response\_meta\_status module +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_compute module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_compute + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_query module ------------------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.product_analytics_response_meta_status +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_request module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_request\_attributes module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_request\_data module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_response\_attributes module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_response\_data module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_response\_type module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_step module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_step + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_funnel\_step\_group module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_funnel_step_group + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_query module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_record module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_record + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_request module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_request\_attributes module +------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_request\_data module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_request\_type module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_response module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_response\_attributes module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_response\_data module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_response\_type module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_list\_sort module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_list_sort + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_node\_target module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_node_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_node\_target\_type module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_node_target_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_path\_target module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_path_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_path\_target\_type module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_path_target_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_request\_type module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_compute module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_compute + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_query module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_request module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_request\_attributes module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_request\_data module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_response\_data module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_scalar\_response\_type module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_scalar_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_search module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_search + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_search\_filters module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_search_filters + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_search\_graph\_filter module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_search_graph_filter + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_search\_graph\_filter\_name module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_search\_graph\_filter\_operator module +------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_target module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_timeseries\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_timeseries_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_timeseries\_response\_data module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_timeseries_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_journey\_timeseries\_response\_type module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_journey_timeseries_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_occurrence\_filter module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_filter + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_occurrence\_query module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_occurrence\_query\_data\_source module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_query_data_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_occurrence\_search module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_occurrence_search + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_response\_meta module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_response_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_response\_meta\_status module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_response_meta_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_aggregation\_target module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_aggregation_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_aggregation\_target\_type module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_aggregation_target_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_calendar\_time\_interval module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_calendar\_time\_interval\_type module +-------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_cell\_scope module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_cell_scope + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_cell\_scope\_type module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_cell_scope_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_cohort\_criteria module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_cohort_criteria + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_cohort\_scope module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_cohort_scope + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_cohort\_scope\_type module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_cohort_scope_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_cohort\_target module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_cohort_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_compute module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_compute + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_compute\_metric module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_compute_metric + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_entity module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_entity + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_filters module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_filters + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_fixed\_time\_interval module +----------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_fixed\_time\_interval\_type module +----------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_fixed\_time\_interval\_unit module +----------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_unit + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_cohort module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_cohort + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_cohort\_cell module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_cohort_cell + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_cohort\_type module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_cohort_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_query module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_request module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_request\_attributes module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_request\_data module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_request\_type module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_response\_attributes module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_response\_data module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_grid\_response\_type module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_grid_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_group\_by module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_group_by + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_group\_by\_target module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_group_by_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_index\_target module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_index_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_index\_target\_type module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_index_target_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_column module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_column + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_column\_field module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_column_field + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_query module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_record module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_record + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_request module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_request\_attributes module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_request\_data module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_request\_type module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_response\_attributes module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_response\_data module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_list\_response\_type module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_list_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_period module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_period + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_return\_condition module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_return_condition + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_return\_criteria module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_return_criteria + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_return\_period\_scope module +----------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_return_period_scope + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_return\_period\_scope\_type module +----------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_return_period_scope_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_scope module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_scope + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_search module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_search + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_retention\_time\_interval module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_retention_time_interval + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_aggregated\_node module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_aggregated_node + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_aggregated\_node\_type module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_aggregated_node_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_definition module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_definition + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_link module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_link + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_node module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_node + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_node\_type module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_node_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_request module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_request\_attributes module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_request\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_request\_type module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_response\_attributes module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_response\_data module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_response\_type module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_response_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_search module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_search + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.product\_analytics\_sankey\_time module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.product_analytics_sankey_time :members: :show-inheritance: diff --git a/examples/v2/product-analytics/QueryProductAnalyticsJourneyFunnel.py b/examples/v2/product-analytics/QueryProductAnalyticsJourneyFunnel.py new file mode 100644 index 0000000000..f74b7a786a --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsJourneyFunnel.py @@ -0,0 +1,142 @@ +""" +Compute journey funnel analysis returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy +from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( + ProductAnalyticsGraphQueryGroupBySource, +) +from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort +from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys +from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_funnel_compute import ProductAnalyticsJourneyFunnelCompute +from datadog_api_client.v2.model.product_analytics_journey_funnel_query import ProductAnalyticsJourneyFunnelQuery +from datadog_api_client.v2.model.product_analytics_journey_funnel_request import ProductAnalyticsJourneyFunnelRequest +from datadog_api_client.v2.model.product_analytics_journey_funnel_request_attributes import ( + ProductAnalyticsJourneyFunnelRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_funnel_request_data import ( + ProductAnalyticsJourneyFunnelRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget +from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ProductAnalyticsJourneyNodeTargetType +from datadog_api_client.v2.model.product_analytics_journey_request_type import ProductAnalyticsJourneyRequestType +from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch +from datadog_api_client.v2.model.product_analytics_journey_search_filters import ProductAnalyticsJourneySearchFilters +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, +) +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + +body = ProductAnalyticsJourneyFunnelRequest( + data=ProductAnalyticsJourneyFunnelRequestData( + attributes=ProductAnalyticsJourneyFunnelRequestAttributes( + exclude_anonymous_traffic=False, + _from=1756425600000, + query=ProductAnalyticsJourneyFunnelQuery( + compute=ProductAnalyticsJourneyFunnelCompute(), + group_by=[ + ProductAnalyticsGraphQueryGroupBy( + facet="@geo.country", + should_exclude_missing=False, + sort=ProductAnalyticsGroupBySort( + aggregation="count", + order=QuerySortOrder.DESC, + ), + source=ProductAnalyticsGraphQueryGroupBySource.USERS, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value_filters=[], + ), + ], + search=ProductAnalyticsJourneySearch( + expression="A -> B", + filters=ProductAnalyticsJourneySearchFilters( + audience_filters=ProductAnalyticsJourneyAudienceFilters( + accounts=[ + ProductAnalyticsJourneyAudienceAccountQuery( + name="enterprise_accounts", + ), + ], + formula="power_users AND NOT trial_segment", + segments=[ + ProductAnalyticsJourneyAudienceSegmentQuery( + name="trial_segment", + segment_id="00000000-0000-0000-0000-000000000000", + ), + ], + users=[ + ProductAnalyticsJourneyAudienceUserQuery( + name="power_users", + ), + ], + ), + graph_filters=[ + ProductAnalyticsJourneySearchGraphFilter( + name=ProductAnalyticsJourneySearchGraphFilterName.TIME_TO_CONVERT, + operator=ProductAnalyticsJourneySearchGraphFilterOperator.LESS_THAN_OR_EQUAL, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value=60000, + ), + ], + ), + join_keys=ProductAnalyticsJoinKeys( + primary="@session.id", + secondary=[], + ), + node_objects=dict( + A=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view @view.name:Login", + ), + ), + B=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:action @action.target.name:Submit", + ), + ), + ), + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsJourneyRequestType.JOURNEY_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_journey_funnel"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_journey_funnel(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsJourneyList.py b/examples/v2/product-analytics/QueryProductAnalyticsJourneyList.py new file mode 100644 index 0000000000..64e569d542 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsJourneyList.py @@ -0,0 +1,161 @@ +""" +List journey entities returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy +from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( + ProductAnalyticsGraphQueryGroupBySource, +) +from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort +from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys +from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_computed_column import ProductAnalyticsJourneyComputedColumn +from datadog_api_client.v2.model.product_analytics_journey_computed_column_name import ( + ProductAnalyticsJourneyComputedColumnName, +) +from datadog_api_client.v2.model.product_analytics_journey_conversion_type import ProductAnalyticsJourneyConversionType +from datadog_api_client.v2.model.product_analytics_journey_list_query import ProductAnalyticsJourneyListQuery +from datadog_api_client.v2.model.product_analytics_journey_list_request import ProductAnalyticsJourneyListRequest +from datadog_api_client.v2.model.product_analytics_journey_list_request_attributes import ( + ProductAnalyticsJourneyListRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_list_request_data import ( + ProductAnalyticsJourneyListRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_list_request_type import ( + ProductAnalyticsJourneyListRequestType, +) +from datadog_api_client.v2.model.product_analytics_journey_list_sort import ProductAnalyticsJourneyListSort +from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget +from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ProductAnalyticsJourneyNodeTargetType +from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch +from datadog_api_client.v2.model.product_analytics_journey_search_filters import ProductAnalyticsJourneySearchFilters +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, +) +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + +body = ProductAnalyticsJourneyListRequest( + data=ProductAnalyticsJourneyListRequestData( + attributes=ProductAnalyticsJourneyListRequestAttributes( + _from=1756425600000, + query=ProductAnalyticsJourneyListQuery( + computed_columns=[ + ProductAnalyticsJourneyComputedColumn( + name=ProductAnalyticsJourneyComputedColumnName.FIRST_CONVERSION_TIMESTAMPS, + ), + ], + conversion_type=ProductAnalyticsJourneyConversionType.CONVERSION, + entity_columns=[], + group_by=[ + ProductAnalyticsGraphQueryGroupBy( + facet="@geo.country", + should_exclude_missing=False, + sort=ProductAnalyticsGroupBySort( + aggregation="count", + order=QuerySortOrder.DESC, + ), + source=ProductAnalyticsGraphQueryGroupBySource.USERS, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value_filters=[], + ), + ], + search=ProductAnalyticsJourneySearch( + expression="A -> B", + filters=ProductAnalyticsJourneySearchFilters( + audience_filters=ProductAnalyticsJourneyAudienceFilters( + accounts=[ + ProductAnalyticsJourneyAudienceAccountQuery( + name="enterprise_accounts", + ), + ], + formula="power_users AND NOT trial_segment", + segments=[ + ProductAnalyticsJourneyAudienceSegmentQuery( + name="trial_segment", + segment_id="00000000-0000-0000-0000-000000000000", + ), + ], + users=[ + ProductAnalyticsJourneyAudienceUserQuery( + name="power_users", + ), + ], + ), + graph_filters=[ + ProductAnalyticsJourneySearchGraphFilter( + name=ProductAnalyticsJourneySearchGraphFilterName.TIME_TO_CONVERT, + operator=ProductAnalyticsJourneySearchGraphFilterOperator.LESS_THAN_OR_EQUAL, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value=60000, + ), + ], + ), + join_keys=ProductAnalyticsJoinKeys( + primary="@session.id", + secondary=[], + ), + node_objects=dict( + A=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view @view.name:Login", + ), + ), + B=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:action @action.target.name:Submit", + ), + ), + ), + ), + sort=ProductAnalyticsJourneyListSort( + order=QuerySortOrder.DESC, + ), + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsJourneyListRequestType.JOURNEY_LIST_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_journey_list"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_journey_list(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsJourneyScalar.py b/examples/v2/product-analytics/QueryProductAnalyticsJourneyScalar.py new file mode 100644 index 0000000000..53296fcbaf --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsJourneyScalar.py @@ -0,0 +1,149 @@ +""" +Compute journey scalar analytics returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_formula_journey_request_type import ( + ProductAnalyticsFormulaJourneyRequestType, +) +from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy +from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( + ProductAnalyticsGraphQueryGroupBySource, +) +from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort +from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys +from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget +from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ProductAnalyticsJourneyNodeTargetType +from datadog_api_client.v2.model.product_analytics_journey_scalar_compute import ProductAnalyticsJourneyScalarCompute +from datadog_api_client.v2.model.product_analytics_journey_scalar_query import ProductAnalyticsJourneyScalarQuery +from datadog_api_client.v2.model.product_analytics_journey_scalar_request import ProductAnalyticsJourneyScalarRequest +from datadog_api_client.v2.model.product_analytics_journey_scalar_request_attributes import ( + ProductAnalyticsJourneyScalarRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_scalar_request_data import ( + ProductAnalyticsJourneyScalarRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch +from datadog_api_client.v2.model.product_analytics_journey_search_filters import ProductAnalyticsJourneySearchFilters +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, +) +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + +body = ProductAnalyticsJourneyScalarRequest( + data=ProductAnalyticsJourneyScalarRequestData( + attributes=ProductAnalyticsJourneyScalarRequestAttributes( + _from=1756425600000, + query=ProductAnalyticsJourneyScalarQuery( + compute=ProductAnalyticsJourneyScalarCompute( + aggregation="count", + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + ), + group_by=[ + ProductAnalyticsGraphQueryGroupBy( + facet="@geo.country", + should_exclude_missing=False, + sort=ProductAnalyticsGroupBySort( + aggregation="count", + order=QuerySortOrder.DESC, + ), + source=ProductAnalyticsGraphQueryGroupBySource.USERS, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value_filters=[], + ), + ], + search=ProductAnalyticsJourneySearch( + expression="A -> B", + filters=ProductAnalyticsJourneySearchFilters( + audience_filters=ProductAnalyticsJourneyAudienceFilters( + accounts=[ + ProductAnalyticsJourneyAudienceAccountQuery( + name="enterprise_accounts", + ), + ], + formula="power_users AND NOT trial_segment", + segments=[ + ProductAnalyticsJourneyAudienceSegmentQuery( + name="trial_segment", + segment_id="00000000-0000-0000-0000-000000000000", + ), + ], + users=[ + ProductAnalyticsJourneyAudienceUserQuery( + name="power_users", + ), + ], + ), + graph_filters=[ + ProductAnalyticsJourneySearchGraphFilter( + name=ProductAnalyticsJourneySearchGraphFilterName.TIME_TO_CONVERT, + operator=ProductAnalyticsJourneySearchGraphFilterOperator.LESS_THAN_OR_EQUAL, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value=60000, + ), + ], + ), + join_keys=ProductAnalyticsJoinKeys( + primary="@session.id", + secondary=[], + ), + node_objects=dict( + A=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view @view.name:Login", + ), + ), + B=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:action @action.target.name:Submit", + ), + ), + ), + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsFormulaJourneyRequestType.FORMULA_JOURNEY_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_journey_scalar"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_journey_scalar(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsJourneyTimeseries.py b/examples/v2/product-analytics/QueryProductAnalyticsJourneyTimeseries.py new file mode 100644 index 0000000000..a56ba78636 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsJourneyTimeseries.py @@ -0,0 +1,149 @@ +""" +Compute journey timeseries analytics returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_formula_journey_query import ProductAnalyticsFormulaJourneyQuery +from datadog_api_client.v2.model.product_analytics_formula_journey_request import ProductAnalyticsFormulaJourneyRequest +from datadog_api_client.v2.model.product_analytics_formula_journey_request_attributes import ( + ProductAnalyticsFormulaJourneyRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_formula_journey_request_data import ( + ProductAnalyticsFormulaJourneyRequestData, +) +from datadog_api_client.v2.model.product_analytics_formula_journey_request_type import ( + ProductAnalyticsFormulaJourneyRequestType, +) +from datadog_api_client.v2.model.product_analytics_graph_query_compute import ProductAnalyticsGraphQueryCompute +from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy +from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( + ProductAnalyticsGraphQueryGroupBySource, +) +from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort +from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys +from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget +from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ProductAnalyticsJourneyNodeTargetType +from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch +from datadog_api_client.v2.model.product_analytics_journey_search_filters import ProductAnalyticsJourneySearchFilters +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, +) +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + +body = ProductAnalyticsFormulaJourneyRequest( + data=ProductAnalyticsFormulaJourneyRequestData( + attributes=ProductAnalyticsFormulaJourneyRequestAttributes( + _from=1756425600000, + query=ProductAnalyticsFormulaJourneyQuery( + compute=ProductAnalyticsGraphQueryCompute( + aggregation="count", + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + ), + group_by=[ + ProductAnalyticsGraphQueryGroupBy( + facet="@geo.country", + should_exclude_missing=False, + sort=ProductAnalyticsGroupBySort( + aggregation="count", + order=QuerySortOrder.DESC, + ), + source=ProductAnalyticsGraphQueryGroupBySource.USERS, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value_filters=[], + ), + ], + search=ProductAnalyticsJourneySearch( + expression="A -> B", + filters=ProductAnalyticsJourneySearchFilters( + audience_filters=ProductAnalyticsJourneyAudienceFilters( + accounts=[ + ProductAnalyticsJourneyAudienceAccountQuery( + name="enterprise_accounts", + ), + ], + formula="power_users AND NOT trial_segment", + segments=[ + ProductAnalyticsJourneyAudienceSegmentQuery( + name="trial_segment", + segment_id="00000000-0000-0000-0000-000000000000", + ), + ], + users=[ + ProductAnalyticsJourneyAudienceUserQuery( + name="power_users", + ), + ], + ), + graph_filters=[ + ProductAnalyticsJourneySearchGraphFilter( + name=ProductAnalyticsJourneySearchGraphFilterName.TIME_TO_CONVERT, + operator=ProductAnalyticsJourneySearchGraphFilterOperator.LESS_THAN_OR_EQUAL, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value=60000, + ), + ], + ), + join_keys=ProductAnalyticsJoinKeys( + primary="@session.id", + secondary=[], + ), + node_objects=dict( + A=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view @view.name:Login", + ), + ), + B=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:action @action.target.name:Submit", + ), + ), + ), + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsFormulaJourneyRequestType.FORMULA_JOURNEY_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_journey_timeseries"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_journey_timeseries(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsList.py b/examples/v2/product-analytics/QueryProductAnalyticsList.py new file mode 100644 index 0000000000..322067f2bb --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsList.py @@ -0,0 +1,50 @@ +""" +List analytics events returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_analytics_list_query import ProductAnalyticsAnalyticsListQuery +from datadog_api_client.v2.model.product_analytics_analytics_list_request import ProductAnalyticsAnalyticsListRequest +from datadog_api_client.v2.model.product_analytics_analytics_list_request_attributes import ( + ProductAnalyticsAnalyticsListRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_request_data import ( + ProductAnalyticsAnalyticsListRequestData, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_request_type import ( + ProductAnalyticsAnalyticsListRequestType, +) +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch + +body = ProductAnalyticsAnalyticsListRequest( + data=ProductAnalyticsAnalyticsListRequestData( + attributes=ProductAnalyticsAnalyticsListRequestAttributes( + _from=1771232048460, + query=ProductAnalyticsAnalyticsListQuery( + columns=[ + "@view.name", + ], + limit=100, + query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + ), + to=1771836848262, + ), + type=ProductAnalyticsAnalyticsListRequestType.FORMULA_ANALYTICS_EXTENDED_LIST_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_list"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_list(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsRetentionGrid.py b/examples/v2/product-analytics/QueryProductAnalyticsRetentionGrid.py new file mode 100644 index 0000000000..fc5393638b --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsRetentionGrid.py @@ -0,0 +1,171 @@ +""" +Compute a retention grid returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_audience_account_subquery import ( + ProductAnalyticsAudienceAccountSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters +from datadog_api_client.v2.model.product_analytics_audience_segment_subquery import ( + ProductAnalyticsAudienceSegmentSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_user_subquery import ProductAnalyticsAudienceUserSubquery +from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval +from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ProductAnalyticsCalendarIntervalType +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, +) +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type import ( + ProductAnalyticsRetentionCalendarTimeIntervalType, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_criteria import ( + ProductAnalyticsRetentionCohortCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope import ProductAnalyticsRetentionCohortScope +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope_type import ( + ProductAnalyticsRetentionCohortScopeType, +) +from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute +from datadog_api_client.v2.model.product_analytics_retention_compute_metric import ( + ProductAnalyticsRetentionComputeMetric, +) +from datadog_api_client.v2.model.product_analytics_retention_entity import ProductAnalyticsRetentionEntity +from datadog_api_client.v2.model.product_analytics_retention_filters import ProductAnalyticsRetentionFilters +from datadog_api_client.v2.model.product_analytics_retention_grid_query import ProductAnalyticsRetentionGridQuery +from datadog_api_client.v2.model.product_analytics_retention_grid_request import ProductAnalyticsRetentionGridRequest +from datadog_api_client.v2.model.product_analytics_retention_grid_request_attributes import ( + ProductAnalyticsRetentionGridRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_request_data import ( + ProductAnalyticsRetentionGridRequestData, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_request_type import ( + ProductAnalyticsRetentionGridRequestType, +) +from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy +from datadog_api_client.v2.model.product_analytics_retention_group_by_target import ( + ProductAnalyticsRetentionGroupByTarget, +) +from datadog_api_client.v2.model.product_analytics_retention_index_target import ProductAnalyticsRetentionIndexTarget +from datadog_api_client.v2.model.product_analytics_retention_index_target_type import ( + ProductAnalyticsRetentionIndexTargetType, +) +from datadog_api_client.v2.model.product_analytics_retention_return_condition import ( + ProductAnalyticsRetentionReturnCondition, +) +from datadog_api_client.v2.model.product_analytics_retention_return_criteria import ( + ProductAnalyticsRetentionReturnCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from uuid import UUID + +body = ProductAnalyticsRetentionGridRequest( + data=ProductAnalyticsRetentionGridRequestData( + attributes=ProductAnalyticsRetentionGridRequestAttributes( + exclude_anonymous_traffic=False, + _from=1756425600000, + query=ProductAnalyticsRetentionGridQuery( + computation_scope=ProductAnalyticsRetentionCohortScope( + target=ProductAnalyticsRetentionIndexTarget( + type=ProductAnalyticsRetentionIndexTargetType.INDEX, + value=0, + ), + type=ProductAnalyticsRetentionCohortScopeType.COHORT, + ), + compute=ProductAnalyticsRetentionCompute( + aggregation="count", + metric=ProductAnalyticsRetentionComputeMetric.RETENTION_RATE, + ), + group_by=[ + ProductAnalyticsRetentionGroupBy( + facet="@geo.country", + limit=10, + should_exclude_missing=False, + sort=ProductAnalyticsGroupBySort( + aggregation="count", + order=QuerySortOrder.DESC, + ), + target=ProductAnalyticsRetentionGroupByTarget.COHORT, + ), + ], + search=ProductAnalyticsRetentionSearch( + cohort_criteria=ProductAnalyticsRetentionCohortCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + filters=ProductAnalyticsRetentionFilters( + audience_filters=ProductAnalyticsAudienceFilters( + accounts=[ + ProductAnalyticsAudienceAccountSubquery( + name="", + ), + ], + formula="u", + segments=[ + ProductAnalyticsAudienceSegmentSubquery( + name="", + segment_id=UUID("00000000-0000-0000-0000-000000000000"), + ), + ], + users=[ + ProductAnalyticsAudienceUserSubquery( + name="u", + query="*", + ), + ], + ), + ), + retention_entity=ProductAnalyticsRetentionEntity.USER_ID, + return_condition=ProductAnalyticsRetentionReturnCondition.CONVERSION_ON_OR_AFTER, + return_criteria=ProductAnalyticsRetentionReturnCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsRetentionGridRequestType.RETENTION_GRID_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_retention_grid"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_retention_grid(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsRetentionList.py b/examples/v2/product-analytics/QueryProductAnalyticsRetentionList.py new file mode 100644 index 0000000000..39a42d4ab8 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsRetentionList.py @@ -0,0 +1,160 @@ +""" +List the entities behind a retention cell returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_audience_account_subquery import ( + ProductAnalyticsAudienceAccountSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters +from datadog_api_client.v2.model.product_analytics_audience_segment_subquery import ( + ProductAnalyticsAudienceSegmentSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_user_subquery import ProductAnalyticsAudienceUserSubquery +from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval +from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ProductAnalyticsCalendarIntervalType +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, +) +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type import ( + ProductAnalyticsRetentionCalendarTimeIntervalType, +) +from datadog_api_client.v2.model.product_analytics_retention_cell_scope import ProductAnalyticsRetentionCellScope +from datadog_api_client.v2.model.product_analytics_retention_cell_scope_type import ( + ProductAnalyticsRetentionCellScopeType, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_criteria import ( + ProductAnalyticsRetentionCohortCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_entity import ProductAnalyticsRetentionEntity +from datadog_api_client.v2.model.product_analytics_retention_filters import ProductAnalyticsRetentionFilters +from datadog_api_client.v2.model.product_analytics_retention_index_target import ProductAnalyticsRetentionIndexTarget +from datadog_api_client.v2.model.product_analytics_retention_index_target_type import ( + ProductAnalyticsRetentionIndexTargetType, +) +from datadog_api_client.v2.model.product_analytics_retention_list_column import ProductAnalyticsRetentionListColumn +from datadog_api_client.v2.model.product_analytics_retention_list_column_field import ( + ProductAnalyticsRetentionListColumnField, +) +from datadog_api_client.v2.model.product_analytics_retention_list_query import ProductAnalyticsRetentionListQuery +from datadog_api_client.v2.model.product_analytics_retention_list_request import ProductAnalyticsRetentionListRequest +from datadog_api_client.v2.model.product_analytics_retention_list_request_attributes import ( + ProductAnalyticsRetentionListRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_retention_list_request_data import ( + ProductAnalyticsRetentionListRequestData, +) +from datadog_api_client.v2.model.product_analytics_retention_list_request_type import ( + ProductAnalyticsRetentionListRequestType, +) +from datadog_api_client.v2.model.product_analytics_retention_return_condition import ( + ProductAnalyticsRetentionReturnCondition, +) +from datadog_api_client.v2.model.product_analytics_retention_return_criteria import ( + ProductAnalyticsRetentionReturnCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch +from uuid import UUID + +body = ProductAnalyticsRetentionListRequest( + data=ProductAnalyticsRetentionListRequestData( + attributes=ProductAnalyticsRetentionListRequestAttributes( + _from=1756425600000, + query=ProductAnalyticsRetentionListQuery( + columns=[ + ProductAnalyticsRetentionListColumn( + field=ProductAnalyticsRetentionListColumnField( + path="@usr.email", + ), + ), + ], + computation_scope=ProductAnalyticsRetentionCellScope( + cohort_target=ProductAnalyticsRetentionIndexTarget( + type=ProductAnalyticsRetentionIndexTargetType.INDEX, + value=0, + ), + return_period_target=ProductAnalyticsRetentionIndexTarget( + type=ProductAnalyticsRetentionIndexTargetType.INDEX, + value=0, + ), + type=ProductAnalyticsRetentionCellScopeType.CELL, + ), + limit=100, + search=ProductAnalyticsRetentionSearch( + cohort_criteria=ProductAnalyticsRetentionCohortCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + filters=ProductAnalyticsRetentionFilters( + audience_filters=ProductAnalyticsAudienceFilters( + accounts=[ + ProductAnalyticsAudienceAccountSubquery( + name="", + ), + ], + formula="u", + segments=[ + ProductAnalyticsAudienceSegmentSubquery( + name="", + segment_id=UUID("00000000-0000-0000-0000-000000000000"), + ), + ], + users=[ + ProductAnalyticsAudienceUserSubquery( + name="u", + query="*", + ), + ], + ), + ), + retention_entity=ProductAnalyticsRetentionEntity.USER_ID, + return_condition=ProductAnalyticsRetentionReturnCondition.CONVERSION_ON_OR_AFTER, + return_criteria=ProductAnalyticsRetentionReturnCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsRetentionListRequestType.RETENTION_LIST_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_retention_list"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_retention_list(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsRetentionScalar.py b/examples/v2/product-analytics/QueryProductAnalyticsRetentionScalar.py new file mode 100644 index 0000000000..58e22e3347 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsRetentionScalar.py @@ -0,0 +1,173 @@ +""" +Compute retention scalar values returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_audience_account_subquery import ( + ProductAnalyticsAudienceAccountSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters +from datadog_api_client.v2.model.product_analytics_audience_segment_subquery import ( + ProductAnalyticsAudienceSegmentSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_user_subquery import ProductAnalyticsAudienceUserSubquery +from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval +from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ProductAnalyticsCalendarIntervalType +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_formula_retention_query import ProductAnalyticsFormulaRetentionQuery +from datadog_api_client.v2.model.product_analytics_formula_retention_request import ( + ProductAnalyticsFormulaRetentionRequest, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_attributes import ( + ProductAnalyticsFormulaRetentionRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_data import ( + ProductAnalyticsFormulaRetentionRequestData, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_type import ( + ProductAnalyticsFormulaRetentionRequestType, +) +from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, +) +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type import ( + ProductAnalyticsRetentionCalendarTimeIntervalType, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_criteria import ( + ProductAnalyticsRetentionCohortCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope import ProductAnalyticsRetentionCohortScope +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope_type import ( + ProductAnalyticsRetentionCohortScopeType, +) +from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute +from datadog_api_client.v2.model.product_analytics_retention_compute_metric import ( + ProductAnalyticsRetentionComputeMetric, +) +from datadog_api_client.v2.model.product_analytics_retention_entity import ProductAnalyticsRetentionEntity +from datadog_api_client.v2.model.product_analytics_retention_filters import ProductAnalyticsRetentionFilters +from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy +from datadog_api_client.v2.model.product_analytics_retention_group_by_target import ( + ProductAnalyticsRetentionGroupByTarget, +) +from datadog_api_client.v2.model.product_analytics_retention_index_target import ProductAnalyticsRetentionIndexTarget +from datadog_api_client.v2.model.product_analytics_retention_index_target_type import ( + ProductAnalyticsRetentionIndexTargetType, +) +from datadog_api_client.v2.model.product_analytics_retention_return_condition import ( + ProductAnalyticsRetentionReturnCondition, +) +from datadog_api_client.v2.model.product_analytics_retention_return_criteria import ( + ProductAnalyticsRetentionReturnCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from uuid import UUID + +body = ProductAnalyticsFormulaRetentionRequest( + data=ProductAnalyticsFormulaRetentionRequestData( + attributes=ProductAnalyticsFormulaRetentionRequestAttributes( + exclude_anonymous_traffic=False, + _from=1756425600000, + query=ProductAnalyticsFormulaRetentionQuery( + computation_scope=ProductAnalyticsRetentionCohortScope( + target=ProductAnalyticsRetentionIndexTarget( + type=ProductAnalyticsRetentionIndexTargetType.INDEX, + value=0, + ), + type=ProductAnalyticsRetentionCohortScopeType.COHORT, + ), + compute=ProductAnalyticsRetentionCompute( + aggregation="count", + metric=ProductAnalyticsRetentionComputeMetric.RETENTION_RATE, + ), + group_by=[ + ProductAnalyticsRetentionGroupBy( + facet="@geo.country", + limit=10, + should_exclude_missing=False, + sort=ProductAnalyticsGroupBySort( + aggregation="count", + order=QuerySortOrder.DESC, + ), + target=ProductAnalyticsRetentionGroupByTarget.COHORT, + ), + ], + search=ProductAnalyticsRetentionSearch( + cohort_criteria=ProductAnalyticsRetentionCohortCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + filters=ProductAnalyticsRetentionFilters( + audience_filters=ProductAnalyticsAudienceFilters( + accounts=[ + ProductAnalyticsAudienceAccountSubquery( + name="", + ), + ], + formula="u", + segments=[ + ProductAnalyticsAudienceSegmentSubquery( + name="", + segment_id=UUID("00000000-0000-0000-0000-000000000000"), + ), + ], + users=[ + ProductAnalyticsAudienceUserSubquery( + name="u", + query="*", + ), + ], + ), + ), + retention_entity=ProductAnalyticsRetentionEntity.USER_ID, + return_condition=ProductAnalyticsRetentionReturnCondition.CONVERSION_ON_OR_AFTER, + return_criteria=ProductAnalyticsRetentionReturnCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsFormulaRetentionRequestType.FORMULA_RETENTION_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_retention_scalar"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_retention_scalar(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsRetentionTimeseries.py b/examples/v2/product-analytics/QueryProductAnalyticsRetentionTimeseries.py new file mode 100644 index 0000000000..f52c5acfa0 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsRetentionTimeseries.py @@ -0,0 +1,173 @@ +""" +Compute retention timeseries returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_audience_account_subquery import ( + ProductAnalyticsAudienceAccountSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters +from datadog_api_client.v2.model.product_analytics_audience_segment_subquery import ( + ProductAnalyticsAudienceSegmentSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_user_subquery import ProductAnalyticsAudienceUserSubquery +from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval +from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ProductAnalyticsCalendarIntervalType +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_formula_retention_query import ProductAnalyticsFormulaRetentionQuery +from datadog_api_client.v2.model.product_analytics_formula_retention_request import ( + ProductAnalyticsFormulaRetentionRequest, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_attributes import ( + ProductAnalyticsFormulaRetentionRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_data import ( + ProductAnalyticsFormulaRetentionRequestData, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_type import ( + ProductAnalyticsFormulaRetentionRequestType, +) +from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, +) +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type import ( + ProductAnalyticsRetentionCalendarTimeIntervalType, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_criteria import ( + ProductAnalyticsRetentionCohortCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope import ProductAnalyticsRetentionCohortScope +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope_type import ( + ProductAnalyticsRetentionCohortScopeType, +) +from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute +from datadog_api_client.v2.model.product_analytics_retention_compute_metric import ( + ProductAnalyticsRetentionComputeMetric, +) +from datadog_api_client.v2.model.product_analytics_retention_entity import ProductAnalyticsRetentionEntity +from datadog_api_client.v2.model.product_analytics_retention_filters import ProductAnalyticsRetentionFilters +from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy +from datadog_api_client.v2.model.product_analytics_retention_group_by_target import ( + ProductAnalyticsRetentionGroupByTarget, +) +from datadog_api_client.v2.model.product_analytics_retention_index_target import ProductAnalyticsRetentionIndexTarget +from datadog_api_client.v2.model.product_analytics_retention_index_target_type import ( + ProductAnalyticsRetentionIndexTargetType, +) +from datadog_api_client.v2.model.product_analytics_retention_return_condition import ( + ProductAnalyticsRetentionReturnCondition, +) +from datadog_api_client.v2.model.product_analytics_retention_return_criteria import ( + ProductAnalyticsRetentionReturnCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from uuid import UUID + +body = ProductAnalyticsFormulaRetentionRequest( + data=ProductAnalyticsFormulaRetentionRequestData( + attributes=ProductAnalyticsFormulaRetentionRequestAttributes( + exclude_anonymous_traffic=False, + _from=1756425600000, + query=ProductAnalyticsFormulaRetentionQuery( + computation_scope=ProductAnalyticsRetentionCohortScope( + target=ProductAnalyticsRetentionIndexTarget( + type=ProductAnalyticsRetentionIndexTargetType.INDEX, + value=0, + ), + type=ProductAnalyticsRetentionCohortScopeType.COHORT, + ), + compute=ProductAnalyticsRetentionCompute( + aggregation="count", + metric=ProductAnalyticsRetentionComputeMetric.RETENTION_RATE, + ), + group_by=[ + ProductAnalyticsRetentionGroupBy( + facet="@geo.country", + limit=10, + should_exclude_missing=False, + sort=ProductAnalyticsGroupBySort( + aggregation="count", + order=QuerySortOrder.DESC, + ), + target=ProductAnalyticsRetentionGroupByTarget.COHORT, + ), + ], + search=ProductAnalyticsRetentionSearch( + cohort_criteria=ProductAnalyticsRetentionCohortCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + filters=ProductAnalyticsRetentionFilters( + audience_filters=ProductAnalyticsAudienceFilters( + accounts=[ + ProductAnalyticsAudienceAccountSubquery( + name="", + ), + ], + formula="u", + segments=[ + ProductAnalyticsAudienceSegmentSubquery( + name="", + segment_id=UUID("00000000-0000-0000-0000-000000000000"), + ), + ], + users=[ + ProductAnalyticsAudienceUserSubquery( + name="u", + query="*", + ), + ], + ), + ), + retention_entity=ProductAnalyticsRetentionEntity.USER_ID, + return_condition=ProductAnalyticsRetentionReturnCondition.CONVERSION_ON_OR_AFTER, + return_criteria=ProductAnalyticsRetentionReturnCriteria( + base_query=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view", + ), + ), + time_interval=ProductAnalyticsRetentionCalendarTimeInterval( + type=ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR, + value=ProductAnalyticsCalendarInterval( + alignment="monday", + quantity=1, + timezone="UTC", + type=ProductAnalyticsCalendarIntervalType.WEEK, + ), + ), + ), + ), + ), + to=1756857600000, + ), + type=ProductAnalyticsFormulaRetentionRequestType.FORMULA_RETENTION_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_retention_timeseries"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_retention_timeseries(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsSankey.py b/examples/v2/product-analytics/QueryProductAnalyticsSankey.py new file mode 100644 index 0000000000..c85e4f1c2e --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsSankey.py @@ -0,0 +1,78 @@ +""" +Compute a Sankey diagram returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_audience_account_subquery import ( + ProductAnalyticsAudienceAccountSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters +from datadog_api_client.v2.model.product_analytics_audience_segment_subquery import ( + ProductAnalyticsAudienceSegmentSubquery, +) +from datadog_api_client.v2.model.product_analytics_audience_user_subquery import ProductAnalyticsAudienceUserSubquery +from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys +from datadog_api_client.v2.model.product_analytics_sankey_definition import ProductAnalyticsSankeyDefinition +from datadog_api_client.v2.model.product_analytics_sankey_request import ProductAnalyticsSankeyRequest +from datadog_api_client.v2.model.product_analytics_sankey_request_attributes import ( + ProductAnalyticsSankeyRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_sankey_request_data import ProductAnalyticsSankeyRequestData +from datadog_api_client.v2.model.product_analytics_sankey_request_type import ProductAnalyticsSankeyRequestType +from datadog_api_client.v2.model.product_analytics_sankey_search import ProductAnalyticsSankeySearch +from datadog_api_client.v2.model.product_analytics_sankey_time import ProductAnalyticsSankeyTime +from uuid import UUID + +body = ProductAnalyticsSankeyRequest( + data=ProductAnalyticsSankeyRequestData( + attributes=ProductAnalyticsSankeyRequestAttributes( + definition=ProductAnalyticsSankeyDefinition( + entries_per_step=10, + number_of_steps=3, + source="@view.name", + target="@view.name", + ), + search=ProductAnalyticsSankeySearch( + audience_filters=ProductAnalyticsAudienceFilters( + accounts=[ + ProductAnalyticsAudienceAccountSubquery( + name="", + ), + ], + formula="u", + segments=[ + ProductAnalyticsAudienceSegmentSubquery( + name="", + segment_id=UUID("00000000-0000-0000-0000-000000000000"), + ), + ], + users=[ + ProductAnalyticsAudienceUserSubquery( + name="u", + query="*", + ), + ], + ), + join_keys=ProductAnalyticsJoinKeys( + primary="@session.id", + secondary=[], + ), + query="@type:view", + ), + time=ProductAnalyticsSankeyTime( + _from=1756425600000, + to=1756857600000, + ), + ), + type=ProductAnalyticsSankeyRequestType.SANKEY_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["query_product_analytics_sankey"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_sankey(body=body) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index d4ecf3a2d9..985877705c 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -716,6 +716,16 @@ def __init__( "v2.update_org_group_policy": False, "v2.update_org_group_policy_override": False, "v2.list_role_templates": False, + "v2.query_product_analytics_journey_funnel": False, + "v2.query_product_analytics_journey_list": False, + "v2.query_product_analytics_journey_scalar": False, + "v2.query_product_analytics_journey_timeseries": False, + "v2.query_product_analytics_list": False, + "v2.query_product_analytics_retention_grid": False, + "v2.query_product_analytics_retention_list": False, + "v2.query_product_analytics_retention_scalar": False, + "v2.query_product_analytics_retention_timeseries": False, + "v2.query_product_analytics_sankey": False, "v2.create_connection": False, "v2.delete_connection": False, "v2.get_account_facet_info": False, diff --git a/src/datadog_api_client/v2/api/product_analytics_api.py b/src/datadog_api_client/v2/api/product_analytics_api.py index 12fcb9db9d..ac52fb43bb 100644 --- a/src/datadog_api_client/v2/api/product_analytics_api.py +++ b/src/datadog_api_client/v2/api/product_analytics_api.py @@ -8,9 +8,30 @@ from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration from datadog_api_client.v2.model.product_analytics_server_side_event_item import ProductAnalyticsServerSideEventItem +from datadog_api_client.v2.model.product_analytics_analytics_list_response import ProductAnalyticsAnalyticsListResponse +from datadog_api_client.v2.model.product_analytics_analytics_list_request import ProductAnalyticsAnalyticsListRequest from datadog_api_client.v2.model.product_analytics_scalar_response import ProductAnalyticsScalarResponse from datadog_api_client.v2.model.product_analytics_analytics_request import ProductAnalyticsAnalyticsRequest from datadog_api_client.v2.model.product_analytics_timeseries_response import ProductAnalyticsTimeseriesResponse +from datadog_api_client.v2.model.product_analytics_journey_funnel_response import ProductAnalyticsJourneyFunnelResponse +from datadog_api_client.v2.model.product_analytics_journey_funnel_request import ProductAnalyticsJourneyFunnelRequest +from datadog_api_client.v2.model.product_analytics_journey_list_response import ProductAnalyticsJourneyListResponse +from datadog_api_client.v2.model.product_analytics_journey_list_request import ProductAnalyticsJourneyListRequest +from datadog_api_client.v2.model.product_analytics_journey_scalar_response import ProductAnalyticsJourneyScalarResponse +from datadog_api_client.v2.model.product_analytics_journey_scalar_request import ProductAnalyticsJourneyScalarRequest +from datadog_api_client.v2.model.product_analytics_journey_timeseries_response import ( + ProductAnalyticsJourneyTimeseriesResponse, +) +from datadog_api_client.v2.model.product_analytics_formula_journey_request import ProductAnalyticsFormulaJourneyRequest +from datadog_api_client.v2.model.product_analytics_retention_grid_response import ProductAnalyticsRetentionGridResponse +from datadog_api_client.v2.model.product_analytics_retention_grid_request import ProductAnalyticsRetentionGridRequest +from datadog_api_client.v2.model.product_analytics_retention_list_response import ProductAnalyticsRetentionListResponse +from datadog_api_client.v2.model.product_analytics_retention_list_request import ProductAnalyticsRetentionListRequest +from datadog_api_client.v2.model.product_analytics_formula_retention_request import ( + ProductAnalyticsFormulaRetentionRequest, +) +from datadog_api_client.v2.model.product_analytics_sankey_response import ProductAnalyticsSankeyResponse +from datadog_api_client.v2.model.product_analytics_sankey_request import ProductAnalyticsSankeyRequest class ProductAnalyticsApi: @@ -28,6 +49,206 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._query_product_analytics_journey_funnel_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsJourneyFunnelResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/journey/funnel", + "operation_id": "query_product_analytics_journey_funnel", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsJourneyFunnelRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_journey_list_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsJourneyListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/journey/list", + "operation_id": "query_product_analytics_journey_list", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsJourneyListRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_journey_scalar_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsJourneyScalarResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/journey/scalar", + "operation_id": "query_product_analytics_journey_scalar", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsJourneyScalarRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_journey_timeseries_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsJourneyTimeseriesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/journey/timeseries", + "operation_id": "query_product_analytics_journey_timeseries", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsFormulaJourneyRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_list_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsAnalyticsListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/analytics/list", + "operation_id": "query_product_analytics_list", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsAnalyticsListRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_retention_grid_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsRetentionGridResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/retention/grid", + "operation_id": "query_product_analytics_retention_grid", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsRetentionGridRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_retention_list_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsRetentionListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/retention/list", + "operation_id": "query_product_analytics_retention_list", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsRetentionListRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_retention_scalar_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsScalarResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/retention/scalar", + "operation_id": "query_product_analytics_retention_scalar", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsFormulaRetentionRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_retention_timeseries_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsTimeseriesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/retention/timeseries", + "operation_id": "query_product_analytics_retention_timeseries", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsFormulaRetentionRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_sankey_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsSankeyResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/product-analytics/sankey", + "operation_id": "query_product_analytics_sankey", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsSankeyRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._query_product_analytics_scalar_endpoint = _Endpoint( settings={ "response_type": (ProductAnalyticsScalarResponse,), @@ -133,6 +354,183 @@ def __init__(self, api_client=None): api_client=api_client, ) + def query_product_analytics_journey_funnel( + self, + body: ProductAnalyticsJourneyFunnelRequest, + ) -> ProductAnalyticsJourneyFunnelResponse: + """Compute journey funnel analysis. + + Compute a funnel over an ordered sequence of Product Analytics events. + Returns the per-step conversion counts, conversion rates, and elapsed times, + optionally segmented by group-by facets. + + :type body: ProductAnalyticsJourneyFunnelRequest + :rtype: ProductAnalyticsJourneyFunnelResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_journey_funnel_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_journey_list( + self, + body: ProductAnalyticsJourneyListRequest, + ) -> ProductAnalyticsJourneyListResponse: + """List journey entities. + + 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 ``entity_columns``. + + :type body: ProductAnalyticsJourneyListRequest + :rtype: ProductAnalyticsJourneyListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_journey_list_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_journey_scalar( + self, + body: ProductAnalyticsJourneyScalarRequest, + ) -> ProductAnalyticsJourneyScalarResponse: + """Compute journey scalar analytics. + + Compute scalar results for a journey query, such as the conversion count, + the conversion rate, or the time to convert, optionally segmented by group-by facets. + + :type body: ProductAnalyticsJourneyScalarRequest + :rtype: ProductAnalyticsJourneyScalarResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_journey_scalar_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_journey_timeseries( + self, + body: ProductAnalyticsFormulaJourneyRequest, + ) -> ProductAnalyticsJourneyTimeseriesResponse: + """Compute journey timeseries analytics. + + Compute timeseries results for a journey query. + Returns one series per group-by combination, bucketed by the requested interval. + + :type body: ProductAnalyticsFormulaJourneyRequest + :rtype: ProductAnalyticsJourneyTimeseriesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_journey_timeseries_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_list( + self, + body: ProductAnalyticsAnalyticsListRequest, + ) -> ProductAnalyticsAnalyticsListResponse: + """List analytics events. + + List the individual event records matching an analytics query. + Use ``columns`` to choose the attributes returned on each row, ``sort`` to order the rows, + and ``limit`` to cap how many are returned. + + :type body: ProductAnalyticsAnalyticsListRequest + :rtype: ProductAnalyticsAnalyticsListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_list_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_retention_grid( + self, + body: ProductAnalyticsRetentionGridRequest, + ) -> ProductAnalyticsRetentionGridResponse: + """Compute a retention grid. + + Compute a retention grid, showing how much of each cohort came back over each subsequent period. + Rows are cohorts, columns are return periods, and each cell holds the count and rate of entities that returned. + + :param body: The retention grid query. + :type body: ProductAnalyticsRetentionGridRequest + :rtype: ProductAnalyticsRetentionGridResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_retention_grid_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_retention_list( + self, + body: ProductAnalyticsRetentionListRequest, + ) -> ProductAnalyticsRetentionListResponse: + """List the entities behind a retention cell. + + List the individual users or accounts counted in one cell of the retention grid. + Set ``computation_scope`` to the cohort and return period you want to examine. + + :param body: The retention list query. + :type body: ProductAnalyticsRetentionListRequest + :rtype: ProductAnalyticsRetentionListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_retention_list_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_retention_scalar( + self, + body: ProductAnalyticsFormulaRetentionRequest, + ) -> ProductAnalyticsScalarResponse: + """Compute retention scalar values. + + Compute retention as a single value per group, suitable for a query value or top list widget. + + :param body: The retention scalar query. + :type body: ProductAnalyticsFormulaRetentionRequest + :rtype: ProductAnalyticsScalarResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_retention_scalar_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_retention_timeseries( + self, + body: ProductAnalyticsFormulaRetentionRequest, + ) -> ProductAnalyticsTimeseriesResponse: + """Compute retention timeseries. + + Compute retention as a series of values over time, using the same query definition as the + retention grid. + + :param body: The retention timeseries query. + :type body: ProductAnalyticsFormulaRetentionRequest + :rtype: ProductAnalyticsTimeseriesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_retention_timeseries_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_sankey( + self, + body: ProductAnalyticsSankeyRequest, + ) -> ProductAnalyticsSankeyResponse: + """Compute a Sankey diagram. + + 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. + + :param body: The Sankey diagram query. + :type body: ProductAnalyticsSankeyRequest + :rtype: ProductAnalyticsSankeyResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_sankey_endpoint.call_with_http_info(**kwargs) + def query_product_analytics_scalar( self, body: ProductAnalyticsAnalyticsRequest, diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_query.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_query.py new file mode 100644 index 0000000000..b656a5825d --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_query.py @@ -0,0 +1,96 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + from datadog_api_client.v2.model.product_analytics_analytics_list_sort import ProductAnalyticsAnalyticsListSort + from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery + from datadog_api_client.v2.model.product_analytics_occurrence_query import ProductAnalyticsOccurrenceQuery + + +class ProductAnalyticsAnalyticsListQuery(ModelNormal): + validations = { + "limit": { + "inclusive_maximum": 1000, + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + from datadog_api_client.v2.model.product_analytics_analytics_list_sort import ProductAnalyticsAnalyticsListSort + + return { + "audience_filters": (ProductAnalyticsAudienceFilters,), + "columns": ([str],), + "limit": (int,), + "query": (ProductAnalyticsBaseQuery,), + "sort": (ProductAnalyticsAnalyticsListSort,), + } + + attribute_map = { + "audience_filters": "audience_filters", + "columns": "columns", + "limit": "limit", + "query": "query", + "sort": "sort", + } + + def __init__( + self_, + query: Union[ProductAnalyticsBaseQuery, ProductAnalyticsEventQuery, ProductAnalyticsOccurrenceQuery], + audience_filters: Union[ProductAnalyticsAudienceFilters, UnsetType] = unset, + columns: Union[List[str], UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + sort: Union[ProductAnalyticsAnalyticsListSort, UnsetType] = unset, + **kwargs, + ): + """ + The analytics list query definition. It selects the events to return with ``query`` , then + chooses the columns on each event row, the sort applied to those rows, and a row limit. + Unlike the scalar and timeseries queries, a list query returns raw event rows rather than + aggregates, so it takes no compute or group-by rule. + + :param audience_filters: Audience filter definitions for targeting specific user segments. + :type audience_filters: ProductAnalyticsAudienceFilters, optional + + :param columns: Attribute columns to include in each event row. + :type columns: [str], optional + + :param limit: Maximum number of event rows to return. + :type limit: int, optional + + :param query: A query definition discriminated by the ``data_source`` field. + Use ``product_analytics`` for standard event queries, or + ``product_analytics_occurrence`` for occurrence-filtered queries. + :type query: ProductAnalyticsBaseQuery + + :param sort: The sort applied to the returned event rows. + :type sort: ProductAnalyticsAnalyticsListSort, optional + """ + if audience_filters is not unset: + kwargs["audience_filters"] = audience_filters + if columns is not unset: + kwargs["columns"] = columns + if limit is not unset: + kwargs["limit"] = limit + if sort is not unset: + kwargs["sort"] = sort + super().__init__(kwargs) + + self_.query = query diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_record.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_record.py new file mode 100644 index 0000000000..1f435da3e7 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_record.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + UUID, +) + + +class ProductAnalyticsAnalyticsListRecord(ModelNormal): + @cached_property + def additional_properties_type(_): + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + + def __init__(self_, **kwargs): + """ + A single event row, keyed by column name. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_request.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request.py new file mode 100644 index 0000000000..397bf5bd46 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_analytics_list_request_data import ( + ProductAnalyticsAnalyticsListRequestData, + ) + + +class ProductAnalyticsAnalyticsListRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_analytics_list_request_data import ( + ProductAnalyticsAnalyticsListRequestData, + ) + + return { + "data": (ProductAnalyticsAnalyticsListRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsAnalyticsListRequestData, **kwargs): + """ + Request for listing the individual event records matching an analytics query. + + :param data: Data object for an analytics list request. + :type data: ProductAnalyticsAnalyticsListRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_attributes.py new file mode 100644 index 0000000000..099312d1c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_attributes.py @@ -0,0 +1,57 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_analytics_list_query import ProductAnalyticsAnalyticsListQuery + + +class ProductAnalyticsAnalyticsListRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_analytics_list_query import ( + ProductAnalyticsAnalyticsListQuery, + ) + + return { + "_from": (int,), + "query": (ProductAnalyticsAnalyticsListQuery,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__(self_, _from: int, query: ProductAnalyticsAnalyticsListQuery, to: int, **kwargs): + """ + Attributes for an analytics list request. + + :param _from: Start time in epoch milliseconds. Must be less than ``to``. + :type _from: int + + :param query: The analytics list query definition. It selects the events to return with ``query`` , then + chooses the columns on each event row, the sort applied to those rows, and a row limit. + Unlike the scalar and timeseries queries, a list query returns raw event rows rather than + aggregates, so it takes no compute or group-by rule. + :type query: ProductAnalyticsAnalyticsListQuery + + :param to: End time in epoch milliseconds. + :type to: int + """ + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_data.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_data.py new file mode 100644 index 0000000000..947724a1a9 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_data.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_analytics_list_request_attributes import ( + ProductAnalyticsAnalyticsListRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_analytics_list_request_type import ( + ProductAnalyticsAnalyticsListRequestType, + ) + + +class ProductAnalyticsAnalyticsListRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_analytics_list_request_attributes import ( + ProductAnalyticsAnalyticsListRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_analytics_list_request_type import ( + ProductAnalyticsAnalyticsListRequestType, + ) + + return { + "attributes": (ProductAnalyticsAnalyticsListRequestAttributes,), + "type": (ProductAnalyticsAnalyticsListRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsAnalyticsListRequestAttributes, + type: ProductAnalyticsAnalyticsListRequestType, + **kwargs, + ): + """ + Data object for an analytics list request. + + :param attributes: Attributes for an analytics list request. + :type attributes: ProductAnalyticsAnalyticsListRequestAttributes + + :param type: The resource type for analytics list requests. + :type type: ProductAnalyticsAnalyticsListRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_type.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_type.py new file mode 100644 index 0000000000..ec44a26b61 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsAnalyticsListRequestType(ModelSimple): + """ + The resource type for analytics list requests. + + :param value: If omitted defaults to "formula_analytics_extended_list_request". Must be one of ["formula_analytics_extended_list_request"]. + :type value: str + """ + + allowed_values = { + "formula_analytics_extended_list_request", + } + FORMULA_ANALYTICS_EXTENDED_LIST_REQUEST: ClassVar["ProductAnalyticsAnalyticsListRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsAnalyticsListRequestType.FORMULA_ANALYTICS_EXTENDED_LIST_REQUEST = ( + ProductAnalyticsAnalyticsListRequestType("formula_analytics_extended_list_request") +) diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_response.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response.py new file mode 100644 index 0000000000..be61ae96ed --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response.py @@ -0,0 +1,60 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_analytics_list_response_data import ( + ProductAnalyticsAnalyticsListResponseData, + ) + from datadog_api_client.v2.model.product_analytics_response_meta import ProductAnalyticsResponseMeta + + +class ProductAnalyticsAnalyticsListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_analytics_list_response_data import ( + ProductAnalyticsAnalyticsListResponseData, + ) + from datadog_api_client.v2.model.product_analytics_response_meta import ProductAnalyticsResponseMeta + + return { + "data": (ProductAnalyticsAnalyticsListResponseData,), + "meta": (ProductAnalyticsResponseMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__( + self_, + data: ProductAnalyticsAnalyticsListResponseData, + meta: Union[ProductAnalyticsResponseMeta, UnsetType] = unset, + **kwargs, + ): + """ + Response for an analytics list query, containing individual event records. + + :param data: Data object for an analytics list response. + :type data: ProductAnalyticsAnalyticsListResponseData + + :param meta: Metadata for a Product Analytics query response. + :type meta: ProductAnalyticsResponseMeta, optional + """ + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_attributes.py new file mode 100644 index 0000000000..1f2a851d8a --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_attributes.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_analytics_list_record import ProductAnalyticsAnalyticsListRecord + + +class ProductAnalyticsAnalyticsListResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_analytics_list_record import ( + ProductAnalyticsAnalyticsListRecord, + ) + + return { + "records": ([ProductAnalyticsAnalyticsListRecord],), + "total_count": (int,), + } + + attribute_map = { + "records": "records", + "total_count": "total_count", + } + + def __init__( + self_, + records: Union[List[ProductAnalyticsAnalyticsListRecord], UnsetType] = unset, + total_count: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an analytics list response, containing the matching event rows. + + :param records: The event rows, each holding the values of the requested columns. + :type records: [ProductAnalyticsAnalyticsListRecord], optional + + :param total_count: Total number of records matching the query, before the row limit is applied. + :type total_count: int, optional + """ + if records is not unset: + kwargs["records"] = records + if total_count is not unset: + kwargs["total_count"] = total_count + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_data.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_data.py new file mode 100644 index 0000000000..1c970199bc --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_data.py @@ -0,0 +1,68 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_analytics_list_response_attributes import ( + ProductAnalyticsAnalyticsListResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_analytics_list_response_type import ( + ProductAnalyticsAnalyticsListResponseType, + ) + + +class ProductAnalyticsAnalyticsListResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_analytics_list_response_attributes import ( + ProductAnalyticsAnalyticsListResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_analytics_list_response_type import ( + ProductAnalyticsAnalyticsListResponseType, + ) + + return { + "attributes": (ProductAnalyticsAnalyticsListResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsAnalyticsListResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsAnalyticsListResponseAttributes, + id: str, + type: ProductAnalyticsAnalyticsListResponseType, + **kwargs, + ): + """ + Data object for an analytics list response. + + :param attributes: Attributes of an analytics list response, containing the matching event rows. + :type attributes: ProductAnalyticsAnalyticsListResponseAttributes + + :param id: Unique identifier for this response data object. + :type id: str + + :param type: The resource type identifier for an analytics list response. + :type type: ProductAnalyticsAnalyticsListResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_type.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_type.py new file mode 100644 index 0000000000..7afe2ca1a6 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_response_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsAnalyticsListResponseType(ModelSimple): + """ + The resource type identifier for an analytics list response. + + :param value: If omitted defaults to "list_response". Must be one of ["list_response"]. + :type value: str + """ + + allowed_values = { + "list_response", + } + LIST_RESPONSE: ClassVar["ProductAnalyticsAnalyticsListResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsAnalyticsListResponseType.LIST_RESPONSE = ProductAnalyticsAnalyticsListResponseType("list_response") diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_sort.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_sort.py new file mode 100644 index 0000000000..14aa05731b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_sort.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_analytics_list_sort_order import ( + ProductAnalyticsAnalyticsListSortOrder, + ) + + +class ProductAnalyticsAnalyticsListSort(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_analytics_list_sort_order import ( + ProductAnalyticsAnalyticsListSortOrder, + ) + + return { + "facet": (str,), + "order": (ProductAnalyticsAnalyticsListSortOrder,), + } + + attribute_map = { + "facet": "facet", + "order": "order", + } + + def __init__( + self_, + facet: Union[str, UnsetType] = unset, + order: Union[ProductAnalyticsAnalyticsListSortOrder, UnsetType] = unset, + **kwargs, + ): + """ + The sort applied to the returned event rows. + + :param facet: Name of the facet to sort the rows by. + :type facet: str, optional + + :param order: The direction rows are sorted in. + :type order: ProductAnalyticsAnalyticsListSortOrder, optional + """ + if facet is not unset: + kwargs["facet"] = facet + if order is not unset: + kwargs["order"] = order + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_list_sort_order.py b/src/datadog_api_client/v2/model/product_analytics_analytics_list_sort_order.py new file mode 100644 index 0000000000..a7cc0f7388 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_list_sort_order.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsAnalyticsListSortOrder(ModelSimple): + """ + The direction rows are sorted in. + + :param value: Must be one of ["asc", "desc"]. + :type value: str + """ + + allowed_values = { + "asc", + "desc", + } + ASC: ClassVar["ProductAnalyticsAnalyticsListSortOrder"] + DESC: ClassVar["ProductAnalyticsAnalyticsListSortOrder"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsAnalyticsListSortOrder.ASC = ProductAnalyticsAnalyticsListSortOrder("asc") +ProductAnalyticsAnalyticsListSortOrder.DESC = ProductAnalyticsAnalyticsListSortOrder("desc") diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_query.py b/src/datadog_api_client/v2/model/product_analytics_analytics_query.py index 76661836fb..c30786b44a 100644 --- a/src/datadog_api_client/v2/model/product_analytics_analytics_query.py +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_query.py @@ -73,7 +73,8 @@ def __init__( :param group_by: Group-by rules for segmenting results. :type group_by: [ProductAnalyticsGroupBy], optional - :param indexes: Restrict the query to specific indexes. Max 1 entry. + :param indexes: Deprecated. Index selection is a rollout detail and will be removed. + Do not set this field. **Deprecated**. :type indexes: [str], optional :param query: A query definition discriminated by the ``data_source`` field. diff --git a/src/datadog_api_client/v2/model/product_analytics_analytics_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_analytics_request_attributes.py index 7633d04b3d..ce6c2b9977 100644 --- a/src/datadog_api_client/v2/model/product_analytics_analytics_request_attributes.py +++ b/src/datadog_api_client/v2/model/product_analytics_analytics_request_attributes.py @@ -61,7 +61,7 @@ def __init__( :param query: The analytics query definition containing a base query, compute rule, and optional grouping. :type query: ProductAnalyticsAnalyticsQuery - :param request_id: Optional request ID for multi-step query continuation. + :param request_id: Unique identifier of the query. :type request_id: str, optional :param to: End time in epoch milliseconds. diff --git a/src/datadog_api_client/v2/model/product_analytics_calendar_interval.py b/src/datadog_api_client/v2/model/product_analytics_calendar_interval.py new file mode 100644 index 0000000000..f84d6844d2 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_calendar_interval.py @@ -0,0 +1,81 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ( + ProductAnalyticsCalendarIntervalType, + ) + + +class ProductAnalyticsCalendarInterval(ModelNormal): + validations = { + "quantity": { + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ( + ProductAnalyticsCalendarIntervalType, + ) + + return { + "alignment": (str,), + "quantity": (int,), + "timezone": (str,), + "type": (ProductAnalyticsCalendarIntervalType,), + } + + attribute_map = { + "alignment": "alignment", + "quantity": "quantity", + "timezone": "timezone", + "type": "type", + } + + def __init__( + self_, + type: ProductAnalyticsCalendarIntervalType, + alignment: Union[str, UnsetType] = unset, + quantity: Union[int, UnsetType] = unset, + timezone: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A calendar-aligned bucket definition, such as "every 1 week starting on Monday". + + :param alignment: Where each bucket starts within the calendar unit. Use an hour for ``day`` (for example ``1am`` or ``14`` ), + a day name for ``week`` (for example ``monday`` ), or an ordinal for ``month`` (for example ``1st`` ). + :type alignment: str, optional + + :param quantity: Number of calendar units per bucket. + :type quantity: int, optional + + :param timezone: Timezone used to align the buckets. + :type timezone: str, optional + + :param type: Calendar unit used to bucket cohorts. + :type type: ProductAnalyticsCalendarIntervalType + """ + if alignment is not unset: + kwargs["alignment"] = alignment + if quantity is not unset: + kwargs["quantity"] = quantity + if timezone is not unset: + kwargs["timezone"] = timezone + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_calendar_interval_type.py b/src/datadog_api_client/v2/model/product_analytics_calendar_interval_type.py new file mode 100644 index 0000000000..88ce96c14e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_calendar_interval_type.py @@ -0,0 +1,53 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsCalendarIntervalType(ModelSimple): + """ + Calendar unit used to bucket cohorts. + + :param value: Must be one of ["minute", "hour", "day", "week", "month", "quarter", "year"]. + :type value: str + """ + + allowed_values = { + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "year", + } + MINUTE: ClassVar["ProductAnalyticsCalendarIntervalType"] + HOUR: ClassVar["ProductAnalyticsCalendarIntervalType"] + DAY: ClassVar["ProductAnalyticsCalendarIntervalType"] + WEEK: ClassVar["ProductAnalyticsCalendarIntervalType"] + MONTH: ClassVar["ProductAnalyticsCalendarIntervalType"] + QUARTER: ClassVar["ProductAnalyticsCalendarIntervalType"] + YEAR: ClassVar["ProductAnalyticsCalendarIntervalType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsCalendarIntervalType.MINUTE = ProductAnalyticsCalendarIntervalType("minute") +ProductAnalyticsCalendarIntervalType.HOUR = ProductAnalyticsCalendarIntervalType("hour") +ProductAnalyticsCalendarIntervalType.DAY = ProductAnalyticsCalendarIntervalType("day") +ProductAnalyticsCalendarIntervalType.WEEK = ProductAnalyticsCalendarIntervalType("week") +ProductAnalyticsCalendarIntervalType.MONTH = ProductAnalyticsCalendarIntervalType("month") +ProductAnalyticsCalendarIntervalType.QUARTER = ProductAnalyticsCalendarIntervalType("quarter") +ProductAnalyticsCalendarIntervalType.YEAR = ProductAnalyticsCalendarIntervalType("year") diff --git a/src/datadog_api_client/v2/model/product_analytics_compute.py b/src/datadog_api_client/v2/model/product_analytics_compute.py index 225f2b1c82..64a33624ca 100644 --- a/src/datadog_api_client/v2/model/product_analytics_compute.py +++ b/src/datadog_api_client/v2/model/product_analytics_compute.py @@ -41,7 +41,8 @@ def __init__( :param aggregation: The aggregation function (count, cardinality, avg, sum, min, max, etc.). :type aggregation: str - :param interval: Time bucket size in milliseconds. Required for timeseries queries. + :param interval: Time bucket size in milliseconds. Required for timeseries queries; ignored by the + scalar endpoint, which returns a single value. :type interval: int, optional :param metric: The metric to aggregate on. Required for non-count aggregations. diff --git a/src/datadog_api_client/v2/model/product_analytics_elapsed_time.py b/src/datadog_api_client/v2/model/product_analytics_elapsed_time.py new file mode 100644 index 0000000000..d481b9f8e9 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_elapsed_time.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class ProductAnalyticsElapsedTime(ModelNormal): + @cached_property + def openapi_types(_): + return { + "avg": (int,), + "max": (int,), + "min": (int,), + } + + attribute_map = { + "avg": "avg", + "max": "max", + "min": "min", + } + + def __init__(self_, avg: int, max: int, min: int, **kwargs): + """ + Elapsed time statistics (min/max/avg in milliseconds). + + :param avg: Average elapsed time to reach the next step, in milliseconds. + :type avg: int + + :param max: Maximum elapsed time to reach the next step, in milliseconds. + :type max: int + + :param min: Minimum elapsed time to reach the next step, in milliseconds. + :type min: int + """ + super().__init__(kwargs) + + self_.avg = avg + self_.max = max + self_.min = min diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_journey_query.py b/src/datadog_api_client/v2/model/product_analytics_formula_journey_query.py new file mode 100644 index 0000000000..f982c2d269 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_journey_query.py @@ -0,0 +1,73 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_graph_query_compute import ProductAnalyticsGraphQueryCompute + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + + +class ProductAnalyticsFormulaJourneyQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_graph_query_compute import ProductAnalyticsGraphQueryCompute + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + + return { + "compute": (ProductAnalyticsGraphQueryCompute,), + "group_by": ([ProductAnalyticsGraphQueryGroupBy],), + "query_id": (str,), + "search": (ProductAnalyticsJourneySearch,), + } + + attribute_map = { + "compute": "compute", + "group_by": "group_by", + "query_id": "query_id", + "search": "search", + } + + def __init__( + self_, + compute: ProductAnalyticsGraphQueryCompute, + search: ProductAnalyticsJourneySearch, + group_by: Union[List[ProductAnalyticsGraphQueryGroupBy], UnsetType] = unset, + query_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Query definition for a journey timeseries request. + + :param compute: Defines the metric computed over the journey. + :type compute: ProductAnalyticsGraphQueryCompute + + :param group_by: Segments the results by the values of one or more facets. + :type group_by: [ProductAnalyticsGraphQueryGroupBy], optional + + :param query_id: Caller-defined identifier echoed back in the results. + :type query_id: str, optional + + :param search: Defines the steps of the journey and the filters applied to it. + :type search: ProductAnalyticsJourneySearch + """ + if group_by is not unset: + kwargs["group_by"] = group_by + if query_id is not unset: + kwargs["query_id"] = query_id + super().__init__(kwargs) + + self_.compute = compute + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_journey_request.py b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request.py new file mode 100644 index 0000000000..cbb0d8748f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_formula_journey_request_data import ( + ProductAnalyticsFormulaJourneyRequestData, + ) + + +class ProductAnalyticsFormulaJourneyRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_formula_journey_request_data import ( + ProductAnalyticsFormulaJourneyRequestData, + ) + + return { + "data": (ProductAnalyticsFormulaJourneyRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsFormulaJourneyRequestData, **kwargs): + """ + Request body for a journey timeseries query. + + :param data: The single JSON:API resource carrying a journey timeseries query. Its attributes hold the time + window, the bucket interval that splits it, and the journey metric to compute per bucket. + :type data: ProductAnalyticsFormulaJourneyRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_attributes.py new file mode 100644 index 0000000000..6d3d2ce340 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_attributes.py @@ -0,0 +1,70 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_formula_journey_query import ProductAnalyticsFormulaJourneyQuery + + +class ProductAnalyticsFormulaJourneyRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_formula_journey_query import ( + ProductAnalyticsFormulaJourneyQuery, + ) + + return { + "_from": (int,), + "interval": (int,), + "query": (ProductAnalyticsFormulaJourneyQuery,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "interval": "interval", + "query": "query", + "to": "to", + } + + def __init__( + self_, + _from: int, + query: ProductAnalyticsFormulaJourneyQuery, + to: int, + interval: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a journey timeseries request. + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param interval: Time bucket interval in milliseconds. + :type interval: int, optional + + :param query: Query definition for a journey timeseries request. + :type query: ProductAnalyticsFormulaJourneyQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + if interval is not unset: + kwargs["interval"] = interval + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_data.py b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_data.py new file mode 100644 index 0000000000..b5129b6628 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_formula_journey_request_attributes import ( + ProductAnalyticsFormulaJourneyRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_formula_journey_request_type import ( + ProductAnalyticsFormulaJourneyRequestType, + ) + + +class ProductAnalyticsFormulaJourneyRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_formula_journey_request_attributes import ( + ProductAnalyticsFormulaJourneyRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_formula_journey_request_type import ( + ProductAnalyticsFormulaJourneyRequestType, + ) + + return { + "attributes": (ProductAnalyticsFormulaJourneyRequestAttributes,), + "type": (ProductAnalyticsFormulaJourneyRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsFormulaJourneyRequestAttributes, + type: ProductAnalyticsFormulaJourneyRequestType, + **kwargs, + ): + """ + The single JSON:API resource carrying a journey timeseries query. Its attributes hold the time + window, the bucket interval that splits it, and the journey metric to compute per bucket. + + :param attributes: Attributes of a journey timeseries request. + :type attributes: ProductAnalyticsFormulaJourneyRequestAttributes + + :param type: The resource type identifier for a journey timeseries or scalar request. + :type type: ProductAnalyticsFormulaJourneyRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_type.py b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_type.py new file mode 100644 index 0000000000..346be59d25 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_journey_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsFormulaJourneyRequestType(ModelSimple): + """ + The resource type identifier for a journey timeseries or scalar request. + + :param value: If omitted defaults to "formula_journey_request". Must be one of ["formula_journey_request"]. + :type value: str + """ + + allowed_values = { + "formula_journey_request", + } + FORMULA_JOURNEY_REQUEST: ClassVar["ProductAnalyticsFormulaJourneyRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsFormulaJourneyRequestType.FORMULA_JOURNEY_REQUEST = ProductAnalyticsFormulaJourneyRequestType( + "formula_journey_request" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_retention_query.py b/src/datadog_api_client/v2/model/product_analytics_formula_retention_query.py new file mode 100644 index 0000000000..ec96d4188f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_retention_query.py @@ -0,0 +1,89 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_scope import ProductAnalyticsRetentionScope + from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute + from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy + from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch + from datadog_api_client.v2.model.product_analytics_retention_cohort_scope import ( + ProductAnalyticsRetentionCohortScope, + ) + from datadog_api_client.v2.model.product_analytics_retention_return_period_scope import ( + ProductAnalyticsRetentionReturnPeriodScope, + ) + from datadog_api_client.v2.model.product_analytics_retention_cell_scope import ProductAnalyticsRetentionCellScope + + +class ProductAnalyticsFormulaRetentionQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_scope import ProductAnalyticsRetentionScope + from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute + from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy + from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch + + return { + "computation_scope": (ProductAnalyticsRetentionScope,), + "compute": (ProductAnalyticsRetentionCompute,), + "group_by": ([ProductAnalyticsRetentionGroupBy],), + "search": (ProductAnalyticsRetentionSearch,), + } + + attribute_map = { + "computation_scope": "computation_scope", + "compute": "compute", + "group_by": "group_by", + "search": "search", + } + + def __init__( + self_, + compute: ProductAnalyticsRetentionCompute, + search: ProductAnalyticsRetentionSearch, + computation_scope: Union[ + ProductAnalyticsRetentionScope, + ProductAnalyticsRetentionCohortScope, + ProductAnalyticsRetentionReturnPeriodScope, + ProductAnalyticsRetentionCellScope, + UnsetType, + ] = unset, + group_by: Union[List[ProductAnalyticsRetentionGroupBy], UnsetType] = unset, + **kwargs, + ): + """ + Query definition for a retention scalar or retention timeseries request. + + :param computation_scope: Restricts a retention query to part of the grid, so that results can be examined in detail. + Omit it to compute the whole grid. + :type computation_scope: ProductAnalyticsRetentionScope, optional + + :param compute: The metric and aggregation applied to a retention query. + :type compute: ProductAnalyticsRetentionCompute + + :param group_by: Splits the results by the values of one or more facets. + :type group_by: [ProductAnalyticsRetentionGroupBy], optional + + :param search: Defines the cohort and return criteria that make up a retention query. + :type search: ProductAnalyticsRetentionSearch + """ + if computation_scope is not unset: + kwargs["computation_scope"] = computation_scope + if group_by is not unset: + kwargs["group_by"] = group_by + super().__init__(kwargs) + + self_.compute = compute + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_retention_request.py b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request.py new file mode 100644 index 0000000000..71f190c1a6 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_formula_retention_request_data import ( + ProductAnalyticsFormulaRetentionRequestData, + ) + + +class ProductAnalyticsFormulaRetentionRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_formula_retention_request_data import ( + ProductAnalyticsFormulaRetentionRequestData, + ) + + return { + "data": (ProductAnalyticsFormulaRetentionRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsFormulaRetentionRequestData, **kwargs): + """ + Request body for a retention scalar or retention timeseries query. + + :param data: The single JSON:API resource carrying a retention scalar or timeseries query. Its attributes + hold the time window to query and the retention query definition to evaluate. + :type data: ProductAnalyticsFormulaRetentionRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_attributes.py new file mode 100644 index 0000000000..bf6ac9f073 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_attributes.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_formula_retention_query import ( + ProductAnalyticsFormulaRetentionQuery, + ) + + +class ProductAnalyticsFormulaRetentionRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_formula_retention_query import ( + ProductAnalyticsFormulaRetentionQuery, + ) + + return { + "exclude_anonymous_traffic": (bool,), + "_from": (int,), + "query": (ProductAnalyticsFormulaRetentionQuery,), + "to": (int,), + } + + attribute_map = { + "exclude_anonymous_traffic": "exclude_anonymous_traffic", + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__( + self_, + _from: int, + query: ProductAnalyticsFormulaRetentionQuery, + to: int, + exclude_anonymous_traffic: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a retention scalar or retention timeseries request. + + :param exclude_anonymous_traffic: Whether to exclude sessions that are not tied to an identified user. + :type exclude_anonymous_traffic: bool, optional + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param query: Query definition for a retention scalar or retention timeseries request. + :type query: ProductAnalyticsFormulaRetentionQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + if exclude_anonymous_traffic is not unset: + kwargs["exclude_anonymous_traffic"] = exclude_anonymous_traffic + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_data.py b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_data.py new file mode 100644 index 0000000000..6e750d2e40 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_formula_retention_request_attributes import ( + ProductAnalyticsFormulaRetentionRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_formula_retention_request_type import ( + ProductAnalyticsFormulaRetentionRequestType, + ) + + +class ProductAnalyticsFormulaRetentionRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_formula_retention_request_attributes import ( + ProductAnalyticsFormulaRetentionRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_formula_retention_request_type import ( + ProductAnalyticsFormulaRetentionRequestType, + ) + + return { + "attributes": (ProductAnalyticsFormulaRetentionRequestAttributes,), + "type": (ProductAnalyticsFormulaRetentionRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsFormulaRetentionRequestAttributes, + type: ProductAnalyticsFormulaRetentionRequestType, + **kwargs, + ): + """ + The single JSON:API resource carrying a retention scalar or timeseries query. Its attributes + hold the time window to query and the retention query definition to evaluate. + + :param attributes: Attributes of a retention scalar or retention timeseries request. + :type attributes: ProductAnalyticsFormulaRetentionRequestAttributes + + :param type: The resource type identifier for a retention scalar or retention timeseries request. + :type type: ProductAnalyticsFormulaRetentionRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_type.py b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_type.py new file mode 100644 index 0000000000..61de53a853 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_formula_retention_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsFormulaRetentionRequestType(ModelSimple): + """ + The resource type identifier for a retention scalar or retention timeseries request. + + :param value: If omitted defaults to "formula_retention_request". Must be one of ["formula_retention_request"]. + :type value: str + """ + + allowed_values = { + "formula_retention_request", + } + FORMULA_RETENTION_REQUEST: ClassVar["ProductAnalyticsFormulaRetentionRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsFormulaRetentionRequestType.FORMULA_RETENTION_REQUEST = ProductAnalyticsFormulaRetentionRequestType( + "formula_retention_request" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_graph_query_compute.py b/src/datadog_api_client/v2/model/product_analytics_graph_query_compute.py new file mode 100644 index 0000000000..92137e1c0a --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_graph_query_compute.py @@ -0,0 +1,86 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + from datadog_api_client.v2.model.product_analytics_journey_path_target import ProductAnalyticsJourneyPathTarget + + +class ProductAnalyticsGraphQueryCompute(ModelNormal): + validations = { + "aggregation": {}, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + + return { + "aggregation": (str,), + "interval": (int,), + "metric": (str,), + "target": (ProductAnalyticsJourneyTarget,), + } + + attribute_map = { + "aggregation": "aggregation", + "interval": "interval", + "metric": "metric", + "target": "target", + } + + def __init__( + self_, + aggregation: str, + interval: Union[int, UnsetType] = unset, + metric: Union[str, UnsetType] = unset, + target: Union[ + ProductAnalyticsJourneyTarget, + ProductAnalyticsJourneyNodeTarget, + ProductAnalyticsJourneyPathTarget, + UnsetType, + ] = unset, + **kwargs, + ): + """ + Defines the metric computed over the journey. + + :param aggregation: Aggregation function: ``count`` , ``cardinality`` , ``avg`` , ``median`` , ``min`` , ``max`` , ``sum`` , + or a percentile of the form ``pc`` such as ``pc95``. Defaults to ``cardinality``. + :type aggregation: str + + :param interval: Time bucket interval in milliseconds, used by timeseries queries. + :type interval: int, optional + + :param metric: Metric to aggregate on. Use a facet path such as ``@view.time_spent`` , or one of the + journey metrics ``__dd.conversion`` , ``__dd.conversion_rate`` , ``__dd.time_to_convert`` , + or ``__dd.dropoff_rate``. Defaults to ``__dd.conversion``. + :type metric: str, optional + + :param target: A reference to a step, or a range of steps, in the journey. + Use a ``node`` target to name a single step, or a ``path`` target to name the range + between two steps. + :type target: ProductAnalyticsJourneyTarget, optional + """ + if interval is not unset: + kwargs["interval"] = interval + if metric is not unset: + kwargs["metric"] = metric + if target is not unset: + kwargs["target"] = target + super().__init__(kwargs) + + self_.aggregation = aggregation diff --git a/src/datadog_api_client/v2/model/product_analytics_graph_query_group_by.py b/src/datadog_api_client/v2/model/product_analytics_graph_query_group_by.py new file mode 100644 index 0000000000..c3125242a3 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_graph_query_group_by.py @@ -0,0 +1,117 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort + from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( + ProductAnalyticsGraphQueryGroupBySource, + ) + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + from datadog_api_client.v2.model.product_analytics_journey_path_target import ProductAnalyticsJourneyPathTarget + + +class ProductAnalyticsGraphQueryGroupBy(ModelNormal): + validations = { + "limit": { + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort + from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( + ProductAnalyticsGraphQueryGroupBySource, + ) + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + + return { + "facet": (str,), + "limit": (int,), + "should_exclude_missing": (bool,), + "sort": (ProductAnalyticsGroupBySort,), + "source": (ProductAnalyticsGraphQueryGroupBySource,), + "target": (ProductAnalyticsJourneyTarget,), + "value_filters": ([str],), + } + + attribute_map = { + "facet": "facet", + "limit": "limit", + "should_exclude_missing": "should_exclude_missing", + "sort": "sort", + "source": "source", + "target": "target", + "value_filters": "value_filters", + } + + def __init__( + self_, + facet: str, + limit: Union[int, UnsetType] = unset, + should_exclude_missing: Union[bool, UnsetType] = unset, + sort: Union[ProductAnalyticsGroupBySort, UnsetType] = unset, + source: Union[ProductAnalyticsGraphQueryGroupBySource, UnsetType] = unset, + target: Union[ + ProductAnalyticsJourneyTarget, + ProductAnalyticsJourneyNodeTarget, + ProductAnalyticsJourneyPathTarget, + UnsetType, + ] = unset, + value_filters: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Segments journey results by the values of a facet. + + :param facet: Attribute path to group by. + :type facet: str + + :param limit: Maximum number of groups to return. Omit it to let the service choose. + :type limit: int, optional + + :param should_exclude_missing: Whether to exclude entities that have no value for this facet. + :type should_exclude_missing: bool, optional + + :param sort: Sort configuration for group-by results. + :type sort: ProductAnalyticsGroupBySort, optional + + :param source: Audience dimension to group by, instead of an event facet. + :type source: ProductAnalyticsGraphQueryGroupBySource, optional + + :param target: A reference to a step, or a range of steps, in the journey. + Use a ``node`` target to name a single step, or a ``path`` target to name the range + between two steps. + :type target: ProductAnalyticsJourneyTarget, optional + + :param value_filters: Restricts the results to these facet values. + :type value_filters: [str], optional + """ + if limit is not unset: + kwargs["limit"] = limit + if should_exclude_missing is not unset: + kwargs["should_exclude_missing"] = should_exclude_missing + if sort is not unset: + kwargs["sort"] = sort + if source is not unset: + kwargs["source"] = source + if target is not unset: + kwargs["target"] = target + if value_filters is not unset: + kwargs["value_filters"] = value_filters + super().__init__(kwargs) + + self_.facet = facet diff --git a/src/datadog_api_client/v2/model/product_analytics_graph_query_group_by_source.py b/src/datadog_api_client/v2/model/product_analytics_graph_query_group_by_source.py new file mode 100644 index 0000000000..0e9bbcac43 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_graph_query_group_by_source.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsGraphQueryGroupBySource(ModelSimple): + """ + Audience dimension to group by, instead of an event facet. + + :param value: Must be one of ["product_analytics_audience_filters.users", "product_analytics_audience_filters.accounts"]. + :type value: str + """ + + allowed_values = { + "product_analytics_audience_filters.users", + "product_analytics_audience_filters.accounts", + } + USERS: ClassVar["ProductAnalyticsGraphQueryGroupBySource"] + ACCOUNTS: ClassVar["ProductAnalyticsGraphQueryGroupBySource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsGraphQueryGroupBySource.USERS = ProductAnalyticsGraphQueryGroupBySource( + "product_analytics_audience_filters.users" +) +ProductAnalyticsGraphQueryGroupBySource.ACCOUNTS = ProductAnalyticsGraphQueryGroupBySource( + "product_analytics_audience_filters.accounts" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_join_keys.py b/src/datadog_api_client/v2/model/product_analytics_join_keys.py new file mode 100644 index 0000000000..26dd73c423 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_join_keys.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsJoinKeys(ModelNormal): + @cached_property + def openapi_types(_): + return { + "primary": (str,), + "secondary": ([str],), + } + + attribute_map = { + "primary": "primary", + "secondary": "secondary", + } + + def __init__( + self_, primary: Union[str, UnsetType] = unset, secondary: Union[List[str], UnsetType] = unset, **kwargs + ): + """ + Identity join keys used to stitch events belonging to the same user or session. + + :param primary: Primary identity join key. Defaults to ``@session.id``. + :type primary: str, optional + + :param secondary: Additional identity join keys. + :type secondary: [str], optional + """ + if primary is not unset: + kwargs["primary"] = primary + if secondary is not unset: + kwargs["secondary"] = secondary + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_audience_account_query.py b/src/datadog_api_client/v2/model/product_analytics_journey_audience_account_query.py new file mode 100644 index 0000000000..e7ceee442d --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_audience_account_query.py @@ -0,0 +1,43 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsJourneyAudienceAccountQuery(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "query": (str,), + } + + attribute_map = { + "name": "name", + "query": "query", + } + + def __init__(self_, name: str, query: Union[str, UnsetType] = unset, **kwargs): + """ + A named sub-query selecting a set of accounts. + + :param name: Unique name for this sub-query, referenced from ``formula``. + :type name: str + + :param query: Search query selecting the accounts. + :type query: str, optional + """ + if query is not unset: + kwargs["query"] = query + super().__init__(kwargs) + + self_.name = name diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_audience_filters.py b/src/datadog_api_client/v2/model/product_analytics_journey_audience_filters.py new file mode 100644 index 0000000000..c7349f4198 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_audience_filters.py @@ -0,0 +1,88 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, + ) + from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, + ) + from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, + ) + + +class ProductAnalyticsJourneyAudienceFilters(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, + ) + from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, + ) + from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, + ) + + return { + "accounts": ([ProductAnalyticsJourneyAudienceAccountQuery],), + "formula": (str,), + "segments": ([ProductAnalyticsJourneyAudienceSegmentQuery],), + "users": ([ProductAnalyticsJourneyAudienceUserQuery],), + } + + attribute_map = { + "accounts": "accounts", + "formula": "formula", + "segments": "segments", + "users": "users", + } + + def __init__( + self_, + accounts: Union[List[ProductAnalyticsJourneyAudienceAccountQuery], UnsetType] = unset, + formula: Union[str, UnsetType] = unset, + segments: Union[List[ProductAnalyticsJourneyAudienceSegmentQuery], UnsetType] = unset, + users: Union[List[ProductAnalyticsJourneyAudienceUserQuery], UnsetType] = unset, + **kwargs, + ): + """ + Restricts the journey to an audience built from named sub-queries. + Sub-query names must be unique across ``users`` , ``segments`` , and ``accounts``. + + :param accounts: Named account sub-queries. + :type accounts: [ProductAnalyticsJourneyAudienceAccountQuery], optional + + :param formula: Boolean expression combining the sub-query names with ``AND`` , ``OR`` , and ``NOT``. + When empty, all sub-queries are combined with ``AND``. + :type formula: str, optional + + :param segments: Named segment sub-queries. + :type segments: [ProductAnalyticsJourneyAudienceSegmentQuery], optional + + :param users: Named user sub-queries. + :type users: [ProductAnalyticsJourneyAudienceUserQuery], optional + """ + if accounts is not unset: + kwargs["accounts"] = accounts + if formula is not unset: + kwargs["formula"] = formula + if segments is not unset: + kwargs["segments"] = segments + if users is not unset: + kwargs["users"] = users + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_audience_segment_query.py b/src/datadog_api_client/v2/model/product_analytics_journey_audience_segment_query.py new file mode 100644 index 0000000000..e5d0754787 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_audience_segment_query.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class ProductAnalyticsJourneyAudienceSegmentQuery(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "segment_id": (str,), + } + + attribute_map = { + "name": "name", + "segment_id": "segment_id", + } + + def __init__(self_, name: str, segment_id: str, **kwargs): + """ + A named sub-query selecting a saved segment. + + :param name: Unique name for this sub-query, referenced from ``formula``. + :type name: str + + :param segment_id: Identifier of the saved segment. + :type segment_id: str + """ + super().__init__(kwargs) + + self_.name = name + self_.segment_id = segment_id diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_audience_user_query.py b/src/datadog_api_client/v2/model/product_analytics_journey_audience_user_query.py new file mode 100644 index 0000000000..da874da22e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_audience_user_query.py @@ -0,0 +1,43 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsJourneyAudienceUserQuery(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "query": (str,), + } + + attribute_map = { + "name": "name", + "query": "query", + } + + def __init__(self_, name: str, query: Union[str, UnsetType] = unset, **kwargs): + """ + A named sub-query selecting a set of users. + + :param name: Unique name for this sub-query, referenced from ``formula``. + :type name: str + + :param query: Search query selecting the users. + :type query: str, optional + """ + if query is not unset: + kwargs["query"] = query + super().__init__(kwargs) + + self_.name = name diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_computed_column.py b/src/datadog_api_client/v2/model/product_analytics_journey_computed_column.py new file mode 100644 index 0000000000..234a02cf4b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_computed_column.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_computed_column_name import ( + ProductAnalyticsJourneyComputedColumnName, + ) + + +class ProductAnalyticsJourneyComputedColumn(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_computed_column_name import ( + ProductAnalyticsJourneyComputedColumnName, + ) + + return { + "name": (ProductAnalyticsJourneyComputedColumnName,), + } + + attribute_map = { + "name": "name", + } + + def __init__(self_, name: ProductAnalyticsJourneyComputedColumnName, **kwargs): + """ + A computed column added to each row. Requesting ``first_conversion_timestamps`` adds one + ``_timestamp`` key per step. + + :param name: Name of a computed column to add to each row. + :type name: ProductAnalyticsJourneyComputedColumnName + """ + super().__init__(kwargs) + + self_.name = name diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_computed_column_name.py b/src/datadog_api_client/v2/model/product_analytics_journey_computed_column_name.py new file mode 100644 index 0000000000..85c37e7c22 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_computed_column_name.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyComputedColumnName(ModelSimple): + """ + Name of a computed column to add to each row. + + :param value: If omitted defaults to "first_conversion_timestamps". Must be one of ["first_conversion_timestamps"]. + :type value: str + """ + + allowed_values = { + "first_conversion_timestamps", + } + FIRST_CONVERSION_TIMESTAMPS: ClassVar["ProductAnalyticsJourneyComputedColumnName"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyComputedColumnName.FIRST_CONVERSION_TIMESTAMPS = ProductAnalyticsJourneyComputedColumnName( + "first_conversion_timestamps" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_conversion_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_conversion_type.py new file mode 100644 index 0000000000..b055326757 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_conversion_type.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyConversionType(ModelSimple): + """ + Whether to return the entities that converted at the target step, or those that dropped off. + + :param value: Must be one of ["conversion", "drop-off"]. + :type value: str + """ + + allowed_values = { + "conversion", + "drop-off", + } + CONVERSION: ClassVar["ProductAnalyticsJourneyConversionType"] + DROP_OFF: ClassVar["ProductAnalyticsJourneyConversionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyConversionType.CONVERSION = ProductAnalyticsJourneyConversionType("conversion") +ProductAnalyticsJourneyConversionType.DROP_OFF = ProductAnalyticsJourneyConversionType("drop-off") diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_entity.py b/src/datadog_api_client/v2/model/product_analytics_journey_entity.py new file mode 100644 index 0000000000..c1e536dea9 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_entity.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyEntity(ModelSimple): + """ + The kind of entity returned by a journey list query. + + :param value: Must be one of ["session", "user", "account"]. + :type value: str + """ + + allowed_values = { + "session", + "user", + "account", + } + SESSION: ClassVar["ProductAnalyticsJourneyEntity"] + USER: ClassVar["ProductAnalyticsJourneyEntity"] + ACCOUNT: ClassVar["ProductAnalyticsJourneyEntity"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyEntity.SESSION = ProductAnalyticsJourneyEntity("session") +ProductAnalyticsJourneyEntity.USER = ProductAnalyticsJourneyEntity("user") +ProductAnalyticsJourneyEntity.ACCOUNT = ProductAnalyticsJourneyEntity("account") diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_compute.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_compute.py new file mode 100644 index 0000000000..75b8b55a79 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_compute.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsJourneyFunnelCompute(ModelNormal): + validations = { + "aggregation": {}, + } + + @cached_property + def openapi_types(_): + return { + "aggregation": (str,), + "metric": (str,), + } + + attribute_map = { + "aggregation": "aggregation", + "metric": "metric", + } + + def __init__(self_, aggregation: Union[str, UnsetType] = unset, metric: Union[str, UnsetType] = unset, **kwargs): + """ + Defines the metric computed at each funnel step. + + :param aggregation: Aggregation function: ``count`` , ``cardinality`` , ``avg`` , ``median`` , ``min`` , ``max`` , ``sum`` , + or a percentile of the form ``pc`` such as ``pc95``. Defaults to ``cardinality``. + :type aggregation: str, optional + + :param metric: Metric to aggregate on. Defaults to the identity join key. + :type metric: str, optional + """ + if aggregation is not unset: + kwargs["aggregation"] = aggregation + if metric is not unset: + kwargs["metric"] = metric + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_query.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_query.py new file mode 100644 index 0000000000..e68b20b487 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_query.py @@ -0,0 +1,70 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_funnel_compute import ( + ProductAnalyticsJourneyFunnelCompute, + ) + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + + +class ProductAnalyticsJourneyFunnelQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_funnel_compute import ( + ProductAnalyticsJourneyFunnelCompute, + ) + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + + return { + "compute": (ProductAnalyticsJourneyFunnelCompute,), + "group_by": ([ProductAnalyticsGraphQueryGroupBy],), + "search": (ProductAnalyticsJourneySearch,), + } + + attribute_map = { + "compute": "compute", + "group_by": "group_by", + "search": "search", + } + + def __init__( + self_, + search: ProductAnalyticsJourneySearch, + compute: Union[ProductAnalyticsJourneyFunnelCompute, UnsetType] = unset, + group_by: Union[List[ProductAnalyticsGraphQueryGroupBy], UnsetType] = unset, + **kwargs, + ): + """ + Query definition for a journey funnel request. + + :param compute: Defines the metric computed at each funnel step. + :type compute: ProductAnalyticsJourneyFunnelCompute, optional + + :param group_by: Segments the funnel by the values of one or more facets. + :type group_by: [ProductAnalyticsGraphQueryGroupBy], optional + + :param search: Defines the steps of the journey and the filters applied to it. + :type search: ProductAnalyticsJourneySearch + """ + if compute is not unset: + kwargs["compute"] = compute + if group_by is not unset: + kwargs["group_by"] = group_by + super().__init__(kwargs) + + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request.py new file mode 100644 index 0000000000..7ce6d96045 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_funnel_request_data import ( + ProductAnalyticsJourneyFunnelRequestData, + ) + + +class ProductAnalyticsJourneyFunnelRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_funnel_request_data import ( + ProductAnalyticsJourneyFunnelRequestData, + ) + + return { + "data": (ProductAnalyticsJourneyFunnelRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyFunnelRequestData, **kwargs): + """ + Request body for a journey funnel analysis. + + :param data: The single JSON:API resource carrying a funnel query. Its attributes hold the time window to + query and the journey whose step-to-step conversion should be measured. + :type data: ProductAnalyticsJourneyFunnelRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request_attributes.py new file mode 100644 index 0000000000..45e257c31d --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request_attributes.py @@ -0,0 +1,70 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_funnel_query import ProductAnalyticsJourneyFunnelQuery + + +class ProductAnalyticsJourneyFunnelRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_funnel_query import ( + ProductAnalyticsJourneyFunnelQuery, + ) + + return { + "exclude_anonymous_traffic": (bool,), + "_from": (int,), + "query": (ProductAnalyticsJourneyFunnelQuery,), + "to": (int,), + } + + attribute_map = { + "exclude_anonymous_traffic": "exclude_anonymous_traffic", + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__( + self_, + _from: int, + query: ProductAnalyticsJourneyFunnelQuery, + to: int, + exclude_anonymous_traffic: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a journey funnel request. + + :param exclude_anonymous_traffic: Whether to exclude sessions that are not tied to an identified user. + :type exclude_anonymous_traffic: bool, optional + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param query: Query definition for a journey funnel request. + :type query: ProductAnalyticsJourneyFunnelQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + if exclude_anonymous_traffic is not unset: + kwargs["exclude_anonymous_traffic"] = exclude_anonymous_traffic + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request_data.py new file mode 100644 index 0000000000..13988b29a3 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_request_data.py @@ -0,0 +1,60 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_funnel_request_attributes import ( + ProductAnalyticsJourneyFunnelRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_request_type import ProductAnalyticsJourneyRequestType + + +class ProductAnalyticsJourneyFunnelRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_funnel_request_attributes import ( + ProductAnalyticsJourneyFunnelRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_request_type import ( + ProductAnalyticsJourneyRequestType, + ) + + return { + "attributes": (ProductAnalyticsJourneyFunnelRequestAttributes,), + "type": (ProductAnalyticsJourneyRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsJourneyFunnelRequestAttributes, + type: ProductAnalyticsJourneyRequestType, + **kwargs, + ): + """ + The single JSON:API resource carrying a funnel query. Its attributes hold the time window to + query and the journey whose step-to-step conversion should be measured. + + :param attributes: Attributes of a journey funnel request. + :type attributes: ProductAnalyticsJourneyFunnelRequestAttributes + + :param type: The resource type identifier for a journey funnel request. + :type type: ProductAnalyticsJourneyRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response.py new file mode 100644 index 0000000000..0cf9245ae7 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_funnel_response_data import ( + ProductAnalyticsJourneyFunnelResponseData, + ) + + +class ProductAnalyticsJourneyFunnelResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_funnel_response_data import ( + ProductAnalyticsJourneyFunnelResponseData, + ) + + return { + "data": (ProductAnalyticsJourneyFunnelResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyFunnelResponseData, **kwargs): + """ + Response for a journey funnel analysis. + + :param data: The single JSON:API resource holding a computed funnel. Its attributes contain the number of + entities that entered, the end-to-end conversion, and one entry per funnel step. + :type data: ProductAnalyticsJourneyFunnelResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_attributes.py new file mode 100644 index 0000000000..cbe5738ad5 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_attributes.py @@ -0,0 +1,67 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime + from datadog_api_client.v2.model.product_analytics_journey_funnel_step import ProductAnalyticsJourneyFunnelStep + + +class ProductAnalyticsJourneyFunnelResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime + from datadog_api_client.v2.model.product_analytics_journey_funnel_step import ProductAnalyticsJourneyFunnelStep + + return { + "end_to_end_conversion_rate": (float,), + "end_to_end_elapsed_time": (ProductAnalyticsElapsedTime,), + "funnel_steps": ([ProductAnalyticsJourneyFunnelStep],), + "initial_count": (int,), + } + + attribute_map = { + "end_to_end_conversion_rate": "end_to_end_conversion_rate", + "end_to_end_elapsed_time": "end_to_end_elapsed_time", + "funnel_steps": "funnel_steps", + "initial_count": "initial_count", + } + + def __init__( + self_, + end_to_end_conversion_rate: float, + end_to_end_elapsed_time: ProductAnalyticsElapsedTime, + funnel_steps: List[ProductAnalyticsJourneyFunnelStep], + initial_count: int, + **kwargs, + ): + """ + Attributes of a journey funnel response. + + :param end_to_end_conversion_rate: Conversion rate from the first step to the last step. + :type end_to_end_conversion_rate: float + + :param end_to_end_elapsed_time: Elapsed time statistics (min/max/avg in milliseconds). + :type end_to_end_elapsed_time: ProductAnalyticsElapsedTime + + :param funnel_steps: The funnel steps, in the order given by the search expression. + :type funnel_steps: [ProductAnalyticsJourneyFunnelStep] + + :param initial_count: Number of entities that entered the funnel. + :type initial_count: int + """ + super().__init__(kwargs) + + self_.end_to_end_conversion_rate = end_to_end_conversion_rate + self_.end_to_end_elapsed_time = end_to_end_elapsed_time + self_.funnel_steps = funnel_steps + self_.initial_count = initial_count diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_data.py new file mode 100644 index 0000000000..1b0e791c43 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_data.py @@ -0,0 +1,69 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_funnel_response_attributes import ( + ProductAnalyticsJourneyFunnelResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_funnel_response_type import ( + ProductAnalyticsJourneyFunnelResponseType, + ) + + +class ProductAnalyticsJourneyFunnelResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_funnel_response_attributes import ( + ProductAnalyticsJourneyFunnelResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_funnel_response_type import ( + ProductAnalyticsJourneyFunnelResponseType, + ) + + return { + "attributes": (ProductAnalyticsJourneyFunnelResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsJourneyFunnelResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsJourneyFunnelResponseAttributes, + id: str, + type: ProductAnalyticsJourneyFunnelResponseType, + **kwargs, + ): + """ + The single JSON:API resource holding a computed funnel. Its attributes contain the number of + entities that entered, the end-to-end conversion, and one entry per funnel step. + + :param attributes: Attributes of a journey funnel response. + :type attributes: ProductAnalyticsJourneyFunnelResponseAttributes + + :param id: Identifier of this result. + :type id: str + + :param type: The resource type identifier for a journey funnel response. + :type type: ProductAnalyticsJourneyFunnelResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_type.py new file mode 100644 index 0000000000..0bfc0f6aee --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_response_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyFunnelResponseType(ModelSimple): + """ + The resource type identifier for a journey funnel response. + + :param value: If omitted defaults to "funnel_response". Must be one of ["funnel_response"]. + :type value: str + """ + + allowed_values = { + "funnel_response", + } + FUNNEL_RESPONSE: ClassVar["ProductAnalyticsJourneyFunnelResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyFunnelResponseType.FUNNEL_RESPONSE = ProductAnalyticsJourneyFunnelResponseType("funnel_response") diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_step.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_step.py new file mode 100644 index 0000000000..9cc846c363 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_step.py @@ -0,0 +1,78 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime + from datadog_api_client.v2.model.product_analytics_journey_funnel_step_group import ( + ProductAnalyticsJourneyFunnelStepGroup, + ) + + +class ProductAnalyticsJourneyFunnelStep(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime + from datadog_api_client.v2.model.product_analytics_journey_funnel_step_group import ( + ProductAnalyticsJourneyFunnelStepGroup, + ) + + return { + "elapsed_time_to_next_step": (ProductAnalyticsElapsedTime,), + "groups": ([ProductAnalyticsJourneyFunnelStepGroup],), + "label": (str,), + "unit": (str,), + "value": (float,), + } + + attribute_map = { + "elapsed_time_to_next_step": "elapsed_time_to_next_step", + "groups": "groups", + "label": "label", + "unit": "unit", + "value": "value", + } + + def __init__( + self_, + elapsed_time_to_next_step: ProductAnalyticsElapsedTime, + groups: List[ProductAnalyticsJourneyFunnelStepGroup], + label: str, + unit: str, + value: float, + **kwargs, + ): + """ + A single step of the funnel with its conversion counts and timings. + + :param elapsed_time_to_next_step: Elapsed time statistics (min/max/avg in milliseconds). + :type elapsed_time_to_next_step: ProductAnalyticsElapsedTime + + :param groups: Breakdown of this step by the requested group-by facets. + :type groups: [ProductAnalyticsJourneyFunnelStepGroup] + + :param label: Label of the step, derived from the node alias. + :type label: str + + :param unit: Unit of the elapsed time values. + :type unit: str + + :param value: Value of the computed metric at this step. + :type value: float + """ + super().__init__(kwargs) + + self_.elapsed_time_to_next_step = elapsed_time_to_next_step + self_.groups = groups + self_.label = label + self_.unit = unit + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_funnel_step_group.py b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_step_group.py new file mode 100644 index 0000000000..88337c4f08 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_funnel_step_group.py @@ -0,0 +1,65 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime + + +class ProductAnalyticsJourneyFunnelStepGroup(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime + + return { + "conversion_count": (int,), + "elapsed_time_to_next_step": (ProductAnalyticsElapsedTime,), + "group_tags": ([str],), + "value": (float,), + } + + attribute_map = { + "conversion_count": "conversion_count", + "elapsed_time_to_next_step": "elapsed_time_to_next_step", + "group_tags": "group_tags", + "value": "value", + } + + def __init__( + self_, + conversion_count: int, + elapsed_time_to_next_step: ProductAnalyticsElapsedTime, + group_tags: List[str], + value: float, + **kwargs, + ): + """ + Breakdown of a funnel step for one combination of group-by values. + + :param conversion_count: Number of entities in this group that reached the next step. + :type conversion_count: int + + :param elapsed_time_to_next_step: Elapsed time statistics (min/max/avg in milliseconds). + :type elapsed_time_to_next_step: ProductAnalyticsElapsedTime + + :param group_tags: Group-by values identifying this cohort. + :type group_tags: [str] + + :param value: Value of the computed metric for this group at this step. + :type value: float + """ + super().__init__(kwargs) + + self_.conversion_count = conversion_count + self_.elapsed_time_to_next_step = elapsed_time_to_next_step + self_.group_tags = group_tags + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_query.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_query.py new file mode 100644 index 0000000000..ca0fd238ec --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_query.py @@ -0,0 +1,144 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_computed_column import ( + ProductAnalyticsJourneyComputedColumn, + ) + from datadog_api_client.v2.model.product_analytics_journey_conversion_type import ( + ProductAnalyticsJourneyConversionType, + ) + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + from datadog_api_client.v2.model.product_analytics_journey_list_sort import ProductAnalyticsJourneyListSort + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + from datadog_api_client.v2.model.product_analytics_journey_path_target import ProductAnalyticsJourneyPathTarget + + +class ProductAnalyticsJourneyListQuery(ModelNormal): + validations = { + "limit": { + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_computed_column import ( + ProductAnalyticsJourneyComputedColumn, + ) + from datadog_api_client.v2.model.product_analytics_journey_conversion_type import ( + ProductAnalyticsJourneyConversionType, + ) + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + from datadog_api_client.v2.model.product_analytics_journey_list_sort import ProductAnalyticsJourneyListSort + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + + return { + "computed_columns": ([ProductAnalyticsJourneyComputedColumn],), + "conversion_type": (ProductAnalyticsJourneyConversionType,), + "entity_columns": ([str],), + "entity_filters": (str,), + "group_by": ([ProductAnalyticsGraphQueryGroupBy],), + "limit": (int,), + "search": (ProductAnalyticsJourneySearch,), + "sort": (ProductAnalyticsJourneyListSort,), + "target": (ProductAnalyticsJourneyTarget,), + } + + attribute_map = { + "computed_columns": "computed_columns", + "conversion_type": "conversion_type", + "entity_columns": "entity_columns", + "entity_filters": "entity_filters", + "group_by": "group_by", + "limit": "limit", + "search": "search", + "sort": "sort", + "target": "target", + } + + def __init__( + self_, + search: ProductAnalyticsJourneySearch, + computed_columns: Union[List[ProductAnalyticsJourneyComputedColumn], UnsetType] = unset, + conversion_type: Union[ProductAnalyticsJourneyConversionType, UnsetType] = unset, + entity_columns: Union[List[str], UnsetType] = unset, + entity_filters: Union[str, UnsetType] = unset, + group_by: Union[List[ProductAnalyticsGraphQueryGroupBy], UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + sort: Union[ProductAnalyticsJourneyListSort, UnsetType] = unset, + target: Union[ + ProductAnalyticsJourneyTarget, + ProductAnalyticsJourneyNodeTarget, + ProductAnalyticsJourneyPathTarget, + UnsetType, + ] = unset, + **kwargs, + ): + """ + Query definition for a journey list request. + + :param computed_columns: Computed columns to add to each row. + :type computed_columns: [ProductAnalyticsJourneyComputedColumn], optional + + :param conversion_type: Whether to return the entities that converted at the target step, or those that dropped off. + :type conversion_type: ProductAnalyticsJourneyConversionType, optional + + :param entity_columns: Attribute columns to return for each row, in addition to the identity join key and ``timestamp``. + :type entity_columns: [str], optional + + :param entity_filters: Additional search query applied to the returned rows. + :type entity_filters: str, optional + + :param group_by: Segments the results by the values of one or more facets. + :type group_by: [ProductAnalyticsGraphQueryGroupBy], optional + + :param limit: Maximum number of rows to return. Omit it to let the service choose. + :type limit: int, optional + + :param search: Defines the steps of the journey and the filters applied to it. + :type search: ProductAnalyticsJourneySearch + + :param sort: Sort configuration for the returned rows. The sort is applied only when ``facet`` + is one of the returned columns; otherwise it is ignored. + :type sort: ProductAnalyticsJourneyListSort, optional + + :param target: A reference to a step, or a range of steps, in the journey. + Use a ``node`` target to name a single step, or a ``path`` target to name the range + between two steps. + :type target: ProductAnalyticsJourneyTarget, optional + """ + if computed_columns is not unset: + kwargs["computed_columns"] = computed_columns + if conversion_type is not unset: + kwargs["conversion_type"] = conversion_type + if entity_columns is not unset: + kwargs["entity_columns"] = entity_columns + if entity_filters is not unset: + kwargs["entity_filters"] = entity_filters + if group_by is not unset: + kwargs["group_by"] = group_by + if limit is not unset: + kwargs["limit"] = limit + if sort is not unset: + kwargs["sort"] = sort + if target is not unset: + kwargs["target"] = target + super().__init__(kwargs) + + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_record.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_record.py new file mode 100644 index 0000000000..7a72406123 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_record.py @@ -0,0 +1,19 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, +) + + +class ProductAnalyticsJourneyListRecord(ModelNormal): + def __init__(self_, **kwargs): + """ + A single row. Keys are the returned column names: the identity join key, ``timestamp`` , + each entry of ``entity_columns`` , and any computed columns. A value is null when the + column has no value for that row. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_request.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_request.py new file mode 100644 index 0000000000..6dca9e1600 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_request.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_list_request_data import ( + ProductAnalyticsJourneyListRequestData, + ) + + +class ProductAnalyticsJourneyListRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_list_request_data import ( + ProductAnalyticsJourneyListRequestData, + ) + + return { + "data": (ProductAnalyticsJourneyListRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyListRequestData, **kwargs): + """ + Request body for a journey list query. + + :param data: The single JSON:API resource carrying a journey list query. Its attributes hold the time window + and the journey whose matching entities should be listed, one row each. + :type data: ProductAnalyticsJourneyListRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_request_attributes.py new file mode 100644 index 0000000000..2026aab87f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_request_attributes.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_list_query import ProductAnalyticsJourneyListQuery + + +class ProductAnalyticsJourneyListRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_list_query import ProductAnalyticsJourneyListQuery + + return { + "_from": (int,), + "query": (ProductAnalyticsJourneyListQuery,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__(self_, _from: int, query: ProductAnalyticsJourneyListQuery, to: int, **kwargs): + """ + Attributes of a journey list request. + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param query: Query definition for a journey list request. + :type query: ProductAnalyticsJourneyListQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_request_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_request_data.py new file mode 100644 index 0000000000..dbcc3117c0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_request_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_list_request_attributes import ( + ProductAnalyticsJourneyListRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_list_request_type import ( + ProductAnalyticsJourneyListRequestType, + ) + + +class ProductAnalyticsJourneyListRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_list_request_attributes import ( + ProductAnalyticsJourneyListRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_list_request_type import ( + ProductAnalyticsJourneyListRequestType, + ) + + return { + "attributes": (ProductAnalyticsJourneyListRequestAttributes,), + "type": (ProductAnalyticsJourneyListRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsJourneyListRequestAttributes, + type: ProductAnalyticsJourneyListRequestType, + **kwargs, + ): + """ + The single JSON:API resource carrying a journey list query. Its attributes hold the time window + and the journey whose matching entities should be listed, one row each. + + :param attributes: Attributes of a journey list request. + :type attributes: ProductAnalyticsJourneyListRequestAttributes + + :param type: The resource type identifier for a journey list request. + :type type: ProductAnalyticsJourneyListRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_request_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_request_type.py new file mode 100644 index 0000000000..53063b35f2 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyListRequestType(ModelSimple): + """ + The resource type identifier for a journey list request. + + :param value: If omitted defaults to "journey_list_request". Must be one of ["journey_list_request"]. + :type value: str + """ + + allowed_values = { + "journey_list_request", + } + JOURNEY_LIST_REQUEST: ClassVar["ProductAnalyticsJourneyListRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyListRequestType.JOURNEY_LIST_REQUEST = ProductAnalyticsJourneyListRequestType( + "journey_list_request" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_response.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_response.py new file mode 100644 index 0000000000..718914d308 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_response.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_list_response_data import ( + ProductAnalyticsJourneyListResponseData, + ) + + +class ProductAnalyticsJourneyListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_list_response_data import ( + ProductAnalyticsJourneyListResponseData, + ) + + return { + "data": (ProductAnalyticsJourneyListResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyListResponseData, **kwargs): + """ + Response for a journey list query. + + :param data: The single JSON:API resource holding the entities matching a journey. Its attributes contain + the returned rows and the total number of rows that matched, ignoring ``limit``. + :type data: ProductAnalyticsJourneyListResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_response_attributes.py new file mode 100644 index 0000000000..259c5f4d68 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_response_attributes.py @@ -0,0 +1,60 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_entity import ProductAnalyticsJourneyEntity + from datadog_api_client.v2.model.product_analytics_journey_list_record import ProductAnalyticsJourneyListRecord + + +class ProductAnalyticsJourneyListResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_entity import ProductAnalyticsJourneyEntity + from datadog_api_client.v2.model.product_analytics_journey_list_record import ProductAnalyticsJourneyListRecord + + return { + "entity": (ProductAnalyticsJourneyEntity,), + "records": ([ProductAnalyticsJourneyListRecord],), + "total_count": (int,), + } + + attribute_map = { + "entity": "entity", + "records": "records", + "total_count": "total_count", + } + + def __init__( + self_, + entity: ProductAnalyticsJourneyEntity, + records: List[ProductAnalyticsJourneyListRecord], + total_count: int, + **kwargs, + ): + """ + Attributes of a journey list response. + + :param entity: The kind of entity returned by a journey list query. + :type entity: ProductAnalyticsJourneyEntity + + :param records: The returned rows. + :type records: [ProductAnalyticsJourneyListRecord] + + :param total_count: Total number of rows matching the query, ignoring ``limit``. + :type total_count: int + """ + super().__init__(kwargs) + + self_.entity = entity + self_.records = records + self_.total_count = total_count diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_response_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_response_data.py new file mode 100644 index 0000000000..c3e126577d --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_response_data.py @@ -0,0 +1,69 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_list_response_attributes import ( + ProductAnalyticsJourneyListResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_list_response_type import ( + ProductAnalyticsJourneyListResponseType, + ) + + +class ProductAnalyticsJourneyListResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_list_response_attributes import ( + ProductAnalyticsJourneyListResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_list_response_type import ( + ProductAnalyticsJourneyListResponseType, + ) + + return { + "attributes": (ProductAnalyticsJourneyListResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsJourneyListResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsJourneyListResponseAttributes, + id: str, + type: ProductAnalyticsJourneyListResponseType, + **kwargs, + ): + """ + The single JSON:API resource holding the entities matching a journey. Its attributes contain + the returned rows and the total number of rows that matched, ignoring ``limit``. + + :param attributes: Attributes of a journey list response. + :type attributes: ProductAnalyticsJourneyListResponseAttributes + + :param id: Identifier of this result. + :type id: str + + :param type: The resource type identifier for a journey list response. + :type type: ProductAnalyticsJourneyListResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_response_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_response_type.py new file mode 100644 index 0000000000..b0bd5b378a --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyListResponseType(ModelSimple): + """ + The resource type identifier for a journey list response. + + :param value: If omitted defaults to "journey_list_response". Must be one of ["journey_list_response"]. + :type value: str + """ + + allowed_values = { + "journey_list_response", + } + JOURNEY_LIST_RESPONSE: ClassVar["ProductAnalyticsJourneyListResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyListResponseType.JOURNEY_LIST_RESPONSE = ProductAnalyticsJourneyListResponseType( + "journey_list_response" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_list_sort.py b/src/datadog_api_client/v2/model/product_analytics_journey_list_sort.py new file mode 100644 index 0000000000..a028688f0e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_list_sort.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + +class ProductAnalyticsJourneyListSort(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + return { + "facet": (str,), + "order": (QuerySortOrder,), + } + + attribute_map = { + "facet": "facet", + "order": "order", + } + + def __init__( + self_, facet: Union[str, UnsetType] = unset, order: Union[QuerySortOrder, UnsetType] = unset, **kwargs + ): + """ + Sort configuration for the returned rows. The sort is applied only when ``facet`` + is one of the returned columns; otherwise it is ignored. + + :param facet: Column to sort on. + :type facet: str, optional + + :param order: Direction of sort. + :type order: QuerySortOrder, optional + """ + if facet is not unset: + kwargs["facet"] = facet + if order is not unset: + kwargs["order"] = order + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_node_target.py b/src/datadog_api_client/v2/model/product_analytics_journey_node_target.py new file mode 100644 index 0000000000..7e6607fb7f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_node_target.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ( + ProductAnalyticsJourneyNodeTargetType, + ) + + +class ProductAnalyticsJourneyNodeTarget(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ( + ProductAnalyticsJourneyNodeTargetType, + ) + + return { + "type": (ProductAnalyticsJourneyNodeTargetType,), + "value": (str,), + } + + attribute_map = { + "type": "type", + "value": "value", + } + + def __init__(self_, type: ProductAnalyticsJourneyNodeTargetType, value: str, **kwargs): + """ + A reference to a single step of the journey. + + :param type: The discriminator identifying a target that references a single step. + :type type: ProductAnalyticsJourneyNodeTargetType + + :param value: Alias of the targeted node. + :type value: str + """ + super().__init__(kwargs) + + self_.type = type + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_node_target_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_node_target_type.py new file mode 100644 index 0000000000..3699df8244 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_node_target_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyNodeTargetType(ModelSimple): + """ + The discriminator identifying a target that references a single step. + + :param value: If omitted defaults to "node". Must be one of ["node"]. + :type value: str + """ + + allowed_values = { + "node", + } + NODE: ClassVar["ProductAnalyticsJourneyNodeTargetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyNodeTargetType.NODE = ProductAnalyticsJourneyNodeTargetType("node") diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_path_target.py b/src/datadog_api_client/v2/model/product_analytics_journey_path_target.py new file mode 100644 index 0000000000..49b91cb1d3 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_path_target.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_path_target_type import ( + ProductAnalyticsJourneyPathTargetType, + ) + + +class ProductAnalyticsJourneyPathTarget(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_path_target_type import ( + ProductAnalyticsJourneyPathTargetType, + ) + + return { + "end": (str,), + "start": (str,), + "type": (ProductAnalyticsJourneyPathTargetType,), + } + + attribute_map = { + "end": "end", + "start": "start", + "type": "type", + } + + def __init__(self_, end: str, start: str, type: ProductAnalyticsJourneyPathTargetType, **kwargs): + """ + A reference to the range of steps between two nodes of the journey. + + :param end: Alias of the node the path ends at. + :type end: str + + :param start: Alias of the node the path starts at. + :type start: str + + :param type: The discriminator identifying a target that references a range of steps. + :type type: ProductAnalyticsJourneyPathTargetType + """ + super().__init__(kwargs) + + self_.end = end + self_.start = start + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_path_target_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_path_target_type.py new file mode 100644 index 0000000000..41ffd074c9 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_path_target_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyPathTargetType(ModelSimple): + """ + The discriminator identifying a target that references a range of steps. + + :param value: If omitted defaults to "path". Must be one of ["path"]. + :type value: str + """ + + allowed_values = { + "path", + } + PATH: ClassVar["ProductAnalyticsJourneyPathTargetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyPathTargetType.PATH = ProductAnalyticsJourneyPathTargetType("path") diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_request_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_request_type.py new file mode 100644 index 0000000000..d10585a857 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_request_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyRequestType(ModelSimple): + """ + The resource type identifier for a journey funnel request. + + :param value: If omitted defaults to "journey_request". Must be one of ["journey_request"]. + :type value: str + """ + + allowed_values = { + "journey_request", + } + JOURNEY_REQUEST: ClassVar["ProductAnalyticsJourneyRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyRequestType.JOURNEY_REQUEST = ProductAnalyticsJourneyRequestType("journey_request") diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_compute.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_compute.py new file mode 100644 index 0000000000..5fef0ab1f8 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_compute.py @@ -0,0 +1,78 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + from datadog_api_client.v2.model.product_analytics_journey_path_target import ProductAnalyticsJourneyPathTarget + + +class ProductAnalyticsJourneyScalarCompute(ModelNormal): + validations = { + "aggregation": {}, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + + return { + "aggregation": (str,), + "metric": (str,), + "target": (ProductAnalyticsJourneyTarget,), + } + + attribute_map = { + "aggregation": "aggregation", + "metric": "metric", + "target": "target", + } + + def __init__( + self_, + aggregation: str, + metric: Union[str, UnsetType] = unset, + target: Union[ + ProductAnalyticsJourneyTarget, + ProductAnalyticsJourneyNodeTarget, + ProductAnalyticsJourneyPathTarget, + UnsetType, + ] = unset, + **kwargs, + ): + """ + Defines the metric computed over the journey for a scalar query. + + :param aggregation: Aggregation function: ``count`` , ``cardinality`` , ``avg`` , ``median`` , ``min`` , ``max`` , ``sum`` , + or a percentile of the form ``pc`` such as ``pc95``. Defaults to ``cardinality``. + :type aggregation: str + + :param metric: Metric to aggregate on. Use a facet path such as ``@view.time_spent`` , or one of the + journey metrics ``__dd.conversion`` , ``__dd.conversion_rate`` , ``__dd.time_to_convert`` , + or ``__dd.dropoff_rate``. Defaults to ``__dd.conversion``. + :type metric: str, optional + + :param target: A reference to a step, or a range of steps, in the journey. + Use a ``node`` target to name a single step, or a ``path`` target to name the range + between two steps. + :type target: ProductAnalyticsJourneyTarget, optional + """ + if metric is not unset: + kwargs["metric"] = metric + if target is not unset: + kwargs["target"] = target + super().__init__(kwargs) + + self_.aggregation = aggregation diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_query.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_query.py new file mode 100644 index 0000000000..79c9ed7f57 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_query.py @@ -0,0 +1,77 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_scalar_compute import ( + ProductAnalyticsJourneyScalarCompute, + ) + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + + +class ProductAnalyticsJourneyScalarQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_scalar_compute import ( + ProductAnalyticsJourneyScalarCompute, + ) + from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + + return { + "compute": (ProductAnalyticsJourneyScalarCompute,), + "group_by": ([ProductAnalyticsGraphQueryGroupBy],), + "query_id": (str,), + "search": (ProductAnalyticsJourneySearch,), + } + + attribute_map = { + "compute": "compute", + "group_by": "group_by", + "query_id": "query_id", + "search": "search", + } + + def __init__( + self_, + compute: ProductAnalyticsJourneyScalarCompute, + search: ProductAnalyticsJourneySearch, + group_by: Union[List[ProductAnalyticsGraphQueryGroupBy], UnsetType] = unset, + query_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Query definition for a journey scalar request. + + :param compute: Defines the metric computed over the journey for a scalar query. + :type compute: ProductAnalyticsJourneyScalarCompute + + :param group_by: Segments the results by the values of one or more facets. + :type group_by: [ProductAnalyticsGraphQueryGroupBy], optional + + :param query_id: Caller-defined identifier echoed back in the results. + :type query_id: str, optional + + :param search: Defines the steps of the journey and the filters applied to it. + :type search: ProductAnalyticsJourneySearch + """ + if group_by is not unset: + kwargs["group_by"] = group_by + if query_id is not unset: + kwargs["query_id"] = query_id + super().__init__(kwargs) + + self_.compute = compute + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request.py new file mode 100644 index 0000000000..bfca0ea0d0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_scalar_request_data import ( + ProductAnalyticsJourneyScalarRequestData, + ) + + +class ProductAnalyticsJourneyScalarRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_scalar_request_data import ( + ProductAnalyticsJourneyScalarRequestData, + ) + + return { + "data": (ProductAnalyticsJourneyScalarRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyScalarRequestData, **kwargs): + """ + Request body for a journey scalar query. + + :param data: The single JSON:API resource carrying a journey scalar query. Its attributes hold the time + window and the journey metric to reduce to one value over that window. + :type data: ProductAnalyticsJourneyScalarRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request_attributes.py new file mode 100644 index 0000000000..db18040cbc --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request_attributes.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_scalar_query import ProductAnalyticsJourneyScalarQuery + + +class ProductAnalyticsJourneyScalarRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_scalar_query import ( + ProductAnalyticsJourneyScalarQuery, + ) + + return { + "_from": (int,), + "query": (ProductAnalyticsJourneyScalarQuery,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__(self_, _from: int, query: ProductAnalyticsJourneyScalarQuery, to: int, **kwargs): + """ + Attributes of a journey scalar request. + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param query: Query definition for a journey scalar request. + :type query: ProductAnalyticsJourneyScalarQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request_data.py new file mode 100644 index 0000000000..c9e9ff882d --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_request_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_scalar_request_attributes import ( + ProductAnalyticsJourneyScalarRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_formula_journey_request_type import ( + ProductAnalyticsFormulaJourneyRequestType, + ) + + +class ProductAnalyticsJourneyScalarRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_scalar_request_attributes import ( + ProductAnalyticsJourneyScalarRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_formula_journey_request_type import ( + ProductAnalyticsFormulaJourneyRequestType, + ) + + return { + "attributes": (ProductAnalyticsJourneyScalarRequestAttributes,), + "type": (ProductAnalyticsFormulaJourneyRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsJourneyScalarRequestAttributes, + type: ProductAnalyticsFormulaJourneyRequestType, + **kwargs, + ): + """ + The single JSON:API resource carrying a journey scalar query. Its attributes hold the time + window and the journey metric to reduce to one value over that window. + + :param attributes: Attributes of a journey scalar request. + :type attributes: ProductAnalyticsJourneyScalarRequestAttributes + + :param type: The resource type identifier for a journey timeseries or scalar request. + :type type: ProductAnalyticsFormulaJourneyRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response.py new file mode 100644 index 0000000000..0188c127ae --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_scalar_response_data import ( + ProductAnalyticsJourneyScalarResponseData, + ) + + +class ProductAnalyticsJourneyScalarResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_scalar_response_data import ( + ProductAnalyticsJourneyScalarResponseData, + ) + + return { + "data": (ProductAnalyticsJourneyScalarResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyScalarResponseData, **kwargs): + """ + Response for a journey scalar query. + + :param data: The single JSON:API resource holding journey scalar results. Its attributes contain one value + per group, suitable for a query value or top list widget. + :type data: ProductAnalyticsJourneyScalarResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response_data.py new file mode 100644 index 0000000000..d04822e894 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response_data.py @@ -0,0 +1,69 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_scalar_response_attributes import ( + ProductAnalyticsScalarResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_scalar_response_type import ( + ProductAnalyticsJourneyScalarResponseType, + ) + + +class ProductAnalyticsJourneyScalarResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_scalar_response_attributes import ( + ProductAnalyticsScalarResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_scalar_response_type import ( + ProductAnalyticsJourneyScalarResponseType, + ) + + return { + "attributes": (ProductAnalyticsScalarResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsJourneyScalarResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsScalarResponseAttributes, + id: str, + type: ProductAnalyticsJourneyScalarResponseType, + **kwargs, + ): + """ + The single JSON:API resource holding journey scalar results. Its attributes contain one value + per group, suitable for a query value or top list widget. + + :param attributes: Attributes of a scalar analytics response, containing the result columns. + :type attributes: ProductAnalyticsScalarResponseAttributes + + :param id: Identifier of this result. + :type id: str + + :param type: The resource type identifier for a journey scalar response. + :type type: ProductAnalyticsJourneyScalarResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response_type.py new file mode 100644 index 0000000000..e42abedb97 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_scalar_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyScalarResponseType(ModelSimple): + """ + The resource type identifier for a journey scalar response. + + :param value: If omitted defaults to "journey_scalar_response". Must be one of ["journey_scalar_response"]. + :type value: str + """ + + allowed_values = { + "journey_scalar_response", + } + JOURNEY_SCALAR_RESPONSE: ClassVar["ProductAnalyticsJourneyScalarResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyScalarResponseType.JOURNEY_SCALAR_RESPONSE = ProductAnalyticsJourneyScalarResponseType( + "journey_scalar_response" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_search.py b/src/datadog_api_client/v2/model/product_analytics_journey_search.py new file mode 100644 index 0000000000..70eb060aee --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_search.py @@ -0,0 +1,82 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Dict, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_search_filters import ( + ProductAnalyticsJourneySearchFilters, + ) + from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery + from datadog_api_client.v2.model.product_analytics_occurrence_query import ProductAnalyticsOccurrenceQuery + + +class ProductAnalyticsJourneySearch(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_search_filters import ( + ProductAnalyticsJourneySearchFilters, + ) + from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + + return { + "expression": (str,), + "filters": (ProductAnalyticsJourneySearchFilters,), + "join_keys": (ProductAnalyticsJoinKeys,), + "node_objects": ({str: (ProductAnalyticsBaseQuery,)},), + } + + attribute_map = { + "expression": "expression", + "filters": "filters", + "join_keys": "join_keys", + "node_objects": "node_objects", + } + + def __init__( + self_, + expression: str, + node_objects: Dict[ + str, Union[ProductAnalyticsBaseQuery, ProductAnalyticsEventQuery, ProductAnalyticsOccurrenceQuery] + ], + filters: Union[ProductAnalyticsJourneySearchFilters, UnsetType] = unset, + join_keys: Union[ProductAnalyticsJoinKeys, UnsetType] = unset, + **kwargs, + ): + """ + Defines the steps of the journey and the filters applied to it. + + :param expression: Expression combining the node aliases in order, for example ``A -> B -> C``. + :type expression: str + + :param filters: Filters applied on top of the journey step expression. + :type filters: ProductAnalyticsJourneySearchFilters, optional + + :param join_keys: Identity join keys used to stitch events belonging to the same user or session. + :type join_keys: ProductAnalyticsJoinKeys, optional + + :param node_objects: Map of node alias to the query matching that step of the journey. + Every alias used in ``expression`` must have an entry here. + :type node_objects: {str: (ProductAnalyticsBaseQuery,)} + """ + if filters is not unset: + kwargs["filters"] = filters + if join_keys is not unset: + kwargs["join_keys"] = join_keys + super().__init__(kwargs) + + self_.expression = expression + self_.node_objects = node_objects diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_search_filters.py b/src/datadog_api_client/v2/model/product_analytics_journey_search_filters.py new file mode 100644 index 0000000000..8253286164 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_search_filters.py @@ -0,0 +1,73 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, + ) + from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, + ) + + +class ProductAnalyticsJourneySearchFilters(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, + ) + from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, + ) + + return { + "audience_filters": (ProductAnalyticsJourneyAudienceFilters,), + "graph_filters": ([ProductAnalyticsJourneySearchGraphFilter],), + "string_filter": (str,), + } + + attribute_map = { + "audience_filters": "audience_filters", + "graph_filters": "graph_filters", + "string_filter": "string_filter", + } + + def __init__( + self_, + audience_filters: Union[ProductAnalyticsJourneyAudienceFilters, UnsetType] = unset, + graph_filters: Union[List[ProductAnalyticsJourneySearchGraphFilter], UnsetType] = unset, + string_filter: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Filters applied on top of the journey step expression. + + :param audience_filters: Restricts the journey to an audience built from named sub-queries. + Sub-query names must be unique across ``users`` , ``segments`` , and ``accounts``. + :type audience_filters: ProductAnalyticsJourneyAudienceFilters, optional + + :param graph_filters: Filters on journey-level metrics such as time to convert. + :type graph_filters: [ProductAnalyticsJourneySearchGraphFilter], optional + + :param string_filter: Free-text search query applied to the whole journey. + :type string_filter: str, optional + """ + if audience_filters is not unset: + kwargs["audience_filters"] = audience_filters + if graph_filters is not unset: + kwargs["graph_filters"] = graph_filters + if string_filter is not unset: + kwargs["string_filter"] = string_filter + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter.py b/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter.py new file mode 100644 index 0000000000..5ce3edb241 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter.py @@ -0,0 +1,89 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, + ) + from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, + ) + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + from datadog_api_client.v2.model.product_analytics_journey_path_target import ProductAnalyticsJourneyPathTarget + + +class ProductAnalyticsJourneySearchGraphFilter(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, + ) + from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, + ) + from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget + + return { + "name": (ProductAnalyticsJourneySearchGraphFilterName,), + "operator": (ProductAnalyticsJourneySearchGraphFilterOperator,), + "target": (ProductAnalyticsJourneyTarget,), + "value": (int,), + } + + attribute_map = { + "name": "name", + "operator": "operator", + "target": "target", + "value": "value", + } + + def __init__( + self_, + name: ProductAnalyticsJourneySearchGraphFilterName, + operator: ProductAnalyticsJourneySearchGraphFilterOperator, + value: int, + target: Union[ + ProductAnalyticsJourneyTarget, + ProductAnalyticsJourneyNodeTarget, + ProductAnalyticsJourneyPathTarget, + UnsetType, + ] = unset, + **kwargs, + ): + """ + A filter applied to a step, or a range of steps, of the journey graph. + + :param name: The journey-level metric the graph filter applies to. + :type name: ProductAnalyticsJourneySearchGraphFilterName + + :param operator: Comparison operator applied to the graph filter value. + :type operator: ProductAnalyticsJourneySearchGraphFilterOperator + + :param target: A reference to a step, or a range of steps, in the journey. + Use a ``node`` target to name a single step, or a ``path`` target to name the range + between two steps. + :type target: ProductAnalyticsJourneyTarget, optional + + :param value: Value compared against the metric. Durations are expressed in milliseconds. + :type value: int + """ + if target is not unset: + kwargs["target"] = target + super().__init__(kwargs) + + self_.name = name + self_.operator = operator + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter_name.py b/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter_name.py new file mode 100644 index 0000000000..908ff88cf2 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter_name.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneySearchGraphFilterName(ModelSimple): + """ + The journey-level metric the graph filter applies to. + + :param value: Must be one of ["__dd.time_to_convert", "__dd.session", "__dd.dropoff_rate"]. + :type value: str + """ + + allowed_values = { + "__dd.time_to_convert", + "__dd.session", + "__dd.dropoff_rate", + } + TIME_TO_CONVERT: ClassVar["ProductAnalyticsJourneySearchGraphFilterName"] + SESSION: ClassVar["ProductAnalyticsJourneySearchGraphFilterName"] + DROPOFF_RATE: ClassVar["ProductAnalyticsJourneySearchGraphFilterName"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneySearchGraphFilterName.TIME_TO_CONVERT = ProductAnalyticsJourneySearchGraphFilterName( + "__dd.time_to_convert" +) +ProductAnalyticsJourneySearchGraphFilterName.SESSION = ProductAnalyticsJourneySearchGraphFilterName("__dd.session") +ProductAnalyticsJourneySearchGraphFilterName.DROPOFF_RATE = ProductAnalyticsJourneySearchGraphFilterName( + "__dd.dropoff_rate" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter_operator.py b/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter_operator.py new file mode 100644 index 0000000000..22b5c7e7dd --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_search_graph_filter_operator.py @@ -0,0 +1,51 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneySearchGraphFilterOperator(ModelSimple): + """ + Comparison operator applied to the graph filter value. + + :param value: Must be one of ["=", "<", ">", "<=", ">="]. + :type value: str + """ + + allowed_values = { + "=", + "<", + ">", + "<=", + ">=", + } + EQUAL: ClassVar["ProductAnalyticsJourneySearchGraphFilterOperator"] + LESS_THAN: ClassVar["ProductAnalyticsJourneySearchGraphFilterOperator"] + GREATER_THAN: ClassVar["ProductAnalyticsJourneySearchGraphFilterOperator"] + LESS_THAN_OR_EQUAL: ClassVar["ProductAnalyticsJourneySearchGraphFilterOperator"] + GREATER_THAN_OR_EQUAL: ClassVar["ProductAnalyticsJourneySearchGraphFilterOperator"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneySearchGraphFilterOperator.EQUAL = ProductAnalyticsJourneySearchGraphFilterOperator("=") +ProductAnalyticsJourneySearchGraphFilterOperator.LESS_THAN = ProductAnalyticsJourneySearchGraphFilterOperator("<") +ProductAnalyticsJourneySearchGraphFilterOperator.GREATER_THAN = ProductAnalyticsJourneySearchGraphFilterOperator(">") +ProductAnalyticsJourneySearchGraphFilterOperator.LESS_THAN_OR_EQUAL = ProductAnalyticsJourneySearchGraphFilterOperator( + "<=" +) +ProductAnalyticsJourneySearchGraphFilterOperator.GREATER_THAN_OR_EQUAL = ( + ProductAnalyticsJourneySearchGraphFilterOperator(">=") +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_target.py b/src/datadog_api_client/v2/model/product_analytics_journey_target.py new file mode 100644 index 0000000000..d89a7544fa --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_target.py @@ -0,0 +1,51 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class ProductAnalyticsJourneyTarget(ModelComposed): + def __init__(self, **kwargs): + """ + A reference to a step, or a range of steps, in the journey. + Use a ``node`` target to name a single step, or a ``path`` target to name the range + between two steps. + + :param type: The discriminator identifying a target that references a single step. + :type type: ProductAnalyticsJourneyNodeTargetType + + :param value: Alias of the targeted node. + :type value: str + + :param end: Alias of the node the path ends at. + :type end: str + + :param start: Alias of the node the path starts at. + :type start: str + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + from datadog_api_client.v2.model.product_analytics_journey_path_target import ProductAnalyticsJourneyPathTarget + + return { + "oneOf": [ + ProductAnalyticsJourneyNodeTarget, + ProductAnalyticsJourneyPathTarget, + ], + } diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response.py b/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response.py new file mode 100644 index 0000000000..9a2c8dfedf --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_timeseries_response_data import ( + ProductAnalyticsJourneyTimeseriesResponseData, + ) + + +class ProductAnalyticsJourneyTimeseriesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_timeseries_response_data import ( + ProductAnalyticsJourneyTimeseriesResponseData, + ) + + return { + "data": (ProductAnalyticsJourneyTimeseriesResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyTimeseriesResponseData, **kwargs): + """ + Response for a journey timeseries query. + + :param data: The single JSON:API resource holding journey timeseries results. Its attributes contain one + series per group along with the timestamps the points fall on. + :type data: ProductAnalyticsJourneyTimeseriesResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response_data.py new file mode 100644 index 0000000000..19f8438c8f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response_data.py @@ -0,0 +1,70 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_timeseries_response_attributes import ( + ProductAnalyticsTimeseriesResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_timeseries_response_type import ( + ProductAnalyticsJourneyTimeseriesResponseType, + ) + + +class ProductAnalyticsJourneyTimeseriesResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_timeseries_response_attributes import ( + ProductAnalyticsTimeseriesResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_timeseries_response_type import ( + ProductAnalyticsJourneyTimeseriesResponseType, + ) + + return { + "attributes": (ProductAnalyticsTimeseriesResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsJourneyTimeseriesResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsTimeseriesResponseAttributes, + id: str, + type: ProductAnalyticsJourneyTimeseriesResponseType, + **kwargs, + ): + """ + The single JSON:API resource holding journey timeseries results. Its attributes contain one + series per group along with the timestamps the points fall on. + + :param attributes: Attributes of a timeseries analytics response, containing series data, timestamps, and + interval definitions. + :type attributes: ProductAnalyticsTimeseriesResponseAttributes + + :param id: Identifier of this result. + :type id: str + + :param type: The resource type identifier for a journey timeseries response. + :type type: ProductAnalyticsJourneyTimeseriesResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response_type.py new file mode 100644 index 0000000000..fb35861446 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_timeseries_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyTimeseriesResponseType(ModelSimple): + """ + The resource type identifier for a journey timeseries response. + + :param value: If omitted defaults to "journey_timeseries_response". Must be one of ["journey_timeseries_response"]. + :type value: str + """ + + allowed_values = { + "journey_timeseries_response", + } + JOURNEY_TIMESERIES_RESPONSE: ClassVar["ProductAnalyticsJourneyTimeseriesResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyTimeseriesResponseType.JOURNEY_TIMESERIES_RESPONSE = ( + ProductAnalyticsJourneyTimeseriesResponseType("journey_timeseries_response") +) diff --git a/src/datadog_api_client/v2/model/product_analytics_response_meta.py b/src/datadog_api_client/v2/model/product_analytics_response_meta.py index 8e246e028d..34ef1acf33 100644 --- a/src/datadog_api_client/v2/model/product_analytics_response_meta.py +++ b/src/datadog_api_client/v2/model/product_analytics_response_meta.py @@ -43,7 +43,7 @@ def __init__( """ Metadata for a Product Analytics query response. - :param request_id: Unique identifier for the request, used for multi-step query continuation. + :param request_id: Unique identifier of the query. :type request_id: str, optional :param status: The execution status of a Product Analytics query. diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_aggregation_target.py b/src/datadog_api_client/v2/model/product_analytics_retention_aggregation_target.py new file mode 100644 index 0000000000..3e305ff78e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_aggregation_target.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_aggregation_target_type import ( + ProductAnalyticsRetentionAggregationTargetType, + ) + + +class ProductAnalyticsRetentionAggregationTarget(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_aggregation_target_type import ( + ProductAnalyticsRetentionAggregationTargetType, + ) + + return { + "type": (ProductAnalyticsRetentionAggregationTargetType,), + "value": (str,), + } + + attribute_map = { + "type": "type", + "value": "value", + } + + def __init__(self_, type: ProductAnalyticsRetentionAggregationTargetType, value: str, **kwargs): + """ + Selects the rolled-up row that aggregates every cohort, rather than a single cohort. + + :param type: The discriminator identifying a target selected by aggregation. + :type type: ProductAnalyticsRetentionAggregationTargetType + + :param value: The aggregation that produced the rolled-up row. + :type value: str + """ + super().__init__(kwargs) + + self_.type = type + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_aggregation_target_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_aggregation_target_type.py new file mode 100644 index 0000000000..c266baccad --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_aggregation_target_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionAggregationTargetType(ModelSimple): + """ + The discriminator identifying a target selected by aggregation. + + :param value: If omitted defaults to "aggregation". Must be one of ["aggregation"]. + :type value: str + """ + + allowed_values = { + "aggregation", + } + AGGREGATION: ClassVar["ProductAnalyticsRetentionAggregationTargetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionAggregationTargetType.AGGREGATION = ProductAnalyticsRetentionAggregationTargetType( + "aggregation" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_calendar_time_interval.py b/src/datadog_api_client/v2/model/product_analytics_retention_calendar_time_interval.py new file mode 100644 index 0000000000..a4c3ab663f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_calendar_time_interval.py @@ -0,0 +1,57 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type import ( + ProductAnalyticsRetentionCalendarTimeIntervalType, + ) + from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval + + +class ProductAnalyticsRetentionCalendarTimeInterval(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type import ( + ProductAnalyticsRetentionCalendarTimeIntervalType, + ) + from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval + + return { + "type": (ProductAnalyticsRetentionCalendarTimeIntervalType,), + "value": (ProductAnalyticsCalendarInterval,), + } + + attribute_map = { + "type": "type", + "value": "value", + } + + def __init__( + self_, + type: ProductAnalyticsRetentionCalendarTimeIntervalType, + value: ProductAnalyticsCalendarInterval, + **kwargs, + ): + """ + A retention interval aligned to calendar boundaries. + + :param type: The discriminator identifying a calendar-aligned retention interval. + :type type: ProductAnalyticsRetentionCalendarTimeIntervalType + + :param value: A calendar-aligned bucket definition, such as "every 1 week starting on Monday". + :type value: ProductAnalyticsCalendarInterval + """ + super().__init__(kwargs) + + self_.type = type + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_calendar_time_interval_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_calendar_time_interval_type.py new file mode 100644 index 0000000000..a2dcd11f8e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_calendar_time_interval_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionCalendarTimeIntervalType(ModelSimple): + """ + The discriminator identifying a calendar-aligned retention interval. + + :param value: If omitted defaults to "calendar". Must be one of ["calendar"]. + :type value: str + """ + + allowed_values = { + "calendar", + } + CALENDAR: ClassVar["ProductAnalyticsRetentionCalendarTimeIntervalType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionCalendarTimeIntervalType.CALENDAR = ProductAnalyticsRetentionCalendarTimeIntervalType( + "calendar" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_cell_scope.py b/src/datadog_api_client/v2/model/product_analytics_retention_cell_scope.py new file mode 100644 index 0000000000..1aa94e1966 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_cell_scope.py @@ -0,0 +1,84 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_cohort_target import ( + ProductAnalyticsRetentionCohortTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_index_target import ( + ProductAnalyticsRetentionIndexTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_cell_scope_type import ( + ProductAnalyticsRetentionCellScopeType, + ) + from datadog_api_client.v2.model.product_analytics_retention_index_target import ( + ProductAnalyticsRetentionIndexTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_aggregation_target import ( + ProductAnalyticsRetentionAggregationTarget, + ) + + +class ProductAnalyticsRetentionCellScope(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_cohort_target import ( + ProductAnalyticsRetentionCohortTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_index_target import ( + ProductAnalyticsRetentionIndexTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_cell_scope_type import ( + ProductAnalyticsRetentionCellScopeType, + ) + + return { + "cohort_target": (ProductAnalyticsRetentionCohortTarget,), + "return_period_target": (ProductAnalyticsRetentionIndexTarget,), + "type": (ProductAnalyticsRetentionCellScopeType,), + } + + attribute_map = { + "cohort_target": "cohort_target", + "return_period_target": "return_period_target", + "type": "type", + } + + def __init__( + self_, + cohort_target: Union[ + ProductAnalyticsRetentionCohortTarget, + ProductAnalyticsRetentionIndexTarget, + ProductAnalyticsRetentionAggregationTarget, + ], + return_period_target: ProductAnalyticsRetentionIndexTarget, + type: ProductAnalyticsRetentionCellScopeType, + **kwargs, + ): + """ + Narrows a retention query to a single cell, at the intersection of one cohort and one return period. + + :param cohort_target: Selects a cohort, either by index or by the aggregation that rolls all cohorts together. + :type cohort_target: ProductAnalyticsRetentionCohortTarget + + :param return_period_target: Selects a cohort or return period by its zero-based position in the grid. + :type return_period_target: ProductAnalyticsRetentionIndexTarget + + :param type: The discriminator identifying a scope narrowed to one grid cell. + :type type: ProductAnalyticsRetentionCellScopeType + """ + super().__init__(kwargs) + + self_.cohort_target = cohort_target + self_.return_period_target = return_period_target + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_cell_scope_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_cell_scope_type.py new file mode 100644 index 0000000000..2228bca12c --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_cell_scope_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionCellScopeType(ModelSimple): + """ + The discriminator identifying a scope narrowed to one grid cell. + + :param value: If omitted defaults to "cell". Must be one of ["cell"]. + :type value: str + """ + + allowed_values = { + "cell", + } + CELL: ClassVar["ProductAnalyticsRetentionCellScopeType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionCellScopeType.CELL = ProductAnalyticsRetentionCellScopeType("cell") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_cohort_criteria.py b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_criteria.py new file mode 100644 index 0000000000..166740cc18 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_criteria.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + from datadog_api_client.v2.model.product_analytics_retention_time_interval import ( + ProductAnalyticsRetentionTimeInterval, + ) + from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery + from datadog_api_client.v2.model.product_analytics_occurrence_query import ProductAnalyticsOccurrenceQuery + from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, + ) + from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval import ( + ProductAnalyticsRetentionFixedTimeInterval, + ) + + +class ProductAnalyticsRetentionCohortCriteria(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + from datadog_api_client.v2.model.product_analytics_retention_time_interval import ( + ProductAnalyticsRetentionTimeInterval, + ) + + return { + "base_query": (ProductAnalyticsBaseQuery,), + "time_interval": (ProductAnalyticsRetentionTimeInterval,), + } + + attribute_map = { + "base_query": "base_query", + "time_interval": "time_interval", + } + + def __init__( + self_, + base_query: Union[ProductAnalyticsBaseQuery, ProductAnalyticsEventQuery, ProductAnalyticsOccurrenceQuery], + time_interval: Union[ + ProductAnalyticsRetentionTimeInterval, + ProductAnalyticsRetentionCalendarTimeInterval, + ProductAnalyticsRetentionFixedTimeInterval, + ], + **kwargs, + ): + """ + Defines the event that places an entity into a cohort, and how cohorts are bucketed over time. + + :param base_query: A query definition discriminated by the ``data_source`` field. + Use ``product_analytics`` for standard event queries, or + ``product_analytics_occurrence`` for occurrence-filtered queries. + :type base_query: ProductAnalyticsBaseQuery + + :param time_interval: A retention interval, either aligned to calendar boundaries or of a fixed length. + Cohort criteria use calendar intervals; return criteria use fixed intervals. + :type time_interval: ProductAnalyticsRetentionTimeInterval + """ + super().__init__(kwargs) + + self_.base_query = base_query + self_.time_interval = time_interval diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_cohort_scope.py b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_scope.py new file mode 100644 index 0000000000..36644a7678 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_scope.py @@ -0,0 +1,71 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_cohort_target import ( + ProductAnalyticsRetentionCohortTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_cohort_scope_type import ( + ProductAnalyticsRetentionCohortScopeType, + ) + from datadog_api_client.v2.model.product_analytics_retention_index_target import ( + ProductAnalyticsRetentionIndexTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_aggregation_target import ( + ProductAnalyticsRetentionAggregationTarget, + ) + + +class ProductAnalyticsRetentionCohortScope(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_cohort_target import ( + ProductAnalyticsRetentionCohortTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_cohort_scope_type import ( + ProductAnalyticsRetentionCohortScopeType, + ) + + return { + "target": (ProductAnalyticsRetentionCohortTarget,), + "type": (ProductAnalyticsRetentionCohortScopeType,), + } + + attribute_map = { + "target": "target", + "type": "type", + } + + def __init__( + self_, + target: Union[ + ProductAnalyticsRetentionCohortTarget, + ProductAnalyticsRetentionIndexTarget, + ProductAnalyticsRetentionAggregationTarget, + ], + type: ProductAnalyticsRetentionCohortScopeType, + **kwargs, + ): + """ + Narrows a retention query to a single cohort row. + + :param target: Selects a cohort, either by index or by the aggregation that rolls all cohorts together. + :type target: ProductAnalyticsRetentionCohortTarget + + :param type: The discriminator identifying a scope narrowed to one cohort. + :type type: ProductAnalyticsRetentionCohortScopeType + """ + super().__init__(kwargs) + + self_.target = target + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_cohort_scope_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_scope_type.py new file mode 100644 index 0000000000..4dbca4de3f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_scope_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionCohortScopeType(ModelSimple): + """ + The discriminator identifying a scope narrowed to one cohort. + + :param value: If omitted defaults to "cohort". Must be one of ["cohort"]. + :type value: str + """ + + allowed_values = { + "cohort", + } + COHORT: ClassVar["ProductAnalyticsRetentionCohortScopeType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionCohortScopeType.COHORT = ProductAnalyticsRetentionCohortScopeType("cohort") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_cohort_target.py b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_target.py new file mode 100644 index 0000000000..3968c1f24a --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_cohort_target.py @@ -0,0 +1,47 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class ProductAnalyticsRetentionCohortTarget(ModelComposed): + def __init__(self, **kwargs): + """ + Selects a cohort, either by index or by the aggregation that rolls all cohorts together. + + :param type: The discriminator identifying a target selected by index. + :type type: ProductAnalyticsRetentionIndexTargetType + + :param value: Zero-based index of the targeted cohort or return period. + :type value: int + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.product_analytics_retention_index_target import ( + ProductAnalyticsRetentionIndexTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_aggregation_target import ( + ProductAnalyticsRetentionAggregationTarget, + ) + + return { + "oneOf": [ + ProductAnalyticsRetentionIndexTarget, + ProductAnalyticsRetentionAggregationTarget, + ], + } diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_compute.py b/src/datadog_api_client/v2/model/product_analytics_retention_compute.py new file mode 100644 index 0000000000..0766496d4b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_compute.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_compute_metric import ( + ProductAnalyticsRetentionComputeMetric, + ) + + +class ProductAnalyticsRetentionCompute(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_compute_metric import ( + ProductAnalyticsRetentionComputeMetric, + ) + + return { + "aggregation": (str,), + "metric": (ProductAnalyticsRetentionComputeMetric,), + } + + attribute_map = { + "aggregation": "aggregation", + "metric": "metric", + } + + def __init__(self_, aggregation: str, metric: ProductAnalyticsRetentionComputeMetric, **kwargs): + """ + The metric and aggregation applied to a retention query. + + :param aggregation: The aggregation function applied to the metric, such as ``count`` or ``avg``. + :type aggregation: str + + :param metric: The retention metric to compute, either an absolute count or a rate. + :type metric: ProductAnalyticsRetentionComputeMetric + """ + super().__init__(kwargs) + + self_.aggregation = aggregation + self_.metric = metric diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_compute_metric.py b/src/datadog_api_client/v2/model/product_analytics_retention_compute_metric.py new file mode 100644 index 0000000000..bb55c409ba --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_compute_metric.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionComputeMetric(ModelSimple): + """ + The retention metric to compute, either an absolute count or a rate. + + :param value: Must be one of ["__dd.retention", "__dd.retention_rate"]. + :type value: str + """ + + allowed_values = { + "__dd.retention", + "__dd.retention_rate", + } + RETENTION: ClassVar["ProductAnalyticsRetentionComputeMetric"] + RETENTION_RATE: ClassVar["ProductAnalyticsRetentionComputeMetric"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionComputeMetric.RETENTION = ProductAnalyticsRetentionComputeMetric("__dd.retention") +ProductAnalyticsRetentionComputeMetric.RETENTION_RATE = ProductAnalyticsRetentionComputeMetric("__dd.retention_rate") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_entity.py b/src/datadog_api_client/v2/model/product_analytics_retention_entity.py new file mode 100644 index 0000000000..e6eba383b4 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_entity.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionEntity(ModelSimple): + """ + The entity whose retention is measured. + + :param value: Must be one of ["@usr.id", "@account.id"]. + :type value: str + """ + + allowed_values = { + "@usr.id", + "@account.id", + } + USER_ID: ClassVar["ProductAnalyticsRetentionEntity"] + ACCOUNT_ID: ClassVar["ProductAnalyticsRetentionEntity"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionEntity.USER_ID = ProductAnalyticsRetentionEntity("@usr.id") +ProductAnalyticsRetentionEntity.ACCOUNT_ID = ProductAnalyticsRetentionEntity("@account.id") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_filters.py b/src/datadog_api_client/v2/model/product_analytics_retention_filters.py new file mode 100644 index 0000000000..1eeb002aee --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_filters.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters + + +class ProductAnalyticsRetentionFilters(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters + + return { + "audience_filters": (ProductAnalyticsAudienceFilters,), + "string_filter": (str,), + } + + attribute_map = { + "audience_filters": "audience_filters", + "string_filter": "string_filter", + } + + def __init__( + self_, + audience_filters: Union[ProductAnalyticsAudienceFilters, UnsetType] = unset, + string_filter: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Filters narrowing the events considered by a retention query. + + :param audience_filters: Audience filter definitions for targeting specific user segments. + :type audience_filters: ProductAnalyticsAudienceFilters, optional + + :param string_filter: Free-text search query applied to the events. + :type string_filter: str, optional + """ + if audience_filters is not unset: + kwargs["audience_filters"] = audience_filters + if string_filter is not unset: + kwargs["string_filter"] = string_filter + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval.py b/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval.py new file mode 100644 index 0000000000..96ac128fee --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval.py @@ -0,0 +1,74 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_type import ( + ProductAnalyticsRetentionFixedTimeIntervalType, + ) + from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_unit import ( + ProductAnalyticsRetentionFixedTimeIntervalUnit, + ) + + +class ProductAnalyticsRetentionFixedTimeInterval(ModelNormal): + validations = { + "value": { + "exclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_type import ( + ProductAnalyticsRetentionFixedTimeIntervalType, + ) + from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_unit import ( + ProductAnalyticsRetentionFixedTimeIntervalUnit, + ) + + return { + "type": (ProductAnalyticsRetentionFixedTimeIntervalType,), + "unit": (ProductAnalyticsRetentionFixedTimeIntervalUnit,), + "value": (float,), + } + + attribute_map = { + "type": "type", + "unit": "unit", + "value": "value", + } + + def __init__( + self_, + type: ProductAnalyticsRetentionFixedTimeIntervalType, + unit: ProductAnalyticsRetentionFixedTimeIntervalUnit, + value: float, + **kwargs, + ): + """ + A retention interval of fixed length, such as "7 days". + + :param type: The discriminator identifying a fixed-length retention interval. + :type type: ProductAnalyticsRetentionFixedTimeIntervalType + + :param unit: Time unit for a fixed-length retention interval. + :type unit: ProductAnalyticsRetentionFixedTimeIntervalUnit + + :param value: Length of the interval, expressed in ``unit``. + :type value: float + """ + super().__init__(kwargs) + + self_.type = type + self_.unit = unit + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval_type.py new file mode 100644 index 0000000000..d68e2c51e5 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionFixedTimeIntervalType(ModelSimple): + """ + The discriminator identifying a fixed-length retention interval. + + :param value: If omitted defaults to "fixed". Must be one of ["fixed"]. + :type value: str + """ + + allowed_values = { + "fixed", + } + FIXED: ClassVar["ProductAnalyticsRetentionFixedTimeIntervalType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionFixedTimeIntervalType.FIXED = ProductAnalyticsRetentionFixedTimeIntervalType("fixed") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval_unit.py b/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval_unit.py new file mode 100644 index 0000000000..8c4f7e75d0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_fixed_time_interval_unit.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionFixedTimeIntervalUnit(ModelSimple): + """ + Time unit for a fixed-length retention interval. + + :param value: Must be one of ["day", "week", "month"]. + :type value: str + """ + + allowed_values = { + "day", + "week", + "month", + } + DAY: ClassVar["ProductAnalyticsRetentionFixedTimeIntervalUnit"] + WEEK: ClassVar["ProductAnalyticsRetentionFixedTimeIntervalUnit"] + MONTH: ClassVar["ProductAnalyticsRetentionFixedTimeIntervalUnit"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionFixedTimeIntervalUnit.DAY = ProductAnalyticsRetentionFixedTimeIntervalUnit("day") +ProductAnalyticsRetentionFixedTimeIntervalUnit.WEEK = ProductAnalyticsRetentionFixedTimeIntervalUnit("week") +ProductAnalyticsRetentionFixedTimeIntervalUnit.MONTH = ProductAnalyticsRetentionFixedTimeIntervalUnit("month") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort.py new file mode 100644 index 0000000000..453a3d8aac --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort.py @@ -0,0 +1,122 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_cell import ( + ProductAnalyticsRetentionGridCohortCell, + ) + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_type import ( + ProductAnalyticsRetentionGridCohortType, + ) + from datadog_api_client.v2.model.product_analytics_unit import ProductAnalyticsUnit + + +class ProductAnalyticsRetentionGridCohort(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_cell import ( + ProductAnalyticsRetentionGridCohortCell, + ) + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_type import ( + ProductAnalyticsRetentionGridCohortType, + ) + from datadog_api_client.v2.model.product_analytics_unit import ProductAnalyticsUnit + + return { + "cells": ([ProductAnalyticsRetentionGridCohortCell],), + "cohort_end_time": (int,), + "cohort_index": (int,), + "cohort_size": (int,), + "cohort_start_time": (int,), + "group_tags": ([str],), + "name": (str,), + "type": (ProductAnalyticsRetentionGridCohortType,), + "unit": ([ProductAnalyticsUnit],), + } + + attribute_map = { + "cells": "cells", + "cohort_end_time": "cohort_end_time", + "cohort_index": "cohort_index", + "cohort_size": "cohort_size", + "cohort_start_time": "cohort_start_time", + "group_tags": "group_tags", + "name": "name", + "type": "type", + "unit": "unit", + } + + def __init__( + self_, + cells: Union[List[ProductAnalyticsRetentionGridCohortCell], UnsetType] = unset, + cohort_end_time: Union[int, UnsetType] = unset, + cohort_index: Union[int, UnsetType] = unset, + cohort_size: Union[int, UnsetType] = unset, + cohort_start_time: Union[int, UnsetType] = unset, + group_tags: Union[List[str], UnsetType] = unset, + name: Union[str, UnsetType] = unset, + type: Union[ProductAnalyticsRetentionGridCohortType, UnsetType] = unset, + unit: Union[List[ProductAnalyticsUnit], UnsetType] = unset, + **kwargs, + ): + """ + One row of the retention grid, holding the results for a single cohort. + + :param cells: The cells of the row, one per return period. + :type cells: [ProductAnalyticsRetentionGridCohortCell], optional + + :param cohort_end_time: End of the cohort window, in epoch milliseconds. + :type cohort_end_time: int, optional + + :param cohort_index: Zero-based index of the cohort in the grid. + :type cohort_index: int, optional + + :param cohort_size: Number of entities in the cohort. + :type cohort_size: int, optional + + :param cohort_start_time: Start of the cohort window, in epoch milliseconds. + :type cohort_start_time: int, optional + + :param group_tags: The group-by facet values that identify this row. + :type group_tags: [str], optional + + :param name: Label identifying the cohort, such as the week it started. + :type name: str, optional + + :param type: Whether the row holds one cohort's own numbers, or the weighted roll-up across every cohort. + :type type: ProductAnalyticsRetentionGridCohortType, optional + + :param unit: Unit definitions for the cell values. + :type unit: [ProductAnalyticsUnit], optional + """ + if cells is not unset: + kwargs["cells"] = cells + if cohort_end_time is not unset: + kwargs["cohort_end_time"] = cohort_end_time + if cohort_index is not unset: + kwargs["cohort_index"] = cohort_index + if cohort_size is not unset: + kwargs["cohort_size"] = cohort_size + if cohort_start_time is not unset: + kwargs["cohort_start_time"] = cohort_start_time + if group_tags is not unset: + kwargs["group_tags"] = group_tags + if name is not unset: + kwargs["name"] = name + if type is not unset: + kwargs["type"] = type + if unit is not unset: + kwargs["unit"] = unit + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort_cell.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort_cell.py new file mode 100644 index 0000000000..8d0e6dfa95 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort_cell.py @@ -0,0 +1,116 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_type import ( + ProductAnalyticsRetentionGridCohortType, + ) + + +class ProductAnalyticsRetentionGridCohortCell(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_type import ( + ProductAnalyticsRetentionGridCohortType, + ) + + return { + "cell_count": (int,), + "cell_rate": (float,), + "cell_relative_value_change": (float, none_type), + "cell_value": (float, none_type), + "is_partial_data": (bool,), + "return_period_end_time": (int,), + "return_period_index": (int,), + "return_period_start_time": (int,), + "type": (ProductAnalyticsRetentionGridCohortType,), + } + + attribute_map = { + "cell_count": "cell_count", + "cell_rate": "cell_rate", + "cell_relative_value_change": "cell_relative_value_change", + "cell_value": "cell_value", + "is_partial_data": "is_partial_data", + "return_period_end_time": "return_period_end_time", + "return_period_index": "return_period_index", + "return_period_start_time": "return_period_start_time", + "type": "type", + } + + def __init__( + self_, + cell_count: Union[int, UnsetType] = unset, + cell_rate: Union[float, UnsetType] = unset, + cell_relative_value_change: Union[float, none_type, UnsetType] = unset, + cell_value: Union[float, none_type, UnsetType] = unset, + is_partial_data: Union[bool, UnsetType] = unset, + return_period_end_time: Union[int, UnsetType] = unset, + return_period_index: Union[int, UnsetType] = unset, + return_period_start_time: Union[int, UnsetType] = unset, + type: Union[ProductAnalyticsRetentionGridCohortType, UnsetType] = unset, + **kwargs, + ): + """ + One cell of the retention grid, holding the result for a single cohort over a single return period. + Aggregated rows omit the time and count fields. + + :param cell_count: Number of entities that returned during the period. + :type cell_count: int, optional + + :param cell_rate: Fraction of the cohort that returned, between ``0`` and ``1``. + :type cell_rate: float, optional + + :param cell_relative_value_change: Change in the metric relative to the cohort baseline. + :type cell_relative_value_change: float, none_type, optional + + :param cell_value: Value of the computed metric, when a metric other than the retention rate is requested. + :type cell_value: float, none_type, optional + + :param is_partial_data: Whether the return period is still open, so the numbers are not yet final. + :type is_partial_data: bool, optional + + :param return_period_end_time: End of the return period, in epoch milliseconds. + :type return_period_end_time: int, optional + + :param return_period_index: Zero-based index of the return period this cell belongs to. + :type return_period_index: int, optional + + :param return_period_start_time: Start of the return period, in epoch milliseconds. + :type return_period_start_time: int, optional + + :param type: Whether the row holds one cohort's own numbers, or the weighted roll-up across every cohort. + :type type: ProductAnalyticsRetentionGridCohortType, optional + """ + if cell_count is not unset: + kwargs["cell_count"] = cell_count + if cell_rate is not unset: + kwargs["cell_rate"] = cell_rate + if cell_relative_value_change is not unset: + kwargs["cell_relative_value_change"] = cell_relative_value_change + if cell_value is not unset: + kwargs["cell_value"] = cell_value + if is_partial_data is not unset: + kwargs["is_partial_data"] = is_partial_data + if return_period_end_time is not unset: + kwargs["return_period_end_time"] = return_period_end_time + if return_period_index is not unset: + kwargs["return_period_index"] = return_period_index + if return_period_start_time is not unset: + kwargs["return_period_start_time"] = return_period_start_time + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort_type.py new file mode 100644 index 0000000000..eceac17fc0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_cohort_type.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionGridCohortType(ModelSimple): + """ + Whether the row holds one cohort's own numbers, or the weighted roll-up across every cohort. + + :param value: Must be one of ["raw", "aggregated"]. + :type value: str + """ + + allowed_values = { + "raw", + "aggregated", + } + RAW: ClassVar["ProductAnalyticsRetentionGridCohortType"] + AGGREGATED: ClassVar["ProductAnalyticsRetentionGridCohortType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionGridCohortType.RAW = ProductAnalyticsRetentionGridCohortType("raw") +ProductAnalyticsRetentionGridCohortType.AGGREGATED = ProductAnalyticsRetentionGridCohortType("aggregated") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_query.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_query.py new file mode 100644 index 0000000000..e534092c88 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_query.py @@ -0,0 +1,89 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_scope import ProductAnalyticsRetentionScope + from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute + from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy + from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch + from datadog_api_client.v2.model.product_analytics_retention_cohort_scope import ( + ProductAnalyticsRetentionCohortScope, + ) + from datadog_api_client.v2.model.product_analytics_retention_return_period_scope import ( + ProductAnalyticsRetentionReturnPeriodScope, + ) + from datadog_api_client.v2.model.product_analytics_retention_cell_scope import ProductAnalyticsRetentionCellScope + + +class ProductAnalyticsRetentionGridQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_scope import ProductAnalyticsRetentionScope + from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute + from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy + from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch + + return { + "computation_scope": (ProductAnalyticsRetentionScope,), + "compute": (ProductAnalyticsRetentionCompute,), + "group_by": ([ProductAnalyticsRetentionGroupBy],), + "search": (ProductAnalyticsRetentionSearch,), + } + + attribute_map = { + "computation_scope": "computation_scope", + "compute": "compute", + "group_by": "group_by", + "search": "search", + } + + def __init__( + self_, + compute: ProductAnalyticsRetentionCompute, + search: ProductAnalyticsRetentionSearch, + computation_scope: Union[ + ProductAnalyticsRetentionScope, + ProductAnalyticsRetentionCohortScope, + ProductAnalyticsRetentionReturnPeriodScope, + ProductAnalyticsRetentionCellScope, + UnsetType, + ] = unset, + group_by: Union[List[ProductAnalyticsRetentionGroupBy], UnsetType] = unset, + **kwargs, + ): + """ + Query definition for a retention grid or retention metadata request. + + :param computation_scope: Restricts a retention query to part of the grid, so that results can be examined in detail. + Omit it to compute the whole grid. + :type computation_scope: ProductAnalyticsRetentionScope, optional + + :param compute: The metric and aggregation applied to a retention query. + :type compute: ProductAnalyticsRetentionCompute + + :param group_by: Splits the results by the values of one or more facets. + :type group_by: [ProductAnalyticsRetentionGroupBy], optional + + :param search: Defines the cohort and return criteria that make up a retention query. + :type search: ProductAnalyticsRetentionSearch + """ + if computation_scope is not unset: + kwargs["computation_scope"] = computation_scope + if group_by is not unset: + kwargs["group_by"] = group_by + super().__init__(kwargs) + + self_.compute = compute + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_request.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request.py new file mode 100644 index 0000000000..65070fe8f4 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_request_data import ( + ProductAnalyticsRetentionGridRequestData, + ) + + +class ProductAnalyticsRetentionGridRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_request_data import ( + ProductAnalyticsRetentionGridRequestData, + ) + + return { + "data": (ProductAnalyticsRetentionGridRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsRetentionGridRequestData, **kwargs): + """ + Request body for a retention grid query. + + :param data: The single JSON:API resource carrying a retention grid query. Its attributes hold the time + window to query and the cohort and return criteria that define the grid. + :type data: ProductAnalyticsRetentionGridRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_attributes.py new file mode 100644 index 0000000000..63f5d427ca --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_attributes.py @@ -0,0 +1,70 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_query import ProductAnalyticsRetentionGridQuery + + +class ProductAnalyticsRetentionGridRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_query import ( + ProductAnalyticsRetentionGridQuery, + ) + + return { + "exclude_anonymous_traffic": (bool,), + "_from": (int,), + "query": (ProductAnalyticsRetentionGridQuery,), + "to": (int,), + } + + attribute_map = { + "exclude_anonymous_traffic": "exclude_anonymous_traffic", + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__( + self_, + _from: int, + query: ProductAnalyticsRetentionGridQuery, + to: int, + exclude_anonymous_traffic: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a retention grid request. + + :param exclude_anonymous_traffic: Whether to exclude sessions that are not tied to an identified user. + :type exclude_anonymous_traffic: bool, optional + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param query: Query definition for a retention grid or retention metadata request. + :type query: ProductAnalyticsRetentionGridQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + if exclude_anonymous_traffic is not unset: + kwargs["exclude_anonymous_traffic"] = exclude_anonymous_traffic + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_data.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_data.py new file mode 100644 index 0000000000..98b836fe2c --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_request_attributes import ( + ProductAnalyticsRetentionGridRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_grid_request_type import ( + ProductAnalyticsRetentionGridRequestType, + ) + + +class ProductAnalyticsRetentionGridRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_request_attributes import ( + ProductAnalyticsRetentionGridRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_grid_request_type import ( + ProductAnalyticsRetentionGridRequestType, + ) + + return { + "attributes": (ProductAnalyticsRetentionGridRequestAttributes,), + "type": (ProductAnalyticsRetentionGridRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsRetentionGridRequestAttributes, + type: ProductAnalyticsRetentionGridRequestType, + **kwargs, + ): + """ + The single JSON:API resource carrying a retention grid query. Its attributes hold the time + window to query and the cohort and return criteria that define the grid. + + :param attributes: Attributes of a retention grid request. + :type attributes: ProductAnalyticsRetentionGridRequestAttributes + + :param type: The resource type identifier for a retention grid request. + :type type: ProductAnalyticsRetentionGridRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_type.py new file mode 100644 index 0000000000..b017ead853 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionGridRequestType(ModelSimple): + """ + The resource type identifier for a retention grid request. + + :param value: If omitted defaults to "retention_grid_request". Must be one of ["retention_grid_request"]. + :type value: str + """ + + allowed_values = { + "retention_grid_request", + } + RETENTION_GRID_REQUEST: ClassVar["ProductAnalyticsRetentionGridRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionGridRequestType.RETENTION_GRID_REQUEST = ProductAnalyticsRetentionGridRequestType( + "retention_grid_request" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_response.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response.py new file mode 100644 index 0000000000..863b2e9fb0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_response_data import ( + ProductAnalyticsRetentionGridResponseData, + ) + + +class ProductAnalyticsRetentionGridResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_response_data import ( + ProductAnalyticsRetentionGridResponseData, + ) + + return { + "data": (ProductAnalyticsRetentionGridResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsRetentionGridResponseData, **kwargs): + """ + Response for a retention grid query. + + :param data: The single JSON:API resource holding a computed retention grid. Its attributes contain the + return periods forming the columns and the cohorts forming the rows. + :type data: ProductAnalyticsRetentionGridResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_attributes.py new file mode 100644 index 0000000000..9446cf77eb --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_attributes.py @@ -0,0 +1,76 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort import ProductAnalyticsRetentionGridCohort + from datadog_api_client.v2.model.product_analytics_retention_period import ProductAnalyticsRetentionPeriod + from datadog_api_client.v2.model.product_analytics_unit import ProductAnalyticsUnit + + +class ProductAnalyticsRetentionGridResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_cohort import ( + ProductAnalyticsRetentionGridCohort, + ) + from datadog_api_client.v2.model.product_analytics_retention_period import ProductAnalyticsRetentionPeriod + from datadog_api_client.v2.model.product_analytics_unit import ProductAnalyticsUnit + + return { + "cohorts": ([ProductAnalyticsRetentionGridCohort],), + "retention_entity": (str,), + "retention_periods": ([ProductAnalyticsRetentionPeriod],), + "unit": ([ProductAnalyticsUnit],), + } + + attribute_map = { + "cohorts": "cohorts", + "retention_entity": "retention_entity", + "retention_periods": "retention_periods", + "unit": "unit", + } + + def __init__( + self_, + cohorts: Union[List[ProductAnalyticsRetentionGridCohort], UnsetType] = unset, + retention_entity: Union[str, UnsetType] = unset, + retention_periods: Union[List[ProductAnalyticsRetentionPeriod], UnsetType] = unset, + unit: Union[List[ProductAnalyticsUnit], UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a retention grid response, containing the cohort rows and the period columns. + + :param cohorts: The cohorts forming the rows of the grid. + :type cohorts: [ProductAnalyticsRetentionGridCohort], optional + + :param retention_entity: The entity whose retention was measured. + :type retention_entity: str, optional + + :param retention_periods: The return periods forming the columns of the grid. + :type retention_periods: [ProductAnalyticsRetentionPeriod], optional + + :param unit: Unit definitions for the grid values. + :type unit: [ProductAnalyticsUnit], optional + """ + if cohorts is not unset: + kwargs["cohorts"] = cohorts + if retention_entity is not unset: + kwargs["retention_entity"] = retention_entity + if retention_periods is not unset: + kwargs["retention_periods"] = retention_periods + if unit is not unset: + kwargs["unit"] = unit + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_data.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_data.py new file mode 100644 index 0000000000..f098dd74d3 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_data.py @@ -0,0 +1,69 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_grid_response_attributes import ( + ProductAnalyticsRetentionGridResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_grid_response_type import ( + ProductAnalyticsRetentionGridResponseType, + ) + + +class ProductAnalyticsRetentionGridResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_grid_response_attributes import ( + ProductAnalyticsRetentionGridResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_grid_response_type import ( + ProductAnalyticsRetentionGridResponseType, + ) + + return { + "attributes": (ProductAnalyticsRetentionGridResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsRetentionGridResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsRetentionGridResponseAttributes, + id: str, + type: ProductAnalyticsRetentionGridResponseType, + **kwargs, + ): + """ + The single JSON:API resource holding a computed retention grid. Its attributes contain the + return periods forming the columns and the cohorts forming the rows. + + :param attributes: Attributes of a retention grid response, containing the cohort rows and the period columns. + :type attributes: ProductAnalyticsRetentionGridResponseAttributes + + :param id: Unique identifier for this response data object. + :type id: str + + :param type: The resource type identifier for a retention grid response. + :type type: ProductAnalyticsRetentionGridResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_type.py new file mode 100644 index 0000000000..03f33345d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_grid_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionGridResponseType(ModelSimple): + """ + The resource type identifier for a retention grid response. + + :param value: If omitted defaults to "retention_grid_response". Must be one of ["retention_grid_response"]. + :type value: str + """ + + allowed_values = { + "retention_grid_response", + } + RETENTION_GRID_RESPONSE: ClassVar["ProductAnalyticsRetentionGridResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionGridResponseType.RETENTION_GRID_RESPONSE = ProductAnalyticsRetentionGridResponseType( + "retention_grid_response" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_group_by.py b/src/datadog_api_client/v2/model/product_analytics_retention_group_by.py new file mode 100644 index 0000000000..7aee22ceb0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_group_by.py @@ -0,0 +1,97 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort + from datadog_api_client.v2.model.product_analytics_retention_group_by_target import ( + ProductAnalyticsRetentionGroupByTarget, + ) + + +class ProductAnalyticsRetentionGroupBy(ModelNormal): + validations = { + "limit": { + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort + from datadog_api_client.v2.model.product_analytics_retention_group_by_target import ( + ProductAnalyticsRetentionGroupByTarget, + ) + + return { + "facet": (str,), + "limit": (int,), + "should_exclude_missing": (bool,), + "sort": (ProductAnalyticsGroupBySort,), + "source": (str,), + "target": (ProductAnalyticsRetentionGroupByTarget,), + } + + attribute_map = { + "facet": "facet", + "limit": "limit", + "should_exclude_missing": "should_exclude_missing", + "sort": "sort", + "source": "source", + "target": "target", + } + + def __init__( + self_, + facet: str, + target: ProductAnalyticsRetentionGroupByTarget, + limit: Union[int, UnsetType] = unset, + should_exclude_missing: Union[bool, UnsetType] = unset, + sort: Union[ProductAnalyticsGroupBySort, UnsetType] = unset, + source: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Splits retention results by the values of a facet. + + :param facet: The attribute path to group by. + :type facet: str + + :param limit: Maximum number of groups to return. Omit it to let the service choose. + :type limit: int, optional + + :param should_exclude_missing: Whether to drop entities that have no value for the facet. + :type should_exclude_missing: bool, optional + + :param sort: Sort configuration for group-by results. + :type sort: ProductAnalyticsGroupBySort, optional + + :param source: Audience source backing the group-by, when grouping by an audience rather than a facet. + :type source: str, optional + + :param target: Which axis of the retention grid a group-by applies to. + :type target: ProductAnalyticsRetentionGroupByTarget + """ + if limit is not unset: + kwargs["limit"] = limit + if should_exclude_missing is not unset: + kwargs["should_exclude_missing"] = should_exclude_missing + if sort is not unset: + kwargs["sort"] = sort + if source is not unset: + kwargs["source"] = source + super().__init__(kwargs) + + self_.facet = facet + self_.target = target diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_group_by_target.py b/src/datadog_api_client/v2/model/product_analytics_retention_group_by_target.py new file mode 100644 index 0000000000..fef4de0a15 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_group_by_target.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionGroupByTarget(ModelSimple): + """ + Which axis of the retention grid a group-by applies to. + + :param value: Must be one of ["cohort", "return_period"]. + :type value: str + """ + + allowed_values = { + "cohort", + "return_period", + } + COHORT: ClassVar["ProductAnalyticsRetentionGroupByTarget"] + RETURN_PERIOD: ClassVar["ProductAnalyticsRetentionGroupByTarget"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionGroupByTarget.COHORT = ProductAnalyticsRetentionGroupByTarget("cohort") +ProductAnalyticsRetentionGroupByTarget.RETURN_PERIOD = ProductAnalyticsRetentionGroupByTarget("return_period") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_index_target.py b/src/datadog_api_client/v2/model/product_analytics_retention_index_target.py new file mode 100644 index 0000000000..081223e576 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_index_target.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_index_target_type import ( + ProductAnalyticsRetentionIndexTargetType, + ) + + +class ProductAnalyticsRetentionIndexTarget(ModelNormal): + validations = { + "value": { + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_index_target_type import ( + ProductAnalyticsRetentionIndexTargetType, + ) + + return { + "type": (ProductAnalyticsRetentionIndexTargetType,), + "value": (int,), + } + + attribute_map = { + "type": "type", + "value": "value", + } + + def __init__(self_, type: ProductAnalyticsRetentionIndexTargetType, value: int, **kwargs): + """ + Selects a cohort or return period by its zero-based position in the grid. + + :param type: The discriminator identifying a target selected by index. + :type type: ProductAnalyticsRetentionIndexTargetType + + :param value: Zero-based index of the targeted cohort or return period. + :type value: int + """ + super().__init__(kwargs) + + self_.type = type + self_.value = value diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_index_target_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_index_target_type.py new file mode 100644 index 0000000000..fa868db77b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_index_target_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionIndexTargetType(ModelSimple): + """ + The discriminator identifying a target selected by index. + + :param value: If omitted defaults to "index". Must be one of ["index"]. + :type value: str + """ + + allowed_values = { + "index", + } + INDEX: ClassVar["ProductAnalyticsRetentionIndexTargetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionIndexTargetType.INDEX = ProductAnalyticsRetentionIndexTargetType("index") diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_column.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_column.py new file mode 100644 index 0000000000..ddf9772c31 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_column.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_column_field import ( + ProductAnalyticsRetentionListColumnField, + ) + + +class ProductAnalyticsRetentionListColumn(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_column_field import ( + ProductAnalyticsRetentionListColumnField, + ) + + return { + "field": (ProductAnalyticsRetentionListColumnField,), + } + + attribute_map = { + "field": "field", + } + + def __init__(self_, field: Union[ProductAnalyticsRetentionListColumnField, UnsetType] = unset, **kwargs): + """ + A column to include in each returned entity row. + + :param field: The attribute selected for a column. + :type field: ProductAnalyticsRetentionListColumnField, optional + """ + if field is not unset: + kwargs["field"] = field + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_column_field.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_column_field.py new file mode 100644 index 0000000000..a71a434bec --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_column_field.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsRetentionListColumnField(ModelNormal): + @cached_property + def openapi_types(_): + return { + "path": (str,), + } + + attribute_map = { + "path": "path", + } + + def __init__(self_, path: Union[str, UnsetType] = unset, **kwargs): + """ + The attribute selected for a column. + + :param path: Attribute path of the column. + :type path: str, optional + """ + if path is not unset: + kwargs["path"] = path + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_query.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_query.py new file mode 100644 index 0000000000..c054abeae0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_query.py @@ -0,0 +1,83 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_column import ProductAnalyticsRetentionListColumn + from datadog_api_client.v2.model.product_analytics_retention_cell_scope import ProductAnalyticsRetentionCellScope + from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch + + +class ProductAnalyticsRetentionListQuery(ModelNormal): + validations = { + "limit": { + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_column import ( + ProductAnalyticsRetentionListColumn, + ) + from datadog_api_client.v2.model.product_analytics_retention_cell_scope import ( + ProductAnalyticsRetentionCellScope, + ) + from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch + + return { + "columns": ([ProductAnalyticsRetentionListColumn],), + "computation_scope": (ProductAnalyticsRetentionCellScope,), + "limit": (int,), + "search": (ProductAnalyticsRetentionSearch,), + } + + attribute_map = { + "columns": "columns", + "computation_scope": "computation_scope", + "limit": "limit", + "search": "search", + } + + def __init__( + self_, + computation_scope: ProductAnalyticsRetentionCellScope, + search: ProductAnalyticsRetentionSearch, + columns: Union[List[ProductAnalyticsRetentionListColumn], UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Query definition for a retention list request. + + :param columns: The attribute columns to include in each returned row. + :type columns: [ProductAnalyticsRetentionListColumn], optional + + :param computation_scope: Narrows a retention query to a single cell, at the intersection of one cohort and one return period. + :type computation_scope: ProductAnalyticsRetentionCellScope + + :param limit: Maximum number of rows to return. Use ``0`` for no limit. + :type limit: int, optional + + :param search: Defines the cohort and return criteria that make up a retention query. + :type search: ProductAnalyticsRetentionSearch + """ + if columns is not unset: + kwargs["columns"] = columns + if limit is not unset: + kwargs["limit"] = limit + super().__init__(kwargs) + + self_.computation_scope = computation_scope + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_record.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_record.py new file mode 100644 index 0000000000..d02fccdba7 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_record.py @@ -0,0 +1,17 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, +) + + +class ProductAnalyticsRetentionListRecord(ModelNormal): + def __init__(self_, **kwargs): + """ + A single entity row, keyed by the requested column paths. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_request.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_request.py new file mode 100644 index 0000000000..18e92d04ea --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_request.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_request_data import ( + ProductAnalyticsRetentionListRequestData, + ) + + +class ProductAnalyticsRetentionListRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_request_data import ( + ProductAnalyticsRetentionListRequestData, + ) + + return { + "data": (ProductAnalyticsRetentionListRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsRetentionListRequestData, **kwargs): + """ + Request body listing the individual entities behind one cell of the retention grid. + + :param data: The single JSON:API resource carrying a retention list query. Its attributes hold the time + window, the cell to list, and the columns to return for each entity. + :type data: ProductAnalyticsRetentionListRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_request_attributes.py new file mode 100644 index 0000000000..07c9faa763 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_request_attributes.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_query import ProductAnalyticsRetentionListQuery + + +class ProductAnalyticsRetentionListRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_query import ( + ProductAnalyticsRetentionListQuery, + ) + + return { + "_from": (int,), + "query": (ProductAnalyticsRetentionListQuery,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__(self_, _from: int, query: ProductAnalyticsRetentionListQuery, to: int, **kwargs): + """ + Attributes of a retention list request. + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param query: Query definition for a retention list request. + :type query: ProductAnalyticsRetentionListQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_request_data.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_request_data.py new file mode 100644 index 0000000000..07c87da0f7 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_request_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_request_attributes import ( + ProductAnalyticsRetentionListRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_list_request_type import ( + ProductAnalyticsRetentionListRequestType, + ) + + +class ProductAnalyticsRetentionListRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_request_attributes import ( + ProductAnalyticsRetentionListRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_list_request_type import ( + ProductAnalyticsRetentionListRequestType, + ) + + return { + "attributes": (ProductAnalyticsRetentionListRequestAttributes,), + "type": (ProductAnalyticsRetentionListRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsRetentionListRequestAttributes, + type: ProductAnalyticsRetentionListRequestType, + **kwargs, + ): + """ + The single JSON:API resource carrying a retention list query. Its attributes hold the time + window, the cell to list, and the columns to return for each entity. + + :param attributes: Attributes of a retention list request. + :type attributes: ProductAnalyticsRetentionListRequestAttributes + + :param type: The resource type identifier for a retention list request. + :type type: ProductAnalyticsRetentionListRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_request_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_request_type.py new file mode 100644 index 0000000000..ab8c439071 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionListRequestType(ModelSimple): + """ + The resource type identifier for a retention list request. + + :param value: If omitted defaults to "retention_list_request". Must be one of ["retention_list_request"]. + :type value: str + """ + + allowed_values = { + "retention_list_request", + } + RETENTION_LIST_REQUEST: ClassVar["ProductAnalyticsRetentionListRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionListRequestType.RETENTION_LIST_REQUEST = ProductAnalyticsRetentionListRequestType( + "retention_list_request" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_response.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_response.py new file mode 100644 index 0000000000..34d752b21d --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_response.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_response_data import ( + ProductAnalyticsRetentionListResponseData, + ) + + +class ProductAnalyticsRetentionListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_response_data import ( + ProductAnalyticsRetentionListResponseData, + ) + + return { + "data": (ProductAnalyticsRetentionListResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsRetentionListResponseData, **kwargs): + """ + Response for a retention list query. + + :param data: The single JSON:API resource holding the entities behind one retention cell. Its attributes + contain the entity whose retention was measured and one row per matching entity. + :type data: ProductAnalyticsRetentionListResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_response_attributes.py new file mode 100644 index 0000000000..a32d8e7767 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_response_attributes.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_record import ProductAnalyticsRetentionListRecord + + +class ProductAnalyticsRetentionListResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_record import ( + ProductAnalyticsRetentionListRecord, + ) + + return { + "records": ([ProductAnalyticsRetentionListRecord],), + "retention_entity": (str,), + } + + attribute_map = { + "records": "records", + "retention_entity": "retention_entity", + } + + def __init__( + self_, + records: Union[List[ProductAnalyticsRetentionListRecord], UnsetType] = unset, + retention_entity: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a retention list response, containing the matching entity rows. + + :param records: The matching entity rows. + :type records: [ProductAnalyticsRetentionListRecord], optional + + :param retention_entity: The entity whose retention was measured. + :type retention_entity: str, optional + """ + if records is not unset: + kwargs["records"] = records + if retention_entity is not unset: + kwargs["retention_entity"] = retention_entity + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_response_data.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_response_data.py new file mode 100644 index 0000000000..f20dbef8e5 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_response_data.py @@ -0,0 +1,69 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_list_response_attributes import ( + ProductAnalyticsRetentionListResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_list_response_type import ( + ProductAnalyticsRetentionListResponseType, + ) + + +class ProductAnalyticsRetentionListResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_list_response_attributes import ( + ProductAnalyticsRetentionListResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_retention_list_response_type import ( + ProductAnalyticsRetentionListResponseType, + ) + + return { + "attributes": (ProductAnalyticsRetentionListResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsRetentionListResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsRetentionListResponseAttributes, + id: str, + type: ProductAnalyticsRetentionListResponseType, + **kwargs, + ): + """ + The single JSON:API resource holding the entities behind one retention cell. Its attributes + contain the entity whose retention was measured and one row per matching entity. + + :param attributes: Attributes of a retention list response, containing the matching entity rows. + :type attributes: ProductAnalyticsRetentionListResponseAttributes + + :param id: Unique identifier for this response data object. + :type id: str + + :param type: The resource type identifier for a retention list response. + :type type: ProductAnalyticsRetentionListResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_list_response_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_list_response_type.py new file mode 100644 index 0000000000..8226f2ac66 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_list_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionListResponseType(ModelSimple): + """ + The resource type identifier for a retention list response. + + :param value: If omitted defaults to "retention_list_response". Must be one of ["retention_list_response"]. + :type value: str + """ + + allowed_values = { + "retention_list_response", + } + RETENTION_LIST_RESPONSE: ClassVar["ProductAnalyticsRetentionListResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionListResponseType.RETENTION_LIST_RESPONSE = ProductAnalyticsRetentionListResponseType( + "retention_list_response" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_period.py b/src/datadog_api_client/v2/model/product_analytics_retention_period.py new file mode 100644 index 0000000000..ac5d105c02 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_period.py @@ -0,0 +1,43 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsRetentionPeriod(ModelNormal): + @cached_property + def openapi_types(_): + return { + "unit": (str,), + "value": (int,), + } + + attribute_map = { + "unit": "unit", + "value": "value", + } + + def __init__(self_, unit: Union[str, UnsetType] = unset, value: Union[int, UnsetType] = unset, **kwargs): + """ + A return period definition, such as "1 week". + + :param unit: Time unit of the period, such as ``day`` , ``week`` , ``month`` , or ``year``. + :type unit: str, optional + + :param value: Length of the period, expressed in ``unit``. + :type value: int, optional + """ + if unit is not unset: + kwargs["unit"] = unit + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_return_condition.py b/src/datadog_api_client/v2/model/product_analytics_retention_return_condition.py new file mode 100644 index 0000000000..18300a57aa --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_return_condition.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionReturnCondition(ModelSimple): + """ + When an entity counts as having returned. Use `conversion_on` to count only entities that + returned during the period itself, or `conversion_on_or_after` to also count later returns. + + :param value: Must be one of ["conversion_on", "conversion_on_or_after"]. + :type value: str + """ + + allowed_values = { + "conversion_on", + "conversion_on_or_after", + } + CONVERSION_ON: ClassVar["ProductAnalyticsRetentionReturnCondition"] + CONVERSION_ON_OR_AFTER: ClassVar["ProductAnalyticsRetentionReturnCondition"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionReturnCondition.CONVERSION_ON = ProductAnalyticsRetentionReturnCondition("conversion_on") +ProductAnalyticsRetentionReturnCondition.CONVERSION_ON_OR_AFTER = ProductAnalyticsRetentionReturnCondition( + "conversion_on_or_after" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_return_criteria.py b/src/datadog_api_client/v2/model/product_analytics_retention_return_criteria.py new file mode 100644 index 0000000000..b8151149c1 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_return_criteria.py @@ -0,0 +1,76 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + from datadog_api_client.v2.model.product_analytics_retention_time_interval import ( + ProductAnalyticsRetentionTimeInterval, + ) + from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery + from datadog_api_client.v2.model.product_analytics_occurrence_query import ProductAnalyticsOccurrenceQuery + from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, + ) + from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval import ( + ProductAnalyticsRetentionFixedTimeInterval, + ) + + +class ProductAnalyticsRetentionReturnCriteria(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery + from datadog_api_client.v2.model.product_analytics_retention_time_interval import ( + ProductAnalyticsRetentionTimeInterval, + ) + + return { + "base_query": (ProductAnalyticsBaseQuery,), + "time_interval": (ProductAnalyticsRetentionTimeInterval,), + } + + attribute_map = { + "base_query": "base_query", + "time_interval": "time_interval", + } + + def __init__( + self_, + base_query: Union[ProductAnalyticsBaseQuery, ProductAnalyticsEventQuery, ProductAnalyticsOccurrenceQuery], + time_interval: Union[ + ProductAnalyticsRetentionTimeInterval, + ProductAnalyticsRetentionCalendarTimeInterval, + ProductAnalyticsRetentionFixedTimeInterval, + UnsetType, + ] = unset, + **kwargs, + ): + """ + Defines the event that counts as a return, and the window in which it must occur. + + :param base_query: A query definition discriminated by the ``data_source`` field. + Use ``product_analytics`` for standard event queries, or + ``product_analytics_occurrence`` for occurrence-filtered queries. + :type base_query: ProductAnalyticsBaseQuery + + :param time_interval: A retention interval, either aligned to calendar boundaries or of a fixed length. + Cohort criteria use calendar intervals; return criteria use fixed intervals. + :type time_interval: ProductAnalyticsRetentionTimeInterval, optional + """ + if time_interval is not unset: + kwargs["time_interval"] = time_interval + super().__init__(kwargs) + + self_.base_query = base_query diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_return_period_scope.py b/src/datadog_api_client/v2/model/product_analytics_retention_return_period_scope.py new file mode 100644 index 0000000000..9d1b74b3e0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_return_period_scope.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_index_target import ( + ProductAnalyticsRetentionIndexTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_return_period_scope_type import ( + ProductAnalyticsRetentionReturnPeriodScopeType, + ) + + +class ProductAnalyticsRetentionReturnPeriodScope(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_index_target import ( + ProductAnalyticsRetentionIndexTarget, + ) + from datadog_api_client.v2.model.product_analytics_retention_return_period_scope_type import ( + ProductAnalyticsRetentionReturnPeriodScopeType, + ) + + return { + "target": (ProductAnalyticsRetentionIndexTarget,), + "type": (ProductAnalyticsRetentionReturnPeriodScopeType,), + } + + attribute_map = { + "target": "target", + "type": "type", + } + + def __init__( + self_, + target: ProductAnalyticsRetentionIndexTarget, + type: ProductAnalyticsRetentionReturnPeriodScopeType, + **kwargs, + ): + """ + Narrows a retention query to a single return-period column. + + :param target: Selects a cohort or return period by its zero-based position in the grid. + :type target: ProductAnalyticsRetentionIndexTarget + + :param type: The discriminator identifying a scope narrowed to one return period. + :type type: ProductAnalyticsRetentionReturnPeriodScopeType + """ + super().__init__(kwargs) + + self_.target = target + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_return_period_scope_type.py b/src/datadog_api_client/v2/model/product_analytics_retention_return_period_scope_type.py new file mode 100644 index 0000000000..15b2526825 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_return_period_scope_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsRetentionReturnPeriodScopeType(ModelSimple): + """ + The discriminator identifying a scope narrowed to one return period. + + :param value: If omitted defaults to "return_period". Must be one of ["return_period"]. + :type value: str + """ + + allowed_values = { + "return_period", + } + RETURN_PERIOD: ClassVar["ProductAnalyticsRetentionReturnPeriodScopeType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsRetentionReturnPeriodScopeType.RETURN_PERIOD = ProductAnalyticsRetentionReturnPeriodScopeType( + "return_period" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_scope.py b/src/datadog_api_client/v2/model/product_analytics_retention_scope.py new file mode 100644 index 0000000000..26a048d38e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_scope.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class ProductAnalyticsRetentionScope(ModelComposed): + def __init__(self, **kwargs): + """ + Restricts a retention query to part of the grid, so that results can be examined in detail. + Omit it to compute the whole grid. + + :param target: Selects a cohort, either by index or by the aggregation that rolls all cohorts together. + :type target: ProductAnalyticsRetentionCohortTarget + + :param type: The discriminator identifying a scope narrowed to one cohort. + :type type: ProductAnalyticsRetentionCohortScopeType + + :param cohort_target: Selects a cohort, either by index or by the aggregation that rolls all cohorts together. + :type cohort_target: ProductAnalyticsRetentionCohortTarget + + :param return_period_target: Selects a cohort or return period by its zero-based position in the grid. + :type return_period_target: ProductAnalyticsRetentionIndexTarget + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.product_analytics_retention_cohort_scope import ( + ProductAnalyticsRetentionCohortScope, + ) + from datadog_api_client.v2.model.product_analytics_retention_return_period_scope import ( + ProductAnalyticsRetentionReturnPeriodScope, + ) + from datadog_api_client.v2.model.product_analytics_retention_cell_scope import ( + ProductAnalyticsRetentionCellScope, + ) + + return { + "oneOf": [ + ProductAnalyticsRetentionCohortScope, + ProductAnalyticsRetentionReturnPeriodScope, + ProductAnalyticsRetentionCellScope, + ], + } diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_search.py b/src/datadog_api_client/v2/model/product_analytics_retention_search.py new file mode 100644 index 0000000000..c8ae0781fc --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_search.py @@ -0,0 +1,97 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_retention_cohort_criteria import ( + ProductAnalyticsRetentionCohortCriteria, + ) + from datadog_api_client.v2.model.product_analytics_retention_filters import ProductAnalyticsRetentionFilters + from datadog_api_client.v2.model.product_analytics_retention_entity import ProductAnalyticsRetentionEntity + from datadog_api_client.v2.model.product_analytics_retention_return_condition import ( + ProductAnalyticsRetentionReturnCondition, + ) + from datadog_api_client.v2.model.product_analytics_retention_return_criteria import ( + ProductAnalyticsRetentionReturnCriteria, + ) + + +class ProductAnalyticsRetentionSearch(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_retention_cohort_criteria import ( + ProductAnalyticsRetentionCohortCriteria, + ) + from datadog_api_client.v2.model.product_analytics_retention_filters import ProductAnalyticsRetentionFilters + from datadog_api_client.v2.model.product_analytics_retention_entity import ProductAnalyticsRetentionEntity + from datadog_api_client.v2.model.product_analytics_retention_return_condition import ( + ProductAnalyticsRetentionReturnCondition, + ) + from datadog_api_client.v2.model.product_analytics_retention_return_criteria import ( + ProductAnalyticsRetentionReturnCriteria, + ) + + return { + "cohort_criteria": (ProductAnalyticsRetentionCohortCriteria,), + "filters": (ProductAnalyticsRetentionFilters,), + "retention_entity": (ProductAnalyticsRetentionEntity,), + "return_condition": (ProductAnalyticsRetentionReturnCondition,), + "return_criteria": (ProductAnalyticsRetentionReturnCriteria,), + } + + attribute_map = { + "cohort_criteria": "cohort_criteria", + "filters": "filters", + "retention_entity": "retention_entity", + "return_condition": "return_condition", + "return_criteria": "return_criteria", + } + + def __init__( + self_, + cohort_criteria: ProductAnalyticsRetentionCohortCriteria, + retention_entity: ProductAnalyticsRetentionEntity, + return_condition: ProductAnalyticsRetentionReturnCondition, + filters: Union[ProductAnalyticsRetentionFilters, UnsetType] = unset, + return_criteria: Union[ProductAnalyticsRetentionReturnCriteria, UnsetType] = unset, + **kwargs, + ): + """ + Defines the cohort and return criteria that make up a retention query. + + :param cohort_criteria: Defines the event that places an entity into a cohort, and how cohorts are bucketed over time. + :type cohort_criteria: ProductAnalyticsRetentionCohortCriteria + + :param filters: Filters narrowing the events considered by a retention query. + :type filters: ProductAnalyticsRetentionFilters, optional + + :param retention_entity: The entity whose retention is measured. + :type retention_entity: ProductAnalyticsRetentionEntity + + :param return_condition: When an entity counts as having returned. Use ``conversion_on`` to count only entities that + returned during the period itself, or ``conversion_on_or_after`` to also count later returns. + :type return_condition: ProductAnalyticsRetentionReturnCondition + + :param return_criteria: Defines the event that counts as a return, and the window in which it must occur. + :type return_criteria: ProductAnalyticsRetentionReturnCriteria, optional + """ + if filters is not unset: + kwargs["filters"] = filters + if return_criteria is not unset: + kwargs["return_criteria"] = return_criteria + super().__init__(kwargs) + + self_.cohort_criteria = cohort_criteria + self_.retention_entity = retention_entity + self_.return_condition = return_condition diff --git a/src/datadog_api_client/v2/model/product_analytics_retention_time_interval.py b/src/datadog_api_client/v2/model/product_analytics_retention_time_interval.py new file mode 100644 index 0000000000..03ffa0ca6b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_retention_time_interval.py @@ -0,0 +1,51 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class ProductAnalyticsRetentionTimeInterval(ModelComposed): + def __init__(self, **kwargs): + """ + A retention interval, either aligned to calendar boundaries or of a fixed length. + Cohort criteria use calendar intervals; return criteria use fixed intervals. + + :param type: The discriminator identifying a calendar-aligned retention interval. + :type type: ProductAnalyticsRetentionCalendarTimeIntervalType + + :param value: A calendar-aligned bucket definition, such as "every 1 week starting on Monday". + :type value: ProductAnalyticsCalendarInterval + + :param unit: Time unit for a fixed-length retention interval. + :type unit: ProductAnalyticsRetentionFixedTimeIntervalUnit + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, + ) + from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval import ( + ProductAnalyticsRetentionFixedTimeInterval, + ) + + return { + "oneOf": [ + ProductAnalyticsRetentionCalendarTimeInterval, + ProductAnalyticsRetentionFixedTimeInterval, + ], + } diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_aggregated_node.py b/src/datadog_api_client/v2/model/product_analytics_sankey_aggregated_node.py new file mode 100644 index 0000000000..3d1c299363 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_aggregated_node.py @@ -0,0 +1,90 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node_type import ( + ProductAnalyticsSankeyAggregatedNodeType, + ) + + +class ProductAnalyticsSankeyAggregatedNode(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node_type import ( + ProductAnalyticsSankeyAggregatedNodeType, + ) + + return { + "id": (str,), + "incoming_value": (int,), + "name": (str,), + "outgoing_value": (int,), + "type": (ProductAnalyticsSankeyAggregatedNodeType,), + "value": (int,), + } + + attribute_map = { + "id": "id", + "incoming_value": "incoming_value", + "name": "name", + "outgoing_value": "outgoing_value", + "type": "type", + "value": "value", + } + + def __init__( + self_, + id: Union[str, UnsetType] = unset, + incoming_value: Union[int, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + outgoing_value: Union[int, UnsetType] = unset, + type: Union[ProductAnalyticsSankeyAggregatedNodeType, UnsetType] = unset, + value: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + One of the nodes rolled up into an aggregated node, retained so the roll-up can be broken down. + + :param id: Unique identifier for the node. + :type id: str, optional + + :param incoming_value: Number of sessions entering the node. + :type incoming_value: int, optional + + :param name: The facet value the node represents. + :type name: str, optional + + :param outgoing_value: Number of sessions leaving the node. + :type outgoing_value: int, optional + + :param type: The resource type identifier for a node rolled up into an aggregated node. + :type type: ProductAnalyticsSankeyAggregatedNodeType, optional + + :param value: Number of sessions passing through the node. + :type value: int, optional + """ + if id is not unset: + kwargs["id"] = id + if incoming_value is not unset: + kwargs["incoming_value"] = incoming_value + if name is not unset: + kwargs["name"] = name + if outgoing_value is not unset: + kwargs["outgoing_value"] = outgoing_value + if type is not unset: + kwargs["type"] = type + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_aggregated_node_type.py b/src/datadog_api_client/v2/model/product_analytics_sankey_aggregated_node_type.py new file mode 100644 index 0000000000..124f27f58c --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_aggregated_node_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsSankeyAggregatedNodeType(ModelSimple): + """ + The resource type identifier for a node rolled up into an aggregated node. + + :param value: If omitted defaults to "aggregated". Must be one of ["aggregated"]. + :type value: str + """ + + allowed_values = { + "aggregated", + } + AGGREGATED: ClassVar["ProductAnalyticsSankeyAggregatedNodeType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsSankeyAggregatedNodeType.AGGREGATED = ProductAnalyticsSankeyAggregatedNodeType("aggregated") diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_definition.py b/src/datadog_api_client/v2/model/product_analytics_sankey_definition.py new file mode 100644 index 0000000000..93c2773bef --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_definition.py @@ -0,0 +1,76 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsSankeyDefinition(ModelNormal): + validations = { + "entries_per_step": { + "inclusive_maximum": 10, + "inclusive_minimum": 0, + }, + "number_of_steps": { + "inclusive_maximum": 10, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "entries_per_step": (int,), + "number_of_steps": (int,), + "source": (str,), + "target": (str,), + } + + attribute_map = { + "entries_per_step": "entries_per_step", + "number_of_steps": "number_of_steps", + "source": "source", + "target": "target", + } + + def __init__( + self_, + source: str, + target: str, + entries_per_step: Union[int, UnsetType] = unset, + number_of_steps: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + The shape of the Sankey diagram, expressed as the facets to flow between and how many steps to show. + + :param entries_per_step: Maximum number of nodes to keep in each column. Remaining values are rolled up into an + aggregated node. Omit it, or send ``0`` , to use the default of ``5``. + :type entries_per_step: int, optional + + :param number_of_steps: Number of intermediate columns between the source and the target. + Omit it, or send ``0`` , to use the default of ``5``. + :type number_of_steps: int, optional + + :param source: Facet forming the first column of the diagram. + :type source: str + + :param target: Facet forming the last column of the diagram. + :type target: str + """ + if entries_per_step is not unset: + kwargs["entries_per_step"] = entries_per_step + if number_of_steps is not unset: + kwargs["number_of_steps"] = number_of_steps + super().__init__(kwargs) + + self_.source = source + self_.target = target diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_link.py b/src/datadog_api_client/v2/model/product_analytics_sankey_link.py new file mode 100644 index 0000000000..c3eb88145e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_link.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsSankeyLink(ModelNormal): + @cached_property + def openapi_types(_): + return { + "column": (int,), + "id": (str,), + "source": (str,), + "target": (str,), + "value": (int,), + } + + attribute_map = { + "column": "column", + "id": "id", + "source": "source", + "target": "target", + "value": "value", + } + + def __init__( + self_, + column: Union[int, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + source: Union[str, UnsetType] = unset, + target: Union[str, UnsetType] = unset, + value: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + A link of the Sankey diagram, representing the sessions flowing between two nodes. + + :param column: Zero-based index of the column the link starts from. + :type column: int, optional + + :param id: Unique identifier for the link. + :type id: str, optional + + :param source: Identifier of the node the link starts at. + :type source: str, optional + + :param target: Identifier of the node the link ends at. + :type target: str, optional + + :param value: Number of sessions flowing along the link. + :type value: int, optional + """ + if column is not unset: + kwargs["column"] = column + if id is not unset: + kwargs["id"] = id + if source is not unset: + kwargs["source"] = source + if target is not unset: + kwargs["target"] = target + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_node.py b/src/datadog_api_client/v2/model/product_analytics_sankey_node.py new file mode 100644 index 0000000000..b7234d6210 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_node.py @@ -0,0 +1,117 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node import ( + ProductAnalyticsSankeyAggregatedNode, + ) + from datadog_api_client.v2.model.product_analytics_sankey_node_type import ProductAnalyticsSankeyNodeType + + +class ProductAnalyticsSankeyNode(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node import ( + ProductAnalyticsSankeyAggregatedNode, + ) + from datadog_api_client.v2.model.product_analytics_sankey_node_type import ProductAnalyticsSankeyNodeType + + return { + "aggregated_nodes": ([ProductAnalyticsSankeyAggregatedNode],), + "column": (int,), + "dropoff_value": (int,), + "id": (str,), + "incoming_value": (int,), + "name": (str,), + "outgoing_value": (int,), + "type": (ProductAnalyticsSankeyNodeType,), + "value": (int,), + } + + attribute_map = { + "aggregated_nodes": "aggregated_nodes", + "column": "column", + "dropoff_value": "dropoff_value", + "id": "id", + "incoming_value": "incoming_value", + "name": "name", + "outgoing_value": "outgoing_value", + "type": "type", + "value": "value", + } + + def __init__( + self_, + aggregated_nodes: Union[List[ProductAnalyticsSankeyAggregatedNode], UnsetType] = unset, + column: Union[int, UnsetType] = unset, + dropoff_value: Union[int, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + incoming_value: Union[int, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + outgoing_value: Union[int, UnsetType] = unset, + type: Union[ProductAnalyticsSankeyNodeType, UnsetType] = unset, + value: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + A node of the Sankey diagram, representing one facet value in one column. + + :param aggregated_nodes: The nodes rolled up into this one, when the node is an aggregate. + :type aggregated_nodes: [ProductAnalyticsSankeyAggregatedNode], optional + + :param column: Zero-based index of the column the node sits in. + :type column: int, optional + + :param dropoff_value: Number of sessions that ended at the node. + :type dropoff_value: int, optional + + :param id: Unique identifier for the node. + :type id: str, optional + + :param incoming_value: Number of sessions entering the node. + :type incoming_value: int, optional + + :param name: The facet value the node represents. + :type name: str, optional + + :param outgoing_value: Number of sessions leaving the node. + :type outgoing_value: int, optional + + :param type: The kind of node. ``regular`` is a single facet value, ``other`` rolls up the values that did not + fit within ``entries_per_step`` , and ``dropoff`` collects the sessions that ended at this column. + :type type: ProductAnalyticsSankeyNodeType, optional + + :param value: Number of sessions passing through the node. + :type value: int, optional + """ + if aggregated_nodes is not unset: + kwargs["aggregated_nodes"] = aggregated_nodes + if column is not unset: + kwargs["column"] = column + if dropoff_value is not unset: + kwargs["dropoff_value"] = dropoff_value + if id is not unset: + kwargs["id"] = id + if incoming_value is not unset: + kwargs["incoming_value"] = incoming_value + if name is not unset: + kwargs["name"] = name + if outgoing_value is not unset: + kwargs["outgoing_value"] = outgoing_value + if type is not unset: + kwargs["type"] = type + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_node_type.py b/src/datadog_api_client/v2/model/product_analytics_sankey_node_type.py new file mode 100644 index 0000000000..db2393465b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_node_type.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsSankeyNodeType(ModelSimple): + """ + The kind of node. `regular` is a single facet value, `other` rolls up the values that did not + fit within `entries_per_step`, and `dropoff` collects the sessions that ended at this column. + + :param value: Must be one of ["regular", "other", "dropoff"]. + :type value: str + """ + + allowed_values = { + "regular", + "other", + "dropoff", + } + REGULAR: ClassVar["ProductAnalyticsSankeyNodeType"] + OTHER: ClassVar["ProductAnalyticsSankeyNodeType"] + DROPOFF: ClassVar["ProductAnalyticsSankeyNodeType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsSankeyNodeType.REGULAR = ProductAnalyticsSankeyNodeType("regular") +ProductAnalyticsSankeyNodeType.OTHER = ProductAnalyticsSankeyNodeType("other") +ProductAnalyticsSankeyNodeType.DROPOFF = ProductAnalyticsSankeyNodeType("dropoff") diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_request.py b/src/datadog_api_client/v2/model/product_analytics_sankey_request.py new file mode 100644 index 0000000000..4438c2ac58 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_request.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_request_data import ProductAnalyticsSankeyRequestData + + +class ProductAnalyticsSankeyRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_request_data import ProductAnalyticsSankeyRequestData + + return { + "data": (ProductAnalyticsSankeyRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsSankeyRequestData, **kwargs): + """ + Request body for a Sankey diagram query. + + :param data: The single JSON:API resource carrying a Sankey query. Its attributes hold the time window to + query, the search that selects the sessions, and the definition of the diagram to build. + :type data: ProductAnalyticsSankeyRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_sankey_request_attributes.py new file mode 100644 index 0000000000..4ec3a9ded2 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_request_attributes.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_definition import ProductAnalyticsSankeyDefinition + from datadog_api_client.v2.model.product_analytics_sankey_search import ProductAnalyticsSankeySearch + from datadog_api_client.v2.model.product_analytics_sankey_time import ProductAnalyticsSankeyTime + + +class ProductAnalyticsSankeyRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_definition import ProductAnalyticsSankeyDefinition + from datadog_api_client.v2.model.product_analytics_sankey_search import ProductAnalyticsSankeySearch + from datadog_api_client.v2.model.product_analytics_sankey_time import ProductAnalyticsSankeyTime + + return { + "definition": (ProductAnalyticsSankeyDefinition,), + "search": (ProductAnalyticsSankeySearch,), + "time": (ProductAnalyticsSankeyTime,), + } + + attribute_map = { + "definition": "definition", + "search": "search", + "time": "time", + } + + def __init__( + self_, + definition: ProductAnalyticsSankeyDefinition, + search: ProductAnalyticsSankeySearch, + time: ProductAnalyticsSankeyTime, + **kwargs, + ): + """ + Attributes of a Sankey request. + + :param definition: The shape of the Sankey diagram, expressed as the facets to flow between and how many steps to show. + :type definition: ProductAnalyticsSankeyDefinition + + :param search: Selects the sessions a Sankey diagram is built from. + :type search: ProductAnalyticsSankeySearch + + :param time: The time window a Sankey query covers. + :type time: ProductAnalyticsSankeyTime + """ + super().__init__(kwargs) + + self_.definition = definition + self_.search = search + self_.time = time diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_request_data.py b/src/datadog_api_client/v2/model/product_analytics_sankey_request_data.py new file mode 100644 index 0000000000..77d5e9ca84 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_request_data.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_request_attributes import ( + ProductAnalyticsSankeyRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_sankey_request_type import ProductAnalyticsSankeyRequestType + + +class ProductAnalyticsSankeyRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_request_attributes import ( + ProductAnalyticsSankeyRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_sankey_request_type import ProductAnalyticsSankeyRequestType + + return { + "attributes": (ProductAnalyticsSankeyRequestAttributes,), + "type": (ProductAnalyticsSankeyRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, attributes: ProductAnalyticsSankeyRequestAttributes, type: ProductAnalyticsSankeyRequestType, **kwargs + ): + """ + The single JSON:API resource carrying a Sankey query. Its attributes hold the time window to + query, the search that selects the sessions, and the definition of the diagram to build. + + :param attributes: Attributes of a Sankey request. + :type attributes: ProductAnalyticsSankeyRequestAttributes + + :param type: The resource type identifier for a Sankey request. + :type type: ProductAnalyticsSankeyRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_request_type.py b/src/datadog_api_client/v2/model/product_analytics_sankey_request_type.py new file mode 100644 index 0000000000..d703c4c38e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_request_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsSankeyRequestType(ModelSimple): + """ + The resource type identifier for a Sankey request. + + :param value: If omitted defaults to "sankey_request". Must be one of ["sankey_request"]. + :type value: str + """ + + allowed_values = { + "sankey_request", + } + SANKEY_REQUEST: ClassVar["ProductAnalyticsSankeyRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsSankeyRequestType.SANKEY_REQUEST = ProductAnalyticsSankeyRequestType("sankey_request") diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_response.py b/src/datadog_api_client/v2/model/product_analytics_sankey_response.py new file mode 100644 index 0000000000..c6f8b2afbd --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_response.py @@ -0,0 +1,43 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_response_data import ProductAnalyticsSankeyResponseData + + +class ProductAnalyticsSankeyResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_response_data import ( + ProductAnalyticsSankeyResponseData, + ) + + return { + "data": (ProductAnalyticsSankeyResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsSankeyResponseData, **kwargs): + """ + Response for a Sankey diagram query. + + :param data: The single JSON:API resource holding a computed Sankey diagram. Its attributes contain the + nodes of every column and the links that carry sessions between them. + :type data: ProductAnalyticsSankeyResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_sankey_response_attributes.py new file mode 100644 index 0000000000..eee016338e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_response_attributes.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_link import ProductAnalyticsSankeyLink + from datadog_api_client.v2.model.product_analytics_sankey_node import ProductAnalyticsSankeyNode + + +class ProductAnalyticsSankeyResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_link import ProductAnalyticsSankeyLink + from datadog_api_client.v2.model.product_analytics_sankey_node import ProductAnalyticsSankeyNode + + return { + "links": ([ProductAnalyticsSankeyLink],), + "nodes": ([ProductAnalyticsSankeyNode],), + } + + attribute_map = { + "links": "links", + "nodes": "nodes", + } + + def __init__( + self_, + links: Union[List[ProductAnalyticsSankeyLink], UnsetType] = unset, + nodes: Union[List[ProductAnalyticsSankeyNode], UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a Sankey response, containing the nodes and the links between them. + + :param links: The links of the diagram, one per pair of connected nodes. + :type links: [ProductAnalyticsSankeyLink], optional + + :param nodes: The nodes of the diagram, one per facet value and column. + :type nodes: [ProductAnalyticsSankeyNode], optional + """ + if links is not unset: + kwargs["links"] = links + if nodes is not unset: + kwargs["nodes"] = nodes + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_response_data.py b/src/datadog_api_client/v2/model/product_analytics_sankey_response_data.py new file mode 100644 index 0000000000..82d57e8f2b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_response_data.py @@ -0,0 +1,67 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sankey_response_attributes import ( + ProductAnalyticsSankeyResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_sankey_response_type import ProductAnalyticsSankeyResponseType + + +class ProductAnalyticsSankeyResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sankey_response_attributes import ( + ProductAnalyticsSankeyResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_sankey_response_type import ( + ProductAnalyticsSankeyResponseType, + ) + + return { + "attributes": (ProductAnalyticsSankeyResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsSankeyResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsSankeyResponseAttributes, + id: str, + type: ProductAnalyticsSankeyResponseType, + **kwargs, + ): + """ + The single JSON:API resource holding a computed Sankey diagram. Its attributes contain the + nodes of every column and the links that carry sessions between them. + + :param attributes: Attributes of a Sankey response, containing the nodes and the links between them. + :type attributes: ProductAnalyticsSankeyResponseAttributes + + :param id: Unique identifier for this response data object. + :type id: str + + :param type: The resource type identifier for a Sankey response. + :type type: ProductAnalyticsSankeyResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_response_type.py b/src/datadog_api_client/v2/model/product_analytics_sankey_response_type.py new file mode 100644 index 0000000000..82f4784555 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_response_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsSankeyResponseType(ModelSimple): + """ + The resource type identifier for a Sankey response. + + :param value: If omitted defaults to "sankey_response". Must be one of ["sankey_response"]. + :type value: str + """ + + allowed_values = { + "sankey_response", + } + SANKEY_RESPONSE: ClassVar["ProductAnalyticsSankeyResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsSankeyResponseType.SANKEY_RESPONSE = ProductAnalyticsSankeyResponseType("sankey_response") diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_search.py b/src/datadog_api_client/v2/model/product_analytics_sankey_search.py new file mode 100644 index 0000000000..f1ca0d4640 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_search.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters + from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys + + +class ProductAnalyticsSankeySearch(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_audience_filters import ProductAnalyticsAudienceFilters + from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys + + return { + "audience_filters": (ProductAnalyticsAudienceFilters,), + "join_keys": (ProductAnalyticsJoinKeys,), + "query": (str,), + } + + attribute_map = { + "audience_filters": "audience_filters", + "join_keys": "join_keys", + "query": "query", + } + + def __init__( + self_, + audience_filters: Union[ProductAnalyticsAudienceFilters, UnsetType] = unset, + join_keys: Union[ProductAnalyticsJoinKeys, UnsetType] = unset, + query: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Selects the sessions a Sankey diagram is built from. + + :param audience_filters: Audience filter definitions for targeting specific user segments. + :type audience_filters: ProductAnalyticsAudienceFilters, optional + + :param join_keys: Identity join keys used to stitch events belonging to the same user or session. + :type join_keys: ProductAnalyticsJoinKeys, optional + + :param query: Datadog search query restricting the events considered. + :type query: str, optional + """ + if audience_filters is not unset: + kwargs["audience_filters"] = audience_filters + if join_keys is not unset: + kwargs["join_keys"] = join_keys + if query is not unset: + kwargs["query"] = query + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_sankey_time.py b/src/datadog_api_client/v2/model/product_analytics_sankey_time.py new file mode 100644 index 0000000000..0efdbd33c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sankey_time.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class ProductAnalyticsSankeyTime(ModelNormal): + @cached_property + def openapi_types(_): + return { + "_from": (int,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "to": "to", + } + + def __init__(self_, _from: int, to: int, **kwargs): + """ + The time window a Sankey query covers. + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + super().__init__(kwargs) + + self_._from = _from + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_timeseries_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_timeseries_response_attributes.py index d400f94caa..0db8180133 100644 --- a/src/datadog_api_client/v2/model/product_analytics_timeseries_response_attributes.py +++ b/src/datadog_api_client/v2/model/product_analytics_timeseries_response_attributes.py @@ -48,7 +48,8 @@ def __init__( **kwargs, ): """ - Attributes of a timeseries analytics response, containing series data, timestamps, and interval definitions. + Attributes of a timeseries analytics response, containing series data, timestamps, and + interval definitions. :param intervals: Interval definitions describing the time buckets used in the response. :type intervals: [ProductAnalyticsInterval], optional diff --git a/src/datadog_api_client/v2/model/product_analytics_timeseries_response_data.py b/src/datadog_api_client/v2/model/product_analytics_timeseries_response_data.py index 8d499f45f0..56eb2ca0c8 100644 --- a/src/datadog_api_client/v2/model/product_analytics_timeseries_response_data.py +++ b/src/datadog_api_client/v2/model/product_analytics_timeseries_response_data.py @@ -54,7 +54,8 @@ def __init__( """ Data object for a timeseries analytics response. - :param attributes: Attributes of a timeseries analytics response, containing series data, timestamps, and interval definitions. + :param attributes: Attributes of a timeseries analytics response, containing series data, timestamps, and + interval definitions. :type attributes: ProductAnalyticsTimeseriesResponseAttributes, optional :param id: Unique identifier for this response data object. diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index b009f80886..b168aca54c 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -7120,6 +7120,32 @@ from datadog_api_client.v2.model.process_summary_attributes import ProcessSummaryAttributes from datadog_api_client.v2.model.process_summary_type import ProcessSummaryType from datadog_api_client.v2.model.process_timeseries_query import ProcessTimeseriesQuery +from datadog_api_client.v2.model.product_analytics_analytics_list_query import ProductAnalyticsAnalyticsListQuery +from datadog_api_client.v2.model.product_analytics_analytics_list_record import ProductAnalyticsAnalyticsListRecord +from datadog_api_client.v2.model.product_analytics_analytics_list_request import ProductAnalyticsAnalyticsListRequest +from datadog_api_client.v2.model.product_analytics_analytics_list_request_attributes import ( + ProductAnalyticsAnalyticsListRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_request_data import ( + ProductAnalyticsAnalyticsListRequestData, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_request_type import ( + ProductAnalyticsAnalyticsListRequestType, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_response import ProductAnalyticsAnalyticsListResponse +from datadog_api_client.v2.model.product_analytics_analytics_list_response_attributes import ( + ProductAnalyticsAnalyticsListResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_response_data import ( + ProductAnalyticsAnalyticsListResponseData, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_response_type import ( + ProductAnalyticsAnalyticsListResponseType, +) +from datadog_api_client.v2.model.product_analytics_analytics_list_sort import ProductAnalyticsAnalyticsListSort +from datadog_api_client.v2.model.product_analytics_analytics_list_sort_order import ( + ProductAnalyticsAnalyticsListSortOrder, +) from datadog_api_client.v2.model.product_analytics_analytics_query import ProductAnalyticsAnalyticsQuery from datadog_api_client.v2.model.product_analytics_analytics_request import ProductAnalyticsAnalyticsRequest from datadog_api_client.v2.model.product_analytics_analytics_request_attributes import ( @@ -7136,14 +7162,153 @@ ) from datadog_api_client.v2.model.product_analytics_audience_user_subquery import ProductAnalyticsAudienceUserSubquery from datadog_api_client.v2.model.product_analytics_base_query import ProductAnalyticsBaseQuery +from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval +from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ProductAnalyticsCalendarIntervalType from datadog_api_client.v2.model.product_analytics_compute import ProductAnalyticsCompute +from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch from datadog_api_client.v2.model.product_analytics_execution_type import ProductAnalyticsExecutionType +from datadog_api_client.v2.model.product_analytics_formula_journey_query import ProductAnalyticsFormulaJourneyQuery +from datadog_api_client.v2.model.product_analytics_formula_journey_request import ProductAnalyticsFormulaJourneyRequest +from datadog_api_client.v2.model.product_analytics_formula_journey_request_attributes import ( + ProductAnalyticsFormulaJourneyRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_formula_journey_request_data import ( + ProductAnalyticsFormulaJourneyRequestData, +) +from datadog_api_client.v2.model.product_analytics_formula_journey_request_type import ( + ProductAnalyticsFormulaJourneyRequestType, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_query import ProductAnalyticsFormulaRetentionQuery +from datadog_api_client.v2.model.product_analytics_formula_retention_request import ( + ProductAnalyticsFormulaRetentionRequest, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_attributes import ( + ProductAnalyticsFormulaRetentionRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_data import ( + ProductAnalyticsFormulaRetentionRequestData, +) +from datadog_api_client.v2.model.product_analytics_formula_retention_request_type import ( + ProductAnalyticsFormulaRetentionRequestType, +) +from datadog_api_client.v2.model.product_analytics_graph_query_compute import ProductAnalyticsGraphQueryCompute +from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy +from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( + ProductAnalyticsGraphQueryGroupBySource, +) from datadog_api_client.v2.model.product_analytics_group_by import ProductAnalyticsGroupBy from datadog_api_client.v2.model.product_analytics_group_by_sort import ProductAnalyticsGroupBySort from datadog_api_client.v2.model.product_analytics_interval import ProductAnalyticsInterval +from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys +from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_computed_column import ProductAnalyticsJourneyComputedColumn +from datadog_api_client.v2.model.product_analytics_journey_computed_column_name import ( + ProductAnalyticsJourneyComputedColumnName, +) +from datadog_api_client.v2.model.product_analytics_journey_conversion_type import ProductAnalyticsJourneyConversionType +from datadog_api_client.v2.model.product_analytics_journey_entity import ProductAnalyticsJourneyEntity +from datadog_api_client.v2.model.product_analytics_journey_funnel_compute import ProductAnalyticsJourneyFunnelCompute +from datadog_api_client.v2.model.product_analytics_journey_funnel_query import ProductAnalyticsJourneyFunnelQuery +from datadog_api_client.v2.model.product_analytics_journey_funnel_request import ProductAnalyticsJourneyFunnelRequest +from datadog_api_client.v2.model.product_analytics_journey_funnel_request_attributes import ( + ProductAnalyticsJourneyFunnelRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_funnel_request_data import ( + ProductAnalyticsJourneyFunnelRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_funnel_response import ProductAnalyticsJourneyFunnelResponse +from datadog_api_client.v2.model.product_analytics_journey_funnel_response_attributes import ( + ProductAnalyticsJourneyFunnelResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_funnel_response_data import ( + ProductAnalyticsJourneyFunnelResponseData, +) +from datadog_api_client.v2.model.product_analytics_journey_funnel_response_type import ( + ProductAnalyticsJourneyFunnelResponseType, +) +from datadog_api_client.v2.model.product_analytics_journey_funnel_step import ProductAnalyticsJourneyFunnelStep +from datadog_api_client.v2.model.product_analytics_journey_funnel_step_group import ( + ProductAnalyticsJourneyFunnelStepGroup, +) +from datadog_api_client.v2.model.product_analytics_journey_list_query import ProductAnalyticsJourneyListQuery +from datadog_api_client.v2.model.product_analytics_journey_list_record import ProductAnalyticsJourneyListRecord +from datadog_api_client.v2.model.product_analytics_journey_list_request import ProductAnalyticsJourneyListRequest +from datadog_api_client.v2.model.product_analytics_journey_list_request_attributes import ( + ProductAnalyticsJourneyListRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_list_request_data import ( + ProductAnalyticsJourneyListRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_list_request_type import ( + ProductAnalyticsJourneyListRequestType, +) +from datadog_api_client.v2.model.product_analytics_journey_list_response import ProductAnalyticsJourneyListResponse +from datadog_api_client.v2.model.product_analytics_journey_list_response_attributes import ( + ProductAnalyticsJourneyListResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_list_response_data import ( + ProductAnalyticsJourneyListResponseData, +) +from datadog_api_client.v2.model.product_analytics_journey_list_response_type import ( + ProductAnalyticsJourneyListResponseType, +) +from datadog_api_client.v2.model.product_analytics_journey_list_sort import ProductAnalyticsJourneyListSort +from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget +from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ProductAnalyticsJourneyNodeTargetType +from datadog_api_client.v2.model.product_analytics_journey_path_target import ProductAnalyticsJourneyPathTarget +from datadog_api_client.v2.model.product_analytics_journey_path_target_type import ProductAnalyticsJourneyPathTargetType +from datadog_api_client.v2.model.product_analytics_journey_request_type import ProductAnalyticsJourneyRequestType +from datadog_api_client.v2.model.product_analytics_journey_scalar_compute import ProductAnalyticsJourneyScalarCompute +from datadog_api_client.v2.model.product_analytics_journey_scalar_query import ProductAnalyticsJourneyScalarQuery +from datadog_api_client.v2.model.product_analytics_journey_scalar_request import ProductAnalyticsJourneyScalarRequest +from datadog_api_client.v2.model.product_analytics_journey_scalar_request_attributes import ( + ProductAnalyticsJourneyScalarRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_scalar_request_data import ( + ProductAnalyticsJourneyScalarRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_scalar_response import ProductAnalyticsJourneyScalarResponse +from datadog_api_client.v2.model.product_analytics_journey_scalar_response_data import ( + ProductAnalyticsJourneyScalarResponseData, +) +from datadog_api_client.v2.model.product_analytics_journey_scalar_response_type import ( + ProductAnalyticsJourneyScalarResponseType, +) +from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch +from datadog_api_client.v2.model.product_analytics_journey_search_filters import ProductAnalyticsJourneySearchFilters +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, +) +from datadog_api_client.v2.model.product_analytics_journey_target import ProductAnalyticsJourneyTarget +from datadog_api_client.v2.model.product_analytics_journey_timeseries_response import ( + ProductAnalyticsJourneyTimeseriesResponse, +) +from datadog_api_client.v2.model.product_analytics_journey_timeseries_response_data import ( + ProductAnalyticsJourneyTimeseriesResponseData, +) +from datadog_api_client.v2.model.product_analytics_journey_timeseries_response_type import ( + ProductAnalyticsJourneyTimeseriesResponseType, +) from datadog_api_client.v2.model.product_analytics_occurrence_filter import ProductAnalyticsOccurrenceFilter from datadog_api_client.v2.model.product_analytics_occurrence_query import ProductAnalyticsOccurrenceQuery from datadog_api_client.v2.model.product_analytics_occurrence_query_data_source import ( @@ -7152,6 +7317,145 @@ from datadog_api_client.v2.model.product_analytics_occurrence_search import ProductAnalyticsOccurrenceSearch from datadog_api_client.v2.model.product_analytics_response_meta import ProductAnalyticsResponseMeta from datadog_api_client.v2.model.product_analytics_response_meta_status import ProductAnalyticsResponseMetaStatus +from datadog_api_client.v2.model.product_analytics_retention_aggregation_target import ( + ProductAnalyticsRetentionAggregationTarget, +) +from datadog_api_client.v2.model.product_analytics_retention_aggregation_target_type import ( + ProductAnalyticsRetentionAggregationTargetType, +) +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval import ( + ProductAnalyticsRetentionCalendarTimeInterval, +) +from datadog_api_client.v2.model.product_analytics_retention_calendar_time_interval_type import ( + ProductAnalyticsRetentionCalendarTimeIntervalType, +) +from datadog_api_client.v2.model.product_analytics_retention_cell_scope import ProductAnalyticsRetentionCellScope +from datadog_api_client.v2.model.product_analytics_retention_cell_scope_type import ( + ProductAnalyticsRetentionCellScopeType, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_criteria import ( + ProductAnalyticsRetentionCohortCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope import ProductAnalyticsRetentionCohortScope +from datadog_api_client.v2.model.product_analytics_retention_cohort_scope_type import ( + ProductAnalyticsRetentionCohortScopeType, +) +from datadog_api_client.v2.model.product_analytics_retention_cohort_target import ProductAnalyticsRetentionCohortTarget +from datadog_api_client.v2.model.product_analytics_retention_compute import ProductAnalyticsRetentionCompute +from datadog_api_client.v2.model.product_analytics_retention_compute_metric import ( + ProductAnalyticsRetentionComputeMetric, +) +from datadog_api_client.v2.model.product_analytics_retention_entity import ProductAnalyticsRetentionEntity +from datadog_api_client.v2.model.product_analytics_retention_filters import ProductAnalyticsRetentionFilters +from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval import ( + ProductAnalyticsRetentionFixedTimeInterval, +) +from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_type import ( + ProductAnalyticsRetentionFixedTimeIntervalType, +) +from datadog_api_client.v2.model.product_analytics_retention_fixed_time_interval_unit import ( + ProductAnalyticsRetentionFixedTimeIntervalUnit, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_cohort import ProductAnalyticsRetentionGridCohort +from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_cell import ( + ProductAnalyticsRetentionGridCohortCell, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_cohort_type import ( + ProductAnalyticsRetentionGridCohortType, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_query import ProductAnalyticsRetentionGridQuery +from datadog_api_client.v2.model.product_analytics_retention_grid_request import ProductAnalyticsRetentionGridRequest +from datadog_api_client.v2.model.product_analytics_retention_grid_request_attributes import ( + ProductAnalyticsRetentionGridRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_request_data import ( + ProductAnalyticsRetentionGridRequestData, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_request_type import ( + ProductAnalyticsRetentionGridRequestType, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_response import ProductAnalyticsRetentionGridResponse +from datadog_api_client.v2.model.product_analytics_retention_grid_response_attributes import ( + ProductAnalyticsRetentionGridResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_response_data import ( + ProductAnalyticsRetentionGridResponseData, +) +from datadog_api_client.v2.model.product_analytics_retention_grid_response_type import ( + ProductAnalyticsRetentionGridResponseType, +) +from datadog_api_client.v2.model.product_analytics_retention_group_by import ProductAnalyticsRetentionGroupBy +from datadog_api_client.v2.model.product_analytics_retention_group_by_target import ( + ProductAnalyticsRetentionGroupByTarget, +) +from datadog_api_client.v2.model.product_analytics_retention_index_target import ProductAnalyticsRetentionIndexTarget +from datadog_api_client.v2.model.product_analytics_retention_index_target_type import ( + ProductAnalyticsRetentionIndexTargetType, +) +from datadog_api_client.v2.model.product_analytics_retention_list_column import ProductAnalyticsRetentionListColumn +from datadog_api_client.v2.model.product_analytics_retention_list_column_field import ( + ProductAnalyticsRetentionListColumnField, +) +from datadog_api_client.v2.model.product_analytics_retention_list_query import ProductAnalyticsRetentionListQuery +from datadog_api_client.v2.model.product_analytics_retention_list_record import ProductAnalyticsRetentionListRecord +from datadog_api_client.v2.model.product_analytics_retention_list_request import ProductAnalyticsRetentionListRequest +from datadog_api_client.v2.model.product_analytics_retention_list_request_attributes import ( + ProductAnalyticsRetentionListRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_retention_list_request_data import ( + ProductAnalyticsRetentionListRequestData, +) +from datadog_api_client.v2.model.product_analytics_retention_list_request_type import ( + ProductAnalyticsRetentionListRequestType, +) +from datadog_api_client.v2.model.product_analytics_retention_list_response import ProductAnalyticsRetentionListResponse +from datadog_api_client.v2.model.product_analytics_retention_list_response_attributes import ( + ProductAnalyticsRetentionListResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_retention_list_response_data import ( + ProductAnalyticsRetentionListResponseData, +) +from datadog_api_client.v2.model.product_analytics_retention_list_response_type import ( + ProductAnalyticsRetentionListResponseType, +) +from datadog_api_client.v2.model.product_analytics_retention_period import ProductAnalyticsRetentionPeriod +from datadog_api_client.v2.model.product_analytics_retention_return_condition import ( + ProductAnalyticsRetentionReturnCondition, +) +from datadog_api_client.v2.model.product_analytics_retention_return_criteria import ( + ProductAnalyticsRetentionReturnCriteria, +) +from datadog_api_client.v2.model.product_analytics_retention_return_period_scope import ( + ProductAnalyticsRetentionReturnPeriodScope, +) +from datadog_api_client.v2.model.product_analytics_retention_return_period_scope_type import ( + ProductAnalyticsRetentionReturnPeriodScopeType, +) +from datadog_api_client.v2.model.product_analytics_retention_scope import ProductAnalyticsRetentionScope +from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch +from datadog_api_client.v2.model.product_analytics_retention_time_interval import ProductAnalyticsRetentionTimeInterval +from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node import ProductAnalyticsSankeyAggregatedNode +from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node_type import ( + ProductAnalyticsSankeyAggregatedNodeType, +) +from datadog_api_client.v2.model.product_analytics_sankey_definition import ProductAnalyticsSankeyDefinition +from datadog_api_client.v2.model.product_analytics_sankey_link import ProductAnalyticsSankeyLink +from datadog_api_client.v2.model.product_analytics_sankey_node import ProductAnalyticsSankeyNode +from datadog_api_client.v2.model.product_analytics_sankey_node_type import ProductAnalyticsSankeyNodeType +from datadog_api_client.v2.model.product_analytics_sankey_request import ProductAnalyticsSankeyRequest +from datadog_api_client.v2.model.product_analytics_sankey_request_attributes import ( + ProductAnalyticsSankeyRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_sankey_request_data import ProductAnalyticsSankeyRequestData +from datadog_api_client.v2.model.product_analytics_sankey_request_type import ProductAnalyticsSankeyRequestType +from datadog_api_client.v2.model.product_analytics_sankey_response import ProductAnalyticsSankeyResponse +from datadog_api_client.v2.model.product_analytics_sankey_response_attributes import ( + ProductAnalyticsSankeyResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_sankey_response_data import ProductAnalyticsSankeyResponseData +from datadog_api_client.v2.model.product_analytics_sankey_response_type import ProductAnalyticsSankeyResponseType +from datadog_api_client.v2.model.product_analytics_sankey_search import ProductAnalyticsSankeySearch +from datadog_api_client.v2.model.product_analytics_sankey_time import ProductAnalyticsSankeyTime from datadog_api_client.v2.model.product_analytics_scalar_column import ProductAnalyticsScalarColumn from datadog_api_client.v2.model.product_analytics_scalar_column_meta import ProductAnalyticsScalarColumnMeta from datadog_api_client.v2.model.product_analytics_scalar_column_type import ProductAnalyticsScalarColumnType @@ -15651,6 +15955,18 @@ "ProcessSummaryAttributes", "ProcessSummaryType", "ProcessTimeseriesQuery", + "ProductAnalyticsAnalyticsListQuery", + "ProductAnalyticsAnalyticsListRecord", + "ProductAnalyticsAnalyticsListRequest", + "ProductAnalyticsAnalyticsListRequestAttributes", + "ProductAnalyticsAnalyticsListRequestData", + "ProductAnalyticsAnalyticsListRequestType", + "ProductAnalyticsAnalyticsListResponse", + "ProductAnalyticsAnalyticsListResponseAttributes", + "ProductAnalyticsAnalyticsListResponseData", + "ProductAnalyticsAnalyticsListResponseType", + "ProductAnalyticsAnalyticsListSort", + "ProductAnalyticsAnalyticsListSortOrder", "ProductAnalyticsAnalyticsQuery", "ProductAnalyticsAnalyticsRequest", "ProductAnalyticsAnalyticsRequestAttributes", @@ -15661,20 +15977,158 @@ "ProductAnalyticsAudienceSegmentSubquery", "ProductAnalyticsAudienceUserSubquery", "ProductAnalyticsBaseQuery", + "ProductAnalyticsCalendarInterval", + "ProductAnalyticsCalendarIntervalType", "ProductAnalyticsCompute", + "ProductAnalyticsElapsedTime", "ProductAnalyticsEventQuery", "ProductAnalyticsEventQueryDataSource", "ProductAnalyticsEventSearch", "ProductAnalyticsExecutionType", + "ProductAnalyticsFormulaJourneyQuery", + "ProductAnalyticsFormulaJourneyRequest", + "ProductAnalyticsFormulaJourneyRequestAttributes", + "ProductAnalyticsFormulaJourneyRequestData", + "ProductAnalyticsFormulaJourneyRequestType", + "ProductAnalyticsFormulaRetentionQuery", + "ProductAnalyticsFormulaRetentionRequest", + "ProductAnalyticsFormulaRetentionRequestAttributes", + "ProductAnalyticsFormulaRetentionRequestData", + "ProductAnalyticsFormulaRetentionRequestType", + "ProductAnalyticsGraphQueryCompute", + "ProductAnalyticsGraphQueryGroupBy", + "ProductAnalyticsGraphQueryGroupBySource", "ProductAnalyticsGroupBy", "ProductAnalyticsGroupBySort", "ProductAnalyticsInterval", + "ProductAnalyticsJoinKeys", + "ProductAnalyticsJourneyAudienceAccountQuery", + "ProductAnalyticsJourneyAudienceFilters", + "ProductAnalyticsJourneyAudienceSegmentQuery", + "ProductAnalyticsJourneyAudienceUserQuery", + "ProductAnalyticsJourneyComputedColumn", + "ProductAnalyticsJourneyComputedColumnName", + "ProductAnalyticsJourneyConversionType", + "ProductAnalyticsJourneyEntity", + "ProductAnalyticsJourneyFunnelCompute", + "ProductAnalyticsJourneyFunnelQuery", + "ProductAnalyticsJourneyFunnelRequest", + "ProductAnalyticsJourneyFunnelRequestAttributes", + "ProductAnalyticsJourneyFunnelRequestData", + "ProductAnalyticsJourneyFunnelResponse", + "ProductAnalyticsJourneyFunnelResponseAttributes", + "ProductAnalyticsJourneyFunnelResponseData", + "ProductAnalyticsJourneyFunnelResponseType", + "ProductAnalyticsJourneyFunnelStep", + "ProductAnalyticsJourneyFunnelStepGroup", + "ProductAnalyticsJourneyListQuery", + "ProductAnalyticsJourneyListRecord", + "ProductAnalyticsJourneyListRequest", + "ProductAnalyticsJourneyListRequestAttributes", + "ProductAnalyticsJourneyListRequestData", + "ProductAnalyticsJourneyListRequestType", + "ProductAnalyticsJourneyListResponse", + "ProductAnalyticsJourneyListResponseAttributes", + "ProductAnalyticsJourneyListResponseData", + "ProductAnalyticsJourneyListResponseType", + "ProductAnalyticsJourneyListSort", + "ProductAnalyticsJourneyNodeTarget", + "ProductAnalyticsJourneyNodeTargetType", + "ProductAnalyticsJourneyPathTarget", + "ProductAnalyticsJourneyPathTargetType", + "ProductAnalyticsJourneyRequestType", + "ProductAnalyticsJourneyScalarCompute", + "ProductAnalyticsJourneyScalarQuery", + "ProductAnalyticsJourneyScalarRequest", + "ProductAnalyticsJourneyScalarRequestAttributes", + "ProductAnalyticsJourneyScalarRequestData", + "ProductAnalyticsJourneyScalarResponse", + "ProductAnalyticsJourneyScalarResponseData", + "ProductAnalyticsJourneyScalarResponseType", + "ProductAnalyticsJourneySearch", + "ProductAnalyticsJourneySearchFilters", + "ProductAnalyticsJourneySearchGraphFilter", + "ProductAnalyticsJourneySearchGraphFilterName", + "ProductAnalyticsJourneySearchGraphFilterOperator", + "ProductAnalyticsJourneyTarget", + "ProductAnalyticsJourneyTimeseriesResponse", + "ProductAnalyticsJourneyTimeseriesResponseData", + "ProductAnalyticsJourneyTimeseriesResponseType", "ProductAnalyticsOccurrenceFilter", "ProductAnalyticsOccurrenceQuery", "ProductAnalyticsOccurrenceQueryDataSource", "ProductAnalyticsOccurrenceSearch", "ProductAnalyticsResponseMeta", "ProductAnalyticsResponseMetaStatus", + "ProductAnalyticsRetentionAggregationTarget", + "ProductAnalyticsRetentionAggregationTargetType", + "ProductAnalyticsRetentionCalendarTimeInterval", + "ProductAnalyticsRetentionCalendarTimeIntervalType", + "ProductAnalyticsRetentionCellScope", + "ProductAnalyticsRetentionCellScopeType", + "ProductAnalyticsRetentionCohortCriteria", + "ProductAnalyticsRetentionCohortScope", + "ProductAnalyticsRetentionCohortScopeType", + "ProductAnalyticsRetentionCohortTarget", + "ProductAnalyticsRetentionCompute", + "ProductAnalyticsRetentionComputeMetric", + "ProductAnalyticsRetentionEntity", + "ProductAnalyticsRetentionFilters", + "ProductAnalyticsRetentionFixedTimeInterval", + "ProductAnalyticsRetentionFixedTimeIntervalType", + "ProductAnalyticsRetentionFixedTimeIntervalUnit", + "ProductAnalyticsRetentionGridCohort", + "ProductAnalyticsRetentionGridCohortCell", + "ProductAnalyticsRetentionGridCohortType", + "ProductAnalyticsRetentionGridQuery", + "ProductAnalyticsRetentionGridRequest", + "ProductAnalyticsRetentionGridRequestAttributes", + "ProductAnalyticsRetentionGridRequestData", + "ProductAnalyticsRetentionGridRequestType", + "ProductAnalyticsRetentionGridResponse", + "ProductAnalyticsRetentionGridResponseAttributes", + "ProductAnalyticsRetentionGridResponseData", + "ProductAnalyticsRetentionGridResponseType", + "ProductAnalyticsRetentionGroupBy", + "ProductAnalyticsRetentionGroupByTarget", + "ProductAnalyticsRetentionIndexTarget", + "ProductAnalyticsRetentionIndexTargetType", + "ProductAnalyticsRetentionListColumn", + "ProductAnalyticsRetentionListColumnField", + "ProductAnalyticsRetentionListQuery", + "ProductAnalyticsRetentionListRecord", + "ProductAnalyticsRetentionListRequest", + "ProductAnalyticsRetentionListRequestAttributes", + "ProductAnalyticsRetentionListRequestData", + "ProductAnalyticsRetentionListRequestType", + "ProductAnalyticsRetentionListResponse", + "ProductAnalyticsRetentionListResponseAttributes", + "ProductAnalyticsRetentionListResponseData", + "ProductAnalyticsRetentionListResponseType", + "ProductAnalyticsRetentionPeriod", + "ProductAnalyticsRetentionReturnCondition", + "ProductAnalyticsRetentionReturnCriteria", + "ProductAnalyticsRetentionReturnPeriodScope", + "ProductAnalyticsRetentionReturnPeriodScopeType", + "ProductAnalyticsRetentionScope", + "ProductAnalyticsRetentionSearch", + "ProductAnalyticsRetentionTimeInterval", + "ProductAnalyticsSankeyAggregatedNode", + "ProductAnalyticsSankeyAggregatedNodeType", + "ProductAnalyticsSankeyDefinition", + "ProductAnalyticsSankeyLink", + "ProductAnalyticsSankeyNode", + "ProductAnalyticsSankeyNodeType", + "ProductAnalyticsSankeyRequest", + "ProductAnalyticsSankeyRequestAttributes", + "ProductAnalyticsSankeyRequestData", + "ProductAnalyticsSankeyRequestType", + "ProductAnalyticsSankeyResponse", + "ProductAnalyticsSankeyResponseAttributes", + "ProductAnalyticsSankeyResponseData", + "ProductAnalyticsSankeyResponseType", + "ProductAnalyticsSankeySearch", + "ProductAnalyticsSankeyTime", "ProductAnalyticsScalarColumn", "ProductAnalyticsScalarColumnMeta", "ProductAnalyticsScalarColumnType", diff --git a/tests/v2/features/product_analytics.feature b/tests/v2/features/product_analytics.feature index cee2e815db..2e5c787307 100644 --- a/tests/v2/features/product_analytics.feature +++ b/tests/v2/features/product_analytics.feature @@ -14,6 +14,132 @@ Feature: Product Analytics Given a valid "apiKeyAuth" key in the system And an instance of "ProductAnalytics" API + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute a Sankey diagram returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsSankey" enabled + And new "QueryProductAnalyticsSankey" request + And body with value {"data": {"attributes": {"definition": {"entries_per_step": 10, "number_of_steps": 3, "source": "@view.name", "target": "@view.name"}, "search": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "query": "@type:view"}, "time": {"from": 1756425600000, "to": 1756857600000}}, "type": "sankey_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute a Sankey diagram returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsSankey" enabled + And new "QueryProductAnalyticsSankey" request + And body with value {"data": {"attributes": {"definition": {"entries_per_step": 10, "number_of_steps": 3, "source": "@view.name", "target": "@view.name"}, "search": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "query": "@type:view"}, "time": {"from": 1756425600000, "to": 1756857600000}}, "type": "sankey_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute a retention grid returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionGrid" enabled + And new "QueryProductAnalyticsRetentionGrid" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"computation_scope": {"target": {"type": "index", "value": 0}, "type": "cohort"}, "compute": {"aggregation": "count", "metric": "__dd.retention_rate"}, "group_by": [{"facet": "@geo.country", "limit": 10, "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "target": "cohort"}], "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "retention_grid_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute a retention grid returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionGrid" enabled + And new "QueryProductAnalyticsRetentionGrid" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"computation_scope": {"target": {"type": "index", "value": 0}, "type": "cohort"}, "compute": {"aggregation": "count", "metric": "__dd.retention_rate"}, "group_by": [{"facet": "@geo.country", "limit": 10, "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "target": "cohort"}], "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "retention_grid_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute journey funnel analysis returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyFunnel" enabled + And new "QueryProductAnalyticsJourneyFunnel" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"compute": {}, "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}}, "to": 1756857600000}, "type": "journey_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute journey funnel analysis returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyFunnel" enabled + And new "QueryProductAnalyticsJourneyFunnel" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"compute": {}, "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}}, "to": 1756857600000}, "type": "journey_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute journey scalar analytics returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyScalar" enabled + And new "QueryProductAnalyticsJourneyScalar" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"compute": {"aggregation": "count", "target": {"type": "node", "value": "A"}}, "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}}, "to": 1756857600000}, "type": "formula_journey_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute journey scalar analytics returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyScalar" enabled + And new "QueryProductAnalyticsJourneyScalar" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"compute": {"aggregation": "count", "target": {"type": "node", "value": "A"}}, "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}}, "to": 1756857600000}, "type": "formula_journey_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute journey timeseries analytics returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyTimeseries" enabled + And new "QueryProductAnalyticsJourneyTimeseries" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"compute": {"aggregation": "count", "target": {"type": "node", "value": "A"}}, "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}}, "to": 1756857600000}, "type": "formula_journey_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute journey timeseries analytics returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyTimeseries" enabled + And new "QueryProductAnalyticsJourneyTimeseries" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"compute": {"aggregation": "count", "target": {"type": "node", "value": "A"}}, "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}}, "to": 1756857600000}, "type": "formula_journey_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute retention scalar values returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionScalar" enabled + And new "QueryProductAnalyticsRetentionScalar" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"computation_scope": {"target": {"type": "index", "value": 0}, "type": "cohort"}, "compute": {"aggregation": "count", "metric": "__dd.retention_rate"}, "group_by": [{"facet": "@geo.country", "limit": 10, "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "target": "cohort"}], "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "formula_retention_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute retention scalar values returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionScalar" enabled + And new "QueryProductAnalyticsRetentionScalar" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"computation_scope": {"target": {"type": "index", "value": 0}, "type": "cohort"}, "compute": {"aggregation": "count", "metric": "__dd.retention_rate"}, "group_by": [{"facet": "@geo.country", "limit": 10, "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "target": "cohort"}], "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "formula_retention_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute retention timeseries returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionTimeseries" enabled + And new "QueryProductAnalyticsRetentionTimeseries" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"computation_scope": {"target": {"type": "index", "value": 0}, "type": "cohort"}, "compute": {"aggregation": "count", "metric": "__dd.retention_rate"}, "group_by": [{"facet": "@geo.country", "limit": 10, "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "target": "cohort"}], "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "formula_retention_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute retention timeseries returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionTimeseries" enabled + And new "QueryProductAnalyticsRetentionTimeseries" request + And body with value {"data": {"attributes": {"exclude_anonymous_traffic": false, "from": 1756425600000, "query": {"computation_scope": {"target": {"type": "index", "value": 0}, "type": "cohort"}, "compute": {"aggregation": "count", "metric": "__dd.retention_rate"}, "group_by": [{"facet": "@geo.country", "limit": 10, "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "target": "cohort"}], "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "formula_retention_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/product-analytics-backend Scenario: Compute scalar analytics returns "Bad Request" response Given a valid "appKeyAuth" key in the system @@ -46,6 +172,60 @@ Feature: Product Analytics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/product-analytics-backend + Scenario: List analytics events returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsList" enabled + And new "QueryProductAnalyticsList" request + And body with value {"data": {"attributes": {"from": 1771232048460, "query": {"columns": ["@view.name"], "limit": 100, "query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}}, "to": 1771836848262}, "type": "formula_analytics_extended_list_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: List analytics events returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsList" enabled + And new "QueryProductAnalyticsList" request + And body with value {"data": {"attributes": {"from": 1771232048460, "query": {"columns": ["@view.name"], "limit": 100, "query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}}, "to": 1771836848262}, "type": "formula_analytics_extended_list_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: List journey entities returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyList" enabled + And new "QueryProductAnalyticsJourneyList" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"computed_columns": [{"name": "first_conversion_timestamps"}], "conversion_type": "conversion", "entity_columns": [], "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}, "sort": {"order": "desc"}, "target": {"type": "node", "value": "A"}}, "to": 1756857600000}, "type": "journey_list_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: List journey entities returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyList" enabled + And new "QueryProductAnalyticsJourneyList" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"computed_columns": [{"name": "first_conversion_timestamps"}], "conversion_type": "conversion", "entity_columns": [], "group_by": [{"facet": "@geo.country", "should_exclude_missing": false, "sort": {"aggregation": "count", "order": "desc"}, "source": "product_analytics_audience_filters.users", "target": {"type": "node", "value": "A"}, "value_filters": []}], "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}, "sort": {"order": "desc"}, "target": {"type": "node", "value": "A"}}, "to": 1756857600000}, "type": "journey_list_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: List the entities behind a retention cell returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionList" enabled + And new "QueryProductAnalyticsRetentionList" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"columns": [{"field": {"path": "@usr.email"}}], "computation_scope": {"cohort_target": {"type": "index", "value": 0}, "return_period_target": {"type": "index", "value": 0}, "type": "cell"}, "limit": 100, "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "retention_list_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: List the entities behind a retention cell returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsRetentionList" enabled + And new "QueryProductAnalyticsRetentionList" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"columns": [{"field": {"path": "@usr.email"}}], "computation_scope": {"cohort_target": {"type": "index", "value": 0}, "return_period_target": {"type": "index", "value": 0}, "type": "cell"}, "limit": 100, "search": {"cohort_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}, "filters": {"audience_filters": {"accounts": [{"name": ""}], "formula": "u", "segments": [{"name": "", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "u", "query": "*"}]}}, "retention_entity": "@usr.id", "return_condition": "conversion_on_or_after", "return_criteria": {"base_query": {"data_source": "product_analytics", "search": {"query": "@type:view"}}, "time_interval": {"type": "calendar", "value": {"alignment": "monday", "quantity": 1, "timezone": "UTC", "type": "week"}}}}}, "to": 1756857600000}, "type": "retention_list_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/product-analytics-backend Scenario: Send server-side events returns "Bad Request" response Given new "SubmitProductAnalyticsEvent" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index b0bc955911..b10abaebef 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6357,6 +6357,12 @@ "type": "unsafe" } }, + "QueryProductAnalyticsList": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "QueryProductAnalyticsScalar": { "tag": "Product Analytics", "undo": { @@ -6369,6 +6375,60 @@ "type": "safe" } }, + "QueryProductAnalyticsJourneyFunnel": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsJourneyList": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsJourneyScalar": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsJourneyTimeseries": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsRetentionGrid": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsRetentionList": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsRetentionScalar": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsRetentionTimeseries": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsSankey": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "QueryEventFilteredUsers": { "tag": "Rum Audience Management", "undo": {