Skip to main content

Create a Context

POST 

/context

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

Request

Header Parameters

    X-Agent stringrequired

    The User-Agent of your SDK.

    Example: absmartly-Java-SDK v1.0.1
    X-Environment stringrequired

    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 stringrequired

    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 int64required

    The application version which you are running your experiments on.

    Example: 0

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 stringrequired
    uid string

    Possible values: non-empty and <= 640 characters

  • ]

Responses

Success

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

    Possible values: non-empty and <= 640 characters

  • ]
  • assignments object[]required
  • Array [
  • id int32required
    iteration int32required
    name stringrequired
    variant int32required

    Possible values: <= 127

    eligible booleanrequired
    audienceMismatch boolean
    originalVariant int32

    Possible values: <= 127

    config stringnullablerequired
  • ]
Loading...