Skip to content

Commit b9c4357

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 73c3295 of spec repo
1 parent 3e5052d commit b9c4357

File tree

113 files changed

+9466
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+9466
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1686 additions & 0 deletions
Large diffs are not rendered by default.

examples/v2/cohort/GetRumCohort.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Get rum cohort returns "Successful response with cohort analysis data" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getRumCohort"] = true;
9+
const apiInstance = new v2.CohortApi(configuration);
10+
11+
const params: v2.CohortApiGetRumCohortRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
definition: {
16+
audienceFilters: {
17+
accounts: [
18+
{
19+
name: "",
20+
},
21+
],
22+
segments: [
23+
{
24+
name: "",
25+
segmentId: "",
26+
},
27+
],
28+
users: [
29+
{
30+
name: "",
31+
},
32+
],
33+
},
34+
},
35+
time: {},
36+
},
37+
type: "cohort_request",
38+
},
39+
},
40+
};
41+
42+
apiInstance
43+
.getRumCohort(params)
44+
.then((data: v2.GetCohortResponse) => {
45+
console.log(
46+
"API called successfully. Returned data: " + JSON.stringify(data)
47+
);
48+
})
49+
.catch((error: any) => console.error(error));
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Get rum cohort users returns "Successful response with cohort users" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getRumCohortUsers"] = true;
9+
const apiInstance = new v2.CohortApi(configuration);
10+
11+
const params: v2.CohortApiGetRumCohortUsersRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
definition: {
16+
audienceFilters: {
17+
accounts: [
18+
{
19+
name: "",
20+
},
21+
],
22+
segments: [
23+
{
24+
name: "",
25+
segmentId: "",
26+
},
27+
],
28+
users: [
29+
{
30+
name: "",
31+
},
32+
],
33+
},
34+
},
35+
time: {},
36+
},
37+
type: "cohort_users_request",
38+
},
39+
},
40+
};
41+
42+
apiInstance
43+
.getRumCohortUsers(params)
44+
.then((data: v2.GetCohortUsersResponse) => {
45+
console.log(
46+
"API called successfully. Returned data: " + JSON.stringify(data)
47+
);
48+
})
49+
.catch((error: any) => console.error(error));

