> 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/experiment/experiment-criterion.md).

# Experiment Criterion

Operations related to Experiment Criterion, the individual test condition or parameter within an experiment configuration.

## GET /datamarts/{datamart\_id}/experiments/criteria/{criterion\_id}

> Get experiment criterion

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Criterion","description":"Operations related to Experiment Criterion, the individual test condition or parameter within an experiment configuration."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/criteria/{criterion_id}":{"get":{"tags":["Experiment Criterion"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentCriterionResource"}},"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":"Get experiment criterion","parameters":[{"name":"datamart_id","in":"path","required":true,"explode":false,"schema":{"type":"integer","format":"int64"},"description":"The Datamart id from which the representativeness criterion belong","style":"simple"},{"required":true,"style":"simple","schema":{"type":"integer","format":"int64"},"name":"criterion_id","description":"The representativeness criterion","in":"path","explode":false}],"operationId":"getExperimentCriterion","description":""}}},"components":{"schemas":{"ExperimentCriterionResource":{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"query_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true}},"required":["archived","created_by","created_ts","datamart_id","id","last_modified_by","last_modified_ts","name","query_id"]},"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/criteria/{criterion\_id}

> Action on Experiment Criterion

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Experiment Criterion","description":"Operations related to Experiment Criterion, the individual test condition or parameter within an experiment configuration."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/experiments/criteria/{criterion_id}":{"post":{"tags":["Experiment Criterion"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ExperimentCriterionResource"}},"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":"applyActionOnExperimentCriterion","parameters":[{"name":"datamart_id","in":"path","required":true,"style":"simple","schema":{"type":"integer","format":"int64"},"description":"The Datamart id from which the representativeness criterion belong","explode":false},{"required":true,"description":"The representativeness criterion","schema":{"type":"integer","format":"int64"},"style":"simple","explode":false,"in":"path","name":"criterion_id"}],"description":"","summary":"Action on Experiment Criterion","requestBody":{"description":"action to apply to the Experiment Criterion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentCriterionActionResource"}}},"required":true}}}},"components":{"schemas":{"ExperimentCriterionResource":{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"query_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true}},"required":["archived","created_by","created_ts","datamart_id","id","last_modified_by","last_modified_ts","name","query_id"]},"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"]},"ExperimentCriterionActionResource":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/ExperimentCriterionAction"}},"required":["action"]},"ExperimentCriterionAction":{"type":"string","enum":["ARCHIVE"],"readOnly":false}},"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/experiment/experiment-criterion.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.
