Compartments
Operations related to Compartments, the logical partitions used to namespace User Account identifiers, ensuring uniqueness by combining Compartment ID with User Account ID across different systems (CRM, loyalty programs, partner SSOs). Each Datamart has a default compartment, and additional compartments can be created to represent different places where users have accounts and profiles.
Relevant documentation:
Search datamarts on which the compartment is enabled
Id of the organisation to search
Id of a specific selection to search for
Id of a specific datamart to search for
Offset from which the search must be performed
Number of maximum items that shall be return by this search
Success !
Error response
Error response
Error response
Error response
Error response
Error response
GET /v1/user_account_compartments/{compartment_id}/datamart_selections HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"first_result": 1,
"data": [
{
"type": "CUSTOM_COMPARTMENT_ID",
"image_uri": "text",
"datamart_id": "text",
"token": "text",
"id": "text",
"compartment_id": "text",
"default": false,
"name": "text"
}
],
"status": "ok",
"max_results": 1,
"total": 1,
"count": 1
}Update the set of datamarts on which this compartment is enabled
Organisation id of the selected datamarts
Success response
Error response
Error response
Error response
Error response
Error response
Error response
PUT /v1/user_account_compartments/{compartment_id}/datamart_selections?organisation_id=text HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"datamart_selections": [
{
"datamart_id": "text"
}
]
}{
"status": "ok"
}user account compartment token
is a default user account compartment or not
select or not source datamarts selections
Success !
Error response
Error response
Error response
Error response
Error response
Error response
GET /v1/datamarts/{datamart_id}/compartments HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"data": [
{
"type": "CUSTOM_COMPARTMENT_ID",
"image_uri": "text",
"datamart_id": "text",
"token": "text",
"id": "text",
"compartment_id": "text",
"default": false,
"name": "text"
}
],
"first_result": 1,
"total": 1,
"max_results": 1,
"count": 1,
"status": "ok"
}falseSuccess !
Error response
Error response
Error response
Error response
Error response
Error response
POST /v1/datamarts/{datamart_id}/compartments HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 112
{
"type": "CUSTOM_COMPARTMENT_ID",
"image_uri": "text",
"datamart_id": "text",
"compartment_id": "text",
"default": false
}{
"status": "ok",
"data": {
"type": "CUSTOM_COMPARTMENT_ID",
"image_uri": "text",
"datamart_id": "text",
"token": "text",
"id": "text",
"compartment_id": "text",
"default": false,
"name": "text"
}
}Get the user account compartment by token or id for a datamart
Identifier in one of the two following format : - an id, often a number - token=xxx
Success !
Error response
Error response
Error response
Error response
Error response
Error response
GET /v1/datamarts/{datamart_id}/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"status": "ok",
"data": {
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
}Update the user account compartment for a given token or id for a datamart
Identifier in one of the two following format : - an id, often a number - token=xxx
falsefalseSuccess !
Error response
Error response
Error response
Error response
Error response
Error response
PUT /v1/datamarts/{datamart_id}/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138
{
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}{
"status": "ok",
"data": {
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
}Delete the user account compartment for a given token or id for a datamart
Identifier in one of the two following format : - an id, often a number - token=xxx
Success response
Error response
Error response
Error response
Error response
Error response
Error response
DELETE /v1/datamarts/{datamart_id}/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"status": "ok"
}Identifier in one of the two following format : - an id, often a number - token=xxx
Success !
Error response
Error response
Error response
Error response
Error response
Error response
GET /v1/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"status": "ok",
"data": {
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
}Update the user account compartment for a given token or id
Identifier in one of the two following format : - an id, often a number - token=xxx
falsefalseSuccess !
Error response
Error response
Error response
Error response
Error response
Error response
PUT /v1/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138
{
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}{
"status": "ok",
"data": {
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
}Delete the user account compartment for a given token or id
Identifier in one of the two following format : - an id, often a number - token=xxx
Success response
Error response
Error response
Error response
Error response
Error response
Error response
DELETE /v1/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"status": "ok"
}Search user account compartments for a datamart
select or not source datamarts selections
Success !
Error response
Error response
Error response
Error response
Error response
Error response
GET /v1/datamarts/{datamart_id}/user_account_compartments HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"status": "ok",
"total": 1,
"data": [
{
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
],
"first_result": 1,
"max_results": 1,
"count": 1
}falsefalseSuccess !
Error response
Error response
Error response
Error response
Error response
Error response
POST /v1/datamarts/{datamart_id}/user_account_compartments HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138
{
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}{
"status": "ok",
"data": {
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
}Identifier in one of the two following format : - an id, often a number - token=xxx
Success !
Error response
Error response
Error response
Error response
Error response
Error response
GET /v1/datamarts/{datamart_id}/compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"status": "ok",
"data": {
"type": "CUSTOM_COMPARTMENT_ID",
"image_uri": "text",
"datamart_id": "text",
"token": "text",
"id": "text",
"compartment_id": "text",
"default": false,
"name": "text"
}
}Identifier in one of the two following format : - an id, often a number - token=xxx
falseSuccess !
Error response
Error response
Error response
Error response
Error response
Error response
PUT /v1/datamarts/{datamart_id}/compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 112
{
"type": "CUSTOM_COMPARTMENT_ID",
"image_uri": "text",
"datamart_id": "text",
"compartment_id": "text",
"default": false
}{
"status": "ok",
"data": {
"type": "CUSTOM_COMPARTMENT_ID",
"image_uri": "text",
"datamart_id": "text",
"token": "text",
"id": "text",
"compartment_id": "text",
"default": false,
"name": "text"
}
}Identifier in one of the two following format : - an id, often a number - token=xxx
Success response
Error response
Error response
Error response
Error response
Error response
Error response
DELETE /v1/datamarts/{datamart_id}/compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"status": "ok"
}Search the user account compartments associated with a given organization id and extra optional filters
Fields used to order the result
select or not source datamarts selections
Success !
Error response
Error response
Error response
Error response
Error response
Error response
GET /v1/user_account_compartments?organisation_id=1 HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
"first_result": 1,
"count": 1,
"data": [
{
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
],
"status": "ok",
"total": 1,
"max_results": 1
}Create the user account compartments associated with a given organization id
falsefalseSuccess !
Error response
Error response
Error response
Error response
Error response
Error response
POST /v1/user_account_compartments HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138
{
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}{
"status": "ok",
"data": {
"id": "text",
"default": false,
"organisation_id": "text",
"token": "text",
"type": "CUSTOM_COMPARTMENT_ID",
"name": "text",
"archived": false,
"image_uri": "text"
}
}Last updated
Was this helpful?