> 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/data-foundation/data-ingestion/analytics-event-transformations.md).

# Analytics Event Transformations

Operations for configuring transformations applied to analytics events.

## GET /datamarts/{datamart\_id}/analytics\_event\_transformation/{id}

> get analytics event transformation

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Analytics Event Transformations","description":"Operations for configuring transformations applied to analytics events."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/analytics_event_transformation/{id}":{"get":{"summary":"get analytics event transformation","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/AnalyticsEventTransformationResource"}},"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"}},"parameters":[{"style":"simple","required":true,"name":"id","in":"path","schema":{"type":"string"},"explode":false},{"explode":false,"required":true,"name":"datamart_id","schema":{"type":"string"},"in":"path","style":"simple"}],"operationId":"getAnalyticsEventTransformation","tags":["Analytics Event Transformations"]}}},"components":{"schemas":{"AnalyticsEventTransformationResource":{"type":"object","properties":{"source_event_name":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"datamart_id":{"readOnly":false,"type":"integer","format":"int64","default":0},"mapping_id":{"readOnly":false,"format":"int64","default":0,"type":"integer"},"last_modified_by":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"target_event_name":{"type":"string","readOnly":false},"channel_id":{"default":0,"readOnly":false,"type":"integer","format":"int64"},"created_by":{"type":"string","readOnly":false},"id":{"type":"integer","readOnly":true,"format":"int64","default":0}},"required":["channel_id","created_by","datamart_id","id","last_modified_by","mapping_id","source_event_name","target_event_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}/analytics\_event\_transformation/{id}

> Update analytics event transformation

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Analytics Event Transformations","description":"Operations for configuring transformations applied to analytics events."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/analytics_event_transformation/{id}":{"put":{"parameters":[{"explode":false,"style":"simple","schema":{"type":"string"},"in":"path","name":"id","required":true},{"name":"datamart_id","style":"simple","required":true,"in":"path","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/AnalyticsEventTransformationResource"}},"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":"","summary":"Update analytics event transformation","operationId":"updateAnalyticsEventTransformation","tags":["Analytics Event Transformations"],"requestBody":{"description":"The analytics event transformation to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsEventTransformationResource"}}},"required":true}}}},"components":{"schemas":{"AnalyticsEventTransformationResource":{"type":"object","properties":{"source_event_name":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"datamart_id":{"readOnly":false,"type":"integer","format":"int64","default":0},"mapping_id":{"readOnly":false,"format":"int64","default":0,"type":"integer"},"last_modified_by":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"target_event_name":{"type":"string","readOnly":false},"channel_id":{"default":0,"readOnly":false,"type":"integer","format":"int64"},"created_by":{"type":"string","readOnly":false},"id":{"type":"integer","readOnly":true,"format":"int64","default":0}},"required":["channel_id","created_by","datamart_id","id","last_modified_by","mapping_id","source_event_name","target_event_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"}}}}}}}
```

## DELETE /datamarts/{datamart\_id}/analytics\_event\_transformation/{id}

> Delete analytics event transformation

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Analytics Event Transformations","description":"Operations for configuring transformations applied to analytics events."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/analytics_event_transformation/{id}":{"delete":{"parameters":[{"schema":{"type":"string"},"required":true,"style":"simple","in":"path","explode":false,"name":"id"},{"style":"simple","schema":{"type":"string"},"in":"path","required":true,"explode":false,"name":"datamart_id"}],"operationId":"deleteAnalyticsEventTransformation","responses":{"200":{"$ref":"#/components/responses/simple"},"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":["Analytics Event Transformations"],"summary":"Delete analytics event transformation"}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"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"]}}}}
```

## GET /datamarts/{datamart\_id}/analytics\_event\_transformation

> Search analytics event transformations

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Analytics Event Transformations","description":"Operations for configuring transformations applied to analytics events."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/analytics_event_transformation":{"get":{"tags":["Analytics Event Transformations"],"summary":"Search analytics event transformations","description":"","parameters":[{"name":"datamart_id","in":"path","style":"simple","schema":{"type":"string"},"required":true,"explode":false},{"explode":true,"name":"channel_id","style":"form","in":"query","required":false,"schema":{"type":"integer","format":"int64"},"description":"Channel Id for which the search must be performed"},{"description":"Offset from which the search must be performed","explode":true,"style":"form","name":"first_result","in":"query","schema":{"type":"integer","format":"int32"},"required":false},{"description":"Number of maximum items that shall be return by this search","explode":true,"name":"max_results","style":"form","schema":{"type":"integer","format":"int32"},"in":"query","required":false}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsEventTransformationResource"}},"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"}},"operationId":"findAnalyticsEventTransformations"}}},"components":{"schemas":{"AnalyticsEventTransformationResource":{"type":"object","properties":{"source_event_name":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"datamart_id":{"readOnly":false,"type":"integer","format":"int64","default":0},"mapping_id":{"readOnly":false,"format":"int64","default":0,"type":"integer"},"last_modified_by":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"target_event_name":{"type":"string","readOnly":false},"channel_id":{"default":0,"readOnly":false,"type":"integer","format":"int64"},"created_by":{"type":"string","readOnly":false},"id":{"type":"integer","readOnly":true,"format":"int64","default":0}},"required":["channel_id","created_by","datamart_id","id","last_modified_by","mapping_id","source_event_name","target_event_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}/analytics\_event\_transformation

> Create analytics event transformation

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Analytics Event Transformations","description":"Operations for configuring transformations applied to analytics events."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/analytics_event_transformation":{"post":{"requestBody":{"description":"The analytics event transformation to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsEventTransformationResource"}}},"required":true},"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/AnalyticsEventTransformationResource"}},"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":"","operationId":"createAnalyticsEventTransformation","parameters":[{"name":"datamart_id","in":"path","style":"simple","explode":false,"schema":{"type":"string"},"required":true}],"tags":["Analytics Event Transformations"],"summary":"Create analytics event transformation"}}},"components":{"schemas":{"AnalyticsEventTransformationResource":{"type":"object","properties":{"source_event_name":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"datamart_id":{"readOnly":false,"type":"integer","format":"int64","default":0},"mapping_id":{"readOnly":false,"format":"int64","default":0,"type":"integer"},"last_modified_by":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"target_event_name":{"type":"string","readOnly":false},"channel_id":{"default":0,"readOnly":false,"type":"integer","format":"int64"},"created_by":{"type":"string","readOnly":false},"id":{"type":"integer","readOnly":true,"format":"int64","default":0}},"required":["channel_id","created_by","datamart_id","id","last_modified_by","mapping_id","source_event_name","target_event_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"}}}}}}}
```


---

# 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/data-foundation/data-ingestion/analytics-event-transformations.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.
