Docs

Config

Fetch split test configuration for a property

Last updated:

This endpoint returns all active split tests and their variations for a property. The Split Testing SDK calls this automatically during init().

Get Config

GET /v1/split-testing/config Public key
Fetch active split test definitions, including variations, traffic allocation, and hash seeds.
ParameterTypeRequiredDescription
propertyId (query)stringThe property to fetch tests for
Response
{
  "tests": [
    {
      "key": "hero-headline",
      "id": "st_abc123",
      "type": "text",
      "status": "running",
      "hashSeed": "seed-xyz",
      "trafficAllocation": 100,
      "variations": [
        { "key": "control", "weight": 50, "value": "Welcome to Acme" },
        { "key": "variant-a", "weight": 50, "value": "Grow Faster with Acme" }
      ]
    }
  ],
  "ttl": 60
}
Example
bash
curl -X GET "https://api.sessionsight.com/v1/split-testing/config" \
  -H "x-api-key: YOUR_PUBLIC_API_KEY"

Notes

  • The response is cached with Cache-Control: public, max-age=60
  • trafficAllocation is a percentage (0 to 100) controlling what fraction of visitors are included in the test
  • hashSeed is used by the SDK to deterministically assign visitors to variations
  • type is one of id, text, or json