> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/experimentation-and-measurement/experimentation/experiment-management.md).

# Experiment Management

Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance.

## GET /experiments/segment\_groups/{segment\_id}

> Find experiment from a group segment id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/experiments/segment_groups/{segment_id}":{"get":{"parameters":[{"schema":{"type":"string"},"style":"simple","required":true,"in":"path","description":"The id of the group segment","explode":false,"name":"segment_id"}],"operationId":"findExperimentFromGroupSegmentId","tags":["Experiment Management"],"description":"","summary":"Find experiment from a group segment id","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"ExperimentResource":{"type":"object","properties":{"result_uri":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"status":{"$ref":"#/components/schemas/ExperimentStatus"},"last_modified_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"selected_identifying_resources":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentIdentifyingResourceResource"},"readOnly":false},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentGroupResource"},"readOnly":false},"source_segment_id":{"type":"string","readOnly":false}},"required":["archived","created_by","created_ts","criterion_ids","groups","id","last_modified_by","last_modified_ts","name","source_segment_id","status"]},"ExperimentStatus":{"type":"string","enum":["DRAFT","IN_PROGRESS","FAILED","UPLOADING","READY"],"readOnly":false},"ExperimentIdentifyingResourceResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT":"#/components/schemas/ExperimentIdentifyingAccountResource","USER_EMAIL":"#/components/schemas/ExperimentIdentifyingEmailResource","USER_DEVICE_TECHNICAL_ID":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource","USER_PROFILE":"#/components/schemas/ExperimentIdentifyingProfileResource"}},"oneOf":[{"$ref":"#/components/schemas/ExperimentIdentifyingAccountResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingEmailResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingProfileResource"}],"properties":{"type":{"type":"string","enum":["USER_ACCOUNT","USER_EMAIL","USER_DEVICE_TECHNICAL_ID","USER_PROFILE"]}},"required":["type"]},"ExperimentIdentifyingAccountResource":{"type":"object","properties":{"compartment_type":{"$ref":"#/components/schemas/UserAccountCompartmentType"},"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id","compartment_type"]},"UserAccountCompartmentType":{"type":"string","enum":["CUSTOM_COMPARTMENT_ID","NETWORK_USER_ID"],"readOnly":false},"ExperimentIdentifyingEmailResource":{"type":"object"},"ExperimentIdentifyingDeviceTechnicalIdResource":{"type":"object","properties":{"registry_type":{"$ref":"#/components/schemas/DeviceIdRegistryType"},"registry_id":{"type":"string","readOnly":false}},"required":["registry_id","registry_type"]},"DeviceIdRegistryType":{"type":"string","enum":["INSTALLATION_ID","MUM_ID","NETWORK_DEVICE_ID","CUSTOM_DEVICE_ID","MOBILE_ADVERTISING_ID","MOBILE_VENDOR_ID","TV_ADVERTISING_ID","IP_V4_ADDRESS_ID","IP_V6_ADDRESS_ID"],"readOnly":false},"ExperimentIdentifyingProfileResource":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id"]},"ExperimentGroupResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/ExperimentGroupType"},"proportion":{"type":"number","format":"float","default":0,"readOnly":false},"segment_id":{"type":"string","readOnly":true}},"required":["id","proportion","type"]},"ExperimentGroupType":{"type":"string","enum":["TEST","CONTROL","PERMANENT_CONTROL"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /experiments

