Create Qualifying Event

Create Qualifying Event

posthttps://statsigapi.net/console/v1/experiments/qualifying_events

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Body

application/json
namestringrequired

The name of the source, serving as its primary identifier.

descriptionstring

An optional description for the source, providing context and details about its purpose and usage.

tagsstring[]

Optional array of tags to categorize the source, facilitating easier organization and retrieval.

sqlstringrequired

The SQL query or statement used to extract data from the source.

timestampColumnstringrequired

The name of the column containing timestamp data for the source.

timestampAsDayboolean

Indicates whether the timestamp should be treated as a day-level granularity.

idTypeMappingobject[]required

Array defining the mapping between Statsig unit IDs and their respective source columns.

Show child attributes
statsigUnitIDstringrequired

The identifier mapping for Statsig units.

columnstringrequired

The corresponding column name in the source that relates to the Statsig unit ID.

sourceTypestring

The type of source, indicating whether it is a database table or a custom query.

Allowed values:tablequery
tableNamestring

The name of the database table if the source type is "table".

datePartitionColumnstring

The name of the date partition column if the source type is "table". Can be undefined.

customFieldMappingobject[]

Optional array defining mappings for custom fields using specific formulas.

Show child attributes
keystringrequired

The identifier for the custom field mapping.

formulastringrequired

The formula or expression used to compute the custom field value.

isReadOnlyboolean

Specifies if the source can only be edited via the Console API.

isVerifiedboolean

Marks the metric source as verified, indicating trustworthiness within the organization.

Example:false
disableCUREboolean

Disable CURE for all metrics built from this metric source

ownerobject

Schema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined.

Example:{"ownerID":"user123","ownerType":"USER","ownerName":"John Doe","ownerEmail":"owner123@test.com"}
Constraints:nullable
Show child attributes
ownerIDstring

ID of the owner

Example:abc123
ownerTypestring

Type of the owner (e.g., SDK_KEY or USER)

Example:USER
ownerNamestring

The name of the owner. This field is optional.

Example:John Doe
ownerEmailstring

The email of the owner. This field is optional.

teamstring

Optional field indicating the team name responsible for the metric, aiding in accountability and management.

Constraints:nullable
teamIDstring

Optional field indicating the team ID responsible for the metric, aiding in accountability and management.

Constraints:nullable
dryRunboolean

Skips persisting the source (used to validate that inputs are correct)

skip_validationboolean

Skips running SQL validation for the source. Requires all_columns and column_types when true. Availability is gated.

all_columnsstring[]

Column names to persist when skip_validation is true. Optional otherwise.

column_typesstring[]

Column types aligned with all_columns when skip_validation is true. Optional otherwise.

Response

application/json
201· Create qualifying event response
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
namestringrequired

The name of the source, serving as its primary identifier.

descriptionstringrequired

A detailed description of the source, providing context and usage information.

tagsstring[]

Optional tags for categorizing the source and improving searchability.

sqlstringrequired

The SQL query or statement used to extract data from the source.

timestampColumnstringrequired

The name of the column containing timestamp data for the source.

timestampAsDayboolean

Indicates whether the timestamp should be treated as a day-level granularity.

idTypeMappingobject[]required

Array defining the mapping between Statsig unit IDs and their respective source columns.

statsigUnitIDstringrequired

The identifier mapping for Statsig units.

columnstringrequired

The corresponding column name in the source that relates to the Statsig unit ID.

sourceTypestring

The type of source, indicating whether it is a database table or a custom query.

Allowed values:tablequery
tableNamestring

The name of the database table if the source type is "table".

datePartitionColumnstring

The name of the date partition column if the source type is "table". Can be undefined.

customFieldMappingobject[]

Optional array defining mappings for custom fields using specific formulas.

keystringrequired

The identifier for the custom field mapping.

formulastringrequired

The formula or expression used to compute the custom field value.

isReadOnlyboolean

Specifies if the source can only be edited via the Console API.

isVerifiedboolean

Marks the metric source as verified, indicating trustworthiness within the organization.

Example:false
disableCUREboolean

Disable CURE for all metrics built from this metric source

ownerobject

Schema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined.

Example:{"ownerID":"user123","ownerType":"USER","ownerName":"John Doe","ownerEmail":"owner123@test.com"}
Constraints:nullable
ownerIDstring

ID of the owner

Example:abc123
ownerTypestring

Type of the owner (e.g., SDK_KEY or USER)

Example:USER
ownerNamestring

The name of the owner. This field is optional.

Example:John Doe
ownerEmailstring

The email of the owner. This field is optional.

teamstring

Optional field indicating the team name responsible for the metric, aiding in accountability and management.

Constraints:nullable
teamIDstring

Optional field indicating the team ID responsible for the metric, aiding in accountability and management.

Constraints:nullable
400· Invalid request. Please check the request input and try again.
statusintegerrequired
Allowed values:400
messagestringrequired
401· This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx
statusintegerrequired
Allowed values:401
messagestringrequired

Was this helpful?