Skip to main content
POST
/
v1
/
workflows
/
abtest
Create Abtest
curl --request POST \
  --url https://experiments.confidence.dev/v1/workflows/abtest \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "displayName": "<string>",
  "name": "<string>",
  "owner": "<string>",
  "jobQueue": {
    "isEnabled": true,
    "items": [
      {
        "key": "<string>",
        "func": "<string>",
        "runTime": {},
        "isActive": true,
        "parameters": {}
      }
    ]
  },
  "workflowVersion": "<string>",
  "surfaces": [
    "<string>"
  ],
  "labels": [
    {}
  ],
  "abtest": {
    "flag": "<string>",
    "rollout": "<string>",
    "treatments": [
      {
        "variant": "<string>",
        "weight": 123,
        "description": "<string>",
        "displayName": "<string>",
        "imageUri": "<string>",
        "name": "<string>"
      }
    ]
  },
  "decision": {
    "conclusion": "<string>",
    "outcome": {},
    "treatment": "<string>"
  },
  "explore": {
    "exploratoryAnalyses": [
      {
        "createTime": "<string>",
        "id": "<string>",
        "messages": [
          "<string>"
        ],
        "metrics": [
          {
            "dimensions": [
              {
                "column": "<string>",
                "factTable": "<string>",
                "dimensionTable": "<string>"
              }
            ],
            "name": "<string>",
            "calculation": "<string>",
            "scheduledCalculation": "<string>"
          }
        ],
        "name": "<string>",
        "state": {},
        "updateTime": "<string>",
        "analysisResults": [
          {
            "analysisResult": "<string>",
            "exposureFilterName": "<string>"
          }
        ],
        "conclusion": {
          "text": "<string>",
          "updateTime": "<string>"
        },
        "createdBy": "<string>",
        "endTime": "<string>",
        "labels": [
          {
            "key": "<string>",
            "value": "<string>"
          }
        ],
        "splitByExposureFilters": true,
        "startTime": "<string>",
        "useCustomDateRange": true,
        "useScheduledCalculation": true
      }
    ]
  },
  "exposure": {
    "exposure": [
      {
        "totalExposureCount": 123,
        "treatment": "<string>",
        "exposureFilter": "<string>"
      }
    ]
  },
  "flags": {
    "audiences": [
      {
        "id": "<string>",
        "displayName": "<string>",
        "intakePaused": true,
        "launchTime": "<string>",
        "materialization": "<string>",
        "rule": "<string>",
        "segment": "<string>",
        "stopTime": "<string>"
      }
    ],
    "flag": "<string>",
    "ignoreTargetingForSticky": true,
    "intakePaused": true,
    "materialization": "<string>",
    "rule": "<string>",
    "segment": "<string>",
    "stickyAssignments": true,
    "targetingKeySelector": "<string>"
  },
  "hypothesis": {
    "text": "<string>"
  },
  "metrics": {
    "bucket": {},
    "metrics": [
      {
        "metric": "<string>",
        "calculation": "<string>",
        "metricRole": {
          "metricKind": {},
          "minimumDetectableEffect": 123,
          "nonInferiorityMargin": 123
        },
        "preferredDirection": {},
        "schedule": "<string>",
        "surface": "<string>",
        "surfaceOnly": true
      }
    ],
    "assignmentTable": "<string>",
    "entity": "<string>",
    "exposureCalculation": "<string>",
    "exposureFilter": {
      "displayName": "<string>",
      "factTable": "<string>",
      "filter": {
        "criteria": [
          {}
        ],
        "expression": {
          "ref": "<string>",
          "not": {},
          "and": {
            "operands": [
              {}
            ]
          },
          "or": {
            "operands": [
              {}
            ]
          }
        }
      }
    },
    "exposureMetric": "<string>",
    "exposureMetricCalculation": "<string>",
    "exposureMetricSchedule": "<string>",
    "exposureTable": "<string>",
    "exposureTableSchedule": "<string>",
    "filters": [
      {
        "displayName": "<string>",
        "factTable": "<string>",
        "filter": {
          "criteria": [
            {}
          ],
          "expression": {
            "ref": "<string>",
            "not": {},
            "and": {
              "operands": [
                {}
              ]
            },
            "or": {
              "operands": [
                {}
              ]
            }
          }
        }
      }
    ]
  },
  "planning": {
    "actual": {
      "endTime": "<string>",
      "runtime": "<string>",
      "startTime": "<string>"
    },
    "planned": {
      "endTime": "<string>",
      "runtime": "<string>",
      "startTime": "<string>"
    }
  },
  "report": {
    "sections": [
      {
        "hypothesisData": {
          "hypothesis": "<string>"
        },
        "id": "<string>",
        "imagesData": {
          "images": [
            {
              "id": "<string>",
              "imageUri": "<string>",
              "label": "<string>",
              "text": "<string>"
            }
          ]
        },
        "metricsData": {
          "metrics": [
            {
              "hidden": true,
              "metric": "<string>",
              "metricName": "<string>",
              "treatments": [
                {
                  "treatment": "<string>",
                  "hidden": true
                }
              ]
            }
          ]
        },
        "nextData": {
          "text": "<string>",
          "title": "<string>"
        },
        "outcomeData": {
          "conclusion": "<string>",
          "outcome": "<string>"
        },
        "recommendationsData": {
          "content": [
            {
              "id": "<string>",
              "shippingRecommendation": "<string>",
              "text": "<string>",
              "variant": "<string>"
            }
          ]
        },
        "resultsData": {
          "text": "<string>",
          "title": "<string>"
        },
        "summaryData": {
          "imageUri": "<string>",
          "text": "<string>",
          "title": "<string>"
        }
      }
    ],
    "name": "<string>"
  },
  "reviews": {
    "approvalRequired": true,
    "optionalReviews": [
      {
        "state": {},
        "responses": [
          {
            "reviewer": "<string>",
            "state": {},
            "commentId": "<string>",
            "groups": [
              "<string>"
            ],
            "id": "<string>",
            "stale": true
          }
        ],
        "surface": "<string>"
      }
    ],
    "requiredReviews": [
      {
        "state": {},
        "responses": [
          {
            "reviewer": "<string>",
            "state": {},
            "commentId": "<string>",
            "groups": [
              "<string>"
            ],
            "id": "<string>",
            "stale": true
          }
        ],
        "surface": "<string>"
      }
    ],
    "reviewId": "<string>",
    "status": {}
  },
  "samplesize": {
    "error": "<string>",
    "exposure": {
      "assignmentTable": {
        "assignmentTable": "<string>",
        "filters": {
          "exposureFilter": "<string>"
        },
        "runtime": "<string>",
        "samplingFactor": 123
      },
      "existingInstance": {
        "workflowInstance": "<string>",
        "exposureTableSchedule": "<string>"
      },
      "endTime": "<string>",
      "startTime": "<string>"
    },
    "exposureSource": {
      "workflowInstance": "<string>",
      "assignmentTable": "<string>",
      "exposureTableSchedule": "<string>",
      "filters": {
        "assignmentFilter": {
          "criteria": [
            {}
          ],
          "expression": {
            "ref": "<string>",
            "not": {},
            "and": {
              "operands": [
                {}
              ]
            },
            "or": {
              "operands": [
                {}
              ]
            }
          }
        },
        "entityFilter": {
          "dimensionTable": "<string>",
          "filter": {
            "criteria": [
              {}
            ],
            "expression": {
              "ref": "<string>",
              "not": {},
              "and": {
                "operands": [
                  {}
                ]
              },
              "or": {
                "operands": [
                  {}
                ]
              }
            }
          }
        },
        "exposureFilter": "<string>"
      },
      "runtime": "<string>",
      "samplingFactor": 123
    },
    "metrics": [
      {
        "metric": "<string>",
        "error": "<string>",
        "forecastedData": [
          {
            "dayIndex": 123,
            "expectedSampleSize": 123,
            "requiredSampleSize": 123
          }
        ],
        "observedData": [
          {
            "dayIndex": 123,
            "expectedSampleSize": 123,
            "mean": 123,
            "requiredSampleSize": 123,
            "variance": 123
          }
        ],
        "requiredSampleSize": 123,
        "state": {},
        "summaryStats": {
          "count": 123,
          "mean": 123,
          "variance": 123,
          "varianceReductionRate": 123
        },
        "type": {}
      }
    ],
    "requiredSampleSize": 123,
    "state": {},
    "statsParameters": {
      "alpha": 123,
      "power": 123,
      "testHorizonStrategy": {},
      "allocationProportion": "<string>"
    }
  },
  "stats": {
    "alpha": 123,
    "analysisResult": "<string>",
    "analysisResults": [
      {
        "analysisResult": "<string>",
        "exposureFilterName": "<string>"
      }
    ],
    "fallbackSampleSize": "<string>",
    "metricInformation": [
      {
        "metricName": "<string>",
        "expectedSampleSize": "<string>"
      }
    ],
    "metricMethods": [
      {
        "method": {},
        "metricName": "<string>"
      }
    ],
    "power": 123,
    "testHorizonStrategy": {}
  }
}
'
{
  "displayName": "<string>",
  "state": "<string>",
  "createTime": {},
  "updateTime": {},
  "creator": "<string>",
  "updater": "<string>",
  "name": "<string>",
  "owner": "<string>",
  "jobQueue": {
    "isEnabled": true,
    "items": [
      {
        "key": "<string>",
        "func": "<string>",
        "runTime": {},
        "isActive": true,
        "parameters": {}
      }
    ]
  },
  "pendingTransition": {
    "transitionAction": "<string>",
    "targetState": "<string>",
    "succeededSteps": [
      "<string>"
    ],
    "failedSteps": [
      {
        "actionStep": "<string>",
        "failuresMessages": [
          "<string>"
        ]
      }
    ],
    "unprocessedSteps": [
      "<string>"
    ],
    "succeededActions": [
      "<string>"
    ],
    "failedActions": [
      {
        "action": "<string>",
        "failuresMessages": [
          "<string>"
        ]
      }
    ],
    "unprocessedActions": [
      "<string>"
    ]
  },
  "checks": [
    {
      "message": "<string>",
      "state": {},
      "persist": true,
      "createTime": {},
      "updateTime": {},
      "creator": "<string>",
      "updater": "<string>",
      "name": "<string>",
      "displayName": "<string>",
      "parent": "<string>",
      "data": {
        "nullValue": {},
        "numberValue": 123,
        "stringValue": "<string>",
        "boolValue": true,
        "structValue": {},
        "listValue": {
          "values": [
            {}
          ]
        }
      },
      "labels": [
        {}
      ]
    }
  ],
  "stateHistory": [
    {
      "state": "<string>",
      "enteredTime": {},
      "exitedTime": {},
      "actualEnteredTime": {},
      "actualExitedTime": {},
      "checks": [
        {
          "message": "<string>",
          "state": {},
          "persist": true,
          "createTime": {},
          "updateTime": {},
          "creator": "<string>",
          "updater": "<string>",
          "name": "<string>",
          "displayName": "<string>",
          "parent": "<string>",
          "data": {
            "nullValue": {},
            "numberValue": 123,
            "stringValue": "<string>",
            "boolValue": true,
            "structValue": {},
            "listValue": {
              "values": [
                {}
              ]
            }
          },
          "labels": [
            {}
          ]
        }
      ]
    }
  ],
  "possibleTransitions": [
    "<string>"
  ],
  "lockedDataKeys": [
    "<string>"
  ],
  "workflowVersion": "<string>",
  "surfaces": [
    "<string>"
  ],
  "transitionStatus": {
    "action": "<string>",
    "initiator": "<string>",
    "running": {
      "startTime": {}
    },
    "completed": {
      "startTime": {},
      "endTime": {}
    },
    "failed": {
      "startTime": {},
      "endTime": {},
      "error": "<string>"
    }
  },
  "deleteTime": {},
  "labels": [
    {}
  ],
  "abtest": {
    "flag": "<string>",
    "rollout": "<string>",
    "treatments": [
      {
        "variant": "<string>",
        "weight": 123,
        "description": "<string>",
        "displayName": "<string>",
        "imageUri": "<string>",
        "name": "<string>"
      }
    ]
  },
  "decision": {
    "conclusion": "<string>",
    "outcome": {},
    "treatment": "<string>"
  },
  "explore": {
    "exploratoryAnalyses": [
      {
        "createTime": "<string>",
        "id": "<string>",
        "messages": [
          "<string>"
        ],
        "metrics": [
          {
            "dimensions": [
              {
                "column": "<string>",
                "factTable": "<string>",
                "dimensionTable": "<string>"
              }
            ],
            "name": "<string>",
            "calculation": "<string>",
            "scheduledCalculation": "<string>"
          }
        ],
        "name": "<string>",
        "state": {},
        "updateTime": "<string>",
        "analysisResults": [
          {
            "analysisResult": "<string>",
            "exposureFilterName": "<string>"
          }
        ],
        "conclusion": {
          "text": "<string>",
          "updateTime": "<string>"
        },
        "createdBy": "<string>",
        "endTime": "<string>",
        "labels": [
          {
            "key": "<string>",
            "value": "<string>"
          }
        ],
        "splitByExposureFilters": true,
        "startTime": "<string>",
        "useCustomDateRange": true,
        "useScheduledCalculation": true
      }
    ]
  },
  "exposure": {
    "exposure": [
      {
        "totalExposureCount": 123,
        "treatment": "<string>",
        "exposureFilter": "<string>"
      }
    ]
  },
  "flags": {
    "audiences": [
      {
        "id": "<string>",
        "displayName": "<string>",
        "intakePaused": true,
        "launchTime": "<string>",
        "materialization": "<string>",
        "rule": "<string>",
        "segment": "<string>",
        "stopTime": "<string>"
      }
    ],
    "flag": "<string>",
    "ignoreTargetingForSticky": true,
    "intakePaused": true,
    "materialization": "<string>",
    "rule": "<string>",
    "segment": "<string>",
    "stickyAssignments": true,
    "targetingKeySelector": "<string>"
  },
  "hypothesis": {
    "text": "<string>"
  },
  "metrics": {
    "bucket": {},
    "metrics": [
      {
        "metric": "<string>",
        "calculation": "<string>",
        "metricRole": {
          "metricKind": {},
          "minimumDetectableEffect": 123,
          "nonInferiorityMargin": 123
        },
        "preferredDirection": {},
        "schedule": "<string>",
        "surface": "<string>",
        "surfaceOnly": true
      }
    ],
    "assignmentTable": "<string>",
    "entity": "<string>",
    "exposureCalculation": "<string>",
    "exposureFilter": {
      "displayName": "<string>",
      "factTable": "<string>",
      "filter": {
        "criteria": [
          {}
        ],
        "expression": {
          "ref": "<string>",
          "not": {},
          "and": {
            "operands": [
              {}
            ]
          },
          "or": {
            "operands": [
              {}
            ]
          }
        }
      }
    },
    "exposureMetric": "<string>",
    "exposureMetricCalculation": "<string>",
    "exposureMetricSchedule": "<string>",
    "exposureTable": "<string>",
    "exposureTableSchedule": "<string>",
    "filters": [
      {
        "displayName": "<string>",
        "factTable": "<string>",
        "filter": {
          "criteria": [
            {}
          ],
          "expression": {
            "ref": "<string>",
            "not": {},
            "and": {
              "operands": [
                {}
              ]
            },
            "or": {
              "operands": [
                {}
              ]
            }
          }
        }
      }
    ]
  },
  "planning": {
    "actual": {
      "endTime": "<string>",
      "runtime": "<string>",
      "startTime": "<string>"
    },
    "planned": {
      "endTime": "<string>",
      "runtime": "<string>",
      "startTime": "<string>"
    }
  },
  "report": {
    "sections": [
      {
        "hypothesisData": {
          "hypothesis": "<string>"
        },
        "id": "<string>",
        "imagesData": {
          "images": [
            {
              "id": "<string>",
              "imageUri": "<string>",
              "label": "<string>",
              "text": "<string>"
            }
          ]
        },
        "metricsData": {
          "metrics": [
            {
              "hidden": true,
              "metric": "<string>",
              "metricName": "<string>",
              "treatments": [
                {
                  "treatment": "<string>",
                  "hidden": true
                }
              ]
            }
          ]
        },
        "nextData": {
          "text": "<string>",
          "title": "<string>"
        },
        "outcomeData": {
          "conclusion": "<string>",
          "outcome": "<string>"
        },
        "recommendationsData": {
          "content": [
            {
              "id": "<string>",
              "shippingRecommendation": "<string>",
              "text": "<string>",
              "variant": "<string>"
            }
          ]
        },
        "resultsData": {
          "text": "<string>",
          "title": "<string>"
        },
        "summaryData": {
          "imageUri": "<string>",
          "text": "<string>",
          "title": "<string>"
        }
      }
    ],
    "name": "<string>"
  },
  "reviews": {
    "approvalRequired": true,
    "optionalReviews": [
      {
        "state": {},
        "responses": [
          {
            "reviewer": "<string>",
            "state": {},
            "commentId": "<string>",
            "groups": [
              "<string>"
            ],
            "id": "<string>",
            "stale": true
          }
        ],
        "surface": "<string>"
      }
    ],
    "requiredReviews": [
      {
        "state": {},
        "responses": [
          {
            "reviewer": "<string>",
            "state": {},
            "commentId": "<string>",
            "groups": [
              "<string>"
            ],
            "id": "<string>",
            "stale": true
          }
        ],
        "surface": "<string>"
      }
    ],
    "reviewId": "<string>",
    "status": {}
  },
  "samplesize": {
    "error": "<string>",
    "exposure": {
      "assignmentTable": {
        "assignmentTable": "<string>",
        "filters": {
          "exposureFilter": "<string>"
        },
        "runtime": "<string>",
        "samplingFactor": 123
      },
      "existingInstance": {
        "workflowInstance": "<string>",
        "exposureTableSchedule": "<string>"
      },
      "endTime": "<string>",
      "startTime": "<string>"
    },
    "exposureSource": {
      "workflowInstance": "<string>",
      "assignmentTable": "<string>",
      "exposureTableSchedule": "<string>",
      "filters": {
        "assignmentFilter": {
          "criteria": [
            {}
          ],
          "expression": {
            "ref": "<string>",
            "not": {},
            "and": {
              "operands": [
                {}
              ]
            },
            "or": {
              "operands": [
                {}
              ]
            }
          }
        },
        "entityFilter": {
          "dimensionTable": "<string>",
          "filter": {
            "criteria": [
              {}
            ],
            "expression": {
              "ref": "<string>",
              "not": {},
              "and": {
                "operands": [
                  {}
                ]
              },
              "or": {
                "operands": [
                  {}
                ]
              }
            }
          }
        },
        "exposureFilter": "<string>"
      },
      "runtime": "<string>",
      "samplingFactor": 123
    },
    "metrics": [
      {
        "metric": "<string>",
        "error": "<string>",
        "forecastedData": [
          {
            "dayIndex": 123,
            "expectedSampleSize": 123,
            "requiredSampleSize": 123
          }
        ],
        "observedData": [
          {
            "dayIndex": 123,
            "expectedSampleSize": 123,
            "mean": 123,
            "requiredSampleSize": 123,
            "variance": 123
          }
        ],
        "requiredSampleSize": 123,
        "state": {},
        "summaryStats": {
          "count": 123,
          "mean": 123,
          "variance": 123,
          "varianceReductionRate": 123
        },
        "type": {}
      }
    ],
    "requiredSampleSize": 123,
    "state": {},
    "statsParameters": {
      "alpha": 123,
      "power": 123,
      "testHorizonStrategy": {},
      "allocationProportion": "<string>"
    }
  },
  "stats": {
    "alpha": 123,
    "analysisResult": "<string>",
    "analysisResults": [
      {
        "analysisResult": "<string>",
        "exposureFilterName": "<string>"
      }
    ],
    "fallbackSampleSize": "<string>",
    "metricInformation": [
      {
        "metricName": "<string>",
        "expectedSampleSize": "<string>"
      }
    ],
    "metricMethods": [
      {
        "method": {},
        "metricName": "<string>"
      }
    ],
    "power": 123,
    "testHorizonStrategy": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

abtestId
string

Optional ID to use for the abtest, will be autogenerated if not provided.

Body

application/json
displayName
string
required

Human-friendly name of this instance.

name
string

Unique id of the instance for example workflows/abtest/instances/vxpoqirnwawxzasv4tuu.

owner
string

The owner of the resource. If not set will default to the creator.

jobQueue
object
workflowVersion
string

Version of the workflow that this instance is running.

surfaces
string[]

A set of surfaces that this workflow instance belongs to.

labels
object[]

Generic labels for the workflow instance.

abtest
Abtest.AbTestData · object

Abtest.AbTestData: Module data for abtest

decision
Abtest.DecisionRecordData · object

Abtest.DecisionRecordData: Module data for decision

explore
Abtest.ExploreData · object

Abtest.ExploreData: Module data for explore

exposure
Abtest.ExposureData · object

Abtest.ExposureData: Module data for exposure

flags
Abtest.FlagsData · object

Abtest.FlagsData: Module data for flags

hypothesis
Abtest.HypothesisData · object

Abtest.HypothesisData: Module data for hypothesis

metrics
Abtest.MetricsData · object

Abtest.MetricsData: Module data for metrics

planning
Abtest.PlanningData · object

Abtest.PlanningData: Module data for planning

report
Abtest.ReportData · object

Abtest.ReportData: Module data for report

reviews
Abtest.ReviewsData · object

Abtest.ReviewsData: Module data for reviews

samplesize
Abtest.SampleSizeData · object

Abtest.SampleSizeData: Module data for samplesize

stats
Abtest.StatsData · object

Abtest.StatsData: Module data for stats

Response

200 - application/json

Returns a Abtest.

Represents a Abtest.

displayName
string
required

Human-friendly name of this instance.

state
string
required

Current state of the workflow instance.

createTime
object
required

Time when the workflow instance was created.

updateTime
object
required

Time when the workflow instance was last updated.

creator
string
required

Reference to the identity that created this workflow instance.

updater
string
required

Reference to the identity that last updated this workflow instance.

name
string

Unique id of the instance for example workflows/abtest/instances/vxpoqirnwawxzasv4tuu.

owner
string

The owner of the resource. If not set will default to the creator.

jobQueue
object
pendingTransition
object

if present, denotes information about an ongoing attempt to transition to another state

checks
object[]

A check is a named boolean value that can be used to report possible errors when a workflow instance is in a certain state.

stateHistory
object[]

A historical record of previous states that the workflow instance was in.

possibleTransitions
string[]

The transitions that this workflow instance can do from its current state.

lockedDataKeys
string[]

Module data keys that are currently locked.

workflowVersion
string

Version of the workflow that this instance is running.

surfaces
string[]

A set of surfaces that this workflow instance belongs to.

transitionStatus
object

The status of the latest transition for the instance.

deleteTime
object

Time when the workflow instance was deleted.

labels
object[]

Generic labels for the workflow instance.

abtest
Abtest.AbTestData · object

Abtest.AbTestData: Module data for abtest

decision
Abtest.DecisionRecordData · object

Abtest.DecisionRecordData: Module data for decision

explore
Abtest.ExploreData · object

Abtest.ExploreData: Module data for explore

exposure
Abtest.ExposureData · object

Abtest.ExposureData: Module data for exposure

flags
Abtest.FlagsData · object

Abtest.FlagsData: Module data for flags

hypothesis
Abtest.HypothesisData · object

Abtest.HypothesisData: Module data for hypothesis

metrics
Abtest.MetricsData · object

Abtest.MetricsData: Module data for metrics

planning
Abtest.PlanningData · object

Abtest.PlanningData: Module data for planning

report
Abtest.ReportData · object

Abtest.ReportData: Module data for report

reviews
Abtest.ReviewsData · object

Abtest.ReviewsData: Module data for reviews

samplesize
Abtest.SampleSizeData · object

Abtest.SampleSizeData: Module data for samplesize

stats
Abtest.StatsData · object

Abtest.StatsData: Module data for stats