Manage your Real User Monitoring (RUM) applications, and search or aggregate your RUM events over HTTP. See the RUM & Session Replay page for more information
The minimum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, and the Z UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds).
default: now-15m
query
string
The search query following the RUM search syntax.
default: *
to
string
The maximum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, and the Z UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds).
default: now
options
object
Global query options that are used during the query.
Note: Only supply timezone or time offset, not both. Otherwise, the query fails.
time_offset
int64
The time offset (in seconds) to apply to the query.
timezone
string
The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York).
default: UTC
page
object
Paging attributes for listing events.
cursor
string
List following results with a cursor provided in the previous query.
limit
int32
Maximum number of events in the response.
default: 10
sort
enum
Sort parameters when querying events.
Allowed enum values: timestamp,-timestamp
{"filter":{"from":"now-15m","query":"@type:session AND @session.type:user","to":"now"},"options":{"time_offset":0,"timezone":"GMT"},"page":{"limit":25},"sort":"timestamp"}
{"filter":{"from":"now-15m","query":"@type:session AND @session.type:user","to":"now"},"options":{"time_offset":0,"timezone":"GMT"},"page":{"limit":2},"sort":"timestamp"}
Response object with all events matching the request and pagination information.
Expand All
フィールド
種類
説明
data
[object]
Array of events matching the request.
attributes
object
JSON object containing all event attributes and their associated values.
attributes
object
JSON object of attributes from RUM events.
service
string
The name of the application or service generating RUM events.
It is used to switch from RUM to APM, so make sure you define the same
value when you use both products.
tags
[string]
Array of tags associated with your event.
timestamp
date-time
Timestamp of your event.
id
string
Unique ID of the event.
type
enum
Type of the event.
Allowed enum values: rum
default: rum
links
object
Links attributes.
next
string
Link for the next set of results. Note that the request can also be made using the
POST endpoint.
meta
object
The metadata associated with a request.
elapsed
int64
The time elapsed in milliseconds.
page
object
Paging attributes.
after
string
The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of page[cursor].
request_id
string
The identifier of the request.
status
enum
The status of the response.
Allowed enum values: done,timeout
warnings
[object]
A list of warnings (non-fatal errors) encountered. Partial results may return if
warnings are present in the response.
code
string
A unique code for this type of warning.
detail
string
A detailed explanation of this specific warning.
title
string
A short human-readable summary of the warning.
{"data":[{"attributes":{"attributes":{"customAttribute":123,"duration":2345},"service":"web-app","tags":["team:A"],"timestamp":"2019-01-02T09:42:36.320Z"},"id":"AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA","type":"rum"}],"links":{"next":"https://app.datadoghq.com/api/v2/rum/event?filter[query]=foo\u0026page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"meta":{"elapsed":132,"page":{"after":"eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"request_id":"MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR","status":"done","warnings":[{"code":"unknown_index","detail":"indexes: foo, bar","title":"One or several indexes are missing or invalid, results hold data from the other indexes"}]}}
// Search RUM events returns "OK" response
packagemainimport("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(){body:=datadogV2.RUMSearchEventsRequest{Filter:&datadogV2.RUMQueryFilter{From:datadog.PtrString("now-15m"),Query:datadog.PtrString("@type:session AND @session.type:user"),To:datadog.PtrString("now"),},Options:&datadogV2.RUMQueryOptions{TimeOffset:datadog.PtrInt64(0),Timezone:datadog.PtrString("GMT"),},Page:&datadogV2.RUMQueryPageOptions{Limit:datadog.PtrInt32(25),},Sort:datadogV2.RUMSORT_TIMESTAMP_ASCENDING.Ptr(),}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,r,err:=api.SearchRUMEvents(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.SearchRUMEvents`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RUMApi.SearchRUMEvents`:\n%s\n",responseContent)}
// Search RUM events returns "OK" response with pagination
packagemainimport("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(){body:=datadogV2.RUMSearchEventsRequest{Filter:&datadogV2.RUMQueryFilter{From:datadog.PtrString("now-15m"),Query:datadog.PtrString("@type:session AND @session.type:user"),To:datadog.PtrString("now"),},Options:&datadogV2.RUMQueryOptions{TimeOffset:datadog.PtrInt64(0),Timezone:datadog.PtrString("GMT"),},Page:&datadogV2.RUMQueryPageOptions{Limit:datadog.PtrInt32(2),},Sort:datadogV2.RUMSORT_TIMESTAMP_ASCENDING.Ptr(),}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,_:=api.SearchRUMEventsWithPagination(ctx,body)forpaginationResult:=rangeresp{ifpaginationResult.Error!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.SearchRUMEvents`: %v\n",paginationResult.Error)}responseContent,_:=json.MarshalIndent(paginationResult.Item,""," ")fmt.Fprintf(os.Stdout,"%s\n",responseContent)}}
// Search RUM events returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumApi;importcom.datadog.api.client.v2.model.RUMEventsResponse;importcom.datadog.api.client.v2.model.RUMQueryFilter;importcom.datadog.api.client.v2.model.RUMQueryOptions;importcom.datadog.api.client.v2.model.RUMQueryPageOptions;importcom.datadog.api.client.v2.model.RUMSearchEventsRequest;importcom.datadog.api.client.v2.model.RUMSort;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);RUMSearchEventsRequestbody=newRUMSearchEventsRequest().filter(newRUMQueryFilter().from("now-15m").query("@type:session AND @session.type:user").to("now")).options(newRUMQueryOptions().timeOffset(0L).timezone("GMT")).page(newRUMQueryPageOptions().limit(25)).sort(RUMSort.TIMESTAMP_ASCENDING);try{RUMEventsResponseresult=apiInstance.searchRUMEvents(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumApi#searchRUMEvents");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Search RUM events returns "OK" response with paginationimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.PaginationIterable;importcom.datadog.api.client.v2.api.RumApi;importcom.datadog.api.client.v2.model.RUMEvent;importcom.datadog.api.client.v2.model.RUMQueryFilter;importcom.datadog.api.client.v2.model.RUMQueryOptions;importcom.datadog.api.client.v2.model.RUMQueryPageOptions;importcom.datadog.api.client.v2.model.RUMSearchEventsRequest;importcom.datadog.api.client.v2.model.RUMSort;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);RUMSearchEventsRequestbody=newRUMSearchEventsRequest().filter(newRUMQueryFilter().from("now-15m").query("@type:session AND @session.type:user").to("now")).options(newRUMQueryOptions().timeOffset(0L).timezone("GMT")).page(newRUMQueryPageOptions().limit(2)).sort(RUMSort.TIMESTAMP_ASCENDING);try{PaginationIterable<RUMEvent>iterable=apiInstance.searchRUMEventsWithPagination(body);for(RUMEventitem:iterable){System.out.println(item);}}catch(RuntimeExceptione){System.err.println("Exception when calling RumApi#searchRUMEventsWithPagination");System.err.println("Reason: "+e.getMessage());e.printStackTrace();}}}
"""
Search RUM events returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApifromdatadog_api_client.v2.model.rum_query_filterimportRUMQueryFilterfromdatadog_api_client.v2.model.rum_query_optionsimportRUMQueryOptionsfromdatadog_api_client.v2.model.rum_query_page_optionsimportRUMQueryPageOptionsfromdatadog_api_client.v2.model.rum_search_events_requestimportRUMSearchEventsRequestfromdatadog_api_client.v2.model.rum_sortimportRUMSortbody=RUMSearchEventsRequest(filter=RUMQueryFilter(_from="now-15m",query="@type:session AND @session.type:user",to="now",),options=RUMQueryOptions(time_offset=0,timezone="GMT",),page=RUMQueryPageOptions(limit=25,),sort=RUMSort.TIMESTAMP_ASCENDING,)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)response=api_instance.search_rum_events(body=body)print(response)
"""
Search RUM events returns "OK" response with pagination
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApifromdatadog_api_client.v2.model.rum_query_filterimportRUMQueryFilterfromdatadog_api_client.v2.model.rum_query_optionsimportRUMQueryOptionsfromdatadog_api_client.v2.model.rum_query_page_optionsimportRUMQueryPageOptionsfromdatadog_api_client.v2.model.rum_search_events_requestimportRUMSearchEventsRequestfromdatadog_api_client.v2.model.rum_sortimportRUMSortbody=RUMSearchEventsRequest(filter=RUMQueryFilter(_from="now-15m",query="@type:session AND @session.type:user",to="now",),options=RUMQueryOptions(time_offset=0,timezone="GMT",),page=RUMQueryPageOptions(limit=2,),sort=RUMSort.TIMESTAMP_ASCENDING,)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)items=api_instance.search_rum_events_with_pagination(body=body)foriteminitems:print(item)
# Search RUM events returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.newbody=DatadogAPIClient::V2::RUMSearchEventsRequest.new({filter:DatadogAPIClient::V2::RUMQueryFilter.new({from:"now-15m",query:"@type:session AND @session.type:user",to:"now",}),options:DatadogAPIClient::V2::RUMQueryOptions.new({time_offset:0,timezone:"GMT",}),page:DatadogAPIClient::V2::RUMQueryPageOptions.new({limit:25,}),sort:DatadogAPIClient::V2::RUMSort::TIMESTAMP_ASCENDING,})papi_instance.search_rum_events(body)
# Search RUM events returns "OK" response with paginationrequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.newbody=DatadogAPIClient::V2::RUMSearchEventsRequest.new({filter:DatadogAPIClient::V2::RUMQueryFilter.new({from:"now-15m",query:"@type:session AND @session.type:user",to:"now",}),options:DatadogAPIClient::V2::RUMQueryOptions.new({time_offset:0,timezone:"GMT",}),page:DatadogAPIClient::V2::RUMQueryPageOptions.new({limit:2,}),sort:DatadogAPIClient::V2::RUMSort::TIMESTAMP_ASCENDING,})api_instance.search_rum_events_with_pagination(body){|item|putsitem}
// Search RUM events returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;usedatadog_api_client::datadogV2::model::RUMQueryFilter;usedatadog_api_client::datadogV2::model::RUMQueryOptions;usedatadog_api_client::datadogV2::model::RUMQueryPageOptions;usedatadog_api_client::datadogV2::model::RUMSearchEventsRequest;usedatadog_api_client::datadogV2::model::RUMSort;#[tokio::main]asyncfnmain(){letbody=RUMSearchEventsRequest::new().filter(RUMQueryFilter::new().from("now-15m".to_string()).query("@type:session AND @session.type:user".to_string()).to("now".to_string()),).options(RUMQueryOptions::new().time_offset(0).timezone("GMT".to_string()),).page(RUMQueryPageOptions::new().limit(25)).sort(RUMSort::TIMESTAMP_ASCENDING);letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.search_rum_events(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
// Search RUM events returns "OK" response with pagination
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;usedatadog_api_client::datadogV2::model::RUMQueryFilter;usedatadog_api_client::datadogV2::model::RUMQueryOptions;usedatadog_api_client::datadogV2::model::RUMQueryPageOptions;usedatadog_api_client::datadogV2::model::RUMSearchEventsRequest;usedatadog_api_client::datadogV2::model::RUMSort;usefutures_util::pin_mut;usefutures_util::stream::StreamExt;#[tokio::main]asyncfnmain(){letbody=RUMSearchEventsRequest::new().filter(RUMQueryFilter::new().from("now-15m".to_string()).query("@type:session AND @session.type:user".to_string()).to("now".to_string()),).options(RUMQueryOptions::new().time_offset(0).timezone("GMT".to_string()),).page(RUMQueryPageOptions::new().limit(2)).sort(RUMSort::TIMESTAMP_ASCENDING);letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresponse=api.search_rum_events_with_pagination(body);pin_mut!(response);whileletSome(resp)=response.next().await{ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Search RUM events returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);constparams: v2.RUMApiSearchRUMEventsRequest={body:{filter:{from:"now-15m",query:"@type:session AND @session.type:user",to:"now",},options:{timeOffset: 0,timezone:"GMT",},page:{limit: 25,},sort:"timestamp",},};apiInstance.searchRUMEvents(params).then((data: v2.RUMEventsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
/**
* Search RUM events returns "OK" response with pagination
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);constparams: v2.RUMApiSearchRUMEventsRequest={body:{filter:{from:"now-15m",query:"@type:session AND @session.type:user",to:"now",},options:{timeOffset: 0,timezone:"GMT",},page:{limit: 2,},sort:"timestamp",},};(async()=>{try{forawait(constitemofapiInstance.searchRUMEventsWithPagination(params)){console.log(item);}}catch(error){console.error(error);}})();
Response object with all events matching the request and pagination information.
Expand All
フィールド
種類
説明
data
[object]
Array of events matching the request.
attributes
object
JSON object containing all event attributes and their associated values.
attributes
object
JSON object of attributes from RUM events.
service
string
The name of the application or service generating RUM events.
It is used to switch from RUM to APM, so make sure you define the same
value when you use both products.
tags
[string]
Array of tags associated with your event.
timestamp
date-time
Timestamp of your event.
id
string
Unique ID of the event.
type
enum
Type of the event.
Allowed enum values: rum
default: rum
links
object
Links attributes.
next
string
Link for the next set of results. Note that the request can also be made using the
POST endpoint.
meta
object
The metadata associated with a request.
elapsed
int64
The time elapsed in milliseconds.
page
object
Paging attributes.
after
string
The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of page[cursor].
request_id
string
The identifier of the request.
status
enum
The status of the response.
Allowed enum values: done,timeout
warnings
[object]
A list of warnings (non-fatal errors) encountered. Partial results may return if
warnings are present in the response.
code
string
A unique code for this type of warning.
detail
string
A detailed explanation of this specific warning.
title
string
A short human-readable summary of the warning.
{"data":[{"attributes":{"attributes":{"customAttribute":123,"duration":2345},"service":"web-app","tags":["team:A"],"timestamp":"2019-01-02T09:42:36.320Z"},"id":"AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA","type":"rum"}],"links":{"next":"https://app.datadoghq.com/api/v2/rum/event?filter[query]=foo\u0026page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"meta":{"elapsed":132,"page":{"after":"eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"request_id":"MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR","status":"done","warnings":[{"code":"unknown_index","detail":"indexes: foo, bar","title":"One or several indexes are missing or invalid, results hold data from the other indexes"}]}}
"""
Get a list of RUM events returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)response=api_instance.list_rum_events()print(response)
# Get a list of RUM events returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.newpapi_instance.list_rum_events()
// Get a list of RUM events returns "OK" response
packagemainimport("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())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,r,err:=api.ListRUMEvents(ctx,*datadogV2.NewListRUMEventsOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.ListRUMEvents`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RUMApi.ListRUMEvents`:\n%s\n",responseContent)}
// Get a list of RUM events returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumApi;importcom.datadog.api.client.v2.model.RUMEventsResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);try{RUMEventsResponseresult=apiInstance.listRUMEvents();System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumApi#listRUMEvents");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get a list of RUM events returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::ListRUMEventsOptionalParams;usedatadog_api_client::datadogV2::api_rum::RUMAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.list_rum_events(ListRUMEventsOptionalParams::default()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get a list of RUM events returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);apiInstance.listRUMEvents().then((data: v2.RUMEventsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The list of metrics or timeseries to compute for the retrieved buckets.
aggregation [required]
enum
An aggregation function.
Allowed enum values: count,cardinality,pc75,pc90,pc95,pc98,pc99,sum,min,max,avg,median
interval
string
The time buckets' size (only used for type=timeseries)
Defaults to a resolution of 150 points.
metric
string
The metric to use.
type
enum
The type of compute.
Allowed enum values: timeseries,total
default: total
filter
object
The search and filter query settings.
from
string
The minimum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, and the Z UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds).
default: now-15m
query
string
The search query following the RUM search syntax.
default: *
to
string
The maximum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, and the Z UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds).
default: now
group_by
[object]
The rules for the group by.
facet [required]
string
The name of the facet to use (required).
histogram
object
Used to perform a histogram computation (only for measure facets).
Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval.
interval [required]
double
The bin size of the histogram buckets.
max [required]
double
The maximum value for the measure used in the histogram
(values greater than this one are filtered out).
min [required]
double
The minimum value for the measure used in the histogram
(values smaller than this one are filtered out).
limit
int64
The maximum buckets to return for this group-by.
default: 10
missing
<oneOf>
The value to use for logs that don't have the facet used to group by.
Option 1
string
The missing value to use if there is string valued facet.
Option 2
double
The missing value to use if there is a number valued facet.
sort
object
A sort rule.
aggregation
enum
An aggregation function.
Allowed enum values: count,cardinality,pc75,pc90,pc95,pc98,pc99,sum,min,max,avg,median
metric
string
The metric to sort by (only used for type=measure).
order
enum
The order to use, ascending or descending.
Allowed enum values: asc,desc
type
enum
The type of sorting algorithm.
Allowed enum values: alphabetical,measure
default: alphabetical
total
<oneOf>
A resulting object to put the given computes in over all the matching records.
Option 1
boolean
If set to true, creates an additional bucket labeled "$facet_total".
Option 2
string
A string to use as the key value for the total bucket.
Option 3
double
A number to use as the key value for the total bucket.
options
object
Global query options that are used during the query.
Note: Only supply timezone or time offset, not both. Otherwise, the query fails.
time_offset
int64
The time offset (in seconds) to apply to the query.
timezone
string
The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York).
default: UTC
page
object
Paging attributes for listing events.
cursor
string
List following results with a cursor provided in the previous query.
limit
int32
Maximum number of events in the response.
default: 10
{"compute":[{"aggregation":"pc90","metric":"@view.time_spent","type":"total"}],"filter":{"from":"now-15m","query":"@type:view AND @session.type:user","to":"now"},"group_by":[{"facet":"@view.time_spent","limit":10,"total":false}],"options":{"timezone":"GMT"},"page":{"limit":25}}
The response object for the RUM events aggregate API endpoint.
Expand All
フィールド
種類
説明
data
object
The query results.
buckets
[object]
The list of matching buckets, one item per bucket.
by
object
The key-value pairs for each group-by.
<any-key>
string
The values for each group-by.
computes
object
A map of the metric name to value for regular compute, or a list of values for a timeseries.
<any-key>
<oneOf>
A bucket value, can be either a timeseries or a single value.
Option 1
string
A single string value.
Option 2
double
A single number value.
Option 3
[object]
A timeseries array.
time
date-time
The time value for this point.
value
double
The value for this point.
links
object
Links attributes.
next
string
Link for the next set of results. Note that the request can also be made using the
POST endpoint.
meta
object
The metadata associated with a request.
elapsed
int64
The time elapsed in milliseconds.
page
object
Paging attributes.
after
string
The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of page[cursor].
request_id
string
The identifier of the request.
status
enum
The status of the response.
Allowed enum values: done,timeout
warnings
[object]
A list of warnings (non-fatal errors) encountered. Partial results may return if
warnings are present in the response.
code
string
A unique code for this type of warning.
detail
string
A detailed explanation of this specific warning.
title
string
A short human-readable summary of the warning.
{"data":{"buckets":[{"by":{"<any-key>":"string"},"computes":{"<any-key>":{"description":"undefined","type":"undefined"}}}]},"links":{"next":"https://app.datadoghq.com/api/v2/rum/event?filter[query]=foo\u0026page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"meta":{"elapsed":132,"page":{"after":"eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"request_id":"MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR","status":"done","warnings":[{"code":"unknown_index","detail":"indexes: foo, bar","title":"One or several indexes are missing or invalid, results hold data from the other indexes"}]}}
// Aggregate RUM events returns "OK" response
packagemainimport("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(){body:=datadogV2.RUMAggregateRequest{Compute:[]datadogV2.RUMCompute{{Aggregation:datadogV2.RUMAGGREGATIONFUNCTION_PERCENTILE_90,Metric:datadog.PtrString("@view.time_spent"),Type:datadogV2.RUMCOMPUTETYPE_TOTAL.Ptr(),},},Filter:&datadogV2.RUMQueryFilter{From:datadog.PtrString("now-15m"),Query:datadog.PtrString("@type:view AND @session.type:user"),To:datadog.PtrString("now"),},GroupBy:[]datadogV2.RUMGroupBy{{Facet:"@view.time_spent",Limit:datadog.PtrInt64(10),Total:&datadogV2.RUMGroupByTotal{RUMGroupByTotalBoolean:datadog.PtrBool(false)},},},Options:&datadogV2.RUMQueryOptions{Timezone:datadog.PtrString("GMT"),},Page:&datadogV2.RUMQueryPageOptions{Limit:datadog.PtrInt32(25),},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,r,err:=api.AggregateRUMEvents(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.AggregateRUMEvents`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RUMApi.AggregateRUMEvents`:\n%s\n",responseContent)}
"""
Aggregate RUM events returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApifromdatadog_api_client.v2.model.rum_aggregate_requestimportRUMAggregateRequestfromdatadog_api_client.v2.model.rum_aggregation_functionimportRUMAggregationFunctionfromdatadog_api_client.v2.model.rum_computeimportRUMComputefromdatadog_api_client.v2.model.rum_compute_typeimportRUMComputeTypefromdatadog_api_client.v2.model.rum_group_byimportRUMGroupByfromdatadog_api_client.v2.model.rum_query_filterimportRUMQueryFilterfromdatadog_api_client.v2.model.rum_query_optionsimportRUMQueryOptionsfromdatadog_api_client.v2.model.rum_query_page_optionsimportRUMQueryPageOptionsbody=RUMAggregateRequest(compute=[RUMCompute(aggregation=RUMAggregationFunction.PERCENTILE_90,metric="@view.time_spent",type=RUMComputeType.TOTAL,),],filter=RUMQueryFilter(_from="now-15m",query="@type:view AND @session.type:user",to="now",),group_by=[RUMGroupBy(facet="@view.time_spent",limit=10,total=False,),],options=RUMQueryOptions(timezone="GMT",),page=RUMQueryPageOptions(limit=25,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)response=api_instance.aggregate_rum_events(body=body)print(response)
# Aggregate RUM events returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.newbody=DatadogAPIClient::V2::RUMAggregateRequest.new({compute:[DatadogAPIClient::V2::RUMCompute.new({aggregation:DatadogAPIClient::V2::RUMAggregationFunction::PERCENTILE_90,metric:"@view.time_spent",type:DatadogAPIClient::V2::RUMComputeType::TOTAL,}),],filter:DatadogAPIClient::V2::RUMQueryFilter.new({from:"now-15m",query:"@type:view AND @session.type:user",to:"now",}),group_by:[DatadogAPIClient::V2::RUMGroupBy.new({facet:"@view.time_spent",limit:10,total:false,}),],options:DatadogAPIClient::V2::RUMQueryOptions.new({timezone:"GMT",}),page:DatadogAPIClient::V2::RUMQueryPageOptions.new({limit:25,}),})papi_instance.aggregate_rum_events(body)
// Aggregate RUM events returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;usedatadog_api_client::datadogV2::model::RUMAggregateRequest;usedatadog_api_client::datadogV2::model::RUMAggregationFunction;usedatadog_api_client::datadogV2::model::RUMCompute;usedatadog_api_client::datadogV2::model::RUMComputeType;usedatadog_api_client::datadogV2::model::RUMGroupBy;usedatadog_api_client::datadogV2::model::RUMGroupByTotal;usedatadog_api_client::datadogV2::model::RUMQueryFilter;usedatadog_api_client::datadogV2::model::RUMQueryOptions;usedatadog_api_client::datadogV2::model::RUMQueryPageOptions;#[tokio::main]asyncfnmain(){letbody=RUMAggregateRequest::new().compute(vec![RUMCompute::new(RUMAggregationFunction::PERCENTILE_90).metric("@view.time_spent".to_string()).type_(RUMComputeType::TOTAL)]).filter(RUMQueryFilter::new().from("now-15m".to_string()).query("@type:view AND @session.type:user".to_string()).to("now".to_string()),).group_by(vec![RUMGroupBy::new("@view.time_spent".to_string()).limit(10).total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))]).options(RUMQueryOptions::new().timezone("GMT".to_string())).page(RUMQueryPageOptions::new().limit(25));letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.aggregate_rum_events(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Aggregate RUM events returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);constparams: v2.RUMApiAggregateRUMEventsRequest={body:{compute:[{aggregation:"pc90",metric:"@view.time_spent",type:"total",},],filter:{from:"now-15m",query:"@type:view AND @session.type:user",to:"now",},groupBy:[{facet:"@view.time_spent",limit: 10,total: false,},],options:{timezone:"GMT",},page:{limit: 25,},},};apiInstance.aggregateRUMEvents(params).then((data: v2.RUMAnalyticsAggregateResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update a RUM application returns "OK" response
packagemainimport("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 "rum_application" in the system
RumApplicationDataID:=os.Getenv("RUM_APPLICATION_DATA_ID")body:=datadogV2.RUMApplicationUpdateRequest{Data:datadogV2.RUMApplicationUpdate{Attributes:&datadogV2.RUMApplicationUpdateAttributes{Name:datadog.PtrString("updated_name_for_my_existing_rum_application"),Type:datadog.PtrString("browser"),},Id:RumApplicationDataID,Type:datadogV2.RUMAPPLICATIONUPDATETYPE_RUM_APPLICATION_UPDATE,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,r,err:=api.UpdateRUMApplication(ctx,RumApplicationDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.UpdateRUMApplication`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RUMApi.UpdateRUMApplication`:\n%s\n",responseContent)}
// Update a RUM application returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumApi;importcom.datadog.api.client.v2.model.RUMApplicationResponse;importcom.datadog.api.client.v2.model.RUMApplicationUpdate;importcom.datadog.api.client.v2.model.RUMApplicationUpdateAttributes;importcom.datadog.api.client.v2.model.RUMApplicationUpdateRequest;importcom.datadog.api.client.v2.model.RUMApplicationUpdateType;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);// there is a valid "rum_application" in the systemStringRUM_APPLICATION_DATA_ID=System.getenv("RUM_APPLICATION_DATA_ID");RUMApplicationUpdateRequestbody=newRUMApplicationUpdateRequest().data(newRUMApplicationUpdate().attributes(newRUMApplicationUpdateAttributes().name("updated_name_for_my_existing_rum_application").type("browser")).id(RUM_APPLICATION_DATA_ID).type(RUMApplicationUpdateType.RUM_APPLICATION_UPDATE));try{RUMApplicationResponseresult=apiInstance.updateRUMApplication(RUM_APPLICATION_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumApi#updateRUMApplication");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update a RUM application returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApifromdatadog_api_client.v2.model.rum_application_updateimportRUMApplicationUpdatefromdatadog_api_client.v2.model.rum_application_update_attributesimportRUMApplicationUpdateAttributesfromdatadog_api_client.v2.model.rum_application_update_requestimportRUMApplicationUpdateRequestfromdatadog_api_client.v2.model.rum_application_update_typeimportRUMApplicationUpdateType# there is a valid "rum_application" in the systemRUM_APPLICATION_DATA_ID=environ["RUM_APPLICATION_DATA_ID"]body=RUMApplicationUpdateRequest(data=RUMApplicationUpdate(attributes=RUMApplicationUpdateAttributes(name="updated_name_for_my_existing_rum_application",type="browser",),id=RUM_APPLICATION_DATA_ID,type=RUMApplicationUpdateType.RUM_APPLICATION_UPDATE,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)response=api_instance.update_rum_application(id=RUM_APPLICATION_DATA_ID,body=body)print(response)
# Update a RUM application returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.new# there is a valid "rum_application" in the systemRUM_APPLICATION_DATA_ID=ENV["RUM_APPLICATION_DATA_ID"]body=DatadogAPIClient::V2::RUMApplicationUpdateRequest.new({data:DatadogAPIClient::V2::RUMApplicationUpdate.new({attributes:DatadogAPIClient::V2::RUMApplicationUpdateAttributes.new({name:"updated_name_for_my_existing_rum_application",type:"browser",}),id:RUM_APPLICATION_DATA_ID,type:DatadogAPIClient::V2::RUMApplicationUpdateType::RUM_APPLICATION_UPDATE,}),})papi_instance.update_rum_application(RUM_APPLICATION_DATA_ID,body)
// Update a RUM application returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;usedatadog_api_client::datadogV2::model::RUMApplicationUpdate;usedatadog_api_client::datadogV2::model::RUMApplicationUpdateAttributes;usedatadog_api_client::datadogV2::model::RUMApplicationUpdateRequest;usedatadog_api_client::datadogV2::model::RUMApplicationUpdateType;#[tokio::main]asyncfnmain(){// there is a valid "rum_application" in the system
letrum_application_data_id=std::env::var("RUM_APPLICATION_DATA_ID").unwrap();letbody=RUMApplicationUpdateRequest::new(RUMApplicationUpdate::new(rum_application_data_id.clone(),RUMApplicationUpdateType::RUM_APPLICATION_UPDATE,).attributes(RUMApplicationUpdateAttributes::new().name("updated_name_for_my_existing_rum_application".to_string()).type_("browser".to_string()),),);letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.update_rum_application(rum_application_data_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update a RUM application returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);// there is a valid "rum_application" in the system
constRUM_APPLICATION_DATA_ID=process.env.RUM_APPLICATION_DATA_IDasstring;constparams: v2.RUMApiUpdateRUMApplicationRequest={body:{data:{attributes:{name:"updated_name_for_my_existing_rum_application",type:"browser",},id: RUM_APPLICATION_DATA_ID,type:"rum_application_update",},},id: RUM_APPLICATION_DATA_ID,};apiInstance.updateRUMApplication(params).then((data: v2.RUMApplicationResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Get a RUM application returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApi# there is a valid "rum_application" in the systemRUM_APPLICATION_DATA_ID=environ["RUM_APPLICATION_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)response=api_instance.get_rum_application(id=RUM_APPLICATION_DATA_ID,)print(response)
# Get a RUM application returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.new# there is a valid "rum_application" in the systemRUM_APPLICATION_DATA_ID=ENV["RUM_APPLICATION_DATA_ID"]papi_instance.get_rum_application(RUM_APPLICATION_DATA_ID)
// Get a RUM application returns "OK" response
packagemainimport("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 "rum_application" in the system
RumApplicationDataID:=os.Getenv("RUM_APPLICATION_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,r,err:=api.GetRUMApplication(ctx,RumApplicationDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.GetRUMApplication`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RUMApi.GetRUMApplication`:\n%s\n",responseContent)}
// Get a RUM application returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumApi;importcom.datadog.api.client.v2.model.RUMApplicationResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);// there is a valid "rum_application" in the systemStringRUM_APPLICATION_DATA_ID=System.getenv("RUM_APPLICATION_DATA_ID");try{RUMApplicationResponseresult=apiInstance.getRUMApplication(RUM_APPLICATION_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumApi#getRUMApplication");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get a RUM application returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;#[tokio::main]asyncfnmain(){// there is a valid "rum_application" in the system
letrum_application_data_id=std::env::var("RUM_APPLICATION_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.get_rum_application(rum_application_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get a RUM application returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);// there is a valid "rum_application" in the system
constRUM_APPLICATION_DATA_ID=process.env.RUM_APPLICATION_DATA_IDasstring;constparams: v2.RUMApiGetRUMApplicationRequest={id: RUM_APPLICATION_DATA_ID,};apiInstance.getRUMApplication(params).then((data: v2.RUMApplicationResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Delete a RUM application returns "No Content" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApi# there is a valid "rum_application" in the systemRUM_APPLICATION_DATA_ID=environ["RUM_APPLICATION_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)api_instance.delete_rum_application(id=RUM_APPLICATION_DATA_ID,)
# Delete a RUM application returns "No Content" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.new# there is a valid "rum_application" in the systemRUM_APPLICATION_DATA_ID=ENV["RUM_APPLICATION_DATA_ID"]api_instance.delete_rum_application(RUM_APPLICATION_DATA_ID)
// Delete a RUM application returns "No Content" response
packagemainimport("context""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 "rum_application" in the system
RumApplicationDataID:=os.Getenv("RUM_APPLICATION_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)r,err:=api.DeleteRUMApplication(ctx,RumApplicationDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.DeleteRUMApplication`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete a RUM application returns "No Content" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);// there is a valid "rum_application" in the systemStringRUM_APPLICATION_DATA_ID=System.getenv("RUM_APPLICATION_DATA_ID");try{apiInstance.deleteRUMApplication(RUM_APPLICATION_DATA_ID);}catch(ApiExceptione){System.err.println("Exception when calling RumApi#deleteRUMApplication");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete a RUM application returns "No Content" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;#[tokio::main]asyncfnmain(){// there is a valid "rum_application" in the system
letrum_application_data_id=std::env::var("RUM_APPLICATION_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.delete_rum_application(rum_application_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete a RUM application returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);// there is a valid "rum_application" in the system
constRUM_APPLICATION_DATA_ID=process.env.RUM_APPLICATION_DATA_IDasstring;constparams: v2.RUMApiDeleteRUMApplicationRequest={id: RUM_APPLICATION_DATA_ID,};apiInstance.deleteRUMApplication(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Create a new RUM application returns "OK" response
packagemainimport("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(){body:=datadogV2.RUMApplicationCreateRequest{Data:datadogV2.RUMApplicationCreate{Attributes:datadogV2.RUMApplicationCreateAttributes{Name:"test-rum-5c67ebb32077e1d9",Type:datadog.PtrString("ios"),},Type:datadogV2.RUMAPPLICATIONCREATETYPE_RUM_APPLICATION_CREATE,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,r,err:=api.CreateRUMApplication(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.CreateRUMApplication`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RUMApi.CreateRUMApplication`:\n%s\n",responseContent)}
// Create a new RUM application returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumApi;importcom.datadog.api.client.v2.model.RUMApplicationCreate;importcom.datadog.api.client.v2.model.RUMApplicationCreateAttributes;importcom.datadog.api.client.v2.model.RUMApplicationCreateRequest;importcom.datadog.api.client.v2.model.RUMApplicationCreateType;importcom.datadog.api.client.v2.model.RUMApplicationResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);RUMApplicationCreateRequestbody=newRUMApplicationCreateRequest().data(newRUMApplicationCreate().attributes(newRUMApplicationCreateAttributes().name("test-rum-5c67ebb32077e1d9").type("ios")).type(RUMApplicationCreateType.RUM_APPLICATION_CREATE));try{RUMApplicationResponseresult=apiInstance.createRUMApplication(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumApi#createRUMApplication");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Create a new RUM application returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApifromdatadog_api_client.v2.model.rum_application_createimportRUMApplicationCreatefromdatadog_api_client.v2.model.rum_application_create_attributesimportRUMApplicationCreateAttributesfromdatadog_api_client.v2.model.rum_application_create_requestimportRUMApplicationCreateRequestfromdatadog_api_client.v2.model.rum_application_create_typeimportRUMApplicationCreateTypebody=RUMApplicationCreateRequest(data=RUMApplicationCreate(attributes=RUMApplicationCreateAttributes(name="test-rum-5c67ebb32077e1d9",type="ios",),type=RUMApplicationCreateType.RUM_APPLICATION_CREATE,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)response=api_instance.create_rum_application(body=body)print(response)
# Create a new RUM application returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.newbody=DatadogAPIClient::V2::RUMApplicationCreateRequest.new({data:DatadogAPIClient::V2::RUMApplicationCreate.new({attributes:DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({name:"test-rum-5c67ebb32077e1d9",type:"ios",}),type:DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE,}),})papi_instance.create_rum_application(body)
// Create a new RUM application returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;usedatadog_api_client::datadogV2::model::RUMApplicationCreate;usedatadog_api_client::datadogV2::model::RUMApplicationCreateAttributes;usedatadog_api_client::datadogV2::model::RUMApplicationCreateRequest;usedatadog_api_client::datadogV2::model::RUMApplicationCreateType;#[tokio::main]asyncfnmain(){letbody=RUMApplicationCreateRequest::new(RUMApplicationCreate::new(RUMApplicationCreateAttributes::new("test-rum-5c67ebb32077e1d9".to_string()).type_("ios".to_string()),RUMApplicationCreateType::RUM_APPLICATION_CREATE,));letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.create_rum_application(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Create a new RUM application returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);constparams: v2.RUMApiCreateRUMApplicationRequest={body:{data:{attributes:{name:"test-rum-5c67ebb32077e1d9",type:"ios",},type:"rum_application_create",},},};apiInstance.createRUMApplication(params).then((data: v2.RUMApplicationResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
List all the RUM applications returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.rum_apiimportRUMApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=RUMApi(api_client)response=api_instance.get_rum_applications()print(response)
# List all the RUM applications returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::RUMAPI.newpapi_instance.get_rum_applications()
// List all the RUM applications returns "OK" response
packagemainimport("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())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewRUMApi(apiClient)resp,r,err:=api.GetRUMApplications(ctx)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `RUMApi.GetRUMApplications`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `RUMApi.GetRUMApplications`:\n%s\n",responseContent)}
// List all the RUM applications returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.RumApi;importcom.datadog.api.client.v2.model.RUMApplicationsResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();RumApiapiInstance=newRumApi(defaultClient);try{RUMApplicationsResponseresult=apiInstance.getRUMApplications();System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling RumApi#getRUMApplications");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// List all the RUM applications returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_rum::RUMAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=RUMAPI::with_config(configuration);letresp=api.get_rum_applications().await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List all the RUM applications returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.RUMApi(configuration);apiInstance.getRUMApplications().then((data: v2.RUMApplicationsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));