SDK V1Experiments
Request experiment assignments
Requests deterministic experiment assignments for the given gameserver and/or its players. For player-targeted experiments returns a playerIdsByGroupId map; for server-targeted experiments returns the assigned gameserverGroupId. Pass knownGroupIds to suppress redundant group payloads, and playerProperties / serverProperties to drive property-based targeting. Returns null when no experiments are active.
Authorization
sdkApiKey authorization<token>
SDK (public) key, prefixed gb_pk_ (older keys: sdk_). Send it as the authorization header value. Scoped to one project, so it is safe to ship in a game build.
In: header
Header Parameters
isstudio?|
Default
trueproject-id?integer
Range
0 < value <= 9007199254740991serverid*string
Length
length <= 100Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/sdk/v1/experiments/assignments" \ -H "serverid: string" \ -H "Content-Type: application/json" \ -d '{ "playerIds": [ "string" ], "property1": null, "property2": null }'{ "groups": [ { "id": 0, "endsAt": 0, "groupName": "string", "experimentName": "string", "configs": { "options": { "privacy": [ [ "string" ] ] }, "variables": null } } ], "targetType": "gameserver", "gameserverGroupId": 0, "property1": null, "property2": null}