Skip to content

Commit 2eb8d73

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add OpenAPI spec for v2 Synthetics test result endpoints (#3970)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 02646f9 commit 2eb8d73

96 files changed

Lines changed: 10585 additions & 163 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: 2457 additions & 74 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Get a browser test result 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.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiGetSyntheticsBrowserTestResultRequest = {
11+
publicId: "public_id",
12+
resultId: "result_id",
13+
};
14+
15+
apiInstance
16+
.getSyntheticsBrowserTestResult(params)
17+
.then((data: v2.SyntheticsTestResultResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Get a test result 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.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiGetSyntheticsTestResultRequest = {
11+
publicId: "public_id",
12+
resultId: "result_id",
13+
};
14+
15+
apiInstance
16+
.getSyntheticsTestResult(params)
17+
.then((data: v2.SyntheticsTestResultResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.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 a browser test's latest results 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.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiListSyntheticsBrowserTestLatestResultsRequest = {
11+
publicId: "public_id",
12+
};
13+
14+
apiInstance
15+
.listSyntheticsBrowserTestLatestResults(params)
16+
.then((data: v2.SyntheticsTestLatestResultsResponse) => {
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 a test's latest results 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.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiListSyntheticsTestLatestResultsRequest = {
11+
publicId: "public_id",
12+
};
13+
14+
apiInstance
15+
.listSyntheticsTestLatestResults(params)
16+
.then((data: v2.SyntheticsTestLatestResultsResponse) => {
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+
* Poll for test results 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.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiPollSyntheticsTestResultsRequest = {
11+
resultIds: "result_ids",
12+
};
13+
14+
apiInstance
15+
.pollSyntheticsTestResults(params)
16+
.then((data: v2.SyntheticsPollTestResultsResponse) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12211,6 +12211,56 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1221112211
},
1221212212
"operationResponseType": "SyntheticsSuiteResponse",
1221312213
},
12214+
"v2.ListSyntheticsBrowserTestLatestResults": {
12215+
"publicId": {
12216+
"type": "string",
12217+
"format": "",
12218+
},
12219+
"fromTs": {
12220+
"type": "number",
12221+
"format": "int64",
12222+
},
12223+
"toTs": {
12224+
"type": "number",
12225+
"format": "int64",
12226+
},
12227+
"status": {
12228+
"type": "SyntheticsTestResultStatus",
12229+
"format": "",
12230+
},
12231+
"runType": {
12232+
"type": "SyntheticsTestResultRunType",
12233+
"format": "",
12234+
},
12235+
"probeDc": {
12236+
"type": "Array<string>",
12237+
"format": "",
12238+
},
12239+
"deviceId": {
12240+
"type": "Array<string>",
12241+
"format": "",
12242+
},
12243+
"operationResponseType": "SyntheticsTestLatestResultsResponse",
12244+
},
12245+
"v2.GetSyntheticsBrowserTestResult": {
12246+
"publicId": {
12247+
"type": "string",
12248+
"format": "",
12249+
},
12250+
"resultId": {
12251+
"type": "string",
12252+
"format": "",
12253+
},
12254+
"eventId": {
12255+
"type": "string",
12256+
"format": "",
12257+
},
12258+
"timestamp": {
12259+
"type": "number",
12260+
"format": "int64",
12261+
},
12262+
"operationResponseType": "SyntheticsTestResultResponse",
12263+
},
1221412264
"v2.DeleteSyntheticsTests": {
1221512265
"body": {
1221612266
"type": "DeletedTestsRequestDeleteRequest",
@@ -12250,6 +12300,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1225012300
},
1225112301
"operationResponseType": "SyntheticsNetworkTestResponse",
1225212302
},
12303+
"v2.PollSyntheticsTestResults": {
12304+
"resultIds": {
12305+
"type": "string",
12306+
"format": "",
12307+
},
12308+
"operationResponseType": "SyntheticsPollTestResultsResponse",
12309+
},
1225312310
"v2.GetTestFileDownloadUrl": {
1225412311
"publicId": {
1225512312
"type": "string",
@@ -12301,6 +12358,56 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1230112358
},
1230212359
"operationResponseType": "SyntheticsTestParentSuitesResponse",
1230312360
},
12361+
"v2.ListSyntheticsTestLatestResults": {
12362+
"publicId": {
12363+
"type": "string",
12364+
"format": "",
12365+
},
12366+
"fromTs": {
12367+
"type": "number",
12368+
"format": "int64",
12369+
},
12370+
"toTs": {
12371+
"type": "number",
12372+
"format": "int64",
12373+
},
12374+
"status": {
12375+
"type": "SyntheticsTestResultStatus",
12376+
"format": "",
12377+
},
12378+
"runType": {
12379+
"type": "SyntheticsTestResultRunType",
12380+
"format": "",
12381+
},
12382+
"probeDc": {
12383+
"type": "Array<string>",
12384+
"format": "",
12385+
},
12386+
"deviceId": {
12387+
"type": "Array<string>",
12388+
"format": "",
12389+
},
12390+
"operationResponseType": "SyntheticsTestLatestResultsResponse",
12391+
},
12392+
"v2.GetSyntheticsTestResult": {
12393+
"publicId": {
12394+
"type": "string",
12395+
"format": "",
12396+
},
12397+
"resultId": {
12398+
"type": "string",
12399+
"format": "",
12400+
},
12401+
"eventId": {
12402+
"type": "string",
12403+
"format": "",
12404+
},
12405+
"timestamp": {
12406+
"type": "number",
12407+
"format": "int64",
12408+
},
12409+
"operationResponseType": "SyntheticsTestResultResponse",
12410+
},
1230412411
"v2.ListSyntheticsTestVersions": {
1230512412
"publicId": {
1230612413
"type": "string",

features/v2/synthetics.feature

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,36 @@ Feature: Synthetics
151151
When the request is sent
152152
Then the response status is 200 OK
153153

154+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
155+
Scenario: Get a browser test result returns "API error response." response
156+
Given new "GetSyntheticsBrowserTestResult" request
157+
And request contains "public_id" parameter from "REPLACE.ME"
158+
And request contains "result_id" parameter from "REPLACE.ME"
159+
When the request is sent
160+
Then the response status is 404 API error response.
161+
162+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
163+
Scenario: Get a browser test result returns "OK" response
164+
Given new "GetSyntheticsBrowserTestResult" request
165+
And request contains "public_id" parameter from "REPLACE.ME"
166+
And request contains "result_id" parameter from "REPLACE.ME"
167+
When the request is sent
168+
Then the response status is 200 OK
169+
170+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
171+
Scenario: Get a browser test's latest results returns "API error response." response
172+
Given new "ListSyntheticsBrowserTestLatestResults" request
173+
And request contains "public_id" parameter from "REPLACE.ME"
174+
When the request is sent
175+
Then the response status is 404 API error response.
176+
177+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
178+
Scenario: Get a browser test's latest results returns "OK" response
179+
Given new "ListSyntheticsBrowserTestLatestResults" request
180+
And request contains "public_id" parameter from "REPLACE.ME"
181+
When the request is sent
182+
Then the response status is 200 OK
183+
154184
@generated @skip @team:DataDog/synthetics-orchestrating-managing
155185
Scenario: Get a fast test result returns "API error response." response
156186
Given new "GetSyntheticsFastTestResult" request
@@ -211,6 +241,36 @@ Feature: Synthetics
211241
When the request is sent
212242
Then the response status is 200 OK
213243

244+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
245+
Scenario: Get a test result returns "API error response." response
246+
Given new "GetSyntheticsTestResult" request
247+
And request contains "public_id" parameter from "REPLACE.ME"
248+
And request contains "result_id" parameter from "REPLACE.ME"
249+
When the request is sent
250+
Then the response status is 404 API error response.
251+
252+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
253+
Scenario: Get a test result returns "OK" response
254+
Given new "GetSyntheticsTestResult" request
255+
And request contains "public_id" parameter from "REPLACE.ME"
256+
And request contains "result_id" parameter from "REPLACE.ME"
257+
When the request is sent
258+
Then the response status is 200 OK
259+
260+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
261+
Scenario: Get a test's latest results returns "API error response." response
262+
Given new "ListSyntheticsTestLatestResults" request
263+
And request contains "public_id" parameter from "REPLACE.ME"
264+
When the request is sent
265+
Then the response status is 404 API error response.
266+
267+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
268+
Scenario: Get a test's latest results returns "OK" response
269+
Given new "ListSyntheticsTestLatestResults" request
270+
And request contains "public_id" parameter from "REPLACE.ME"
271+
When the request is sent
272+
Then the response status is 200 OK
273+
214274
@generated @skip @team:DataDog/synthetics-orchestrating-managing
215275
Scenario: Get available subtests for a multistep test returns "OK" response
216276
Given new "GetApiMultistepSubtests" request
@@ -322,6 +382,20 @@ Feature: Synthetics
322382
When the request is sent
323383
Then the response status is 200 OK
324384

385+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
386+
Scenario: Poll for test results returns "API error response." response
387+
Given new "PollSyntheticsTestResults" request
388+
And request contains "result_ids" parameter from "REPLACE.ME"
389+
When the request is sent
390+
Then the response status is 404 API error response.
391+
392+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
393+
Scenario: Poll for test results returns "OK" response
394+
Given new "PollSyntheticsTestResults" request
395+
And request contains "result_ids" parameter from "REPLACE.ME"
396+
When the request is sent
397+
Then the response status is 200 OK
398+
325399
@team:DataDog/synthetics-orchestrating-managing
326400
Scenario: Save new value for on-demand concurrency cap returns "OK" response
327401
Given new "SetOnDemandConcurrencyCap" request

features/v2/undo.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6447,6 +6447,18 @@
64476447
"type": "idempotent"
64486448
}
64496449
},
6450+
"ListSyntheticsBrowserTestLatestResults": {
6451+
"tag": "Synthetics",
6452+
"undo": {
6453+
"type": "safe"
6454+
}
6455+
},
6456+
"GetSyntheticsBrowserTestResult": {
6457+
"tag": "Synthetics",
6458+
"undo": {
6459+
"type": "safe"
6460+
}
6461+
},
64506462
"DeleteSyntheticsTests": {
64516463
"tag": "Synthetics",
64526464
"undo": {
@@ -6484,6 +6496,12 @@
64846496
"type": "idempotent"
64856497
}
64866498
},
6499+
"PollSyntheticsTestResults": {
6500+
"tag": "Synthetics",
6501+
"undo": {
6502+
"type": "safe"
6503+
}
6504+
},
64876505
"GetTestFileDownloadUrl": {
64886506
"tag": "Synthetics",
64896507
"undo": {
@@ -6514,6 +6532,18 @@
65146532
"type": "safe"
65156533
}
65166534
},
6535+
"ListSyntheticsTestLatestResults": {
6536+
"tag": "Synthetics",
6537+
"undo": {
6538+
"type": "safe"
6539+
}
6540+
},
6541+
"GetSyntheticsTestResult": {
6542+
"tag": "Synthetics",
6543+
"undo": {
6544+
"type": "safe"
6545+
}
6546+
},
65176547
"ListSyntheticsTestVersions": {
65186548
"tag": "Synthetics",
65196549
"undo": {

0 commit comments

Comments
 (0)