Get the list of teams ownership rules for your organization, optionally filtered.
Rules group the underlying mappings by view_name, application_id, service, and match_type,
collapsing every team that owns the same view into a single entry.
Argumentos
Cadenas de consulta
Nombre
Tipo
Descripción
filter[view_name]
array
Filter mappings by RUM view name.
filter[team_handle]
array
Filter mappings by owning team handle.
filter[application_id]
array
Filter mappings by RUM application ID. Each value must be a valid UUID.
The response body for a list of teams ownership rules.
Expand All
Campo
Tipo
Descripción
data [required]
[object]
A list of teams ownership rules.
attributes [required]
object
The attributes of a teams ownership rule.
application_id [required]
string
The ID of the RUM application this mapping applies to.
For browser applications, this is the real application UUID.
For mobile applications, this is the nil UUID 00000000-0000-0000-0000-000000000000 (wildcard), meaning the ownership applies across all applications.
match_type [required]
enum
How the view_name is matched against RUM view names.
Allowed enum values: exact,prefix
default: exact
service [required]
string
The RUM application's service name. For browser applications, may be empty. For mobile applications, this is the service that scopes the ownership.
teams [required]
[object]
The teams that own the matched views, each paired with the ID of its underlying mapping.
mapping_id [required]
string
The ID of the underlying mapping, used to delete this team's ownership individually.
team_handle [required]
string
The handle of the owning team.
view_name [required]
string
The RUM view name to match, or its prefix when match_type is prefix.
id [required]
string
A deterministic identifier derived from the rule's grouping key.
This ID cannot be used to delete the rule directly; delete individual mappings
using the mapping_id under teams instead.
type [required]
enum
The type of the resource. The value should always be teams_ownership_grouped_mappings.
Allowed enum values: teams_ownership_grouped_mappings
"""
List teams ownership rules returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_teams_ownership_apiimportRumTeamsOwnershipApi# there is a valid "teams_ownership_mapping" in the systemTEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME=environ["TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RumTeamsOwnershipApi(api_client)response=api_instance.list_teams_ownership_rules(filter_view_name=[TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME,],)print(response)
# List teams ownership rules returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RumTeamsOwnershipAPI.new# there is a valid "teams_ownership_mapping" in the systemTEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME=ENV["TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME"]opts={filter_view_name:[TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME,],}papi_instance.list_teams_ownership_rules(opts)
// List teams ownership rules returns "OK" 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(){// there is a valid "teams_ownership_mapping" in the systemTeamsOwnershipMappingDataAttributesViewName:=os.Getenv("TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRumTeamsOwnershipApi(apiClient)resp,r,err:=api.ListTeamsOwnershipRules(ctx,*datadogV2.NewListTeamsOwnershipRulesOptionalParameters().WithFilterViewName([]string{TeamsOwnershipMappingDataAttributesViewName,}))iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RumTeamsOwnershipApi.ListTeamsOwnershipRules`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RumTeamsOwnershipApi.ListTeamsOwnershipRules`:\n%s\n",responseContent)}
// List teams ownership rules returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumTeamsOwnershipApi;importcom.datadog.api.client.v2.api.RumTeamsOwnershipApi.ListTeamsOwnershipRulesOptionalParameters;importcom.datadog.api.client.v2.model.TeamsOwnershipRulesResponse;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumTeamsOwnershipApiapiInstance=newRumTeamsOwnershipApi(defaultClient);// there is a valid "teams_ownership_mapping" in the systemStringTEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME=System.getenv("TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME");try{TeamsOwnershipRulesResponseresult=apiInstance.listTeamsOwnershipRules(newListTeamsOwnershipRulesOptionalParameters().filterViewName(Collections.singletonList(TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME)));System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumTeamsOwnershipApi#listTeamsOwnershipRules");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// List teams ownership rules returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum_teams_ownership::ListTeamsOwnershipRulesOptionalParams;usedatadog_api_client::datadogV2::api_rum_teams_ownership::RumTeamsOwnershipAPI;#[tokio::main]asyncfnmain(){// there is a valid "teams_ownership_mapping" in the system
letteams_ownership_mapping_data_attributes_view_name=std::env::var("TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME").unwrap();letconfiguration=datadog::Configuration::new();letapi=RumTeamsOwnershipAPI::with_config(configuration);letresp=api.list_teams_ownership_rules(ListTeamsOwnershipRulesOptionalParams::default().filter_view_name(vec![teams_ownership_mapping_data_attributes_view_name.clone(),]),).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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List teams ownership rules returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RumTeamsOwnershipApi(configuration);// there is a valid "teams_ownership_mapping" in the system
constTEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME=process.env.TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAMEasstring;constparams: v2.RumTeamsOwnershipApiListTeamsOwnershipRulesRequest={filterViewName:[TEAMS_OWNERSHIP_MAPPING_DATA_ATTRIBUTES_VIEW_NAME],};apiInstance.listTeamsOwnershipRules(params).then((data: v2.TeamsOwnershipRulesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));