Configuring Data Warehouse and Dashboards binding settings in Management API
On this page
This guide explains how to manage destination binding settings using the Management API for two distinct destination types:
-
Data Warehouse (also called Adverity Data Storage, or ADS) is the current Adverity-managed or external warehouse destination. It can also route data into Dashboards workspaces as part of the same binding. For the equivalent user interface flow, see Loading data into Data Warehouse.
-
Dashboards is a separate, legacy destination for customers who see separate Explore and Present links in the top navigation panel and do not use an internal warehouse. This destination type is being phased out in favor of Data Warehouse. For the equivalent user interface flow, see Loading data into Dashboards.
Prerequisites
Before you complete the procedures in this guide, perform all of the following actions:
-
Use a Connect API key with the following permissions:
-
Destination: Read-only (
destination:read) to list and view bindings. -
Destination: Write (
destination:write) to create, update, or delete bindings.
Picking Write for a permission also gives the key its Read-only access. Without the permission a request needs, Management API returns HTTP
403. You cannot change the permissions of a key, so to add one, create a new key. For more information, see Creating a Connect API key in Adverity. -
-
Determine the following IDs:
-
TARGET_TYPE_ID— the content-type ID of the destination. To find it, send a GET request tohttps://{{INSTANCE}}/api/target-types/and look for the entry named Data Warehouse or Dashboards, depending on which destination type you use. -
TARGET_ID— the numeric ID of the destination instance. After obtaining theTARGET_TYPE_ID, send a GET request tohttps://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/and locate the relevant ID.
-
Configuring Data Warehouse binding settings
Data Warehouse limitations
The Management API does not provide endpoints to enumerate the valid values for workspace_single_mapping and workspace_mapping_table. To obtain the IDs of valid workspaces and mapping tables, use the Adverity user interface.
Listing Data Warehouse bindings
To list the Data Warehouse bindings, follow these steps:
-
Create a GET request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, you obtain the list of Data Warehouse bindings, including the current values of all configurable settings.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request GET 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/' \
--header 'Authorization: Bearer {{KEY}}'
Retrieving a single Data Warehouse binding
To retrieve the settings of a specific Data Warehouse binding, follow these steps:
-
Create a GET request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, you obtain the current settings for the specified binding.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request GET 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/' \
--header 'Authorization: Bearer {{KEY}}'
Discovering available Data Warehouse settings
To see all configurable fields, their accepted values, and help text before creating or updating a binding, send an OPTIONS request.
To discover available settings, follow these steps:
-
Create an OPTIONS request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, the response contains the full schema for the binding endpoint, including all accepted fields, their types, choices, and which are required.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request OPTIONS 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/' \
--header 'Authorization: Bearer {{KEY}}'
Creating a Data Warehouse binding
To create a new Data Warehouse binding, follow these steps:
-
Create a POST request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
In the HTTP request header, include the parameter
Content-Typewith valueapplication/json. -
In the HTTP request body, include the binding parameters. At minimum, include the
datastreamfield. For the full list of available parameters, see Available Data Warehouse binding settings:{ "datastream": "{{DATASTREAM_ID}}", "ingestion_mode": 1, "workspace_mapping_type": 1, "workspace_single_mapping": "{{WORKSPACE_ID}}", "datasource_label": "My Datasource" } -
Send the request.
As a result, you created a new Data Warehouse binding. The response contains the created binding with all its settings and returns HTTP 201.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request POST 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/' \
--header 'Authorization: Bearer {{KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{"datastream": "{{DATASTREAM_ID}}", "ingestion_mode": 1, "workspace_mapping_type": 1, "workspace_single_mapping": "{{WORKSPACE_ID}}", "datasource_label": "My Datasource"}'
Updating Data Warehouse binding settings
To update the settings of an existing Data Warehouse binding, follow these steps:
-
Create a PATCH request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
In the HTTP request header, include the parameter
Content-Typewith valueapplication/json. -
In the HTTP request body, include only the settings you want to update:
{ "datasource_label": "Updated Label", "overwrite_key_columns": true } -
Send the request.
As a result, the binding is updated and the response reflects the new values.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request PATCH 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/' \
--header 'Authorization: Bearer {{KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{"datasource_label": "Updated Label", "overwrite_key_columns": true}'
Deleting a Data Warehouse binding
To delete an existing Data Warehouse binding, follow these steps:
-
Create a DELETE request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, you deleted the Data Warehouse binding and the destination is removed from the datastream. The response returns HTTP 204 with no body.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request DELETE 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/' \
--header 'Authorization: Bearer {{KEY}}'
Available Data Warehouse binding settings
The settings are grouped into three categories: ingestion settings, Dashboards workspace selection, and other settings. To see the full set of accepted values for each field, send an OPTIONS request as described in Discovering available Data Warehouse settings.
Ingestion settings
These settings correspond to the data loading options described in Understanding warehouse data storage options.
Scroll horizontally to see the full table.
Parameter | Description |
|---|---|
| Controls how new data is loaded into the connected warehouse — for example, overwriting specific days, appending all new rows, or overwriting all rows. Use the OPTIONS endpoint to see all accepted values. |
| The name of the date column used to calculate the date range that is cleared when |
| Boolean. When |
Routing data to Dashboards workspaces
These settings correspond to the Dashboards section described in Loading data into Data Warehouse, and control whether and how data loaded into Data Warehouse is also made available in Dashboards.
Scroll horizontally to see the full table.
Parameter | Description |
|---|---|
| Controls how the datastream’s data is mapped to a Dashboards workspace. Use the OPTIONS endpoint to see all accepted values. |
| The numeric ID of the Dashboards workspace to map to. Required when |
| The name of the column in your data extract used to map data to Dashboards workspaces. Required when |
| The workspace mapping table that resolves column values to Dashboards workspaces. Required when |
| The action to take when a Dashboards workspace cannot be resolved from the mapping column. Use the OPTIONS endpoint to see available choices. |
Other Data Warehouse settings
Scroll horizontally to see the full table.
Parameter | Description |
|---|---|
| A label for the data source. Must be title-case. Appears as the data source name in Dashboards, if the binding is also mapped to a Dashboards workspace. |
| Boolean. When |
Read-only fields
Scroll horizontally to see the full table.
Field | Description |
|---|---|
| The numeric ID of the binding. |
| The numeric ID of the Data Warehouse destination. Read-only; set from the URL path. |
| The numeric ID of the bound datastream. |
| Boolean. Read-only. Whether existing data for the datastream is overwritten on each load. |
| Boolean. Read-only. Whether existing data with the same data extract filename is overwritten. |
| Read-only. The name of the date column used to determine which data is overwritten, if configured through the Adverity user interface. |
Configuring Dashboards binding settings (legacy)
Dashboards limitations
The Management API does not provide endpoints to enumerate the valid values for workspace_single_mapping and workspace_mapping_table. To obtain the IDs of valid workspaces and mapping tables, use the Adverity user interface.
Listing Dashboards bindings
To list the Dashboards bindings, follow these steps:
-
Create a GET request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, you obtain the list of Dashboards bindings, including the current values of all configurable settings.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request GET 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/' \
--header 'Authorization: Bearer {{KEY}}'
Retrieving a single Dashboards binding
To retrieve the settings of a specific Dashboards binding, follow these steps:
-
Create a GET request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, you obtain the current settings for the specified binding.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request GET 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/' \
--header 'Authorization: Bearer {{KEY}}'
Discovering available Dashboards settings
To see all configurable fields, their accepted values, and help text before creating or updating a binding, send an OPTIONS request.
To discover available settings, follow these steps:
-
Create an OPTIONS request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, the response contains the full schema for the binding endpoint, including all accepted fields, their types, choices, and which are required.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request OPTIONS 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/' \
--header 'Authorization: Bearer {{KEY}}'
Creating a Dashboards binding
To create a new Dashboards binding, follow these steps:
-
Create a POST request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
In the HTTP request header, include the parameter
Content-Typewith valueapplication/json. -
In the HTTP request body, include the binding parameters. At minimum, include the
datastreamfield. For the full list of available parameters, see Available Dashboards binding settings:{ "datastream": "{{DATASTREAM_ID}}", "workspace_mapping_type": 1, "workspace_single_mapping": "{{WORKSPACE_ID}}", "datasource_label": "My Datasource" } -
Send the request.
As a result, you created a new Dashboards binding. The response contains the created binding with all its settings and returns HTTP 201.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request POST 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/' \
--header 'Authorization: Bearer {{KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{"datastream": "{{DATASTREAM_ID}}", "workspace_mapping_type": 1, "workspace_single_mapping": "{{WORKSPACE_ID}}", "datasource_label": "My Datasource"}'
Updating Dashboards binding settings
To update the settings of an existing Dashboards binding, follow these steps:
-
Create a PATCH request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
In the HTTP request header, include the parameter
Content-Typewith valueapplication/json. -
In the HTTP request body, include only the settings you want to update:
{ "datasource_label": "Updated Label", "overwrite_filename": true } -
Send the request.
As a result, the binding is updated and the response reflects the new values.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request PATCH 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/' \
--header 'Authorization: Bearer {{KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{"datasource_label": "Updated Label", "overwrite_filename": true}'
Deleting a Dashboards binding
To delete an existing Dashboards binding, follow these steps:
-
Create a DELETE request to the following endpoint:
https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
Send the request.
As a result, you deleted the Dashboards binding and the destination is removed from the datastream. The response returns HTTP 204 with no body.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl --location --request DELETE 'https://{{INSTANCE}}/api/target-types/{{TARGET_TYPE_ID}}/targets/{{TARGET_ID}}/mappings/{{BINDING_ID}}/' \
--header 'Authorization: Bearer {{KEY}}'
Available Dashboards binding settings
The settings are grouped into three categories: Dashboards workspace selection, overwrite settings, and other settings. To see the full set of accepted values for each field, send an OPTIONS request as described in Discovering available Dashboards settings.
Dashboards workspace selection
Scroll horizontally to see the full table.
Parameter | Description |
|---|---|
| Controls how the datastream’s data is mapped to a workspace. Known values: |
| The numeric ID of the Dashboards workspace to map to. Required when |
| The name of the column in your data extract used to map data to workspaces. Required when |
| The workspace mapping table that resolves column values to workspaces. Required when |
| The action to take when a workspace cannot be resolved from the mapping column. Use the OPTIONS endpoint to see available choices. |
Dashboards overwrite settings
Scroll horizontally to see the full table.
Parameter | Description |
|---|---|
| Boolean. When |
| Boolean. When |
| Boolean. When |
| The name of the date column used to determine which data is overwritten. When set, previously loaded data within the matching date range is replaced. |
Other Dashboards settings
Scroll horizontally to see the full table.
Parameter | Description |
|---|---|
| A label for the data source. Must be title-case. Appears as the data source name in Dashboards. |
| Boolean. When |
| Boolean. When |
Read-only base fields
Scroll horizontally to see the full table.
Field | Description |
|---|---|
| The numeric ID of the binding. |
| The numeric ID of the Dashboards destination. Read-only; set from the URL path. |
| The numeric ID of the bound datastream. |