> 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/datamart-management/channels-event-rules.md).

# Channels Event Rules

Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:

* Data reformatting
* Enrichment with external data
* Quality improvements

Relevant documentation:

* [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)

## GET /datamarts/{datamart\_id}/event\_rules

> Search datamart event rules

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Channels Event Rules","description":"Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:\n- Data reformatting\n- Enrichment with external data\n- Quality improvements\n\nRelevant documentation:\n- [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/event_rules":{"get":{"operationId":"findDatamartEventRules","parameters":[{"name":"datamart_id","in":"path","style":"simple","schema":{"type":"string"},"explode":false,"required":true},{"required":false,"name":"first_result","explode":true,"in":"query","schema":{"type":"integer","format":"int32"},"style":"form","description":"Offset from which the search must be performed"},{"description":"Number of maximum items that shall be return by this search","schema":{"type":"integer","format":"int32"},"style":"form","in":"query","required":false,"explode":true,"name":"max_results"}],"tags":["Channels Event Rules"],"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventRuleResource"}},"total":{"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"}},"summary":"Search datamart event rules"}}},"components":{"schemas":{"EventRuleResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT_ID_INSERTION":"#/components/schemas/UserAccountIdCreationRuleResource","CONTEXTUAL_TARGETING_EXTRACTOR":"#/components/schemas/ContextualTargetingExtractorRuleResource","PROPERTY_TO_ORIGIN_COPY":"#/components/schemas/PropertyToOriginCopyRuleResource","URL_MATCH":"#/components/schemas/UrlMatchRuleResource","USER_IDENTIFIER_INSERTION":"#/components/schemas/UserIdentifierInsertionRuleResource","NO_STORAGE":"#/components/schemas/NoStorageRuleResource"}},"oneOf":[{"$ref":"#/components/schemas/PropertyToOriginCopyRuleResource"},{"$ref":"#/components/schemas/ContextualTargetingExtractorRuleResource"},{"$ref":"#/components/schemas/UserIdentifierInsertionRuleResource"},{"$ref":"#/components/schemas/UserAccountIdCreationRuleResource"},{"$ref":"#/components/schemas/UrlMatchRuleResource"},{"$ref":"#/components/schemas/NoStorageRuleResource"}],"properties":{"type":{"type":"string","enum":["PROPERTY_TO_ORIGIN_COPY","CONTEXTUAL_TARGETING_EXTRACTOR","USER_IDENTIFIER_INSERTION","USER_ACCOUNT_ID_INSERTION","URL_MATCH","NO_STORAGE"]}},"required":["type"]},"PropertyToOriginCopyRuleResource":{"type":"object","properties":{"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"destination":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"$ref":"#/components/schemas/OriginPropertySource"},"property_name":{"type":"string","readOnly":false}},"required":["datamart_id","destination","id","property_name"]},"OriginPropertySource":{"type":"string","enum":["REFERRER","URL","EVENT_PROPERTY"],"readOnly":false},"ContextualTargetingExtractorRuleResource":{"type":"object","properties":{"add_signature_to_event":{"type":"boolean","default":false,"readOnly":false},"mode":{"$ref":"#/components/schemas/ContextualTargetingMode"},"datamart_id":{"type":"string","readOnly":true},"blacklist_url_datafile_uri":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"blacklist_regex_datafile_uri":{"type":"string","readOnly":false},"channel_id":{"type":"string","readOnly":true}},"required":["add_signature_to_event","datamart_id","id"]},"ContextualTargetingMode":{"type":"string","enum":["USER_EVENT_TAG","CONTEXTUAL_TARGETING_TAG"],"readOnly":false},"UserIdentifierInsertionRuleResource":{"type":"object","properties":{"hash_function":{"$ref":"#/components/schemas/HashFunctionName"},"validation_regexp":{"type":"string","readOnly":false},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"compartment_id":{"type":"string","readOnly":false},"salt":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"type":"string","readOnly":false},"remove_source":{"type":"boolean","default":false,"readOnly":false}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"HashFunctionName":{"type":"string","enum":["MD2","MD5","SHA_1","SHA_256","SHA_384","SHA_512","NO_HASH"],"readOnly":false},"IdentifierType1":{"type":"string","enum":["USER_ACCOUNT","EMAIL_HASH"],"readOnly":false},"UserAccountIdCreationRuleResource":{"type":"object","properties":{"remove_source":{"type":"boolean","default":false,"readOnly":false},"salt":{"type":"string","readOnly":false},"validation_regexp":{"type":"string","readOnly":false},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"property_source":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"hash_function":{"$ref":"#/components/schemas/HashFunctionName"}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"UrlMatchRuleResource":{"type":"object","properties":{"event_template":{"type":"string","readOnly":false},"pattern":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true}},"required":["datamart_id","event_template","id","pattern"]},"NoStorageRuleResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true}},"required":["datamart_id","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}/event\_rules

> Create datamart event rule

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Channels Event Rules","description":"Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:\n- Data reformatting\n- Enrichment with external data\n- Quality improvements\n\nRelevant documentation:\n- [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/event_rules":{"post":{"summary":"Create datamart event rule","parameters":[{"name":"datamart_id","style":"simple","in":"path","required":true,"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/EventRuleResource"}},"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":"createDatamartEventRule","requestBody":{"description":"The datamart to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRuleResource"}}},"required":true},"tags":["Channels Event Rules"]}}},"components":{"schemas":{"EventRuleResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT_ID_INSERTION":"#/components/schemas/UserAccountIdCreationRuleResource","CONTEXTUAL_TARGETING_EXTRACTOR":"#/components/schemas/ContextualTargetingExtractorRuleResource","PROPERTY_TO_ORIGIN_COPY":"#/components/schemas/PropertyToOriginCopyRuleResource","URL_MATCH":"#/components/schemas/UrlMatchRuleResource","USER_IDENTIFIER_INSERTION":"#/components/schemas/UserIdentifierInsertionRuleResource","NO_STORAGE":"#/components/schemas/NoStorageRuleResource"}},"oneOf":[{"$ref":"#/components/schemas/PropertyToOriginCopyRuleResource"},{"$ref":"#/components/schemas/ContextualTargetingExtractorRuleResource"},{"$ref":"#/components/schemas/UserIdentifierInsertionRuleResource"},{"$ref":"#/components/schemas/UserAccountIdCreationRuleResource"},{"$ref":"#/components/schemas/UrlMatchRuleResource"},{"$ref":"#/components/schemas/NoStorageRuleResource"}],"properties":{"type":{"type":"string","enum":["PROPERTY_TO_ORIGIN_COPY","CONTEXTUAL_TARGETING_EXTRACTOR","USER_IDENTIFIER_INSERTION","USER_ACCOUNT_ID_INSERTION","URL_MATCH","NO_STORAGE"]}},"required":["type"]},"PropertyToOriginCopyRuleResource":{"type":"object","properties":{"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"destination":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"$ref":"#/components/schemas/OriginPropertySource"},"property_name":{"type":"string","readOnly":false}},"required":["datamart_id","destination","id","property_name"]},"OriginPropertySource":{"type":"string","enum":["REFERRER","URL","EVENT_PROPERTY"],"readOnly":false},"ContextualTargetingExtractorRuleResource":{"type":"object","properties":{"add_signature_to_event":{"type":"boolean","default":false,"readOnly":false},"mode":{"$ref":"#/components/schemas/ContextualTargetingMode"},"datamart_id":{"type":"string","readOnly":true},"blacklist_url_datafile_uri":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"blacklist_regex_datafile_uri":{"type":"string","readOnly":false},"channel_id":{"type":"string","readOnly":true}},"required":["add_signature_to_event","datamart_id","id"]},"ContextualTargetingMode":{"type":"string","enum":["USER_EVENT_TAG","CONTEXTUAL_TARGETING_TAG"],"readOnly":false},"UserIdentifierInsertionRuleResource":{"type":"object","properties":{"hash_function":{"$ref":"#/components/schemas/HashFunctionName"},"validation_regexp":{"type":"string","readOnly":false},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"compartment_id":{"type":"string","readOnly":false},"salt":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"type":"string","readOnly":false},"remove_source":{"type":"boolean","default":false,"readOnly":false}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"HashFunctionName":{"type":"string","enum":["MD2","MD5","SHA_1","SHA_256","SHA_384","SHA_512","NO_HASH"],"readOnly":false},"IdentifierType1":{"type":"string","enum":["USER_ACCOUNT","EMAIL_HASH"],"readOnly":false},"UserAccountIdCreationRuleResource":{"type":"object","properties":{"remove_source":{"type":"boolean","default":false,"readOnly":false},"salt":{"type":"string","readOnly":false},"validation_regexp":{"type":"string","readOnly":false},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"property_source":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"hash_function":{"$ref":"#/components/schemas/HashFunctionName"}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"UrlMatchRuleResource":{"type":"object","properties":{"event_template":{"type":"string","readOnly":false},"pattern":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true}},"required":["datamart_id","event_template","id","pattern"]},"NoStorageRuleResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true}},"required":["datamart_id","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"}}}}}}}
```

## GET /datamarts/{datamart\_id}/channels/{channel\_id}/event\_rules/{event\_rule\_id}

> Get a channel event rule

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Channels Event Rules","description":"Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:\n- Data reformatting\n- Enrichment with external data\n- Quality improvements\n\nRelevant documentation:\n- [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/channels/{channel_id}/event_rules/{event_rule_id}":{"get":{"parameters":[{"name":"datamart_id","style":"simple","required":true,"schema":{"type":"string"},"in":"path","explode":false},{"required":true,"in":"path","name":"channel_id","explode":false,"schema":{"type":"string"},"style":"simple"},{"style":"simple","required":true,"explode":false,"name":"event_rule_id","in":"path","schema":{"type":"string"}}],"operationId":"findChannelEventRule","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/EventRuleResource"}},"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 a channel event rule","description":"","tags":["Channels Event Rules"]}}},"components":{"schemas":{"EventRuleResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT_ID_INSERTION":"#/components/schemas/UserAccountIdCreationRuleResource","CONTEXTUAL_TARGETING_EXTRACTOR":"#/components/schemas/ContextualTargetingExtractorRuleResource","PROPERTY_TO_ORIGIN_COPY":"#/components/schemas/PropertyToOriginCopyRuleResource","URL_MATCH":"#/components/schemas/UrlMatchRuleResource","USER_IDENTIFIER_INSERTION":"#/components/schemas/UserIdentifierInsertionRuleResource","NO_STORAGE":"#/components/schemas/NoStorageRuleResource"}},"oneOf":[{"$ref":"#/components/schemas/PropertyToOriginCopyRuleResource"},{"$ref":"#/components/schemas/ContextualTargetingExtractorRuleResource"},{"$ref":"#/components/schemas/UserIdentifierInsertionRuleResource"},{"$ref":"#/components/schemas/UserAccountIdCreationRuleResource"},{"$ref":"#/components/schemas/UrlMatchRuleResource"},{"$ref":"#/components/schemas/NoStorageRuleResource"}],"properties":{"type":{"type":"string","enum":["PROPERTY_TO_ORIGIN_COPY","CONTEXTUAL_TARGETING_EXTRACTOR","USER_IDENTIFIER_INSERTION","USER_ACCOUNT_ID_INSERTION","URL_MATCH","NO_STORAGE"]}},"required":["type"]},"PropertyToOriginCopyRuleResource":{"type":"object","properties":{"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"destination":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"$ref":"#/components/schemas/OriginPropertySource"},"property_name":{"type":"string","readOnly":false}},"required":["datamart_id","destination","id","property_name"]},"OriginPropertySource":{"type":"string","enum":["REFERRER","URL","EVENT_PROPERTY"],"readOnly":false},"ContextualTargetingExtractorRuleResource":{"type":"object","properties":{"add_signature_to_event":{"type":"boolean","default":false,"readOnly":false},"mode":{"$ref":"#/components/schemas/ContextualTargetingMode"},"datamart_id":{"type":"string","readOnly":true},"blacklist_url_datafile_uri":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"blacklist_regex_datafile_uri":{"type":"string","readOnly":false},"channel_id":{"type":"string","readOnly":true}},"required":["add_signature_to_event","datamart_id","id"]},"ContextualTargetingMode":{"type":"string","enum":["USER_EVENT_TAG","CONTEXTUAL_TARGETING_TAG"],"readOnly":false},"UserIdentifierInsertionRuleResource":{"type":"object","properties":{"hash_function":{"$ref":"#/components/schemas/HashFunctionName"},"validation_regexp":{"type":"string","readOnly":false},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"compartment_id":{"type":"string","readOnly":false},"salt":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"type":"string","readOnly":false},"remove_source":{"type":"boolean","default":false,"readOnly":false}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"HashFunctionName":{"type":"string","enum":["MD2","MD5","SHA_1","SHA_256","SHA_384","SHA_512","NO_HASH"],"readOnly":false},"IdentifierType1":{"type":"string","enum":["USER_ACCOUNT","EMAIL_HASH"],"readOnly":false},"UserAccountIdCreationRuleResource":{"type":"object","properties":{"remove_source":{"type":"boolean","default":false,"readOnly":false},"salt":{"type":"string","readOnly":false},"validation_regexp":{"type":"string","readOnly":false},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"property_source":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"hash_function":{"$ref":"#/components/schemas/HashFunctionName"}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"UrlMatchRuleResource":{"type":"object","properties":{"event_template":{"type":"string","readOnly":false},"pattern":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true}},"required":["datamart_id","event_template","id","pattern"]},"NoStorageRuleResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true}},"required":["datamart_id","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"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/channels/{channel\_id}/event\_rules/{event\_rule\_id}

> Update a channel event rule

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Channels Event Rules","description":"Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:\n- Data reformatting\n- Enrichment with external data\n- Quality improvements\n\nRelevant documentation:\n- [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/channels/{channel_id}/event_rules/{event_rule_id}":{"put":{"operationId":"updateChannelEventRule","requestBody":{"description":"The event rule to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRuleResource"}}},"required":true},"parameters":[{"name":"datamart_id","schema":{"type":"string"},"explode":false,"style":"simple","in":"path","required":true},{"in":"path","style":"simple","schema":{"type":"string"},"name":"channel_id","required":true,"explode":false},{"required":true,"name":"event_rule_id","style":"simple","schema":{"type":"string"},"explode":false,"in":"path"}],"tags":["Channels Event Rules"],"summary":"Update a channel event rule","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/EventRuleResource"}},"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":""}}},"components":{"schemas":{"EventRuleResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT_ID_INSERTION":"#/components/schemas/UserAccountIdCreationRuleResource","CONTEXTUAL_TARGETING_EXTRACTOR":"#/components/schemas/ContextualTargetingExtractorRuleResource","PROPERTY_TO_ORIGIN_COPY":"#/components/schemas/PropertyToOriginCopyRuleResource","URL_MATCH":"#/components/schemas/UrlMatchRuleResource","USER_IDENTIFIER_INSERTION":"#/components/schemas/UserIdentifierInsertionRuleResource","NO_STORAGE":"#/components/schemas/NoStorageRuleResource"}},"oneOf":[{"$ref":"#/components/schemas/PropertyToOriginCopyRuleResource"},{"$ref":"#/components/schemas/ContextualTargetingExtractorRuleResource"},{"$ref":"#/components/schemas/UserIdentifierInsertionRuleResource"},{"$ref":"#/components/schemas/UserAccountIdCreationRuleResource"},{"$ref":"#/components/schemas/UrlMatchRuleResource"},{"$ref":"#/components/schemas/NoStorageRuleResource"}],"properties":{"type":{"type":"string","enum":["PROPERTY_TO_ORIGIN_COPY","CONTEXTUAL_TARGETING_EXTRACTOR","USER_IDENTIFIER_INSERTION","USER_ACCOUNT_ID_INSERTION","URL_MATCH","NO_STORAGE"]}},"required":["type"]},"PropertyToOriginCopyRuleResource":{"type":"object","properties":{"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"destination":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"$ref":"#/components/schemas/OriginPropertySource"},"property_name":{"type":"string","readOnly":false}},"required":["datamart_id","destination","id","property_name"]},"OriginPropertySource":{"type":"string","enum":["REFERRER","URL","EVENT_PROPERTY"],"readOnly":false},"ContextualTargetingExtractorRuleResource":{"type":"object","properties":{"add_signature_to_event":{"type":"boolean","default":false,"readOnly":false},"mode":{"$ref":"#/components/schemas/ContextualTargetingMode"},"datamart_id":{"type":"string","readOnly":true},"blacklist_url_datafile_uri":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"blacklist_regex_datafile_uri":{"type":"string","readOnly":false},"channel_id":{"type":"string","readOnly":true}},"required":["add_signature_to_event","datamart_id","id"]},"ContextualTargetingMode":{"type":"string","enum":["USER_EVENT_TAG","CONTEXTUAL_TARGETING_TAG"],"readOnly":false},"UserIdentifierInsertionRuleResource":{"type":"object","properties":{"hash_function":{"$ref":"#/components/schemas/HashFunctionName"},"validation_regexp":{"type":"string","readOnly":false},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"compartment_id":{"type":"string","readOnly":false},"salt":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"type":"string","readOnly":false},"remove_source":{"type":"boolean","default":false,"readOnly":false}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"HashFunctionName":{"type":"string","enum":["MD2","MD5","SHA_1","SHA_256","SHA_384","SHA_512","NO_HASH"],"readOnly":false},"IdentifierType1":{"type":"string","enum":["USER_ACCOUNT","EMAIL_HASH"],"readOnly":false},"UserAccountIdCreationRuleResource":{"type":"object","properties":{"remove_source":{"type":"boolean","default":false,"readOnly":false},"salt":{"type":"string","readOnly":false},"validation_regexp":{"type":"string","readOnly":false},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"property_source":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"hash_function":{"$ref":"#/components/schemas/HashFunctionName"}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"UrlMatchRuleResource":{"type":"object","properties":{"event_template":{"type":"string","readOnly":false},"pattern":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true}},"required":["datamart_id","event_template","id","pattern"]},"NoStorageRuleResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true}},"required":["datamart_id","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"}}}}}}}
```

## DELETE /datamarts/{datamart\_id}/channels/{channel\_id}/event\_rules/{event\_rule\_id}

> Delete a channel event rule

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Channels Event Rules","description":"Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:\n- Data reformatting\n- Enrichment with external data\n- Quality improvements\n\nRelevant documentation:\n- [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/channels/{channel_id}/event_rules/{event_rule_id}":{"delete":{"parameters":[{"schema":{"type":"string"},"required":true,"in":"path","style":"simple","explode":false,"name":"datamart_id"},{"name":"channel_id","in":"path","schema":{"type":"string"},"required":true,"style":"simple","explode":false},{"name":"event_rule_id","required":true,"schema":{"type":"string"},"explode":false,"style":"simple","in":"path"}],"summary":"Delete a channel event rule","description":"","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"}},"tags":["Channels Event Rules"],"operationId":"removeChannelEventRule"}}},"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}/channels/{channel\_id}/event\_rules

> Search channel event rules

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Channels Event Rules","description":"Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:\n- Data reformatting\n- Enrichment with external data\n- Quality improvements\n\nRelevant documentation:\n- [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/channels/{channel_id}/event_rules":{"get":{"summary":"Search channel event rules","tags":["Channels Event Rules"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventRuleResource"}},"count":{"type":"integer"},"first_result":{"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":"","parameters":[{"required":true,"explode":false,"schema":{"type":"string"},"style":"simple","in":"path","name":"datamart_id"},{"style":"simple","explode":false,"in":"path","required":true,"name":"channel_id","schema":{"type":"string"}},{"schema":{"type":"integer","format":"int32"},"in":"query","required":false,"style":"form","name":"first_result","explode":true,"description":"Offset from which the search must be performed"},{"schema":{"type":"integer","format":"int32"},"name":"max_results","required":false,"style":"form","explode":true,"in":"query","description":"Number of maximum items that shall be return by this search"}],"operationId":"findChannelEventRules"}}},"components":{"schemas":{"EventRuleResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT_ID_INSERTION":"#/components/schemas/UserAccountIdCreationRuleResource","CONTEXTUAL_TARGETING_EXTRACTOR":"#/components/schemas/ContextualTargetingExtractorRuleResource","PROPERTY_TO_ORIGIN_COPY":"#/components/schemas/PropertyToOriginCopyRuleResource","URL_MATCH":"#/components/schemas/UrlMatchRuleResource","USER_IDENTIFIER_INSERTION":"#/components/schemas/UserIdentifierInsertionRuleResource","NO_STORAGE":"#/components/schemas/NoStorageRuleResource"}},"oneOf":[{"$ref":"#/components/schemas/PropertyToOriginCopyRuleResource"},{"$ref":"#/components/schemas/ContextualTargetingExtractorRuleResource"},{"$ref":"#/components/schemas/UserIdentifierInsertionRuleResource"},{"$ref":"#/components/schemas/UserAccountIdCreationRuleResource"},{"$ref":"#/components/schemas/UrlMatchRuleResource"},{"$ref":"#/components/schemas/NoStorageRuleResource"}],"properties":{"type":{"type":"string","enum":["PROPERTY_TO_ORIGIN_COPY","CONTEXTUAL_TARGETING_EXTRACTOR","USER_IDENTIFIER_INSERTION","USER_ACCOUNT_ID_INSERTION","URL_MATCH","NO_STORAGE"]}},"required":["type"]},"PropertyToOriginCopyRuleResource":{"type":"object","properties":{"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"destination":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"$ref":"#/components/schemas/OriginPropertySource"},"property_name":{"type":"string","readOnly":false}},"required":["datamart_id","destination","id","property_name"]},"OriginPropertySource":{"type":"string","enum":["REFERRER","URL","EVENT_PROPERTY"],"readOnly":false},"ContextualTargetingExtractorRuleResource":{"type":"object","properties":{"add_signature_to_event":{"type":"boolean","default":false,"readOnly":false},"mode":{"$ref":"#/components/schemas/ContextualTargetingMode"},"datamart_id":{"type":"string","readOnly":true},"blacklist_url_datafile_uri":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"blacklist_regex_datafile_uri":{"type":"string","readOnly":false},"channel_id":{"type":"string","readOnly":true}},"required":["add_signature_to_event","datamart_id","id"]},"ContextualTargetingMode":{"type":"string","enum":["USER_EVENT_TAG","CONTEXTUAL_TARGETING_TAG"],"readOnly":false},"UserIdentifierInsertionRuleResource":{"type":"object","properties":{"hash_function":{"$ref":"#/components/schemas/HashFunctionName"},"validation_regexp":{"type":"string","readOnly":false},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"compartment_id":{"type":"string","readOnly":false},"salt":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"type":"string","readOnly":false},"remove_source":{"type":"boolean","default":false,"readOnly":false}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"HashFunctionName":{"type":"string","enum":["MD2","MD5","SHA_1","SHA_256","SHA_384","SHA_512","NO_HASH"],"readOnly":false},"IdentifierType1":{"type":"string","enum":["USER_ACCOUNT","EMAIL_HASH"],"readOnly":false},"UserAccountIdCreationRuleResource":{"type":"object","properties":{"remove_source":{"type":"boolean","default":false,"readOnly":false},"salt":{"type":"string","readOnly":false},"validation_regexp":{"type":"string","readOnly":false},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"property_source":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"hash_function":{"$ref":"#/components/schemas/HashFunctionName"}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"UrlMatchRuleResource":{"type":"object","properties":{"event_template":{"type":"string","readOnly":false},"pattern":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true}},"required":["datamart_id","event_template","id","pattern"]},"NoStorageRuleResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true}},"required":["datamart_id","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}/channels/{channel\_id}/event\_rules

> Create Channel event rule

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Channels Event Rules","description":"Operations related to **Event Rules** that transform and enrich User Events during the real-time collection process for a Datamart or a specific Channel. Event Rules are executed by **Activity Analyzer plugins** as part of the processing pipeline before data storage, enabling:\n- Data reformatting\n- Enrichment with external data\n- Quality improvements\n\nRelevant documentation:\n- [Activity analyzers](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking/activity-analyzers)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/channels/{channel_id}/event_rules":{"post":{"requestBody":{"description":"The Channel to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRuleResource"}}},"required":true},"operationId":"createChannelEventRule","summary":"Create Channel event rule","tags":["Channels Event Rules"],"parameters":[{"in":"path","schema":{"type":"string"},"name":"datamart_id","style":"simple","required":true,"explode":false},{"schema":{"type":"string"},"name":"channel_id","explode":false,"required":true,"style":"simple","in":"path"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/EventRuleResource"}},"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":""}}},"components":{"schemas":{"EventRuleResource":{"discriminator":{"propertyName":"type","mapping":{"USER_ACCOUNT_ID_INSERTION":"#/components/schemas/UserAccountIdCreationRuleResource","CONTEXTUAL_TARGETING_EXTRACTOR":"#/components/schemas/ContextualTargetingExtractorRuleResource","PROPERTY_TO_ORIGIN_COPY":"#/components/schemas/PropertyToOriginCopyRuleResource","URL_MATCH":"#/components/schemas/UrlMatchRuleResource","USER_IDENTIFIER_INSERTION":"#/components/schemas/UserIdentifierInsertionRuleResource","NO_STORAGE":"#/components/schemas/NoStorageRuleResource"}},"oneOf":[{"$ref":"#/components/schemas/PropertyToOriginCopyRuleResource"},{"$ref":"#/components/schemas/ContextualTargetingExtractorRuleResource"},{"$ref":"#/components/schemas/UserIdentifierInsertionRuleResource"},{"$ref":"#/components/schemas/UserAccountIdCreationRuleResource"},{"$ref":"#/components/schemas/UrlMatchRuleResource"},{"$ref":"#/components/schemas/NoStorageRuleResource"}],"properties":{"type":{"type":"string","enum":["PROPERTY_TO_ORIGIN_COPY","CONTEXTUAL_TARGETING_EXTRACTOR","USER_IDENTIFIER_INSERTION","USER_ACCOUNT_ID_INSERTION","URL_MATCH","NO_STORAGE"]}},"required":["type"]},"PropertyToOriginCopyRuleResource":{"type":"object","properties":{"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"destination":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"$ref":"#/components/schemas/OriginPropertySource"},"property_name":{"type":"string","readOnly":false}},"required":["datamart_id","destination","id","property_name"]},"OriginPropertySource":{"type":"string","enum":["REFERRER","URL","EVENT_PROPERTY"],"readOnly":false},"ContextualTargetingExtractorRuleResource":{"type":"object","properties":{"add_signature_to_event":{"type":"boolean","default":false,"readOnly":false},"mode":{"$ref":"#/components/schemas/ContextualTargetingMode"},"datamart_id":{"type":"string","readOnly":true},"blacklist_url_datafile_uri":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"blacklist_regex_datafile_uri":{"type":"string","readOnly":false},"channel_id":{"type":"string","readOnly":true}},"required":["add_signature_to_event","datamart_id","id"]},"ContextualTargetingMode":{"type":"string","enum":["USER_EVENT_TAG","CONTEXTUAL_TARGETING_TAG"],"readOnly":false},"UserIdentifierInsertionRuleResource":{"type":"object","properties":{"hash_function":{"$ref":"#/components/schemas/HashFunctionName"},"validation_regexp":{"type":"string","readOnly":false},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"compartment_id":{"type":"string","readOnly":false},"salt":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"id":{"type":"string","readOnly":true},"property_source":{"type":"string","readOnly":false},"remove_source":{"type":"boolean","default":false,"readOnly":false}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"HashFunctionName":{"type":"string","enum":["MD2","MD5","SHA_1","SHA_256","SHA_384","SHA_512","NO_HASH"],"readOnly":false},"IdentifierType1":{"type":"string","enum":["USER_ACCOUNT","EMAIL_HASH"],"readOnly":false},"UserAccountIdCreationRuleResource":{"type":"object","properties":{"remove_source":{"type":"boolean","default":false,"readOnly":false},"salt":{"type":"string","readOnly":false},"validation_regexp":{"type":"string","readOnly":false},"to_lower_case":{"type":"boolean","default":false,"readOnly":false},"property_source":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"identifier_creation":{"$ref":"#/components/schemas/IdentifierType1"},"hash_function":{"$ref":"#/components/schemas/HashFunctionName"}},"required":["datamart_id","id","property_source","remove_source","to_lower_case"]},"UrlMatchRuleResource":{"type":"object","properties":{"event_template":{"type":"string","readOnly":false},"pattern":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true}},"required":["datamart_id","event_template","id","pattern"]},"NoStorageRuleResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"channel_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true}},"required":["datamart_id","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"}}}}}}}
```


---

# 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/datamart-management/channels-event-rules.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.
