Skip to content

Commit 65379c1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Sync rum-replay endpoints with backend for public documentation (#3413)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a0bd579 commit 65379c1

66 files changed

Lines changed: 6931 additions & 0 deletions

File tree

Some content is hidden

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

.generator/schemas/v2/openapi.yaml

Lines changed: 1113 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Create replay heatmap snapshot returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayHeatmapsApi(configuration);
9+
10+
const params: v2.RumReplayHeatmapsApiCreateReplayHeatmapSnapshotRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
applicationId: "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb",
15+
deviceType: "desktop",
16+
eventId: "11111111-2222-3333-4444-555555555555",
17+
isDeviceTypeSelectedByUser: false,
18+
snapshotName: "My Snapshot",
19+
start: 0,
20+
viewName: "/home",
21+
},
22+
type: "snapshots",
23+
},
24+
},
25+
};
26+
27+
apiInstance
28+
.createReplayHeatmapSnapshot(params)
29+
.then((data: v2.Snapshot) => {
30+
console.log(
31+
"API called successfully. Returned data: " + JSON.stringify(data)
32+
);
33+
})
34+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Delete replay heatmap snapshot returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayHeatmapsApi(configuration);
9+
10+
const params: v2.RumReplayHeatmapsApiDeleteReplayHeatmapSnapshotRequest = {
11+
snapshotId: "00000000-0000-0000-0000-000000000001",
12+
};
13+
14+
apiInstance
15+
.deleteReplayHeatmapSnapshot(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* List replay heatmap snapshots returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayHeatmapsApi(configuration);
9+
10+
const params: v2.RumReplayHeatmapsApiListReplayHeatmapSnapshotsRequest = {
11+
filterViewName: "/home",
12+
};
13+
14+
apiInstance
15+
.listReplayHeatmapSnapshots(params)
16+
.then((data: v2.SnapshotArray) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Update replay heatmap snapshot returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayHeatmapsApi(configuration);
9+
10+
const params: v2.RumReplayHeatmapsApiUpdateReplayHeatmapSnapshotRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
eventId: "11111111-2222-3333-4444-555555555555",
15+
isDeviceTypeSelectedByUser: false,
16+
start: 0,
17+
},
18+
id: "00000000-0000-0000-0000-000000000001",
19+
type: "snapshots",
20+
},
21+
},
22+
snapshotId: "00000000-0000-0000-0000-000000000001",
23+
};
24+
25+
apiInstance
26+
.updateReplayHeatmapSnapshot(params)
27+
.then((data: v2.Snapshot) => {
28+
console.log(
29+
"API called successfully. Returned data: " + JSON.stringify(data)
30+
);
31+
})
32+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Add rum replay session to playlist returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayPlaylistsApi(configuration);
9+
10+
const params: v2.RumReplayPlaylistsApiAddRumReplaySessionToPlaylistRequest = {
11+
ts: 1704067200000,
12+
playlistId: 1234567,
13+
sessionId: "00000000-0000-0000-0000-000000000001",
14+
};
15+
16+
apiInstance
17+
.addRumReplaySessionToPlaylist(params)
18+
.then((data: v2.PlaylistsSession) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Bulk remove rum replay playlist sessions returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayPlaylistsApi(configuration);
9+
10+
const params: v2.RumReplayPlaylistsApiBulkRemoveRumReplayPlaylistSessionsRequest =
11+
{
12+
body: {
13+
data: [
14+
{
15+
id: "00000000-0000-0000-0000-000000000001",
16+
type: "rum_replay_session",
17+
},
18+
],
19+
},
20+
playlistId: 1234567,
21+
};
22+
23+
apiInstance
24+
.bulkRemoveRumReplayPlaylistSessions(params)
25+
.then((data: any) => {
26+
console.log(
27+
"API called successfully. Returned data: " + JSON.stringify(data)
28+
);
29+
})
30+
.catch((error: any) => console.error(error));
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Create rum replay playlist returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayPlaylistsApi(configuration);
9+
10+
const params: v2.RumReplayPlaylistsApiCreateRumReplayPlaylistRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
createdBy: {
15+
handle: "john.doe@example.com",
16+
id: "00000000-0000-0000-0000-000000000001",
17+
uuid: "00000000-0000-0000-0000-000000000001",
18+
},
19+
name: "My Playlist",
20+
},
21+
type: "rum_replay_playlist",
22+
},
23+
},
24+
};
25+
26+
apiInstance
27+
.createRumReplayPlaylist(params)
28+
.then((data: v2.Playlist) => {
29+
console.log(
30+
"API called successfully. Returned data: " + JSON.stringify(data)
31+
);
32+
})
33+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Delete rum replay playlist returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayPlaylistsApi(configuration);
9+
10+
const params: v2.RumReplayPlaylistsApiDeleteRumReplayPlaylistRequest = {
11+
playlistId: 1234567,
12+
};
13+
14+
apiInstance
15+
.deleteRumReplayPlaylist(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Get rum replay playlist returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.RumReplayPlaylistsApi(configuration);
9+
10+
const params: v2.RumReplayPlaylistsApiGetRumReplayPlaylistRequest = {
11+
playlistId: 1234567,
12+
};
13+
14+
apiInstance
15+
.getRumReplayPlaylist(params)
16+
.then((data: v2.Playlist) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)