Skip to main content

Create a Context

A POST request for creating a new context and assigning variants to your users.

Header Parameters
    X-Agent string required

    The User-Agent of your SDK.

    Example: absmartly-Java-SDK v1.0.1
    X-Environment string required

    The environment in which you are running your experiments. These can be found and created in your ABsmartly Web Console settings.

    Example: development
    X-Application string required

    The application in which you are running your experiments. These can be found and created in your ABsmartly Web Console settings.

    Example: www
    X-Application-Version int64 required

    The application version which you are running your experiments on.

    Example: 0
Request Body required

Units data for which to create the context and variant assignments. Unit types can be found and created in your ABsmartly Web Console settings.

{
"type": "user_id" // The name of the unit type
"uid": "4a42766ca6313d26f49985e799ff4f3790fb86efa0fce46edb3ea8fbf1ea3408" // The value of the unit that you are tracking.
}
    units object[] required
  • Array [
  • type string required
    uid string

    Possible values: non-empty and <= 640 characters

  • ]
Responses

Success


Schema
    units object[] required
  • Array [
  • type string required
    uid string

    Possible values: non-empty and <= 640 characters

  • ]
  • assignments object[] required
  • Array [
  • id int32 required
    iteration int32 required
    name string required
    variant int32 required

    Possible values: <= 127

    eligible boolean required
    audienceMismatch boolean
    originalVariant int32

    Possible values: <= 127

    config string nullable required
  • ]
Loading...