experiments
DELETE
https://lucidace.com /v1/projects/{project_id}/experiments/{id} Scope experiment:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/experiments/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
409 The experiment is running: stop it first
PATCH
https://lucidace.com /v1/projects/{project_id}/experiments/{id} Scope experiment:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
audiencearrayconfirm_running_changebooleanLC-EXT-46: changing metrics, stats config or exposure of a started experiment changes results already seen; without this the change is refused with 409
running_change.exposureobject{event?, filters?, multiple_variants?: exclude|first_seen, filter_test_accounts?}; freeze enrolment with POST .../freeze.hypothesisstringmetricsobjectnamestringrequires_approvalbooleanscheduleobjectstats_configobjecttraffic_pctnumbervariantsarray{
"audience": [
{
"context_kind": "string",
"group_type": "string",
"key": "string",
"op": "string",
"properties": [
null
],
"scope": "string",
"type": "string",
"value": {}
}
],
"confirm_running_change": true,
"exposure": {},
"hypothesis": "string",
"metrics": {},
"name": "string",
"requires_approval": true,
"schedule": {},
"stats_config": {},
"traffic_pct": 0,
"variants": [
{
"allocation_pct": 0,
"key": "string",
"name": "string",
"payload": {}
}
]
}Code samples
cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/experiments/{id}" \
-H "Content-Type: application/json" \
-d '{"audience":[{"context_kind":"string","group_type":"string","key":"string","op":"string","properties":[null],"scope":"string","type":"string","value":{}}],"confirm_running_change":true,"exposure":{},"hypothesis":"string","metrics":{},"name":"string","requires_approval":true,"schedule":{},"stats_config":{},"traffic_pct":0,"variants":[{"allocation_pct":0,"key":"string","name":"string","payload":{}}]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"audience": {},
"conclusion": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"ended_at": "2024-01-01T00:00:00Z",
"exposure": {},
"flag_id": "string",
"flag_key": "string",
"guardrail_state": {},
"holdout_id": "string",
"hypothesis": "string",
"id": "string",
"kind": "string",
"metrics": {},
"name": "string",
"namespace_id": "string",
"project_id": "string",
"requires_approval": true,
"schedule": {},
"shipped_at": "2024-01-01T00:00:00Z",
"snapshot": {},
"started_at": "2024-01-01T00:00:00Z",
"stats_config": {},
"status": "string",
"traffic_pct": 0,
"updated_at": "2024-01-01T00:00:00Z",
"variants": {},
"winner": "string"
}Schema
audienceobjectrequiredconclusionstringcreated_atstringrequiredcreated_bystringended_atstringexposureobjectrequiredflag_idstringrequiredflag_keystringKey of the flag
flag_id names; null only if that flag row is gone.guardrail_stateobjectrequiredholdout_idstringhypothesisstringrequiredidstringrequiredkindstringrequiredmetricsobjectrequired{primary: [metric id], secondary: [...], guardrail: [{metric, direction?}]}.namestringrequirednamespace_idstringproject_idstringrequiredrequires_approvalbooleanrequiredscheduleobjectrequiredshipped_atstringsnapshotobjectstarted_atstringstats_configobjectrequiredstatusstringrequiredtraffic_pctnumberrequiredupdated_atstringrequiredvariantsobjectrequiredwinnerstring400
403
404
409
POST
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/archive Scope experiment:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/archive"TypeScript
Python
Go
PHP
Ruby
Java
Responses
404
409 running or paused
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/bandit/contextual Scope experiment:readThe multi-feature policy of a bandit experiment whose `stats_config.bandit.contextual` names `properties` (2 or 3). Empty lists until the experiment has data.
Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/bandit/contextual"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"choices": [
{
"values": [
"string"
],
"variant": "string"
}
],
"importance": [
{
"importance": 0,
"property": "string"
}
],
"properties": [
"string"
]
}Schema
choicesMultiChoice[]requiredShow child parameters
valuesstring[]requiredOne value per property, in property order.
variantstringrequiredimportanceImportance[]requiredShow child parameters
importancenumberrequiredShare in
[0, 1]; all attributes sum to 1 (or all 0 without signal).propertystringrequiredpropertiesstring[]required400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/checklist Scope experiment:readPre-launch checks of an experiment as currently configured.
Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/checklist"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"items": [
{
"detail": "string",
"key": "string",
"label": "string",
"status": "pass"
}
],
"ready": true
}Schema
itemsCheckItem[]requiredShow child parameters
detailstringrequiredkeystringrequiredlabelstringrequiredstatusstringrequiredreadybooleanrequiredNo item fails: the experiment can start (warnings do not block).
404
GET
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/checks Scope experiment:readParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/checks"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"aa": {
"passed": true,
"significant": [
"string"
]
},
"biased": true,
"experiment_id": "string",
"exposure_ignored": {
"ignored_before_start": 0,
"ignored_internal": 0,
"ignored_invalid_variant": 0
},
"pre_exposure": [
{
"biased": true,
"p_value": 0,
"pre_diff": 0,
"variant": "string"
}
]
}Schema
aaAaVerdictShow child parameters
passedbooleanrequiredNo treatment arm differs significantly on any metric (what an A/A test should show).
significantstring[]requiredmetric id / variant pairs that came out significant (expected in about alpha of tests).biasedbooleanrequiredAny arm differed before exposure (randomization or assignment problem).
experiment_idstringrequiredexposure_ignoredobjectrequiredExposure units left out of the results, by reason (
ignored_before_start, ignored_internal, ignored_invalid_variant); the same counts as exposure_health of the results.Show child parameters
ignored_before_startintegerrequiredExposed before the experiment's start time.
ignored_internalintegerrequiredInternal or test-account traffic (0 unless
exposure.filter_test_accounts is on).ignored_invalid_variantintegerrequiredExposure with a variant key the experiment does not define (or an empty one).
pre_exposureBiasReport[]requiredPre-exposure balance of the first metric; empty before any unit is exposed.
Show child parameters
biasedbooleanrequiredp_value < alpha: the arms already differed before exposure.p_valuenumberrequiredpre_diffnumberrequiredTreatment minus control in the pre-exposure metric: should be ~0 under randomization.
variantstringrequired404
503
POST
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/duplicate Scope experiment:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
flag_keystringDefault
<flag key>-copy.namestringDefault
<name> (copy).project_idstringLC-EXT-44: create the copy in this project (needs write access there). Metrics are matched by name in the target, or copied; layer, holdout and metric groups are not carried.
{
"flag_key": null,
"name": null,
"project_id": null
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/duplicate" \
-H "Content-Type: application/json" \
-d '{"flag_key":null,"name":null,"project_id":null}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 a draft with the same design, metrics and settings on a new flag (layer allocation not copied)
Same as 200 · PATCH /v1/projects/{project_id}/experiments/{id}
400
404
409
POST
https://lucidace.com /v1/projects/{project_id}/experiments/{id}/freeze Scope experiment:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
frozenbooleanfalse unfreezes.snapshotbooleanLC-EXT-43: also snapshot the units exposed so far into a static cohort and narrow the flag release to that cohort, so new users stop entering. Unfreezing undoes the narrowing.
{
"frozen": true,
"snapshot": true
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/freeze" \
-H "Content-Type: application/json" \
-d '{"frozen":true,"snapshot":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
exposure.frozen_at set (or cleared): later first exposures are left out of the analysisSame as 200 · PATCH /v1/projects/{project_id}/experiments/{id}
404
409
Updated