Skip to content

Commit 535c8bb

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit da8834e1 of spec repo (#683)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent ae48797 commit 535c8bb

File tree

13 files changed

+410
-14
lines changed

13 files changed

+410
-14
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-05-19 13:46:02.637449",
8-
"spec_repo_commit": "dc18f74b"
7+
"regenerated": "2022-05-19 19:13:23.823605",
8+
"spec_repo_commit": "da8834e1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-05-19 13:46:02.653894",
13-
"spec_repo_commit": "dc18f74b"
12+
"regenerated": "2022-05-19 19:13:23.842654",
13+
"spec_repo_commit": "da8834e1"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10872,6 +10872,50 @@ components:
1087210872
format: int64
1087310873
type: integer
1087410874
type: object
10875+
SyntheticsBrowserTestRumSettings:
10876+
description: 'The RUM data collection settings for the Synthetic browser test.
10877+
10878+
**Note:** There are 3 ways to format RUM settings:
10879+
10880+
10881+
`{ isEnabled: false }`
10882+
10883+
RUM data is not collected.
10884+
10885+
10886+
`{ isEnabled: true }`
10887+
10888+
RUM data is collected from the Synthetic test''s default application.
10889+
10890+
10891+
`{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
10892+
clientTokenId: 12345 }`
10893+
10894+
RUM data is collected using the specified application.'
10895+
example:
10896+
applicationId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
10897+
clientTokenId: 12345
10898+
isEnabled: true
10899+
properties:
10900+
applicationId:
10901+
description: RUM application ID used to collect RUM data for the browser
10902+
test.
10903+
example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
10904+
type: string
10905+
clientTokenId:
10906+
description: RUM application API key ID used to collect RUM data for the
10907+
browser test.
10908+
example: 12345
10909+
format: int64
10910+
type: integer
10911+
x-secret: true
10912+
isEnabled:
10913+
description: Determines whether RUM data is collected during test runs.
10914+
example: true
10915+
type: boolean
10916+
required:
10917+
- isEnabled
10918+
type: object
1087510919
SyntheticsBrowserTestType:
1087610920
default: browser
1087710921
description: Type of the Synthetic test, `browser`.
@@ -11967,6 +12011,8 @@ components:
1196712011
$ref: '#/components/schemas/SyntheticsRestrictedRoles'
1196812012
retry:
1196912013
$ref: '#/components/schemas/SyntheticsTestOptionsRetry'
12014+
rumSettings:
12015+
$ref: '#/components/schemas/SyntheticsBrowserTestRumSettings'
1197012016
tick_every:
1197112017
description: The frequency at which to run the Synthetic test (in seconds).
1197212018
format: int64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2022-05-18T13:08:12.878Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"log": {
3+
"_recordingName": "Synthetics/Create a browser test returns \"OK - Returns saved rumSettings.\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "19ad0a979b5d2b9976ec73b74de0cf7c",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 848,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 585,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"method\":\"GET\",\"url\":\"https://datadoghq.com\"},\"setCookie\":\"name:test\"},\"locations\":[\"aws:us-east-2\"],\"message\":\"Test message\",\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1652879292\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"device_ids\":[\"tablet\"],\"disableCors\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":3,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":123456,\"isEnabled\":true},\"tick_every\":300},\"steps\":[{\"allowFailure\":false,\"isCritical\":true,\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\"}],\"tags\":[\"testing:browser\"],\"type\":\"browser\"}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/browser"
39+
},
40+
"response": {
41+
"bodySize": 1045,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 1045,
45+
"text": "{\"status\":\"paused\",\"public_id\":\"wfe-m7p-h4b\",\"tags\":[\"testing:browser\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"Test message\",\"deleted_at\":null,\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1652879292\",\"monitor_id\":71860323,\"type\":\"browser\",\"created_at\":\"2022-05-18T13:08:13.276145+00:00\",\"modified_at\":\"2022-05-18T13:08:13.276145+00:00\",\"steps\":[{\"name\":\"Refresh page\",\"allowFailure\":false,\"params\":{},\"isCritical\":true,\"type\":\"refresh\"}],\"config\":{\"setCookie\":\"name:test\",\"request\":{\"url\":\"https://datadoghq.com\",\"method\":\"GET\"},\"assertions\":[],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":10},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"noScreenshot\":true,\"rumSettings\":{\"isEnabled\":true,\"applicationId\":\"mockApplicationId\",\"clientTokenId\":123456},\"disableCors\":true,\"device_ids\":[\"tablet\"],\"tick_every\":300}}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 667,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2022-05-18T13:08:12.898Z",
61+
"time": 426
62+
},
63+
{
64+
"_id": "76fc582c80fc7ec5dbafdb295ed98df2",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 30,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
},
76+
{
77+
"_fromType": "array",
78+
"name": "content-type",
79+
"value": "application/json"
80+
}
81+
],
82+
"headersSize": 568,
83+
"httpVersion": "HTTP/1.1",
84+
"method": "POST",
85+
"postData": {
86+
"mimeType": "application/json",
87+
"params": [],
88+
"text": "{\"public_ids\":[\"wfe-m7p-h4b\"]}"
89+
},
90+
"queryString": [],
91+
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/delete"
92+
},
93+
"response": {
94+
"bodySize": 95,
95+
"content": {
96+
"mimeType": "application/json",
97+
"size": 95,
98+
"text": "{\"deleted_tests\":[{\"deleted_at\":\"2022-05-18T13:08:18.431221+00:00\",\"public_id\":\"wfe-m7p-h4b\"}]}"
99+
},
100+
"cookies": [],
101+
"headers": [
102+
{
103+
"name": "content-type",
104+
"value": "application/json"
105+
}
106+
],
107+
"headersSize": 665,
108+
"httpVersion": "HTTP/1.1",
109+
"redirectURL": "",
110+
"status": 200,
111+
"statusText": "OK"
112+
},
113+
"startedDateTime": "2022-05-18T13:08:13.336Z",
114+
"time": 5178
115+
}
116+
],
117+
"pages": [],
118+
"version": "1.2"
119+
}
120+
}

