Response containing the entity attribute mapping configuration including all available attributes and their properties.
Expand All
Field
Type
Description
data
object
The data object containing the resource type and attributes for the get mapping response.
attributes
object
Attributes of the get mapping response, containing the list of configured entity attributes.
attributes
[object]
The list of entity attributes and their mapping configurations.
attribute
string
The attribute identifier as used in the entity data model.
description
string
Human-readable explanation of what the attribute represents.
display_name
string
The human-readable label for the attribute shown in the UI.
groups
[string]
List of group labels used to categorize the attribute.
is_custom
boolean
Whether this attribute is a custom user-defined attribute rather than a built-in one.
type
string
The data type of the attribute (for example, string or number).
id
string
Unique identifier for the get mapping response resource.
type [required]
enum
Get mappings response resource type.
Allowed enum values: get_mappings_response
default: get_mappings_response
{"data":{"attributes":{"attributes":[{"attribute":"user_id","description":"Unique user identifier","display_name":"User ID","groups":["Identity"],"is_custom":false,"type":"string"},{"attribute":"user_email","description":"User email address","display_name":"Email Address","groups":["Identity","Contact"],"is_custom":false,"type":"string"},{"attribute":"first_country_code","description":"The ISO code of the country for the user's first session","display_name":"First Country Code","groups":["Geography"],"is_custom":false,"type":"string"},{"attribute":"@customer_tier","description":"Customer subscription tier","display_name":"Customer Tier","groups":["Business"],"is_custom":true,"type":"string"}]},"id":"get_mappings_response","type":"get_mappings_response"}}
# Path parameters exportentity="users" # Use a Personal Access Token or Service Access Token exportDD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Get mapping returns "Successful response with entity mapping configuration" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]config.unstable_operations["v2.get_mapping".to_sym]=trueendapi_instance=DatadogAPIClient::V2::RumAudienceManagementAPI.newpapi_instance.get_mapping("users")
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Get mapping returns "Successful response with entity mapping configuration" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.GetMapping",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRumAudienceManagementApi(apiClient)resp,r,err:=api.GetMapping(ctx,"users")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RumAudienceManagementApi.GetMapping`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RumAudienceManagementApi.GetMapping`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Get mapping returns "Successful response with entity mapping configuration" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumAudienceManagementApi;importcom.datadog.api.client.v2.model.GetMappingResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));defaultClient.setUnstableOperationEnabled("v2.getMapping",true);RumAudienceManagementApiapiInstance=newRumAudienceManagementApi(defaultClient);try{GetMappingResponseresult=apiInstance.getMapping("users");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumAudienceManagementApi#getMapping");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// Get mapping returns "Successful response with entity mapping configuration"
// response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum_audience_management::RumAudienceManagementAPI;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.GetMapping",true);letapi=RumAudienceManagementAPI::with_config(configuration);letresp=api.get_mapping("users".to_string()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get mapping returns "Successful response with entity mapping configuration" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});configuration.unstableOperations["v2.getMapping"]=true;constapiInstance=newv2.RumAudienceManagementApi(configuration);constparams: v2.RumAudienceManagementApiGetMappingRequest={entity:"users",};apiInstance.getMapping(params).then((data: v2.GetMappingResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.