experiments

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-experiments"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/6af814d4-70c1-4363-8381-689a51668c4d/social-card.svg?v=3e7ae33eec8b" alt="experiments" width="600" height="315"></a>
POSThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/unarchiveScope experiment:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/unarchive"
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
audienceobjectrequired
conclusionstring
created_atstringrequired
created_bystring
ended_atstring
exposureobjectrequired
flag_idstringrequired
flag_keystring
Key of the flag flag_id names; null only if that flag row is gone.
guardrail_stateobjectrequired
holdout_idstring
hypothesisstringrequired
idstringrequired
kindstringrequired
metricsobjectrequired
{primary: [metric id], secondary: [...], guardrail: [{metric, direction?}]}.
namestringrequired
namespace_idstring
project_idstringrequired
requires_approvalbooleanrequired
scheduleobjectrequired
shipped_atstring
snapshotobject
started_atstring
stats_configobjectrequired
statusstringrequired
traffic_pctnumberrequired
updated_atstringrequired
variantsobjectrequired
winnerstring
404
409
PATCHhttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{key}

Renames a variant's display name at any status (also running, stopped and archived). The variant `key` stays immutable, so exposures, results and history stay joined; the rename is audited.

Parameters

project_idstringpathrequired
idstringpathrequired
keystringpathrequired

Request body

application/json
namestringrequired
Display name, 1 to 200 characters.
{
  "name": "string"
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{key}" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/cohortScope cohort:write

Parameters

project_idstringpathrequired
idstringpathrequired
variantstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/cohort"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 A static cohort of the units first exposed to the variant
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "description": "string",
  "filters": {},
  "id": "string",
  "kind": "string",
  "last_computed_at": "2024-01-01T00:00:00Z",
  "last_error": "string",
  "member_count": 0,
  "name": "string",
  "realtime": true,
  "status": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "version": 0
}
Schema
created_atstringrequired
created_bystring
descriptionstringrequired
filtersobjectrequired
Dynamic: the lc-cohort definition tree. Static: {}.
idstringrequired
kindstringrequired
static | dynamic.
last_computed_atstring
last_errorstring
member_countinteger
namestringrequired
realtimebooleanrequired
Dynamic cohorts: members are also added from the event stream as they qualify (G181).
statusstringrequired
pending | calculating | ready | error.
updated_atstringrequired
versionintegerrequired
Bumped on every definition change.
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/screenshotScope experiment:read

Parameters

project_idstringpathrequired
idstringpathrequired
variantstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/screenshot"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 the variant screenshot (PNG or JPEG)
404
PUThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/screenshotScope experiment:write

Parameters

project_idstringpathrequired
idstringpathrequired
variantstringpathrequired

Request body

image/png
[
  0
]

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/screenshot" \
  -H "Content-Type: image/png" \
  -d '[0]'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400 not a PNG or JPEG
404
413
DELETEhttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/screenshotScope experiment:write

Parameters

project_idstringpathrequired
idstringpathrequired
variantstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/variants/{variant}/screenshot"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404
POSThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/{action}Scope experiment:write

Parameters

project_idstringpathrequired
idstringpathrequired
actionstringpathrequired
start | pause | resume | stop | request-approval
forstringquery
request-approval only: start (default), pause, stop, update or custom_code

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/{action}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 start | pause | resume | stop return the Experiment; request-approval returns the ChangeRequest
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/holdoutsScope experiment:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/holdouts"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "filters": {},
      "id": "string",
      "name": "string",
      "percentage": 0,
      "status": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
created_atstringrequired
filtersobjectrequired
idstringrequired
namestringrequired
percentagenumberrequired
statusstringrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/holdoutsScope experiment:write

Parameters

project_idstringpathrequired

Request body

application/json
filtersobject
namestringrequired
percentagenumberrequired
{
  "filters": {},
  "name": "string",
  "percentage": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/holdouts" \
  -H "Content-Type: application/json" \
  -d '{"filters":{},"name":"string","percentage":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "filters": {},
  "id": "string",
  "name": "string",
  "percentage": 0,
  "status": "string"
}
Schema
created_atstringrequired
filtersobjectrequired
idstringrequired
namestringrequired
percentagenumberrequired
statusstringrequired
400
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/holdouts/{id}/endScope experiment:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/holdouts/{id}/end"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
409

Updated