GamebeastDocs
Dashboard
Project APIExperiments (V2)

Create experiment

POST
/application/{applicationId}/v2/experiments

Create a new experiment on a configuration. Validates group weights, changeset operations, scheduling constraints, and path-lock conflicts.

Authorization

personalAccessTokenAuth
AuthorizationBearer <token>

Personal access token (prefixed gb_pat_). Acts on behalf of its owner and can never exceed the owner's own permissions. Send it as Authorization: Bearer <token>.

In: header

Path Parameters

applicationId*number

Gamebeast project ID

Header Parameters

environment_id*number

Gamebeast environment ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/application/0/v2/experiments" \  -H "environment_id: 0" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "baseConfigurationId": 1,    "unitType": "user",    "assignmentMode": "weightedHash",    "groups": [      {        "label": "string",        "color": "string",        "iconName": "string",        "weight": 1,        "changeset": {          "version": 1,          "operations": [            {              "op": "set",              "path": "string"            }          ]        }      }    ]  }'
{  "id": 1,  "applicationId": 1,  "environmentId": 1,  "baseConfigurationId": 1,  "name": "string",  "description": "string",  "access": "public",  "unitType": "user",  "autoAssignment": true,  "assignmentMode": "weightedHash",  "permanentEnrollment": true,  "targeting": {    "version": 1,    "root": null  },  "requiredProperties": [    "string"  ],  "state": "scheduled",  "startsAt": "2019-08-24T14:15:22Z",  "endsAt": "2019-08-24T14:15:22Z",  "terminatedAt": "2019-08-24T14:15:22Z",  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",  "terminatedBy": "67700905-d026-410e-9812-5c6358f2720f",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "groups": [    {      "id": 1,      "label": "string",      "color": "string",      "iconName": "string",      "weight": -9007199254740991,      "ordinal": 0,      "changeset": {        "id": 1,        "version": 1,        "baseConfigurationId": 1,        "baseContentHash": "string",        "operations": [          {            "id": 1,            "index": 0,            "op": "set",            "path": "string",            "value": null,            "baseValue": null          }        ]      }    }  ]}