examples/v2/funnel/GetRumFunnel.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* Get rum funnel returns "Successful response with funnel analysis data" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getRumFunnel"] = true;
9+
const apiInstance = new v2.FunnelApi(configuration);
10+
11+
const params: v2.FunnelApiGetRumFunnelRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
dataSource: "rum",
16+
enforcedExecutionType: "",
17+
requestId: "",
18+
search: {
19+
crossSessionFilter: "",
20+
queryString: "@type:view",
21+
steps: [
22+
{
23+
facet: "@view.name",
24+
stepFilter: "",
25+
value: "/apm/home",
26+
},
27+
{
28+
facet: "@view.name",
29+
stepFilter: "",
30+
value: "/apm/traces",
31+
},
32+
],
33+
subqueryId: "",
34+
},
35+
time: {
36+
from: 1756425600000,
37+
to: 1756857600000,
38+
},
39+
},
40+
id: "funnel_request",
41+
type: "funnel_request",
42+
},
43+
},
44+
};
45+
46+
apiInstance
47+
.getRumFunnel(params)
48+
.then((data: v2.FunnelResponse) => {
49+
console.log(
50+
"API called successfully. Returned data: " + JSON.stringify(data)
51+
);
52+
})
53+
.catch((error: any) => console.error(error));
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Get rum funnel step suggestions returns "Successful response with funnel step suggestions" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getRumFunnelStepSuggestions"] = true;
9+
const apiInstance = new v2.FunnelApi(configuration);
10+
11+
const params: v2.FunnelApiGetRumFunnelStepSuggestionsRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
dataSource: "",
16+
search: {
17+
crossSessionFilter: "",
18+
queryString: "@type:view",
19+
steps: [
20+
{
21+
facet: "@view.name",
22+
stepFilter: "",
23+
value: "/apm/home",
24+
},
25+
],
26+
subqueryId: "",
27+
},
28+
termSearch: {
29+
query: "apm",
30+
},
31+
time: {
32+
from: 1756425600000,
33+
to: 1756857600000,
34+
},
35+
},
36+
id: "funnel_suggestion_request",
37+
type: "funnel_suggestion_request",
38+
},
39+
},
40+
};
41+
42+
apiInstance
43+
.getRumFunnelStepSuggestions(params)
44+
.then((data: v2.FunnelSuggestionResponse) => {
45+
console.log(
46+
"API called successfully. Returned data: " + JSON.stringify(data)
47+
);
48+
})
49+
.catch((error: any) => console.error(error));
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Create rum segment returns "Segment created successfully" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createRumSegment"] = true;
9+
const apiInstance = new v2.SegmentsApi(configuration);
10+
11+
const params: v2.SegmentsApiCreateRumSegmentRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
createdAt: new Date(1, 1, 1, 0, 0, 0, 0),
16+
createdBy: {
17+
handle: "",
18+
id: "",
19+
uuid: "",
20+
},
21+
dataQuery: {
22+
eventPlatform: [
23+
{
24+
facet: "@usr.id",
25+
from: "2025-08-01",
26+
name: "high_value_users",
27+
query:
28+
"@type:view @view.name:/logs @usr.session_duration:>300000",
29+
to: "2025-09-01",
30+
},
31+
],
32+
},
33+
description:
34+
"Users who frequently visit logs and have high session duration",
35+
modifiedAt: new Date(1, 1, 1, 0, 0, 0, 0),
36+
modifiedBy: {
37+
handle: "",
38+
id: "",
39+
uuid: "",
40+
},
41+
name: "High-Value Users",
42+
orgId: 123456,
43+
source: 0,
44+
tags: ["high-value", "logs", "active"],
45+
version: 1,
46+
},
47+
id: "segment-12345",
48+
type: "segment",
49+
},
50+
},
51+
};
52+
53+
apiInstance
54+
.createRumSegment(params)
55+
.then((data: v2.Segment) => {
56+
console.log(
57+
"API called successfully. Returned data: " + JSON.stringify(data)
58+
);
59+
})
60+
.catch((error: any) => console.error(error));
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Initialize rum segments returns "Default segments created successfully" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.initializeRumSegments"] = true;
9+
const apiInstance = new v2.SegmentsApi(configuration);
10+
11+
apiInstance
12+
.initializeRumSegments()
13+
.then((data: any) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.catch((error: any) => console.error(error));
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* List rum segments returns "Successful response with list of segments" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listRumSegments"] = true;
9+
const apiInstance = new v2.SegmentsApi(configuration);
10+
11+
apiInstance
12+
.listRumSegments()
13+
.then((data: v2.SegmentArray) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.catch((error: any) => console.error(error));
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* Get rum sankey returns "Successful response with Sankey diagram data" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getRumSankey"] = true;
9+
const apiInstance = new v2.UserFlowApi(configuration);
10+
11+
const params: v2.UserFlowApiGetRumSankeyRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
dataSource: "",
16+
definition: {
17+
entriesPerStep: 10,
18+
numberOfSteps: 5,
19+
source: "@view.name",
20+
target: "@view.name",
21+
},
22+
enforcedExecutionType: "",
23+
requestId: "",
24+
sampling: {
25+
enabled: true,
26+
},
27+
search: {
28+
audienceFilters: {},
29+
query: "@type:view @application.id:*",
30+
subqueryId: "",
31+
},
32+
time: {
33+
from: 1756425600000,
34+
to: 1756857600000,
35+
},
36+
},
37+
id: "sankey_request",
38+
type: "sankey_request",
39+
},
40+
},
41+
};
42+
43+
apiInstance
44+
.getRumSankey(params)
45+
.then((data: v2.SankeyResponse) => {
46+
console.log(
47+
"API called successfully. Returned data: " + JSON.stringify(data)
48+
);
49+
})
50+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)