> Find experiments

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/experiments":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentResource"}},"first_result":{"type":"integer"},"count":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","tags":["Experiment Management"],"summary":"Find experiments","parameters":[{"description":"Organisation owning the source segment of the experiments","style":"form","required":true,"explode":true,"schema":{"type":"integer","format":"int64"},"name":"organisation_id","in":"query"},{"style":"form","description":"The keywords to match with experiment names","schema":{"type":"string"},"in":"query","name":"keywords","required":false,"explode":true},{"schema":{"type":"boolean"},"required":false,"in":"query","name":"archived","description":"If true the result will contain only archived experiments","explode":true,"style":"form"},{"in":"query","name":"first_result","explode":true,"schema":{"type":"integer","format":"int32"},"description":"Offset from which the search must be performed","style":"form","required":false},{"required":false,"description":"Number of maximum items that shall be return by this search","explode":true,"schema":{"type":"integer","format":"int32"},"name":"max_results","style":"form","in":"query"}],"operationId":"findExperiments"}}},"components":{"schemas":{"ExperimentResource":{"type":"object","properties":{"result_uri":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"status":{"$ref":"#/components/schemas/ExperimentStatus"},"last_modified_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"selected_identifying_resources":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentIdentifyingResourceResource"},"readOnly":false},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentGroupResource"},"readOnly":false},"source_segment_id":{"type":"string","readOnly":false}},"required":["archived","created_by","created_ts","criterion_ids","groups","id","last_modified_by","last_modified_ts","name","source_segment_id","status"]},"ExperimentStatus":{"type":"string","enum":["DRAFT","IN_PROGRESS","FAILED","UPLOADING","READY"],"readOnly":false},"ExperimentIdentifyingResourceResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT":"#/components/schemas/ExperimentIdentifyingAccountResource","USER_EMAIL":"#/components/schemas/ExperimentIdentifyingEmailResource","USER_DEVICE_TECHNICAL_ID":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource","USER_PROFILE":"#/components/schemas/ExperimentIdentifyingProfileResource"}},"oneOf":[{"$ref":"#/components/schemas/ExperimentIdentifyingAccountResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingEmailResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingProfileResource"}],"properties":{"type":{"type":"string","enum":["USER_ACCOUNT","USER_EMAIL","USER_DEVICE_TECHNICAL_ID","USER_PROFILE"]}},"required":["type"]},"ExperimentIdentifyingAccountResource":{"type":"object","properties":{"compartment_type":{"$ref":"#/components/schemas/UserAccountCompartmentType"},"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id","compartment_type"]},"UserAccountCompartmentType":{"type":"string","enum":["CUSTOM_COMPARTMENT_ID","NETWORK_USER_ID"],"readOnly":false},"ExperimentIdentifyingEmailResource":{"type":"object"},"ExperimentIdentifyingDeviceTechnicalIdResource":{"type":"object","properties":{"registry_type":{"$ref":"#/components/schemas/DeviceIdRegistryType"},"registry_id":{"type":"string","readOnly":false}},"required":["registry_id","registry_type"]},"DeviceIdRegistryType":{"type":"string","enum":["INSTALLATION_ID","MUM_ID","NETWORK_DEVICE_ID","CUSTOM_DEVICE_ID","MOBILE_ADVERTISING_ID","MOBILE_VENDOR_ID","TV_ADVERTISING_ID","IP_V4_ADDRESS_ID","IP_V6_ADDRESS_ID"],"readOnly":false},"ExperimentIdentifyingProfileResource":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id"]},"ExperimentGroupResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/ExperimentGroupType"},"proportion":{"type":"number","format":"float","default":0,"readOnly":false},"segment_id":{"type":"string","readOnly":true}},"required":["id","proportion","type"]},"ExperimentGroupType":{"type":"string","enum":["TEST","CONTROL","PERMANENT_CONTROL"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /datamarts/{datamart\_id}/experiments/configuration/action

