curl --request GET \
--url https://statsigapi.net/console/v1/metrics/metric_source/{name}/metrics \
--header 'STATSIG-API-KEY: <api-key>'{
"message": "<string>",
"data": [
{
"name": "metricName",
"type": "sum",
"directionality": "increase",
"id": "metricId",
"lineage": {
"events": [
"event1",
"event2"
],
"metrics": [
"metric1",
"metric2"
]
},
"isVerified": false,
"isReadOnly": false,
"unitTypes": [
"stableID",
"userID"
],
"metricEvents": [
{
"name": "event1",
"type": "value"
}
],
"metricComponentMetrics": [],
"description": "the description of this metric",
"tags": [
"tag1",
"tag2"
],
"isPermanent": false,
"rollupTimeWindow": "custom",
"customRollUpStart": 1,
"customRollUpEnd": 1,
"funnelEventList": [
{
"name": "event1",
"type": "event_dau"
}
],
"funnelCountDistinct": "events",
"warehouseNative": {
"aggregation": "count",
"metricSourceName": "<string>",
"criteria": [
{
"type": "value",
"condition": "in",
"column": "<string>",
"values": [
"<string>"
],
"nullVacuousOverride": true
}
],
"waitForCohortWindow": true,
"denominatorCriteria": [
{
"type": "value",
"condition": "in",
"column": "<string>",
"values": [
"<string>"
],
"nullVacuousOverride": true
}
],
"denominatorAggregation": "count",
"denominatorCustomRollupEnd": 123,
"denominatorCustomRollupStart": 123,
"denominatorMetricSourceName": "<string>",
"denominatorRollupTimeWindow": "<string>",
"denominatorValueColumn": "<string>",
"funnelCalculationWindow": 123,
"funnelCountDistinct": "sessions",
"funnelEvents": [
{
"criteria": [
{
"type": "value",
"condition": "in",
"column": "<string>",
"values": [
"<string>"
],
"nullVacuousOverride": true
}
],
"metricSourceName": "<string>",
"name": "<string>",
"sessionIdentifierField": "<string>"
}
],
"funnelStartCriteria": "start_event",
"metricDimensionColumns": [
"<string>"
],
"metricBakeDays": 123,
"numeratorAggregation": "count",
"valueColumn": "<string>",
"winsorizationHigh": 0.5,
"winsorizationLow": 0.5,
"cupedAttributionWindow": 123,
"onlyIncludeUsersWithConversionEvent": true,
"percentile": 123,
"valueThreshold": 123,
"cap": 123,
"rollupTimeWindow": "<string>",
"customRollUpStart": 123,
"customRollUpEnd": 123,
"allowNullRatioDenominator": true
},
"team": "<string>",
"teamID": "<string>",
"dryRun": true,
"isHidden": false,
"creatorName": "creatorName",
"creatorEmail": "creatorEmail",
"createdTime": 1716230400,
"lastModifierID": "<string>",
"lastModifiedTime": 123,
"lastModifierEmail": "<string>",
"lastModifierName": "<string>",
"owner": {
"name": "ownerName"
}
}
],
"pagination": {
"itemsPerPage": 123,
"pageNumber": 123,
"nextPage": "<string>",
"previousPage": "<string>",
"totalItems": 123,
"all": "<string>"
}
}curl --request GET \
--url https://statsigapi.net/console/v1/metrics/metric_source/{name}/metrics \
--header 'STATSIG-API-KEY: <api-key>'{
"message": "<string>",
"data": [
{
"name": "metricName",
"type": "sum",
"directionality": "increase",
"id": "metricId",
"lineage": {
"events": [
"event1",
"event2"
],
"metrics": [
"metric1",
"metric2"
]
},
"isVerified": false,
"isReadOnly": false,
"unitTypes": [
"stableID",
"userID"
],
"metricEvents": [
{
"name": "event1",
"type": "value"
}
],
"metricComponentMetrics": [],
"description": "the description of this metric",
"tags": [
"tag1",
"tag2"
],
"isPermanent": false,
"rollupTimeWindow": "custom",
"customRollUpStart": 1,
"customRollUpEnd": 1,
"funnelEventList": [
{
"name": "event1",
"type": "event_dau"
}
],
"funnelCountDistinct": "events",
"warehouseNative": {
"aggregation": "count",
"metricSourceName": "<string>",
"criteria": [
{
"type": "value",
"condition": "in",
"column": "<string>",
"values": [
"<string>"
],
"nullVacuousOverride": true
}
],
"waitForCohortWindow": true,
"denominatorCriteria": [
{
"type": "value",
"condition": "in",
"column": "<string>",
"values": [
"<string>"
],
"nullVacuousOverride": true
}
],
"denominatorAggregation": "count",
"denominatorCustomRollupEnd": 123,
"denominatorCustomRollupStart": 123,
"denominatorMetricSourceName": "<string>",
"denominatorRollupTimeWindow": "<string>",
"denominatorValueColumn": "<string>",
"funnelCalculationWindow": 123,
"funnelCountDistinct": "sessions",
"funnelEvents": [
{
"criteria": [
{
"type": "value",
"condition": "in",
"column": "<string>",
"values": [
"<string>"
],
"nullVacuousOverride": true
}
],
"metricSourceName": "<string>",
"name": "<string>",
"sessionIdentifierField": "<string>"
}
],
"funnelStartCriteria": "start_event",
"metricDimensionColumns": [
"<string>"
],
"metricBakeDays": 123,
"numeratorAggregation": "count",
"valueColumn": "<string>",
"winsorizationHigh": 0.5,
"winsorizationLow": 0.5,
"cupedAttributionWindow": 123,
"onlyIncludeUsersWithConversionEvent": true,
"percentile": 123,
"valueThreshold": 123,
"cap": 123,
"rollupTimeWindow": "<string>",
"customRollUpStart": 123,
"customRollUpEnd": 123,
"allowNullRatioDenominator": true
},
"team": "<string>",
"teamID": "<string>",
"dryRun": true,
"isHidden": false,
"creatorName": "creatorName",
"creatorEmail": "creatorEmail",
"createdTime": 1716230400,
"lastModifierID": "<string>",
"lastModifiedTime": 123,
"lastModifierEmail": "<string>",
"lastModifierName": "<string>",
"owner": {
"name": "ownerName"
}
}
],
"pagination": {
"itemsPerPage": 123,
"pageNumber": 123,
"nextPage": "<string>",
"previousPage": "<string>",
"totalItems": 123,
"all": "<string>"
}
}Optional header to respect review settings for mutation endpoints.
name
Read metric source metrics response
A simple string explaining the result of the operation.
Array of results returned by pagination limit.
Show child attributes
The name of the metric, serving as its primary identifier.
"metricName"
The type of the metric, defining its aggregation method and characteristics.
ratio, sum, composite, mean, event_count_custom, event_user, funnel, undefined, setup_incomplete, composite_sum, import_window, user_warehouse "sum"
Specifies the desired directionality for the metric, indicating whether an increase or decrease is favorable.
increase, decrease "increase"
Unique identifier for the metric, used for referencing within the system.
"metricId"
Marks the metric as verified, indicating trustworthiness within the organization.
false
Set to true to make the metric definition editable only through the Console API.
false
Array of unit types associated with the metric, such as stableID or userID.
["stableID", "userID"]An array of event definitions used to compute the metric.
Show child attributes
The name of the metric event.
The type of metric event. Allowed values include: count, count_distinct, value, and metadata.
count, count_distinct, value, metadata The key for associated metadata, if applicable.
Filtering criteria for the metric event, including conditions and values to refine the event data.
Show child attributes
Type of event criterion for filtering metrics. Options include value, metadata, user, and user_custom; in Warehouse Native, this should always be metadata.
value, metadata, user, user_custom sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native
in, not_in, =, >, <, >=, <=, is_null, non_null, contains, not_contains, sql_filter, starts_with, ends_with, after_exposure Optional column specifying which data attribute to filter on.
Optional array of values for the criterion to match against.
If true, overrides null values in criterion evaluation.
[{ "name": "event1", "type": "value" }]An optional description providing additional context about the metric.
"the description of this metric"
Optional tags for categorizing the metric and improving searchability.
["tag1", "tag2"]Indicates whether the metric is permanent and should not be deleted.
false
Time window for the metric rollup. Specify "custom" for a customized time window.
"custom"
Custom time window start date in days since exposure.
1
Custom time window end date in days since exposure.
1
List of events used to create funnel metrics.
Show child attributes
The name of the funnel event used in the metric.
"event1"
The type of funnel event, specifying how the event is tracked.
event_dau, event_user, event_count, event_count_custom "event_dau"
Specifies whether to count events or distinct users for the funnel metric.
events, users Defines warehouse native metrics for advanced configurations.
Show child attributes
Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile
count, sum, mean, daily_participation, ratio, funnel, count_distinct, percentile, first_value, latest_value, retention, max, min, For Count, Sum, Mean, User Count aggregation types: the name of metric source
Filtering criteria for the metric source
Show child attributes
Type of event criterion for filtering metrics. Options include value, metadata, user, and user_custom; in Warehouse Native, this should always be metadata.
value, metadata, user, user_custom sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native
in, not_in, =, >, <, >=, <=, is_null, non_null, contains, not_contains, sql_filter, starts_with, ends_with, after_exposure Optional column specifying which data attribute to filter on.
Optional array of values for the criterion to match against.
If true, overrides null values in criterion evaluation.
Filtering criteria for the denominator metric source, if this metric is a ratio
Show child attributes
Type of event criterion for filtering metrics. Options include value, metadata, user, and user_custom; in Warehouse Native, this should always be metadata.
value, metadata, user, user_custom sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native
in, not_in, =, >, <, >=, <=, is_null, non_null, contains, not_contains, sql_filter, starts_with, ends_with, after_exposure Optional column specifying which data attribute to filter on.
Optional array of values for the criterion to match against.
If true, overrides null values in criterion evaluation.
Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile
count, sum, mean, daily_participation, ratio, funnel, count_distinct, percentile, first_value, latest_value, retention, max, min, Custom end date for rollup in days since exposure.
Custom start date for rollup in days since exposure.
Name of the metric source for the denominator.
Time window for the denominator metric. Specify "custom" for a custom window.
Column name for the denominator’s value.
Duration for counting funnel events in days.
Allowed: users┃sessions for distinct count method in funnel events.
sessions, users List of funnel events with associated criteria and identifiers.
Show child attributes
Optional array of criteria to filter the funnel events, defined by various types and conditions.
Show child attributes
Type of event criterion for filtering metrics. Options include value, metadata, user, and user_custom; in Warehouse Native, this should always be metadata.
value, metadata, user, user_custom sql_filter, start_withs, ends_with, and after_exposure are only applicable in Warehouse Native
in, not_in, =, >, <, >=, <=, is_null, non_null, contains, not_contains, sql_filter, starts_with, ends_with, after_exposure Optional column specifying which data attribute to filter on.
Optional array of values for the criterion to match against.
If true, overrides null values in criterion evaluation.
Optional name of the metric source associated with the funnel event.
Optional step name for the funnel event, can be null if not specified.
Name of column which being used as session identifier. Funnel event with the same metric source
Allowed: start_event┃exposure to determine funnel start criteria.
start_event, exposure Specify metadata columns for breaking down metric analysis.
Number of days for metric baking; specify duration for analysis.
Aggregation type for numerator; Allowed: count┃sum┃mean┃daily_participation┃ratio┃funnel┃count_distinct┃percentile.
count, sum, mean, daily_participation, ratio, funnel, count_distinct, percentile, first_value, latest_value, retention, max, min, Column name representing the metric’s value.
High threshold for winsorization; must be between 0 and 1.
0 <= x <= 1Low threshold for winsorization; must be between 0 and 1.
0 <= x <= 1Attribution window for CUPED adjustments in days.
Flag to include only users with a conversion event in the metric.
Percentile value for statistical calculations.
Threshold value for filtering metrics.
Maximum cap for metric values.
General time window for rollup; can specify custom settings.
Custom start date for rollup in days since exposure.
Custom end date for rollup in days since exposure.
Include units which do not have a denominator. Only applicable to ratios.
The team associated with the metric, applicable for enterprise environments.
The team ID associated with the metric, applicable for enterprise environments.
Skips persisting the metric (used to validate that inputs are correct)
Indicates if the metric is hidden from the user interface.
false
Name of the person who created the metric, if available.
"creatorName"
Email address of the metric creator for contact purposes.
"creatorEmail"
Timestamp indicating when the metric was created.
1716230400
ID of the last modifier.
Time of the last modification to this metric.
Email of the last modifier.
Name of the last modifier.