growthbook
Version:
The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform
2,325 lines • 95.4 kB
TypeScript
/**
* GrowthBook REST API
* GrowthBook offers a full REST API for interacting with the GrowthBook application. This is currently in **beta** as we add more authenticated API routes and features. Request data can use either JSON or Form data encoding (with proper `Content-Type` headers). All response bodies are JSON-encoded. The API base URL for GrowthBook Cloud is `https://api.growthbook.io`. For self-hosted deployments, it is the same as your API_HOST environment variable (defaults to `http://localhost:3100`). The rest of these docs will assume you are using GrowthBook Cloud. ## Authentication We support both the HTTP Basic and Bearer authentication schemes for convenience. You first need to generate a new Secret Key in GrowthBook by going to `Settings -> API Keys`. If using HTTP Basic auth, pass the Secret Key as the username and leave the password blank: ```bash curl https://api.growthbook.io/api/v1 \\ -u secret_abc123DEF456: # The \":\" at the end stops curl from asking for a password ``` If using Bearer auth, pass the Secret Key as the token: ```bash curl https://api.growthbook.io/api/v1 \\ -H \"Authorization: Bearer secret_abc123DEF456\" ``` ## Errors The API may return the following error status codes: - **400** - Bad Request - Often due to a missing required parameter - **401** - Unauthorized - No valid API key provided - **402** - Request Failed - The parameters are valid, but the request failed - **403** - Forbidden - Provided API key does not have the required access - **404** - Not Found - Unknown API route or requested resource - **429** - Too Many Requests - You exceeded the rate limit of 60 requests per minute. Try again later. - **5XX** - Server Error - Something went wrong on GrowthBook\'s end (these are rare) The response body will be a JSON object with the following properties: - **message** - Information about the error
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import type { RequestArgs } from './base';
import { BaseAPI } from './base';
/**
*
* @export
* @interface DataSource
*/
export interface DataSource {
/**
*
* @type {any}
* @memberof DataSource
*/
'id': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'type': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'name': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'description': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'projectIds': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'eventTracker': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'identifierTypes': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'assignmentQueries': any;
/**
*
* @type {any}
* @memberof DataSource
*/
'identifierJoinQueries': any;
/**
*
* @type {DataSourceMixpanelSettings}
* @memberof DataSource
*/
'mixpanelSettings'?: DataSourceMixpanelSettings;
}
/**
*
* @export
* @interface DataSourceMixpanelSettings
*/
export interface DataSourceMixpanelSettings {
/**
*
* @type {any}
* @memberof DataSourceMixpanelSettings
*/
'viewedExperimentEventName': any;
/**
*
* @type {any}
* @memberof DataSourceMixpanelSettings
*/
'experimentIdProperty': any;
/**
*
* @type {any}
* @memberof DataSourceMixpanelSettings
*/
'variationIdProperty': any;
/**
*
* @type {any}
* @memberof DataSourceMixpanelSettings
*/
'extraUserIdProperty': any;
}
/**
*
* @export
* @interface DeleteSavedGroup200Response
*/
export interface DeleteSavedGroup200Response {
/**
*
* @type {any}
* @memberof DeleteSavedGroup200Response
*/
'deletedId': any;
}
/**
*
* @export
* @interface Dimension
*/
export interface Dimension {
/**
*
* @type {any}
* @memberof Dimension
*/
'id': any;
/**
*
* @type {any}
* @memberof Dimension
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof Dimension
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof Dimension
*/
'owner': any;
/**
*
* @type {any}
* @memberof Dimension
*/
'datasourceId': any;
/**
*
* @type {any}
* @memberof Dimension
*/
'identifierType': any;
/**
*
* @type {any}
* @memberof Dimension
*/
'name': any;
/**
*
* @type {any}
* @memberof Dimension
*/
'query': any;
}
/**
*
* @export
* @interface Experiment
*/
export interface Experiment {
/**
*
* @type {any}
* @memberof Experiment
*/
'id': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'name': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'project': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'hypothesis': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'description': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'tags': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'owner': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'archived': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'status': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'autoRefresh': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'hashAttribute': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'variations': any;
/**
*
* @type {any}
* @memberof Experiment
*/
'phases': any;
/**
*
* @type {ExperimentAnalysisSettings}
* @memberof Experiment
*/
'settings': ExperimentAnalysisSettings;
/**
*
* @type {ExperimentResultSummary}
* @memberof Experiment
*/
'resultSummary'?: ExperimentResultSummary;
}
/**
*
* @export
* @interface ExperimentAnalysisSettings
*/
export interface ExperimentAnalysisSettings {
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'datasourceId': any;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'assignmentQueryId': any;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'experimentId': any;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'segmentId': any;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'queryFilter': any;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'inProgressConversions': ExperimentAnalysisSettingsInProgressConversionsEnum;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'attributionModel': ExperimentAnalysisSettingsAttributionModelEnum;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'statsEngine': ExperimentAnalysisSettingsStatsEngineEnum;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'goals': any;
/**
*
* @type {any}
* @memberof ExperimentAnalysisSettings
*/
'guardrails': any;
/**
*
* @type {ExperimentMetric}
* @memberof ExperimentAnalysisSettings
*/
'activationMetric'?: ExperimentMetric;
}
export declare const ExperimentAnalysisSettingsInProgressConversionsEnum: {
readonly Include: "include";
readonly Exclude: "exclude";
};
export type ExperimentAnalysisSettingsInProgressConversionsEnum = typeof ExperimentAnalysisSettingsInProgressConversionsEnum[keyof typeof ExperimentAnalysisSettingsInProgressConversionsEnum];
export declare const ExperimentAnalysisSettingsAttributionModelEnum: {
readonly FirstExposure: "firstExposure";
readonly ExperimentDuration: "experimentDuration";
};
export type ExperimentAnalysisSettingsAttributionModelEnum = typeof ExperimentAnalysisSettingsAttributionModelEnum[keyof typeof ExperimentAnalysisSettingsAttributionModelEnum];
export declare const ExperimentAnalysisSettingsStatsEngineEnum: {
readonly Bayesian: "bayesian";
readonly Frequentist: "frequentist";
};
export type ExperimentAnalysisSettingsStatsEngineEnum = typeof ExperimentAnalysisSettingsStatsEngineEnum[keyof typeof ExperimentAnalysisSettingsStatsEngineEnum];
/**
*
* @export
* @interface ExperimentMetric
*/
export interface ExperimentMetric {
/**
*
* @type {any}
* @memberof ExperimentMetric
*/
'metricId': any;
/**
*
* @type {ExperimentMetricOverrides}
* @memberof ExperimentMetric
*/
'overrides': ExperimentMetricOverrides;
}
/**
*
* @export
* @interface ExperimentMetricOverrides
*/
export interface ExperimentMetricOverrides {
/**
*
* @type {any}
* @memberof ExperimentMetricOverrides
*/
'conversionWindowStart'?: any;
/**
*
* @type {any}
* @memberof ExperimentMetricOverrides
*/
'conversionWindowEnd'?: any;
/**
*
* @type {any}
* @memberof ExperimentMetricOverrides
*/
'winRiskThreshold'?: any;
/**
*
* @type {any}
* @memberof ExperimentMetricOverrides
*/
'loseRiskThreshold'?: any;
}
/**
*
* @export
* @interface ExperimentResultSummary
*/
export interface ExperimentResultSummary {
/**
*
* @type {any}
* @memberof ExperimentResultSummary
*/
'status': any;
/**
*
* @type {any}
* @memberof ExperimentResultSummary
*/
'winner': any;
/**
*
* @type {any}
* @memberof ExperimentResultSummary
*/
'conclusions': any;
/**
*
* @type {any}
* @memberof ExperimentResultSummary
*/
'releasedVariationId': any;
}
/**
*
* @export
* @interface ExperimentResults
*/
export interface ExperimentResults {
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'id': any;
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'experimentId': any;
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'phase': any;
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'dateStart': any;
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'dateEnd': any;
/**
*
* @type {ExperimentResultsDimension}
* @memberof ExperimentResults
*/
'dimension': ExperimentResultsDimension;
/**
*
* @type {ExperimentAnalysisSettings}
* @memberof ExperimentResults
*/
'settings': ExperimentAnalysisSettings;
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'queryIds': any;
/**
*
* @type {any}
* @memberof ExperimentResults
*/
'results': any;
}
/**
*
* @export
* @interface ExperimentResultsDimension
*/
export interface ExperimentResultsDimension {
/**
*
* @type {any}
* @memberof ExperimentResultsDimension
*/
'type': any;
/**
*
* @type {any}
* @memberof ExperimentResultsDimension
*/
'id'?: any;
}
/**
*
* @export
* @interface Feature
*/
export interface Feature {
/**
*
* @type {any}
* @memberof Feature
*/
'id': any;
/**
*
* @type {any}
* @memberof Feature
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof Feature
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof Feature
*/
'archived': any;
/**
*
* @type {any}
* @memberof Feature
*/
'description': any;
/**
*
* @type {any}
* @memberof Feature
*/
'owner': any;
/**
*
* @type {any}
* @memberof Feature
*/
'project': any;
/**
*
* @type {any}
* @memberof Feature
*/
'valueType': FeatureValueTypeEnum;
/**
*
* @type {any}
* @memberof Feature
*/
'defaultValue': any;
/**
*
* @type {any}
* @memberof Feature
*/
'tags': any;
/**
*
* @type {{ [key: string]: FeatureEnvironment; }}
* @memberof Feature
*/
'environments': {
[key: string]: FeatureEnvironment;
};
/**
*
* @type {FeatureRevision}
* @memberof Feature
*/
'revision': FeatureRevision;
}
export declare const FeatureValueTypeEnum: {
readonly Boolean: "boolean";
readonly String: "string";
readonly Number: "number";
readonly Json: "json";
};
export type FeatureValueTypeEnum = typeof FeatureValueTypeEnum[keyof typeof FeatureValueTypeEnum];
/**
*
* @export
* @interface FeatureDefinition
*/
export interface FeatureDefinition {
/**
*
* @type {any}
* @memberof FeatureDefinition
*/
'defaultValue': any;
/**
*
* @type {any}
* @memberof FeatureDefinition
*/
'rules'?: any;
}
/**
*
* @export
* @interface FeatureEnvironment
*/
export interface FeatureEnvironment {
/**
*
* @type {any}
* @memberof FeatureEnvironment
*/
'enabled': any;
/**
*
* @type {any}
* @memberof FeatureEnvironment
*/
'defaultValue': any;
/**
*
* @type {any}
* @memberof FeatureEnvironment
*/
'rules': any;
/**
* A JSON stringified [FeatureDefinition](#tag/FeatureDefinition_model)
* @type {any}
* @memberof FeatureEnvironment
*/
'definition'?: any;
/**
*
* @type {FeatureEnvironmentDraft}
* @memberof FeatureEnvironment
*/
'draft'?: FeatureEnvironmentDraft;
}
/**
*
* @export
* @interface FeatureEnvironmentDraft
*/
export interface FeatureEnvironmentDraft {
/**
*
* @type {any}
* @memberof FeatureEnvironmentDraft
*/
'enabled': any;
/**
*
* @type {any}
* @memberof FeatureEnvironmentDraft
*/
'defaultValue': any;
/**
*
* @type {any}
* @memberof FeatureEnvironmentDraft
*/
'rules': any;
/**
* A JSON stringified [FeatureDefinition](#tag/FeatureDefinition_model)
* @type {any}
* @memberof FeatureEnvironmentDraft
*/
'definition'?: any;
}
/**
*
* @export
* @interface FeatureExperimentRule
*/
export interface FeatureExperimentRule {
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'description': any;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'condition': any;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'id': any;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'enabled': any;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'type': any;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'trackingKey'?: any;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'hashAttribute'?: any;
/**
*
* @type {FeatureExperimentRuleNamespace}
* @memberof FeatureExperimentRule
*/
'namespace'?: FeatureExperimentRuleNamespace;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'coverage'?: any;
/**
*
* @type {any}
* @memberof FeatureExperimentRule
*/
'value'?: any;
}
/**
*
* @export
* @interface FeatureExperimentRuleNamespace
*/
export interface FeatureExperimentRuleNamespace {
/**
*
* @type {any}
* @memberof FeatureExperimentRuleNamespace
*/
'enabled': any;
/**
*
* @type {any}
* @memberof FeatureExperimentRuleNamespace
*/
'name': any;
/**
*
* @type {any}
* @memberof FeatureExperimentRuleNamespace
*/
'range': any;
}
/**
*
* @export
* @interface FeatureForceRule
*/
export interface FeatureForceRule {
/**
*
* @type {any}
* @memberof FeatureForceRule
*/
'description': any;
/**
*
* @type {any}
* @memberof FeatureForceRule
*/
'condition': any;
/**
*
* @type {any}
* @memberof FeatureForceRule
*/
'id': any;
/**
*
* @type {any}
* @memberof FeatureForceRule
*/
'enabled': any;
/**
*
* @type {any}
* @memberof FeatureForceRule
*/
'type': any;
/**
*
* @type {any}
* @memberof FeatureForceRule
*/
'value': any;
}
/**
*
* @export
* @interface FeatureRevision
*/
export interface FeatureRevision {
/**
*
* @type {any}
* @memberof FeatureRevision
*/
'version': any;
/**
*
* @type {any}
* @memberof FeatureRevision
*/
'comment': any;
/**
*
* @type {any}
* @memberof FeatureRevision
*/
'date': any;
/**
*
* @type {any}
* @memberof FeatureRevision
*/
'publishedBy': any;
}
/**
*
* @export
* @interface FeatureRolloutRule
*/
export interface FeatureRolloutRule {
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'description': any;
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'condition': any;
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'id': any;
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'enabled': any;
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'type': any;
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'value': any;
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'coverage': any;
/**
*
* @type {any}
* @memberof FeatureRolloutRule
*/
'hashAttribute': any;
}
/**
*
* @export
* @interface GetDataSource200Response
*/
export interface GetDataSource200Response {
/**
*
* @type {DataSource}
* @memberof GetDataSource200Response
*/
'dataSource': DataSource;
}
/**
*
* @export
* @interface GetDimension200Response
*/
export interface GetDimension200Response {
/**
*
* @type {Dimension}
* @memberof GetDimension200Response
*/
'dimension': Dimension;
}
/**
*
* @export
* @interface GetExperiment200Response
*/
export interface GetExperiment200Response {
/**
*
* @type {Experiment}
* @memberof GetExperiment200Response
*/
'experiment': Experiment;
}
/**
*
* @export
* @interface GetExperimentResults200Response
*/
export interface GetExperimentResults200Response {
/**
*
* @type {ExperimentResults}
* @memberof GetExperimentResults200Response
*/
'result'?: ExperimentResults;
}
/**
*
* @export
* @interface GetFeature200Response
*/
export interface GetFeature200Response {
/**
*
* @type {Feature}
* @memberof GetFeature200Response
*/
'feature': Feature;
}
/**
*
* @export
* @interface GetProject200Response
*/
export interface GetProject200Response {
/**
*
* @type {Project}
* @memberof GetProject200Response
*/
'project': Project;
}
/**
*
* @export
* @interface GetSdkConnection200Response
*/
export interface GetSdkConnection200Response {
/**
*
* @type {SdkConnection}
* @memberof GetSdkConnection200Response
*/
'sdkConnection': SdkConnection;
}
/**
*
* @export
* @interface GetSegment200Response
*/
export interface GetSegment200Response {
/**
*
* @type {Segment}
* @memberof GetSegment200Response
*/
'segment': Segment;
}
/**
*
* @export
* @interface GetVisualChangeset200Response
*/
export interface GetVisualChangeset200Response {
/**
*
* @type {VisualChangeset}
* @memberof GetVisualChangeset200Response
*/
'visualChangeset': VisualChangeset;
/**
*
* @type {Experiment}
* @memberof GetVisualChangeset200Response
*/
'experiment'?: Experiment;
}
/**
*
* @export
* @interface Metric
*/
export interface Metric {
/**
*
* @type {any}
* @memberof Metric
*/
'id': any;
/**
*
* @type {any}
* @memberof Metric
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof Metric
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof Metric
*/
'owner': any;
/**
*
* @type {any}
* @memberof Metric
*/
'datasourceId': any;
/**
*
* @type {any}
* @memberof Metric
*/
'name': any;
/**
*
* @type {any}
* @memberof Metric
*/
'description': any;
/**
*
* @type {any}
* @memberof Metric
*/
'type': MetricTypeEnum;
/**
*
* @type {any}
* @memberof Metric
*/
'tags': any;
/**
*
* @type {any}
* @memberof Metric
*/
'projects': any;
/**
*
* @type {any}
* @memberof Metric
*/
'archived': any;
/**
*
* @type {MetricBehavior}
* @memberof Metric
*/
'behavior': MetricBehavior;
/**
*
* @type {MetricSql}
* @memberof Metric
*/
'sql'?: MetricSql;
/**
*
* @type {MetricSqlBuilder}
* @memberof Metric
*/
'sqlBuilder'?: MetricSqlBuilder;
/**
*
* @type {MetricMixpanel}
* @memberof Metric
*/
'mixpanel'?: MetricMixpanel;
}
export declare const MetricTypeEnum: {
readonly Binomial: "binomial";
readonly Count: "count";
readonly Duration: "duration";
readonly Revenue: "revenue";
};
export type MetricTypeEnum = typeof MetricTypeEnum[keyof typeof MetricTypeEnum];
/**
*
* @export
* @interface MetricBehavior
*/
export interface MetricBehavior {
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'goal': MetricBehaviorGoalEnum;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'cap': any;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'conversionWindowStart': any;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'conversionWindowEnd': any;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'riskThresholdSuccess': any;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'riskThresholdDanger': any;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'minPercentChange': any;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'maxPercentChange': any;
/**
*
* @type {any}
* @memberof MetricBehavior
*/
'minSampleSize': any;
}
export declare const MetricBehaviorGoalEnum: {
readonly Increase: "increase";
readonly Decrease: "decrease";
};
export type MetricBehaviorGoalEnum = typeof MetricBehaviorGoalEnum[keyof typeof MetricBehaviorGoalEnum];
/**
*
* @export
* @interface MetricMixpanel
*/
export interface MetricMixpanel {
/**
*
* @type {any}
* @memberof MetricMixpanel
*/
'eventName': any;
/**
*
* @type {any}
* @memberof MetricMixpanel
*/
'eventValue': any;
/**
*
* @type {any}
* @memberof MetricMixpanel
*/
'userAggregation': any;
/**
*
* @type {any}
* @memberof MetricMixpanel
*/
'conditions': any;
}
/**
*
* @export
* @interface MetricSql
*/
export interface MetricSql {
/**
*
* @type {any}
* @memberof MetricSql
*/
'identifierTypes': any;
/**
*
* @type {any}
* @memberof MetricSql
*/
'conversionSQL': any;
/**
*
* @type {any}
* @memberof MetricSql
*/
'userAggregationSQL': any;
/**
*
* @type {any}
* @memberof MetricSql
*/
'denominatorMetricId': any;
}
/**
*
* @export
* @interface MetricSqlBuilder
*/
export interface MetricSqlBuilder {
/**
*
* @type {any}
* @memberof MetricSqlBuilder
*/
'identifierTypeColumns': any;
/**
*
* @type {any}
* @memberof MetricSqlBuilder
*/
'tableName': any;
/**
*
* @type {any}
* @memberof MetricSqlBuilder
*/
'valueColumnName': any;
/**
*
* @type {any}
* @memberof MetricSqlBuilder
*/
'timestampColumnName': any;
/**
*
* @type {any}
* @memberof MetricSqlBuilder
*/
'conditions': any;
}
/**
*
* @export
* @interface PaginationFields
*/
export interface PaginationFields {
/**
*
* @type {any}
* @memberof PaginationFields
*/
'limit': any;
/**
*
* @type {any}
* @memberof PaginationFields
*/
'offset': any;
/**
*
* @type {any}
* @memberof PaginationFields
*/
'count': any;
/**
*
* @type {any}
* @memberof PaginationFields
*/
'total': any;
/**
*
* @type {any}
* @memberof PaginationFields
*/
'hasMore': any;
/**
*
* @type {any}
* @memberof PaginationFields
*/
'nextOffset': any;
}
/**
*
* @export
* @interface PostMetric200Response
*/
export interface PostMetric200Response {
/**
*
* @type {Metric}
* @memberof PostMetric200Response
*/
'metric': Metric;
}
/**
*
* @export
* @interface PostMetricRequest
*/
export interface PostMetricRequest {
/**
* ID for the [DataSource](#tag/DataSource_model)
* @type {any}
* @memberof PostMetricRequest
*/
'datasourceId': any;
/**
* Name of the person who owns this metric
* @type {any}
* @memberof PostMetricRequest
*/
'owner'?: any;
/**
* Name of the metric
* @type {any}
* @memberof PostMetricRequest
*/
'name': any;
/**
* Description of the metric
* @type {any}
* @memberof PostMetricRequest
*/
'description'?: any;
/**
* Type of metric. See [Metrics documentation](/app/metrics)
* @type {any}
* @memberof PostMetricRequest
*/
'type': PostMetricRequestTypeEnum;
/**
* List of tags
* @type {any}
* @memberof PostMetricRequest
*/
'tags'?: any;
/**
* List of project IDs for projects that can access this metric
* @type {any}
* @memberof PostMetricRequest
*/
'projects'?: any;
/**
*
* @type {any}
* @memberof PostMetricRequest
*/
'archived'?: any;
/**
*
* @type {PostMetricRequestBehavior}
* @memberof PostMetricRequest
*/
'behavior'?: PostMetricRequestBehavior;
/**
*
* @type {PostMetricRequestSql}
* @memberof PostMetricRequest
*/
'sql'?: PostMetricRequestSql;
/**
*
* @type {PostMetricRequestSqlBuilder}
* @memberof PostMetricRequest
*/
'sqlBuilder'?: PostMetricRequestSqlBuilder;
/**
*
* @type {PostMetricRequestMixpanel}
* @memberof PostMetricRequest
*/
'mixpanel'?: PostMetricRequestMixpanel;
}
export declare const PostMetricRequestTypeEnum: {
readonly Binomial: "binomial";
readonly Count: "count";
readonly Duration: "duration";
readonly Revenue: "revenue";
};
export type PostMetricRequestTypeEnum = typeof PostMetricRequestTypeEnum[keyof typeof PostMetricRequestTypeEnum];
/**
*
* @export
* @interface PostMetricRequestBehavior
*/
export interface PostMetricRequestBehavior {
/**
*
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'goal'?: PostMetricRequestBehaviorGoalEnum;
/**
* This should be non-negative
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'cap'?: any;
/**
* The start of a Conversion Window relative to the exposure date, in hours. This is equivalent to the [Conversion Delay](/app/metrics#conversion-delay). <br/> Must specify both `behavior.conversionWindowStart` and `behavior.conversionWindowEnd` or neither.
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'conversionWindowStart'?: any;
/**
* The end of a [Conversion Window](/app/metrics#conversion-window) relative to the exposure date, in hours. This is equivalent to the [Conversion Delay](/app/metrics#conversion-delay) + Conversion Window Hours settings in the UI. In other words, if you want a 48 hour window starting after 24 hours, you would set conversionWindowStart to 24 and conversionWindowEnd to 72 (24+48). <br/> Must specify both `behavior.conversionWindowStart` and `behavior.conversionWindowEnd` or neither.
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'conversionWindowEnd'?: any;
/**
* Threshold for Risk to be considered low enough, as a proportion (e.g. put 0.0025 for 0.25%). <br/> Must be a non-negative number and must not be higher than `riskThresholdDanger`.
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'riskThresholdSuccess'?: any;
/**
* Threshold for Risk to be considered too high, as a proportion (e.g. put 0.0125 for 1.25%). <br/> Must be a non-negative number.
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'riskThresholdDanger'?: any;
/**
* Minimum percent change to consider uplift significant, as a proportion (e.g. put 0.005 for 0.5%)
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'minPercentChange'?: any;
/**
* Maximum percent change to consider uplift significant, as a proportion (e.g. put 0.5 for 50%)
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'maxPercentChange'?: any;
/**
*
* @type {any}
* @memberof PostMetricRequestBehavior
*/
'minSampleSize'?: any;
}
export declare const PostMetricRequestBehaviorGoalEnum: {
readonly Increase: "increase";
readonly Decrease: "decrease";
};
export type PostMetricRequestBehaviorGoalEnum = typeof PostMetricRequestBehaviorGoalEnum[keyof typeof PostMetricRequestBehaviorGoalEnum];
/**
* Only use for MixPanel (non-SQL) Data Sources. Only one of `sql`, `sqlBuilder` or `mixpanel` allowed, and at least one must be specified.
* @export
* @interface PostMetricRequestMixpanel
*/
export interface PostMetricRequestMixpanel {
/**
*
* @type {any}
* @memberof PostMetricRequestMixpanel
*/
'eventName': any;
/**
*
* @type {any}
* @memberof PostMetricRequestMixpanel
*/
'eventValue'?: any;
/**
*
* @type {any}
* @memberof PostMetricRequestMixpanel
*/
'userAggregation': any;
/**
*
* @type {any}
* @memberof PostMetricRequestMixpanel
*/
'conditions'?: any;
}
/**
* Preferred way to define SQL. Only one of `sql`, `sqlBuilder` or `mixpanel` allowed, and at least one must be specified.
* @export
* @interface PostMetricRequestSql
*/
export interface PostMetricRequestSql {
/**
*
* @type {any}
* @memberof PostMetricRequestSql
*/
'identifierTypes': any;
/**
*
* @type {any}
* @memberof PostMetricRequestSql
*/
'conversionSQL': any;
/**
* Custom user level aggregation for your metric (default: `SUM(value)`)
* @type {any}
* @memberof PostMetricRequestSql
*/
'userAggregationSQL'?: any;
/**
* The metric ID for a [denominator metric for funnel and ratio metrics](/app/metrics#denominator-ratio--funnel-metrics)
* @type {any}
* @memberof PostMetricRequestSql
*/
'denominatorMetricId'?: any;
}
/**
* An alternative way to specify a SQL metric, rather than a full query. Using `sql` is preferred to `sqlBuilder`. Only one of `sql`, `sqlBuilder` or `mixpanel` allowed, and at least one must be specified.
* @export
* @interface PostMetricRequestSqlBuilder
*/
export interface PostMetricRequestSqlBuilder {
/**
*
* @type {any}
* @memberof PostMetricRequestSqlBuilder
*/
'identifierTypeColumns': any;
/**
*
* @type {any}
* @memberof PostMetricRequestSqlBuilder
*/
'tableName': any;
/**
*
* @type {any}
* @memberof PostMetricRequestSqlBuilder
*/
'valueColumnName'?: any;
/**
*
* @type {any}
* @memberof PostMetricRequestSqlBuilder
*/
'timestampColumnName': any;
/**
*
* @type {any}
* @memberof PostMetricRequestSqlBuilder
*/
'conditions'?: any;
}
/**
*
* @export
* @interface PostSavedGroup200Response
*/
export interface PostSavedGroup200Response {
/**
*
* @type {SavedGroup}
* @memberof PostSavedGroup200Response
*/
'savedGroup': SavedGroup;
}
/**
*
* @export
* @interface PostSavedGroupRequest
*/
export interface PostSavedGroupRequest {
/**
* The display name of the Saved Group
* @type {any}
* @memberof PostSavedGroupRequest
*/
'name': any;
/**
* An array of values to target (Ex: a list of userIds).
* @type {any}
* @memberof PostSavedGroupRequest
*/
'values': any;
/**
* The parameter you want to target users with. Ex: userId, orgId, ...
* @type {any}
* @memberof PostSavedGroupRequest
*/
'attributeKey': any;
/**
* The person or team that owns this Saved Group. If no owner, you can pass an empty string.
* @type {any}
* @memberof PostSavedGroupRequest
*/
'owner'?: any;
}
/**
*
* @export
* @interface Project
*/
export interface Project {
/**
*
* @type {any}
* @memberof Project
*/
'id': any;
/**
*
* @type {any}
* @memberof Project
*/
'name': any;
/**
*
* @type {any}
* @memberof Project
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof Project
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof Project
*/
'description'?: any;
/**
*
* @type {ProjectSettings}
* @memberof Project
*/
'settings'?: ProjectSettings;
}
/**
*
* @export
* @interface ProjectSettings
*/
export interface ProjectSettings {
/**
*
* @type {any}
* @memberof ProjectSettings
*/
'statsEngine'?: any;
}
/**
*
* @export
* @interface PutVisualChangeset200Response
*/
export interface PutVisualChangeset200Response {
/**
*
* @type {any}
* @memberof PutVisualChangeset200Response
*/
'nModified': any;
}
/**
*
* @export
* @interface SavedGroup
*/
export interface SavedGroup {
/**
*
* @type {any}
* @memberof SavedGroup
*/
'id': any;
/**
*
* @type {any}
* @memberof SavedGroup
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof SavedGroup
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof SavedGroup
*/
'name': any;
/**
*
* @type {any}
* @memberof SavedGroup
*/
'owner'?: any;
/**
*
* @type {any}
* @memberof SavedGroup
*/
'attributeKey': any;
/**
*
* @type {any}
* @memberof SavedGroup
*/
'values': any;
}
/**
*
* @export
* @interface SdkConnection
*/
export interface SdkConnection {
/**
*
* @type {any}
* @memberof SdkConnection
*/
'id': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'dateUpdated': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'name': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'languages': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'environment': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'project': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'encryptPayload': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'encryptionKey': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'includeVisualExperiments'?: any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'includeDraftExperiments'?: any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'includeExperimentNames'?: any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'key': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'proxyEnabled': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'proxyHost': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'proxySigningKey': any;
/**
*
* @type {any}
* @memberof SdkConnection
*/
'sseEnabled'?: any;
}
/**
*
* @export
* @interface Segment
*/
export interface Segment {
/**
*
* @type {any}
* @memberof Segment
*/
'id': any;
/**
*
* @type {any}
* @memberof Segment
*/
'owner': any;
/**
*
* @type {any}
* @memberof Segment
*/
'datasourceId': any;
/**
*
* @type {any}
* @memberof Segment
*/
'identifierType': any;
/**
*
* @type {any}
* @memberof Segment
*/
'name': any;
/**
*
* @type {any}
* @memberof Segment
*/
'query': any;
/**
*
* @type {any}
* @memberof Segment
*/
'dateCreated': any;
/**
*
* @type {any}
* @memberof Segment
*/
'dateUpdated': any;
}
/**
*
* @export
* @interface ToggleFeatureRequest
*/
export interface ToggleFeatureRequest {
/**
*
* @type {any}
* @memberof ToggleFeatureRequest
*/
'reason'?: any;
/**
*
* @type {{ [key: string]: any; }}
* @memberof ToggleFeatureRequest
*/
'environments': {
[key: string]: any;
};
}
/**
*
* @export
* @interface UpdateSavedGroupRequest
*/
export interface UpdateSavedGroupRequest {
/**
* The display name of the Saved Group
* @type {any}
* @memberof UpdateSavedGroupRequest
*/
'name'?: any;
/**
* An array of values to target (Ex: a list of userIds).
* @type {any}
* @memberof UpdateSavedGroupRequest
*/
'values'?: any;
/**
* The person or team that owns this Saved Group. If no owner, you can pass an empty string.
* @type {any}
* @memberof UpdateSavedGroupRequest
*/
'owner'?: any;
}
/**
*
* @export
* @interface VisualChange
*/
export interface VisualChange {
/**
*
* @type {any}
* @memberof VisualChange
*/
'description'?: any;
/**
*
* @type {any}
* @memberof VisualChange
*/
'css'?: any;
/**
*
* @type {any}
* @memberof VisualChange
*/
'js'?: any;
/**
*
* @type {any}
* @memberof VisualChange
*/
'variation': any;
/**
*
* @type {any}
* @memberof VisualChange
*/
'domMutations'?: any;
}
/**
*
* @export
* @interface VisualChangeset
*/
export interface VisualChangeset {
/**
*
* @type {any}
* @memberof VisualChangeset
*/
'id'?: any;
/**
*
* @type {any}
* @memberof VisualChangeset
*/
'urlPatterns': any;
/**
*
* @type {any}
* @memberof VisualChangeset
*/
'editorUrl': any;
/**
*
* @type {any}
* @memberof VisualChangeset
*/
'experiment': any;
/**
*
* @type {any}
* @memberof VisualChangeset
*/
'visualChanges': any;
}
/**
* DataSourcesApi - axios parameter creator
* @export
*/
export declare const DataSourcesApiAxiosParamCreator: (configuration?: Configuration) => {
/**
*
* @summary Get a single data source
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDataSource: (id: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Get all data sources
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [projectId] Filter by project id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listDataSources: (limit?: any, offset?: any, projectId?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* DataSourcesApi - functional programming interface
* @export
*/
export declare const DataSourcesApiFp: (configuration?: Configuration) => {
/**
*
* @summary Get a single data source
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDataSource(id: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDataSource200Response>>;
/**
*
* @summary Get all data sources
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [projectId] Filter by project id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listDataSources(limit?: any, offset?: any, projectId?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>>;
};
/**
* DataSourcesApi - factory interface
* @export
*/
export declare const DataSourcesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
*
* @summary Get a single data source
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDataSource(id: any, options?: any): AxiosPromise<GetDataSource200Response>;
/**
*
* @summary Get all data sources
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [projectId] Filter by project id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listDataSources(limit?: any, offset?: any, projectId?: any, options?: any): AxiosPromise<any>;
};
/**
* DataSourcesApi - object-oriented interface
* @export
* @class DataSourcesApi
* @extends {BaseAPI}
*/
export declare class DataSourcesApi extends BaseAPI {
/**
*
* @summary Get a single data source
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DataSourcesApi
*/
getDataSource(id: any, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDataSource200Response, any>>;
/**
*
* @summary Get all data sources
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [projectId] Filter by project id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DataSourcesApi
*/
listDataSources(limit?: any, offset?: any, projectId?: any, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
}
/**
* DimensionsApi - axios parameter creator
* @export
*/
export declare const DimensionsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
*
* @summary Get a single dimension
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDimension: (id: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Get all dimensions
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [datasourceId] Filter by Data Source
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listDimensions: (limit?: any, offset?: any, datasourceId?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* DimensionsApi - functional programming interface
* @export
*/
export declare const DimensionsApiFp: (configuration?: Configuration) => {
/**
*
* @summary Get a single dimension
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDimension(id: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDimension200Response>>;
/**
*
* @summary Get all dimensions
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [datasourceId] Filter by Data Source
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listDimensions(limit?: any, offset?: any, datasourceId?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>>;
};
/**
* DimensionsApi - factory interface
* @export
*/
export declare const DimensionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
*
* @summary Get a single dimension
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDimension(id: any, options?: any): AxiosPromise<GetDimension200Response>;
/**
*
* @summary Get all dimensions
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [datasourceId] Filter by Data Source
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listDimensions(limit?: any, offset?: any, datasourceId?: any, options?: any): AxiosPromise<any>;
};
/**
* DimensionsApi - object-oriented interface
* @export
* @class DimensionsApi
* @extends {BaseAPI}
*/
export declare class DimensionsApi extends BaseAPI {
/**
*
* @summary Get a single dimension
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DimensionsApi
*/
getDimension(id: any, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDimension200Response, any>>;
/**
*
* @summary Get all dimensions
* @param {any} [limit] The number of items to return
* @param {any} [offset] How many items to skip (use in conjunction with limit for pagination)
* @param {any} [datasourceId] Filter by Data Source
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DimensionsApi
*/
listDimensions(limit?: any, offset?: any, datasourceId?: any, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
}
/**
* ExperimentsApi - axios parameter creator
* @export
*/
export declare const ExperimentsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
*
* @summary Get a single experiment
* @param {any} id The id of the requested resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperiment: (id: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Get results for an experiment
* @param {any} id The id of the requested resource
* @param {any} [phase]
* @param {any} [dimension]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperimentResults: (id: any, phase?: any, dimension?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Get all experiments
* @param {any} [limit] The number