Onboarding A/B test results with chi-squared p-value
GET
/api/v1/ux/ab-tests/{test_id}/results
const url = 'https://api.ultimateteam.ai/api/v1/ux/ab-tests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/results';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ultimateteam.ai/api/v1/ux/ab-tests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/results \ --header 'X-API-Key: <X-API-Key>'UX-01: Return per-variant metrics plus the significance decision. p_value is exposed as chi_squared_p_value to match the UX-01 acceptance criterion language; the underlying math is a two-proportion z-test which is mathematically equivalent to chi-squared on a 2x2 table.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”test_id
required
Test Id
string format: uuid
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
ABTestResultsResponse
Response body for GET /api/v1/ux/ab-tests/{test_id}/results.
p_value from the underlying two-proportion z-test is renamed
to chi_squared_p_value here per UX-01 acceptance criteria.
object
significant
required
Significant
boolean
status
required
Status
string
test_id
required
Test Id
string format: uuid
variants
required
Variants
Array<object>
VariantMetricsViewPer-variant view for the results endpoint.
object
completion_rate
required
Completion Rate
number
name
required
Name
string
observations
required
Observations
integer
successes
required
Successes
integer
variant_id
required
Variant Id
string format: uuid
Examplegenerated
{ "chi_squared_p_value": 1, "significant": true, "status": "example", "test_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "variants": [ { "completion_rate": 1, "name": "example", "observations": 1, "successes": 1, "variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "winner": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}