> Perform Actions on a experiment datamart configuration

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/configuration/action":{"post":{"summary":"Perform Actions on a experiment datamart configuration","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentsDatamartConfigurationResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"applyActionOnExperimentsDatamartConfiguration","requestBody":{"description":"The action to perform","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentsDatamartConfigurationActionResource"}}},"required":true},"tags":["Experiment Management"],"parameters":[{"required":true,"name":"datamart_id","in":"path","explode":false,"style":"simple","schema":{"type":"string"}}]}}},"components":{"schemas":{"ExperimentsDatamartConfigurationResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":true},"outlier_threshold":{"type":"integer","format":"int32","default":0,"readOnly":false},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"control_group_size_limit":{"type":"integer","format":"int64","default":0,"readOnly":false},"acceptance_threshold":{"type":"integer","format":"int32","default":0,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"permanent_control_group_activation":{"type":"boolean","default":false,"readOnly":false},"default_group_distribution":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"audience_partition_id":{"type":"string","readOnly":true},"permanent_control_group_segment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"control_group_size_limit_activation":{"type":"boolean","default":false,"readOnly":false},"permanent_control_group_size":{"type":"number","format":"float","default":0,"readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["acceptance_threshold","archived","audience_partition_id","control_group_size_limit","control_group_size_limit_activation","created_by","created_ts","datamart_id","default_group_distribution","id","last_modified_by","last_modified_ts","outlier_threshold","permanent_control_group_activation","permanent_control_group_segment_ids","permanent_control_group_size"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"ExperimentsDatamartConfigurationActionResource":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/ExperimentsDatamartConfigurationAction"}},"required":["action"]},"ExperimentsDatamartConfigurationAction":{"type":"string","enum":["ROTATE_PERMANENT_GROUP_SEGMENTS"],"readOnly":false}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /audience\_segments/{segment\_id}/experiments/{experiment\_id}

> Search experiment by Id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/experiments/{experiment_id}":{"get":{"operationId":"getExperiment","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Search experiment by Id","tags":["Experiment Management"],"parameters":[{"schema":{"type":"string"},"name":"segment_id","explode":false,"required":true,"description":"The id of the segment of the experiment","in":"path","style":"simple"},{"in":"path","schema":{"type":"string"},"required":true,"explode":false,"style":"simple","name":"experiment_id","description":"The experiment id"}],"description":""}}},"components":{"schemas":{"ExperimentResource":{"type":"object","properties":{"result_uri":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"status":{"$ref":"#/components/schemas/ExperimentStatus"},"last_modified_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"selected_identifying_resources":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentIdentifyingResourceResource"},"readOnly":false},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentGroupResource"},"readOnly":false},"source_segment_id":{"type":"string","readOnly":false}},"required":["archived","created_by","created_ts","criterion_ids","groups","id","last_modified_by","last_modified_ts","name","source_segment_id","status"]},"ExperimentStatus":{"type":"string","enum":["DRAFT","IN_PROGRESS","FAILED","UPLOADING","READY"],"readOnly":false},"ExperimentIdentifyingResourceResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT":"#/components/schemas/ExperimentIdentifyingAccountResource","USER_EMAIL":"#/components/schemas/ExperimentIdentifyingEmailResource","USER_DEVICE_TECHNICAL_ID":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource","USER_PROFILE":"#/components/schemas/ExperimentIdentifyingProfileResource"}},"oneOf":[{"$ref":"#/components/schemas/ExperimentIdentifyingAccountResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingEmailResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingProfileResource"}],"properties":{"type":{"type":"string","enum":["USER_ACCOUNT","USER_EMAIL","USER_DEVICE_TECHNICAL_ID","USER_PROFILE"]}},"required":["type"]},"ExperimentIdentifyingAccountResource":{"type":"object","properties":{"compartment_type":{"$ref":"#/components/schemas/UserAccountCompartmentType"},"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id","compartment_type"]},"UserAccountCompartmentType":{"type":"string","enum":["CUSTOM_COMPARTMENT_ID","NETWORK_USER_ID"],"readOnly":false},"ExperimentIdentifyingEmailResource":{"type":"object"},"ExperimentIdentifyingDeviceTechnicalIdResource":{"type":"object","properties":{"registry_type":{"$ref":"#/components/schemas/DeviceIdRegistryType"},"registry_id":{"type":"string","readOnly":false}},"required":["registry_id","registry_type"]},"DeviceIdRegistryType":{"type":"string","enum":["INSTALLATION_ID","MUM_ID","NETWORK_DEVICE_ID","CUSTOM_DEVICE_ID","MOBILE_ADVERTISING_ID","MOBILE_VENDOR_ID","TV_ADVERTISING_ID","IP_V4_ADDRESS_ID","IP_V6_ADDRESS_ID"],"readOnly":false},"ExperimentIdentifyingProfileResource":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id"]},"ExperimentGroupResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/ExperimentGroupType"},"proportion":{"type":"number","format":"float","default":0,"readOnly":false},"segment_id":{"type":"string","readOnly":true}},"required":["id","proportion","type"]},"ExperimentGroupType":{"type":"string","enum":["TEST","CONTROL","PERMANENT_CONTROL"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /audience\_segments/{segment\_id}/experiments/{experiment\_id}

> Update experiment

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/experiments/{experiment_id}":{"put":{"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Experiment Management"],"requestBody":{"description":"The experiment to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResource"}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","explode":false,"description":"The id of the segment of the experiment","style":"simple","required":true,"name":"segment_id"},{"explode":false,"style":"simple","schema":{"type":"string"},"required":true,"name":"experiment_id","in":"path","description":"The experiment id"}],"summary":"Update experiment","operationId":"updateExperiment"}}},"components":{"schemas":{"ExperimentResource":{"type":"object","properties":{"result_uri":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"status":{"$ref":"#/components/schemas/ExperimentStatus"},"last_modified_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"selected_identifying_resources":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentIdentifyingResourceResource"},"readOnly":false},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentGroupResource"},"readOnly":false},"source_segment_id":{"type":"string","readOnly":false}},"required":["archived","created_by","created_ts","criterion_ids","groups","id","last_modified_by","last_modified_ts","name","source_segment_id","status"]},"ExperimentStatus":{"type":"string","enum":["DRAFT","IN_PROGRESS","FAILED","UPLOADING","READY"],"readOnly":false},"ExperimentIdentifyingResourceResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT":"#/components/schemas/ExperimentIdentifyingAccountResource","USER_EMAIL":"#/components/schemas/ExperimentIdentifyingEmailResource","USER_DEVICE_TECHNICAL_ID":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource","USER_PROFILE":"#/components/schemas/ExperimentIdentifyingProfileResource"}},"oneOf":[{"$ref":"#/components/schemas/ExperimentIdentifyingAccountResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingEmailResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingProfileResource"}],"properties":{"type":{"type":"string","enum":["USER_ACCOUNT","USER_EMAIL","USER_DEVICE_TECHNICAL_ID","USER_PROFILE"]}},"required":["type"]},"ExperimentIdentifyingAccountResource":{"type":"object","properties":{"compartment_type":{"$ref":"#/components/schemas/UserAccountCompartmentType"},"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id","compartment_type"]},"UserAccountCompartmentType":{"type":"string","enum":["CUSTOM_COMPARTMENT_ID","NETWORK_USER_ID"],"readOnly":false},"ExperimentIdentifyingEmailResource":{"type":"object"},"ExperimentIdentifyingDeviceTechnicalIdResource":{"type":"object","properties":{"registry_type":{"$ref":"#/components/schemas/DeviceIdRegistryType"},"registry_id":{"type":"string","readOnly":false}},"required":["registry_id","registry_type"]},"DeviceIdRegistryType":{"type":"string","enum":["INSTALLATION_ID","MUM_ID","NETWORK_DEVICE_ID","CUSTOM_DEVICE_ID","MOBILE_ADVERTISING_ID","MOBILE_VENDOR_ID","TV_ADVERTISING_ID","IP_V4_ADDRESS_ID","IP_V6_ADDRESS_ID"],"readOnly":false},"ExperimentIdentifyingProfileResource":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id"]},"ExperimentGroupResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/ExperimentGroupType"},"proportion":{"type":"number","format":"float","default":0,"readOnly":false},"segment_id":{"type":"string","readOnly":true}},"required":["id","proportion","type"]},"ExperimentGroupType":{"type":"string","enum":["TEST","CONTROL","PERMANENT_CONTROL"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /audience\_segments/{segment\_id}/experiments/{experiment\_id}/action

> Execute action on experiment

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/experiments/{experiment_id}/action":{"post":{"summary":"Execute action on experiment","parameters":[{"required":true,"schema":{"type":"string"},"style":"simple","explode":false,"in":"path","name":"segment_id","description":"The id of the segment of the experiment"},{"name":"experiment_id","required":true,"in":"path","schema":{"type":"string"},"style":"simple","explode":false,"description":"The experiment id"}],"tags":["Experiment Management"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","requestBody":{"description":"The action to perform","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentPublicAction"}}},"required":true},"operationId":"applyActionOnExperiment"}}},"components":{"schemas":{"ExperimentResource":{"type":"object","properties":{"result_uri":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"status":{"$ref":"#/components/schemas/ExperimentStatus"},"last_modified_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"selected_identifying_resources":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentIdentifyingResourceResource"},"readOnly":false},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentGroupResource"},"readOnly":false},"source_segment_id":{"type":"string","readOnly":false}},"required":["archived","created_by","created_ts","criterion_ids","groups","id","last_modified_by","last_modified_ts","name","source_segment_id","status"]},"ExperimentStatus":{"type":"string","enum":["DRAFT","IN_PROGRESS","FAILED","UPLOADING","READY"],"readOnly":false},"ExperimentIdentifyingResourceResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT":"#/components/schemas/ExperimentIdentifyingAccountResource","USER_EMAIL":"#/components/schemas/ExperimentIdentifyingEmailResource","USER_DEVICE_TECHNICAL_ID":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource","USER_PROFILE":"#/components/schemas/ExperimentIdentifyingProfileResource"}},"oneOf":[{"$ref":"#/components/schemas/ExperimentIdentifyingAccountResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingEmailResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingProfileResource"}],"properties":{"type":{"type":"string","enum":["USER_ACCOUNT","USER_EMAIL","USER_DEVICE_TECHNICAL_ID","USER_PROFILE"]}},"required":["type"]},"ExperimentIdentifyingAccountResource":{"type":"object","properties":{"compartment_type":{"$ref":"#/components/schemas/UserAccountCompartmentType"},"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id","compartment_type"]},"UserAccountCompartmentType":{"type":"string","enum":["CUSTOM_COMPARTMENT_ID","NETWORK_USER_ID"],"readOnly":false},"ExperimentIdentifyingEmailResource":{"type":"object"},"ExperimentIdentifyingDeviceTechnicalIdResource":{"type":"object","properties":{"registry_type":{"$ref":"#/components/schemas/DeviceIdRegistryType"},"registry_id":{"type":"string","readOnly":false}},"required":["registry_id","registry_type"]},"DeviceIdRegistryType":{"type":"string","enum":["INSTALLATION_ID","MUM_ID","NETWORK_DEVICE_ID","CUSTOM_DEVICE_ID","MOBILE_ADVERTISING_ID","MOBILE_VENDOR_ID","TV_ADVERTISING_ID","IP_V4_ADDRESS_ID","IP_V6_ADDRESS_ID"],"readOnly":false},"ExperimentIdentifyingProfileResource":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id"]},"ExperimentGroupResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/ExperimentGroupType"},"proportion":{"type":"number","format":"float","default":0,"readOnly":false},"segment_id":{"type":"string","readOnly":true}},"required":["id","proportion","type"]},"ExperimentGroupType":{"type":"string","enum":["TEST","CONTROL","PERMANENT_CONTROL"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"ExperimentPublicAction":{"allOf":[{"$ref":"#/components/schemas/ExperimentAction"}],"required":["type"],"discriminator":{"propertyName":"type","mapping":{"COMPUTE":"#/components/schemas/ComputeAction","ARCHIVE":"#/components/schemas/ArchiveAction1"}},"properties":{"type":{"type":"string","enum":["COMPUTE","ARCHIVE"]}},"oneOf":[{"$ref":"#/components/schemas/ComputeAction"},{"$ref":"#/components/schemas/ArchiveAction1"}]},"ExperimentAction":{"type":"object"},"ComputeAction":{"type":"object"},"ArchiveAction1":{"type":"object"}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datamarts/{datamart\_id}/experiments/configuration

> Search the datamart configuration for experiments

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/configuration":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentsDatamartConfigurationResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"getExperimentsDatamartConfiguration","description":"","tags":["Experiment Management"],"parameters":[{"name":"datamart_id","explode":false,"required":true,"in":"path","style":"simple","schema":{"type":"string"}}],"summary":"Search the datamart configuration for experiments"}}},"components":{"schemas":{"ExperimentsDatamartConfigurationResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":true},"outlier_threshold":{"type":"integer","format":"int32","default":0,"readOnly":false},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"control_group_size_limit":{"type":"integer","format":"int64","default":0,"readOnly":false},"acceptance_threshold":{"type":"integer","format":"int32","default":0,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"permanent_control_group_activation":{"type":"boolean","default":false,"readOnly":false},"default_group_distribution":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"audience_partition_id":{"type":"string","readOnly":true},"permanent_control_group_segment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"control_group_size_limit_activation":{"type":"boolean","default":false,"readOnly":false},"permanent_control_group_size":{"type":"number","format":"float","default":0,"readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["acceptance_threshold","archived","audience_partition_id","control_group_size_limit","control_group_size_limit_activation","created_by","created_ts","datamart_id","default_group_distribution","id","last_modified_by","last_modified_ts","outlier_threshold","permanent_control_group_activation","permanent_control_group_segment_ids","permanent_control_group_size"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/experiments/configuration

> Update the datamart configuration for experiments

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/configuration":{"put":{"requestBody":{"description":"The datamart configuration for experiments to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentsDatamartConfigurationResource"}}},"required":true},"summary":"Update the datamart configuration for experiments","description":"","operationId":"updateExperimentsDatamartConfiguration","tags":["Experiment Management"],"parameters":[{"schema":{"type":"string"},"in":"path","style":"simple","name":"datamart_id","explode":false,"required":true}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentsDatamartConfigurationResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"ExperimentsDatamartConfigurationResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":true},"outlier_threshold":{"type":"integer","format":"int32","default":0,"readOnly":false},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"control_group_size_limit":{"type":"integer","format":"int64","default":0,"readOnly":false},"acceptance_threshold":{"type":"integer","format":"int32","default":0,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"permanent_control_group_activation":{"type":"boolean","default":false,"readOnly":false},"default_group_distribution":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"audience_partition_id":{"type":"string","readOnly":true},"permanent_control_group_segment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"control_group_size_limit_activation":{"type":"boolean","default":false,"readOnly":false},"permanent_control_group_size":{"type":"number","format":"float","default":0,"readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["acceptance_threshold","archived","audience_partition_id","control_group_size_limit","control_group_size_limit_activation","created_by","created_ts","datamart_id","default_group_distribution","id","last_modified_by","last_modified_ts","outlier_threshold","permanent_control_group_activation","permanent_control_group_segment_ids","permanent_control_group_size"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datamarts/{datamart\_id}/experiments/templates

> Find experiment templates

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/templates":{"get":{"operationId":"findExperimentTemplates","summary":"Find experiment templates","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentTemplateResource"}},"first_result":{"type":"integer"},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"name":"datamart_id","in":"path","explode":false,"style":"simple","required":true,"schema":{"type":"string"}},{"description":"If true the result will contain only archived experiment templates","name":"archived","schema":{"type":"boolean"},"in":"query","style":"form","explode":true,"required":false},{"explode":true,"in":"query","required":false,"style":"form","schema":{"type":"integer","format":"int32"},"name":"first_result","description":"Offset from which the search must be performed"},{"required":false,"name":"max_results","style":"form","description":"Number of maximum items that shall be return by this search","schema":{"type":"integer","format":"int32"},"explode":true,"in":"query"}],"tags":["Experiment Management"]}}},"components":{"schemas":{"ExperimentTemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","created_by","created_ts","criterion_ids","datamart_id","id","last_modified_by","last_modified_ts","name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /datamarts/{datamart\_id}/experiments/templates

> Create experiment template

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/templates":{"post":{"summary":"Create experiment template","description":"","tags":["Experiment Management"],"parameters":[{"explode":false,"schema":{"type":"string"},"in":"path","name":"datamart_id","required":true,"style":"simple"}],"requestBody":{"description":"Infos to create an experiment template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentTemplateResource"}}},"required":true},"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentTemplateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"createExperimentTemplate"}}},"components":{"schemas":{"ExperimentTemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","created_by","created_ts","criterion_ids","datamart_id","id","last_modified_by","last_modified_ts","name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datamarts/{datamart\_id}/experiments/templates/{experiment\_template\_id}

> Search experiment template by Id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/templates/{experiment_template_id}":{"get":{"operationId":"getExperimentTemplate","description":"","parameters":[{"schema":{"type":"string"},"style":"simple","in":"path","explode":false,"required":true,"name":"datamart_id"},{"style":"simple","explode":false,"schema":{"type":"string"},"name":"experiment_template_id","required":true,"description":"The experiment template id","in":"path"}],"summary":"Search experiment template by Id","tags":["Experiment Management"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentTemplateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"ExperimentTemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","created_by","created_ts","criterion_ids","datamart_id","id","last_modified_by","last_modified_ts","name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/experiments/templates/{experiment\_template\_id}

> Update experiment template

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/templates/{experiment_template_id}":{"put":{"tags":["Experiment Management"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentTemplateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"updateExperimentTemplate","description":"","parameters":[{"required":true,"schema":{"type":"string"},"in":"path","name":"datamart_id","style":"simple","explode":false},{"in":"path","description":"The experiment template id","schema":{"type":"string"},"required":true,"name":"experiment_template_id","explode":false,"style":"simple"}],"requestBody":{"description":"The experiment template to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentTemplateResource"}}},"required":true},"summary":"Update experiment template"}}},"components":{"schemas":{"ExperimentTemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","created_by","created_ts","criterion_ids","datamart_id","id","last_modified_by","last_modified_ts","name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /audience\_segments/{segment\_id}/experiments

> Create experiment

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Management","description":"Operations related to Experiments for managing A/B tests and controlled experiments to measure feature impact and campaign performance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/experiments":{"post":{"parameters":[{"name":"segment_id","in":"path","style":"simple","explode":false,"description":"The id of the segment of the experiment","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Create experiment","operationId":"createExperiment","requestBody":{"description":"Infos to create experiment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResource"}}},"required":true},"tags":["Experiment Management"],"description":""}}},"components":{"schemas":{"ExperimentResource":{"type":"object","properties":{"result_uri":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"criterion_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"status":{"$ref":"#/components/schemas/ExperimentStatus"},"last_modified_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"selected_identifying_resources":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentIdentifyingResourceResource"},"readOnly":false},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentGroupResource"},"readOnly":false},"source_segment_id":{"type":"string","readOnly":false}},"required":["archived","created_by","created_ts","criterion_ids","groups","id","last_modified_by","last_modified_ts","name","source_segment_id","status"]},"ExperimentStatus":{"type":"string","enum":["DRAFT","IN_PROGRESS","FAILED","UPLOADING","READY"],"readOnly":false},"ExperimentIdentifyingResourceResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT":"#/components/schemas/ExperimentIdentifyingAccountResource","USER_EMAIL":"#/components/schemas/ExperimentIdentifyingEmailResource","USER_DEVICE_TECHNICAL_ID":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource","USER_PROFILE":"#/components/schemas/ExperimentIdentifyingProfileResource"}},"oneOf":[{"$ref":"#/components/schemas/ExperimentIdentifyingAccountResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingEmailResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingDeviceTechnicalIdResource"},{"$ref":"#/components/schemas/ExperimentIdentifyingProfileResource"}],"properties":{"type":{"type":"string","enum":["USER_ACCOUNT","USER_EMAIL","USER_DEVICE_TECHNICAL_ID","USER_PROFILE"]}},"required":["type"]},"ExperimentIdentifyingAccountResource":{"type":"object","properties":{"compartment_type":{"$ref":"#/components/schemas/UserAccountCompartmentType"},"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id","compartment_type"]},"UserAccountCompartmentType":{"type":"string","enum":["CUSTOM_COMPARTMENT_ID","NETWORK_USER_ID"],"readOnly":false},"ExperimentIdentifyingEmailResource":{"type":"object"},"ExperimentIdentifyingDeviceTechnicalIdResource":{"type":"object","properties":{"registry_type":{"$ref":"#/components/schemas/DeviceIdRegistryType"},"registry_id":{"type":"string","readOnly":false}},"required":["registry_id","registry_type"]},"DeviceIdRegistryType":{"type":"string","enum":["INSTALLATION_ID","MUM_ID","NETWORK_DEVICE_ID","CUSTOM_DEVICE_ID","MOBILE_ADVERTISING_ID","MOBILE_VENDOR_ID","TV_ADVERTISING_ID","IP_V4_ADDRESS_ID","IP_V6_ADDRESS_ID"],"readOnly":false},"ExperimentIdentifyingProfileResource":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false}},"required":["compartment_id"]},"ExperimentGroupResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/ExperimentGroupType"},"proportion":{"type":"number","format":"float","default":0,"readOnly":false},"segment_id":{"type":"string","readOnly":true}},"required":["id","proportion","type"]},"ExperimentGroupType":{"type":"string","enum":["TEST","CONTROL","PERMANENT_CONTROL"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/experimentation-and-measurement/experimentation/experiment-management.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
