Add and remove teams ownership mappings for your organization in a single atomic request, following
the JSON:API atomic operations extension.
Operations are applied together: if any operation is invalid, none of the operations are applied.
Add operations are processed before remove operations, so results may not appear in the same
order as the request.
Request
Body Data (required)
The list of add and remove operations to apply atomically.
The list of add and remove operations to apply atomically.
data
object
The mapping to add. Required when op is add.
attributes [required]
object
The attributes of the mapping to add. team_handle and view_name are required
when op is add. At least one of service or application_id must be provided.
application_id
uuid
The ID of the RUM application this mapping applies to.
For browser applications, provide the real application UUID — the team is applied to the view regardless of service.
For mobile applications, omit this field (or set it to the nil UUID 00000000-0000-0000-0000-000000000000) — the team is applied to the view and service combination across all applications.
match_type
enum
How the view_name is matched against RUM view names.
Allowed enum values: exact,prefix
default: exact
service
string
The RUM application's service name. For browser applications, this is optional. For mobile applications, this is required and scopes the ownership to a specific service.
team_handle
string
The handle of the team that owns the matched RUM views.
view_name
string
The RUM view name to match, or its prefix when match_type is prefix.
type [required]
enum
The type of the resource. The value should always be teams_ownership_mappings.
Allowed enum values: teams_ownership_mappings
default: teams_ownership_mappings
op [required]
enum
Whether this operation adds a new mapping or removes an existing one.
Allowed enum values: add,remove
ref
object
Identifies an existing mapping to remove. Required when op is remove.
id [required]
string
The ID of the mapping to remove.
type [required]
enum
The type of the resource. The value should always be teams_ownership_mappings.
Allowed enum values: teams_ownership_mappings
The response body for the bulk create and remove operation. On success, atomic:results
contains one entry per operation. Add results appear before remove results and may not match
request order. Correlate add results by their type and id rather than by array position.
On failure, no operations were applied and errors describes what went wrong.
Expand All
Field
Type
Description
atomic:results
[object]
The result of each operation.
Add operations are processed first, then remove operations, so results may not appear
in the same order as the request. Present only on success.
data
object
The mapping created by an add operation.
attributes [required]
object
The attributes of a mapping created by an add operation.
application_id
uuid
The ID of the RUM application, when one was provided.
created_at [required]
date-time
Timestamp when the mapping was created.
created_by [required]
string
The UUID of the user who created the mapping.
match_type [required]
enum
How the view_name is matched against RUM view names.
Allowed enum values: exact,prefix
default: exact
org_id [required]
int64
The ID of the organization that owns this mapping.
service
string
The RUM application's service name, when one was provided.
team_handle [required]
string
The handle of the team that owns the matched RUM views.
view_name [required]
string
The RUM view name to match, or its prefix when match_type is prefix.
id [required]
string
The unique identifier of the teams ownership mapping.
type [required]
enum
The type of the resource. The value should always be teams_ownership_mappings.
Allowed enum values: teams_ownership_mappings
default: teams_ownership_mappings
errors
[object]
The validation or processing errors encountered. Present only when the request could not be completed.
detail
string
A human-readable explanation specific to this error.
status [required]
string
The HTTP status code applicable to this error.
title [required]
string
A short, human-readable summary of the error.
{"atomic:results":[{"data":{"attributes":{"application_id":"11111111-2222-3333-4444-555555555555","created_at":"2026-01-15T09:30:00.000Z","created_by":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","match_type":"exact","org_id":123456,"service":"web-checkout","team_handle":"team-rum","view_name":"/checkout"},"id":"123","type":"teams_ownership_mappings"}}],"errors":[{"detail":"prefix match_type is not enabled for this org","status":"400","title":"Bad Request"}]}
Bad Request. One or more operations failed validation, so none of the operations were applied.
Errors are returned in the JSON:API atomic operations error format rather than the standard error response.
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
/**
* Bulk create and remove teams ownership mappings returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RumTeamsOwnershipApi(configuration);constparams: v2.RumTeamsOwnershipApiCreateTeamsOwnershipMappingsBatchRequest={body:{atomicOperations:[{op:"add",data:{type:"teams_ownership_mappings",attributes:{teamHandle:"team-rum",viewName:"/checkout-examplerumteamsownership",service:"web-checkout-examplerumteamsownership",matchType:"exact",},},},],},};apiInstance.createTeamsOwnershipMappingsBatch(params).then((data: v2.TeamsOwnershipMappingBatchResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));