API · Agents
Results
Read test results, the events an environment receives, and visitor analytics from an agent.
Everything here is read-only and works for any role. Paths start with /api/agent/organizations/{organizationId}/spaces/{spaceId}/{environment}.
Test results
curl https://improve.obelism.studio/api/agent/organizations/$ORG/production/tests/$TEST/results \
-H "Authorization: Bearer $TOKEN"{
"testId": "test_01H8XYZ",
"status": "ready",
"usageLimitReached": false,
"results": {
"summary": { "dateStart": "…", "dateUpdated": "…", "totalSessions": 2000 },
"result": {
"control": { "page_view": 1000, "sign_up": 100 },
"bold": { "page_view": 1000, "sign_up": 140 }
},
"resultsByDate": []
},
"significance": {
"method": "sequential",
"confidence": 95,
"control": "control",
"significantVariants": ["bold"],
"variants": {
"bold": {
"significantResult": true,
"direction": "better",
"percentile": 99,
"pValue": 0.004,
"difference": 0.02,
"confidenceInterval": { "lower": 0.006, "upper": 0.034 },
"zScore": 2.78,
"standardErrorDifference": 0.014
}
}
}
}resulthas the unique visitors per variant for each event of the test. The first event is the start, the last is the conversion.valueandordersappear when events carry avalue, such as an order total. They add up every event, including repeat purchases.significancecompares each variant with the control, the first variant, at 95% confidence.methodissequential:pValueand the confidence interval stay valid however often you read the results, so they are safe to poll and to stop on.percentileis the strictest of 99, 95 and 90 thatpValueclears. A variant is significant when it is clearly better or clearly worse;direction(better,worseornone) says which, so check it before calling a variant a winner.statusispending, andresultsisnull, until the test has exposures.sampleRatiois the sample-ratio-mismatch check: whenmismatchistrue, visitors are not reaching the variants in the configured split, so do not trust the numbers until you find out why.placementscounts the published Content entries that carry the test. Withstatus: pendingandplacementsabove zero, the site is not reporting exposures yet.
Results are cached. A cached result comes back straight away and is recalculated in the background when it is older than 5 minutes. POST to the same path recalculates now. It answers 202 while there is nothing to calculate yet or a calculation is already running.
When the organization is past its event pool and the plan's buffer, results freeze at the last calculation: usageLimitReached is true, and a recalculation answers 402 usage_limit_reached. Over the pool but within the buffer, results keep updating.
Events
GET .../events lists every event and scope the environment has received, or a test refers to, with a count and lastReceivedAt. Use it to choose a test's events.
Visitor analytics
GET .../analytics?timezone=Europe/Amsterdam returns visitor charts for the environment (Numbers shows the same and more in its dashboard):
visitors: unique visitors per time bucket over the last24h,7d,30dand90dpopularPages: the most viewed pagescountries: visitors per country
timezone is an IANA time zone for the buckets, and defaults to UTC.