examples/v1/synthetics/CreateSyntheticsAPITest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
3030
monitorOptions: {},
3131
restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
3232
retry: {},
33+
rumSettings: {
34+
applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
35+
clientTokenId: 12345,
36+
isEnabled: true,
37+
},
3338
},
3439
status: "live",
3540
subtype: "http",
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Create a browser test returns "OK - Returns saved rumSettings." response
3+
*/
4+
5+
import { v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = v1.createConfiguration();
8+
const apiInstance = new v1.SyntheticsApi(configuration);
9+
10+
const params: v1.SyntheticsApiCreateSyntheticsBrowserTestRequest = {
11+
body: {
12+
config: {
13+
assertions: [],
14+
configVariables: [
15+
{
16+
example: "content-type",
17+
name: "PROPERTY",
18+
pattern: "content-type",
19+
type: "text",
20+
},
21+
],
22+
request: {
23+
method: "GET",
24+
url: "https://datadoghq.com",
25+
},
26+
setCookie: "name:test",
27+
},
28+
locations: ["aws:us-east-2"],
29+
message: "Test message",
30+
name: "Example-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response",
31+
options: {
32+
acceptSelfSigned: false,
33+
allowInsecure: true,
34+
deviceIds: ["tablet"],
35+
disableCors: true,
36+
followRedirects: true,
37+
minFailureDuration: 10,
38+
minLocationFailed: 1,
39+
noScreenshot: true,
40+
retry: {
41+
count: 3,
42+
interval: 10,
43+
},
44+
rumSettings: {
45+
isEnabled: true,
46+
applicationId: "mockApplicationId",
47+
clientTokenId: 123456,
48+
},
49+
tickEvery: 300,
50+
},
51+
tags: ["testing:browser"],
52+
type: "browser",
53+
steps: [
54+
{
55+
allowFailure: false,
56+
isCritical: true,
57+
name: "Refresh page",
58+
params: {},
59+
type: "refresh",
60+
},
61+
],
62+
},
63+
};
64+
65+
apiInstance
66+
.createSyntheticsBrowserTest(params)
67+
.then((data: v1.SyntheticsBrowserTest) => {
68+
console.log(
69+
"API called successfully. Returned data: " + JSON.stringify(data)
70+
);
71+
})
72+
.catch((error: any) => console.error(error));

examples/v1/synthetics/UpdateBrowserTest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ const params: v1.SyntheticsApiUpdateBrowserTestRequest = {
4848
monitorOptions: {},
4949
restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
5050
retry: {},
51+
rumSettings: {
52+
applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
53+
clientTokenId: 12345,
54+
isEnabled: true,
55+
},
5156
},
5257
status: "live",
5358
steps: [

0 commit comments

Comments
 (0)