For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/rum-audience-management/update-connection.md. A documentation index is available at /llms.txt.
Language
Datadog site

Update connection

WARNINGNote: This endpoint may be subject to changes.
PUThttps://api.datadoghq.com/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.us3.datadoghq.com/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.us5.datadoghq.com/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.datadoghq.eu/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.ap1.datadoghq.com/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.ap2.datadoghq.com/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.uk1.datadoghq.com/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.ddog-gov.com/api/v2/product-analytics/{entity}/mapping/connectionhttps://api.us2.ddog-gov.com/api/v2/product-analytics/{entity}/mapping/connection

Overview

Update an existing data connection by adding, updating, or deleting fields

Arguments

Path Parameters

Name
Type
Description
entity [required]
string

The entity for which to update the connection

Request

Body Data (required)

Field
Type
Description
data
object

The data object containing the resource identifier and attributes for updating an existing connection.

Response

Connection updated successfully

Code Example

# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF
# Path parameters
export entity="users"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v2/product-analytics/${entity}/mapping/connection" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "fields_to_add": [
        {
          "description": "Net Promoter Score from customer surveys",
          "display_name": "NPS Score",
          "groups": [
            "Satisfaction",
            "Metrics"
          ],
          "id": "nps_score",
          "source_name": "net_promoter_score",
          "type": "number"
        }
      ],
      "fields_to_delete": [
        "old_revenue_field"
      ],
      "fields_to_update": [
        {
          "field_id": "lifetime_value",
          "updated_display_name": "Customer Lifetime Value (`USD`)",
          "updated_groups": [
            "Financial",
            "Metrics"
          ]
        }
      ]
    },
    "id": "crm-integration",
    "type": "connection_id"
  }
}
EOF