Execute an AB Testing

Endpoint to execute an A/B Testing

Intro

This API allows you to start the execution of an A/B Testing. It is the first endpoint that you must consume in order to put your workfloos to compete.

📘

Create your A/B Test first

Remember that you must first have created your A/B Testing on the kiban cloud platform to then execute it via API.
To learn how to create an A/B test, visit our knowledge center.

Important points

To make the request it is necessary to provide the A/B Testing ID generated in the workfloo platform and the sceneries if you want to execute it in sandbox environment.

fieldsubfieldtyperequiredDescription
idPoolDefinitionAlphanumericYesProvide a valid A/B testing Id.
sceneriesObjectNoThis object is required only in the sandbox environment. You should use it to specify for each workfloo present in the A/B testing pool, which test scenario you want to apply.
idwf1AlphanumericNoexample where idwf1 shall be replaced by the Id of the workflow and the value of this field shall be the ID of the scenario that must be executed if case idwf1 was choosen for the execution.
idwf2AlphanumericNoThis example is similar to the case of "idwf1", but here you need to specify the IDs of the second workfloo added to the A/B Testing .
......NoThe same structure should be repeated based on the number of workfloos added. For instance, if there are 5 workflows in the A/B Testing, the parameters will go up to "idwf5":"idSceneryIdWf5", with each one corresponding to a specific workfloo.

You can find the A/B testing ID in the workfloo creation URL, in the IDs section.

And also within A/B Testing you can find the IDs of the added workflows:

To see the ID of each of the workflow scenarios added to A/B Testing, you must access the "Tests" area and obtain the ID of each test scenario there.

Example of the request body:

{
  "idPoolDefinition": "64c811990a99d4f84692baa9",
  "sceneries": {
    "idwf1": "idSceneryIdWf1",
    "idwf2": "idSceneryIdWf2",
    "idwf3": "idSceneryIdWf3",
    ...
    "idwfN": "idSceneryIdWfN"
  }
}

Successful response

A successful response will return the execution id of the workfloo, you must save this id, because it will be mandatory to pass it to the following endpoints to complete all the steps defined in your workfloo.

field NameDescription
idWorkflooIndicates the id of the generated workfloo to use in the following steps
idWorkflooDefinitionIndicates the ID of the workflow that was choosen when you started this A/B testing execution.
{
    "idWorkfloo": "66f4b143f8981abef5d6e3fe",
    "idWorkflooDefinition": "669fd491602f75dedf08f770"
}

Listing the possible error responses

Required scenarioId

You will get a 400 bad request error when any of the scenarioId is not provided in the request body.

{
    "typeError": "REQUIRED_FIELD_ERROR",
    "errors": null,
    "errorMessage": "scenarioId is necessary"
}

Required scenarioId

You will get this 404 bad request error when the scenarioId provided in the request body does not exist.

{
    "typeError": "ELEMENT_NOT_EXIST_ERROR",
    "errors": null,
    "errorMessage": "scenarioId not found"
}

Required fields

You will get a 400 bad request error when you don't provide any required field in the request body.

{
    "typeError": "REQUIRED_FIELDS",
    "errors": {},
    "errorMessage": ""
}

Unauthorized

It means that the provided API is incorrect and that you are not authorized to access it. You will not receive a body, only a 401 HTTP code.

Language
Authorization
Header
Click Try It! to start a request and see the response here!