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

# Datamarts

Operations related to **Datamarts**, the multi-model graph-based marketing databases that store all collected and computed data for an Organisation. Datamarts organize data around **UserPoints** as nodes in a graph structure, enabling both real-time query processing and scalability on large data volumes, while automatically performing **identity resolution** to merge UserPoints representing the same individual.

Relevant documentation:

* [Datamart](https://developer.mediarithmics.io/communities-and-organisations/datamart)
* [Key concepts](https://userguides.mediarithmics.io/basics/key-concepts)

## GET /datamarts/{datamart\_id}

> Get datamart

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Datamarts","description":"Operations related to **Datamarts**, the multi-model graph-based marketing databases that store all collected and computed data for an Organisation. Datamarts organize data around **UserPoints** as nodes in a graph structure, enabling both real-time query processing and scalability on large data volumes, while automatically performing **identity resolution** to merge UserPoints representing the same individual.\n\nRelevant documentation:\n- [Datamart](https://developer.mediarithmics.io/communities-and-organisations/datamart)\n- [Key concepts](https://userguides.mediarithmics.io/basics/key-concepts)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}":{"get":{"summary":"Get datamart","operationId":"getDatamart","parameters":[{"explode":false,"in":"path","name":"datamart_id","schema":{"type":"integer","format":"int64"},"style":"simple","required":true}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatamartResource"}},"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":["Datamarts"],"description":""}}},"components":{"schemas":{"DatamartResource":{"allOf":[{"$ref":"#/components/schemas/AbstractDatamartResource"},{"type":"object","properties":{"datafarm":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"user_point_system_version":{"$ref":"#/components/schemas/UserPointSystemVersion"},"main_engine":{"$ref":"#/components/schemas/DatamartEngineType"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"region":{"$ref":"#/components/schemas/DatamartRegion"},"type":{"$ref":"#/components/schemas/DatamartType"},"name":{"type":"string","readOnly":false},"data_privacy_law":{"$ref":"#/components/schemas/DataPrivacyLaw"},"id":{"type":"string","readOnly":true},"token":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"storage_model_version":{"$ref":"#/components/schemas/DatamartStorageModelVersion"},"time_zone":{"type":"string","enum":["UTC"],"readOnly":false}},"required":["archived","creation_date","data_privacy_law","datafarm","id","main_engine","organisation_id","region","storage_model_version","time_zone","type","user_point_system_version"]}]},"AbstractDatamartResource":{"type":"object"},"UserPointSystemVersion":{"type":"string","enum":["v201506","v201709","v201901","v202205"],"readOnly":false},"DatamartEngineType":{"type":"string","enum":["PIONUS","DATA_WAREHOUSE"],"readOnly":false},"DatamartRegion":{"type":"string","enum":["EUROPE","AMERICA","ASIA"],"readOnly":false},"DatamartType":{"type":"string","enum":["DATAMART","CROSS_DATAMART"],"readOnly":false},"DataPrivacyLaw":{"type":"string","enum":["GDPR","NONE"],"readOnly":false},"DatamartStorageModelVersion":{"type":"string","enum":["v201506","v201709"],"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 /datamarts/{datamart\_id}

> Update datamart

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Datamarts","description":"Operations related to **Datamarts**, the multi-model graph-based marketing databases that store all collected and computed data for an Organisation. Datamarts organize data around **UserPoints** as nodes in a graph structure, enabling both real-time query processing and scalability on large data volumes, while automatically performing **identity resolution** to merge UserPoints representing the same individual.\n\nRelevant documentation:\n- [Datamart](https://developer.mediarithmics.io/communities-and-organisations/datamart)\n- [Key concepts](https://userguides.mediarithmics.io/basics/key-concepts)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}":{"put":{"tags":["Datamarts"],"parameters":[{"schema":{"type":"integer","format":"int64"},"name":"datamart_id","style":"simple","explode":false,"required":true,"in":"path"}],"summary":"Update datamart","requestBody":{"description":"The Datamart to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatamartResource"}}},"required":true},"operationId":"updateDatamart","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatamartResource"}},"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":{"DatamartResource":{"allOf":[{"$ref":"#/components/schemas/AbstractDatamartResource"},{"type":"object","properties":{"datafarm":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"user_point_system_version":{"$ref":"#/components/schemas/UserPointSystemVersion"},"main_engine":{"$ref":"#/components/schemas/DatamartEngineType"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"region":{"$ref":"#/components/schemas/DatamartRegion"},"type":{"$ref":"#/components/schemas/DatamartType"},"name":{"type":"string","readOnly":false},"data_privacy_law":{"$ref":"#/components/schemas/DataPrivacyLaw"},"id":{"type":"string","readOnly":true},"token":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"storage_model_version":{"$ref":"#/components/schemas/DatamartStorageModelVersion"},"time_zone":{"type":"string","enum":["UTC"],"readOnly":false}},"required":["archived","creation_date","data_privacy_law","datafarm","id","main_engine","organisation_id","region","storage_model_version","time_zone","type","user_point_system_version"]}]},"AbstractDatamartResource":{"type":"object"},"UserPointSystemVersion":{"type":"string","enum":["v201506","v201709","v201901","v202205"],"readOnly":false},"DatamartEngineType":{"type":"string","enum":["PIONUS","DATA_WAREHOUSE"],"readOnly":false},"DatamartRegion":{"type":"string","enum":["EUROPE","AMERICA","ASIA"],"readOnly":false},"DatamartType":{"type":"string","enum":["DATAMART","CROSS_DATAMART"],"readOnly":false},"DataPrivacyLaw":{"type":"string","enum":["GDPR","NONE"],"readOnly":false},"DatamartStorageModelVersion":{"type":"string","enum":["v201506","v201709"],"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 /datamarts

> Get all datamarts

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Datamarts","description":"Operations related to **Datamarts**, the multi-model graph-based marketing databases that store all collected and computed data for an Organisation. Datamarts organize data around **UserPoints** as nodes in a graph structure, enabling both real-time query processing and scalability on large data volumes, while automatically performing **identity resolution** to merge UserPoints representing the same individual.\n\nRelevant documentation:\n- [Datamart](https://developer.mediarithmics.io/communities-and-organisations/datamart)\n- [Key concepts](https://userguides.mediarithmics.io/basics/key-concepts)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts":{"get":{"summary":"Get all datamarts","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"first_result":{"type":"integer"},"count":{"type":"integer"},"max_results":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DatamartResource"}}},"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":["Datamarts"],"operationId":"getDatamarts","parameters":[{"required":false,"style":"form","schema":{"type":"array","items":{"type":"integer","format":"int64"}},"in":"query","description":"Organisations owning the datamart","explode":true,"name":"organisation_id"},{"explode":true,"description":"Community owning the datamart","name":"community_id","schema":{"type":"integer","format":"int64"},"in":"query","style":"form","required":false},{"name":"type","required":false,"in":"query","style":"form","schema":{"type":"string"},"explode":true,"description":"Type of the datamart"},{"in":"query","style":"form","description":"Archived datamarts","name":"archived","required":false,"explode":true,"schema":{"type":"boolean"}},{"explode":true,"description":"Offset from which the search must be performed","required":false,"name":"first_result","in":"query","schema":{"type":"integer","format":"int32"},"style":"form"},{"style":"form","required":false,"description":"Number of maximum items that shall be return by this search","name":"max_results","explode":true,"in":"query","schema":{"type":"integer","format":"int32"}}]}}},"components":{"schemas":{"DatamartResource":{"allOf":[{"$ref":"#/components/schemas/AbstractDatamartResource"},{"type":"object","properties":{"datafarm":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"user_point_system_version":{"$ref":"#/components/schemas/UserPointSystemVersion"},"main_engine":{"$ref":"#/components/schemas/DatamartEngineType"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"region":{"$ref":"#/components/schemas/DatamartRegion"},"type":{"$ref":"#/components/schemas/DatamartType"},"name":{"type":"string","readOnly":false},"data_privacy_law":{"$ref":"#/components/schemas/DataPrivacyLaw"},"id":{"type":"string","readOnly":true},"token":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"storage_model_version":{"$ref":"#/components/schemas/DatamartStorageModelVersion"},"time_zone":{"type":"string","enum":["UTC"],"readOnly":false}},"required":["archived","creation_date","data_privacy_law","datafarm","id","main_engine","organisation_id","region","storage_model_version","time_zone","type","user_point_system_version"]}]},"AbstractDatamartResource":{"type":"object"},"UserPointSystemVersion":{"type":"string","enum":["v201506","v201709","v201901","v202205"],"readOnly":false},"DatamartEngineType":{"type":"string","enum":["PIONUS","DATA_WAREHOUSE"],"readOnly":false},"DatamartRegion":{"type":"string","enum":["EUROPE","AMERICA","ASIA"],"readOnly":false},"DatamartType":{"type":"string","enum":["DATAMART","CROSS_DATAMART"],"readOnly":false},"DataPrivacyLaw":{"type":"string","enum":["GDPR","NONE"],"readOnly":false},"DatamartStorageModelVersion":{"type":"string","enum":["v201506","v201709"],"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

> Create a datamart

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Datamarts","description":"Operations related to **Datamarts**, the multi-model graph-based marketing databases that store all collected and computed data for an Organisation. Datamarts organize data around **UserPoints** as nodes in a graph structure, enabling both real-time query processing and scalability on large data volumes, while automatically performing **identity resolution** to merge UserPoints representing the same individual.\n\nRelevant documentation:\n- [Datamart](https://developer.mediarithmics.io/communities-and-organisations/datamart)\n- [Key concepts](https://userguides.mediarithmics.io/basics/key-concepts)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts":{"post":{"description":"","requestBody":{"description":"The datamart to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatamartResource"}}},"required":true},"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatamartResource"}},"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":"createDatamart","parameters":[{"required":false,"description":"Type of default datamart schema","in":"query","schema":{"$ref":"#/components/schemas/DatamartSchemaType"},"explode":true,"style":"form","name":"default_schema_type"}],"summary":"Create a datamart","tags":["Datamarts"]}}},"components":{"schemas":{"DatamartResource":{"allOf":[{"$ref":"#/components/schemas/AbstractDatamartResource"},{"type":"object","properties":{"datafarm":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"user_point_system_version":{"$ref":"#/components/schemas/UserPointSystemVersion"},"main_engine":{"$ref":"#/components/schemas/DatamartEngineType"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"region":{"$ref":"#/components/schemas/DatamartRegion"},"type":{"$ref":"#/components/schemas/DatamartType"},"name":{"type":"string","readOnly":false},"data_privacy_law":{"$ref":"#/components/schemas/DataPrivacyLaw"},"id":{"type":"string","readOnly":true},"token":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"storage_model_version":{"$ref":"#/components/schemas/DatamartStorageModelVersion"},"time_zone":{"type":"string","enum":["UTC"],"readOnly":false}},"required":["archived","creation_date","data_privacy_law","datafarm","id","main_engine","organisation_id","region","storage_model_version","time_zone","type","user_point_system_version"]}]},"AbstractDatamartResource":{"type":"object"},"UserPointSystemVersion":{"type":"string","enum":["v201506","v201709","v201901","v202205"],"readOnly":false},"DatamartEngineType":{"type":"string","enum":["PIONUS","DATA_WAREHOUSE"],"readOnly":false},"DatamartRegion":{"type":"string","enum":["EUROPE","AMERICA","ASIA"],"readOnly":false},"DatamartType":{"type":"string","enum":["DATAMART","CROSS_DATAMART"],"readOnly":false},"DataPrivacyLaw":{"type":"string","enum":["GDPR","NONE"],"readOnly":false},"DatamartStorageModelVersion":{"type":"string","enum":["v201506","v201709"],"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"]},"DatamartSchemaType":{"type":"string","enum":["OBJECT_TREE","PLAIN_TEXT"],"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/datamart-management/datamarts.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.
