Configuring Snowflake managed by Adverity binding settings in Management API#
This guide explains how to manage Snowflake managed by Adverity (previously ADS) settings using the Management API. Snowflake managed by Adverity is an Adverity-managed warehouse. In the Management API, it is exposed as a destination type that can be configured and bound to datastreams.
Note
In the Management API, the Snowflake managed by Adverity target type is
registered under the name Dashboards. When listing available
destination types (GET /api/target-types/), look for the entry
named Dashboards to obtain the TARGET_TYPE_ID. The settings
exposed through the MAPI include both general data storage settings
(overwrite behaviour) and Dashboards visualization settings
(workspace mapping). The same settings are available in the
Adverity user interface in the Dashboards section when loading
data into your connected warehouse. For more information, see
Loading data into 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.
Prerequisites#
Before you complete the procedures in this guide, perform all of the following actions:
Obtain a Management API key with the appropriate scope:
destination:readto list and view bindings.destination:writeto create, update, or delete bindings.
For more information, see Authorizing to Management API.
Determine the following IDs:
TARGET_TYPE_ID— the content-type ID of the Snowflake managed by Adverity destination. To find it, send a GET request tohttps://{{INSTANCE}}/api/target-types/and look for the entry named Dashboards in the response.TARGET_ID— the numeric ID of the Snowflake managed by Adverity 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.
Listing Snowflake managed by Adverity bindings#
To list the Snowflake managed by Adverity 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 one of the following values:Token {{KEY}}if you use a key generated with user credentials in Management API.Bearer {{KEY}}if you use a key generated in the Adverity user interface.
Send the request.
As a result, you obtain the list of Snowflake managed by Adverity 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: Token {{KEY}}'
Note
If you have generated your API key in the Adverity user interface,
replace Token with Bearer in the Authorization header.
Retrieving a single binding#
To retrieve the settings of a specific Snowflake managed by Adverity 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 one of the following values:Token {{KEY}}if you use a key generated with user credentials in Management API.Bearer {{KEY}}if you use a key generated in the Adverity user interface.
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: Token {{KEY}}'
Note
If you have generated your API key in the Adverity user interface,
replace Token with Bearer in the Authorization header.
Discovering available 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 one of the following values:Token {{KEY}}if you use a key generated with user credentials in Management API.Bearer {{KEY}}if you use a key generated in the Adverity user interface.
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: Token {{KEY}}'
Note
If you have generated your API key in the Adverity user interface,
replace Token with Bearer in the Authorization header.
Creating an Snowflake managed by Adverity binding#
To create a new Snowflake managed by Adverity 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 one of the following values:Token {{KEY}}if you use a key generated with user credentials in Management API.Bearer {{KEY}}if you use a key generated in the Adverity user interface.
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 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 Snowflake managed by Adverity 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: Token {{KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{"datastream": "{{DATASTREAM_ID}}", "workspace_mapping_type": 1, "workspace_single_mapping": "{{WORKSPACE_ID}}", "datasource_label": "My Datasource"}'
Note
If you have generated your API key in the Adverity user interface,
replace Token with Bearer in the Authorization header.
Note
The target field is taken from the URL path and is read-only. Any
target value included in the request body is ignored. Creating a
second binding for the same datastream and destination pair returns
a 400 response.
Updating Snowflake managed by Adverity binding settings#
To update the settings of an existing Snowflake managed by Adverity 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 one of the following values:Token {{KEY}}if you use a key generated with user credentials in Management API.Bearer {{KEY}}if you use a key generated in the Adverity user interface.
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: Token {{KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{"datasource_label": "Updated Label", "overwrite_filename": true}'
Note
If you have generated your API key in the Adverity user interface,
replace Token with Bearer in the Authorization header.
Note
Extra or unknown fields in the request body are ignored — only the fields listed in Available binding settings are applied.
Deleting an Snowflake managed by Adverity binding#
To delete an existing Snowflake managed by Adverity 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 one of the following values:Token {{KEY}}if you use a key generated with user credentials in Management API.Bearer {{KEY}}if you use a key generated in the Adverity user interface.
Send the request.
As a result, you deleted the Snowflake managed by Adverity 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: Token {{KEY}}'
Note
If you have generated your API key in the Adverity user interface,
replace Token with Bearer in the Authorization header.
Available 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 settings.
Dashboards workspace selection#
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. |
Overwrite settings#
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 settings#
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#
Field |
Description |
|---|---|
|
The numeric ID of the binding. |
|
The numeric ID of the Snowflake managed by Adverity destination. Read-only; set from the URL path. |
|
The numeric ID of the bound datastream. |