Skip to content

Commit 3d5bee8

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add OpenAPI spec for v2 Synthetics test result endpoints (#3242)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 35fd661 commit 3d5bee8

95 files changed

Lines changed: 14069 additions & 134 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get a browser test result returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.get_synthetics_browser_test_result("public_id", "result_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get a test result returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.get_synthetics_test_result("public_id", "result_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get a browser test's latest results returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.list_synthetics_browser_test_latest_results("public_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get a test's latest results returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.list_synthetics_test_latest_results("public_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Poll for test results returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.poll_synthetics_test_results("result_ids")

features/scenarios_model_mapping.rb

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4327,6 +4327,21 @@
43274327
"public_id" => "String",
43284328
"body" => "SuiteJsonPatchRequest",
43294329
},
4330+
"v2.ListSyntheticsBrowserTestLatestResults" => {
4331+
"public_id" => "String",
4332+
"from_ts" => "Integer",
4333+
"to_ts" => "Integer",
4334+
"status" => "SyntheticsTestResultStatus",
4335+
"run_type" => "SyntheticsTestResultRunType",
4336+
"probe_dc" => "Array<String>",
4337+
"device_id" => "Array<String>",
4338+
},
4339+
"v2.GetSyntheticsBrowserTestResult" => {
4340+
"public_id" => "String",
4341+
"result_id" => "String",
4342+
"event_id" => "String",
4343+
"timestamp" => "Integer",
4344+
},
43304345
"v2.DeleteSyntheticsTests" => {
43314346
"body" => "DeletedTestsRequestDeleteRequest",
43324347
},
@@ -4343,6 +4358,9 @@
43434358
"public_id" => "String",
43444359
"body" => "SyntheticsNetworkTestEditRequest",
43454360
},
4361+
"v2.PollSyntheticsTestResults" => {
4362+
"result_ids" => "String",
4363+
},
43464364
"v2.GetTestFileDownloadUrl" => {
43474365
"public_id" => "String",
43484366
"body" => "SyntheticsTestFileDownloadRequest",
@@ -4362,6 +4380,21 @@
43624380
"v2.GetTestParentSuites" => {
43634381
"public_id" => "String",
43644382
},
4383+
"v2.ListSyntheticsTestLatestResults" => {
4384+
"public_id" => "String",
4385+
"from_ts" => "Integer",
4386+
"to_ts" => "Integer",
4387+
"status" => "SyntheticsTestResultStatus",
4388+
"run_type" => "SyntheticsTestResultRunType",
4389+
"probe_dc" => "Array<String>",
4390+
"device_id" => "Array<String>",
4391+
},
4392+
"v2.GetSyntheticsTestResult" => {
4393+
"public_id" => "String",
4394+
"result_id" => "String",
4395+
"event_id" => "String",
4396+
"timestamp" => "Integer",
4397+
},
43654398
"v2.ListSyntheticsTestVersions" => {
43664399
"public_id" => "String",
43674400
"last_version_number" => "Integer",

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": {

lib/datadog_api_client/inflector.rb

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5628,11 +5628,9 @@ def overrides
56285628
"v2.synthetics_fast_test_result_attributes" => "SyntheticsFastTestResultAttributes",
56295629
"v2.synthetics_fast_test_result_data" => "SyntheticsFastTestResultData",
56305630
"v2.synthetics_fast_test_result_detail" => "SyntheticsFastTestResultDetail",
5631-
"v2.synthetics_fast_test_result_device" => "SyntheticsFastTestResultDevice",
5632-
"v2.synthetics_fast_test_result_failure" => "SyntheticsFastTestResultFailure",
5633-
"v2.synthetics_fast_test_result_location" => "SyntheticsFastTestResultLocation",
56345631
"v2.synthetics_fast_test_result_type" => "SyntheticsFastTestResultType",
56355632
"v2.synthetics_fast_test_sub_type" => "SyntheticsFastTestSubType",
5633+
"v2.synthetics_fast_test_type" => "SyntheticsFastTestType",
56365634
"v2.synthetics_global_variable" => "SyntheticsGlobalVariable",
56375635
"v2.synthetics_global_variable_attributes" => "SyntheticsGlobalVariableAttributes",
56385636
"v2.synthetics_global_variable_options" => "SyntheticsGlobalVariableOptions",
@@ -5663,6 +5661,7 @@ def overrides
56635661
"v2.synthetics_network_test_response_type" => "SyntheticsNetworkTestResponseType",
56645662
"v2.synthetics_network_test_sub_type" => "SyntheticsNetworkTestSubType",
56655663
"v2.synthetics_network_test_type" => "SyntheticsNetworkTestType",
5664+
"v2.synthetics_poll_test_results_response" => "SyntheticsPollTestResultsResponse",
56665665
"v2.synthetics_suite" => "SyntheticsSuite",
56675666
"v2.synthetics_suite_options" => "SyntheticsSuiteOptions",
56685667
"v2.synthetics_suite_response" => "SyntheticsSuiteResponse",
@@ -5684,6 +5683,7 @@ def overrides
56845683
"v2.synthetics_test_file_multipart_presigned_urls_request" => "SyntheticsTestFileMultipartPresignedUrlsRequest",
56855684
"v2.synthetics_test_file_multipart_presigned_urls_request_bucket_key_prefix" => "SyntheticsTestFileMultipartPresignedUrlsRequestBucketKeyPrefix",
56865685
"v2.synthetics_test_file_multipart_presigned_urls_response" => "SyntheticsTestFileMultipartPresignedUrlsResponse",
5686+
"v2.synthetics_test_latest_results_response" => "SyntheticsTestLatestResultsResponse",
56875687
"v2.synthetics_test_options" => "SyntheticsTestOptions",
56885688
"v2.synthetics_test_options_monitor_options" => "SyntheticsTestOptionsMonitorOptions",
56895689
"v2.synthetics_test_options_monitor_options_notification_preset_name" => "SyntheticsTestOptionsMonitorOptionsNotificationPresetName",
@@ -5695,6 +5695,85 @@ def overrides
56955695
"v2.synthetics_test_parent_suites_response" => "SyntheticsTestParentSuitesResponse",
56965696
"v2.synthetics_test_parent_suite_type" => "SyntheticsTestParentSuiteType",
56975697
"v2.synthetics_test_pause_status" => "SyntheticsTestPauseStatus",
5698+
"v2.synthetics_test_result_assertion_result" => "SyntheticsTestResultAssertionResult",
5699+
"v2.synthetics_test_result_attributes" => "SyntheticsTestResultAttributes",
5700+
"v2.synthetics_test_result_batch" => "SyntheticsTestResultBatch",
5701+
"v2.synthetics_test_result_bounds" => "SyntheticsTestResultBounds",
5702+
"v2.synthetics_test_result_browser_error" => "SyntheticsTestResultBrowserError",
5703+
"v2.synthetics_test_result_bucket_keys" => "SyntheticsTestResultBucketKeys",
5704+
"v2.synthetics_test_result_cdn_cache_status" => "SyntheticsTestResultCdnCacheStatus",
5705+
"v2.synthetics_test_result_cdn_provider_info" => "SyntheticsTestResultCdnProviderInfo",
5706+
"v2.synthetics_test_result_cdn_resource" => "SyntheticsTestResultCdnResource",
5707+
"v2.synthetics_test_result_certificate" => "SyntheticsTestResultCertificate",
5708+
"v2.synthetics_test_result_certificate_validity" => "SyntheticsTestResultCertificateValidity",
5709+
"v2.synthetics_test_result_ci" => "SyntheticsTestResultCI",
5710+
"v2.synthetics_test_result_ci_pipeline" => "SyntheticsTestResultCIPipeline",
5711+
"v2.synthetics_test_result_ci_provider" => "SyntheticsTestResultCIProvider",
5712+
"v2.synthetics_test_result_ci_stage" => "SyntheticsTestResultCIStage",
5713+
"v2.synthetics_test_result_data" => "SyntheticsTestResultData",
5714+
"v2.synthetics_test_result_detail" => "SyntheticsTestResultDetail",
5715+
"v2.synthetics_test_result_device" => "SyntheticsTestResultDevice",
5716+
"v2.synthetics_test_result_device_browser" => "SyntheticsTestResultDeviceBrowser",
5717+
"v2.synthetics_test_result_device_platform" => "SyntheticsTestResultDevicePlatform",
5718+
"v2.synthetics_test_result_device_resolution" => "SyntheticsTestResultDeviceResolution",
5719+
"v2.synthetics_test_result_dns_record" => "SyntheticsTestResultDnsRecord",
5720+
"v2.synthetics_test_result_dns_resolution" => "SyntheticsTestResultDnsResolution",
5721+
"v2.synthetics_test_result_duration" => "SyntheticsTestResultDuration",
5722+
"v2.synthetics_test_result_execution_info" => "SyntheticsTestResultExecutionInfo",
5723+
"v2.synthetics_test_result_failure" => "SyntheticsTestResultFailure",
5724+
"v2.synthetics_test_result_file_ref" => "SyntheticsTestResultFileRef",
5725+
"v2.synthetics_test_result_git" => "SyntheticsTestResultGit",
5726+
"v2.synthetics_test_result_git_commit" => "SyntheticsTestResultGitCommit",
5727+
"v2.synthetics_test_result_git_user" => "SyntheticsTestResultGitUser",
5728+
"v2.synthetics_test_result_handshake" => "SyntheticsTestResultHandshake",
5729+
"v2.synthetics_test_result_health_check" => "SyntheticsTestResultHealthCheck",
5730+
"v2.synthetics_test_result_included_item" => "SyntheticsTestResultIncludedItem",
5731+
"v2.synthetics_test_result_location" => "SyntheticsTestResultLocation",
5732+
"v2.synthetics_test_result_netpath" => "SyntheticsTestResultNetpath",
5733+
"v2.synthetics_test_result_netpath_destination" => "SyntheticsTestResultNetpathDestination",
5734+
"v2.synthetics_test_result_netpath_endpoint" => "SyntheticsTestResultNetpathEndpoint",
5735+
"v2.synthetics_test_result_netpath_hop" => "SyntheticsTestResultNetpathHop",
5736+
"v2.synthetics_test_result_netstats" => "SyntheticsTestResultNetstats",
5737+
"v2.synthetics_test_result_netstats_hops" => "SyntheticsTestResultNetstatsHops",
5738+
"v2.synthetics_test_result_network_latency" => "SyntheticsTestResultNetworkLatency",
5739+
"v2.synthetics_test_result_ocsp_certificate" => "SyntheticsTestResultOCSPCertificate",
5740+
"v2.synthetics_test_result_ocsp_response" => "SyntheticsTestResultOCSPResponse",
5741+
"v2.synthetics_test_result_ocsp_updates" => "SyntheticsTestResultOCSPUpdates",
5742+
"v2.synthetics_test_result_parent_step" => "SyntheticsTestResultParentStep",
5743+
"v2.synthetics_test_result_parent_test" => "SyntheticsTestResultParentTest",
5744+
"v2.synthetics_test_result_redirect" => "SyntheticsTestResultRedirect",
5745+
"v2.synthetics_test_result_relationships" => "SyntheticsTestResultRelationships",
5746+
"v2.synthetics_test_result_relationship_test" => "SyntheticsTestResultRelationshipTest",
5747+
"v2.synthetics_test_result_relationship_test_data" => "SyntheticsTestResultRelationshipTestData",
5748+
"v2.synthetics_test_result_request_info" => "SyntheticsTestResultRequestInfo",
5749+
"v2.synthetics_test_result_response" => "SyntheticsTestResultResponse",
5750+
"v2.synthetics_test_result_response_info" => "SyntheticsTestResultResponseInfo",
5751+
"v2.synthetics_test_result_router" => "SyntheticsTestResultRouter",
5752+
"v2.synthetics_test_result_rum_context" => "SyntheticsTestResultRumContext",
5753+
"v2.synthetics_test_result_run_type" => "SyntheticsTestResultRunType",
5754+
"v2.synthetics_test_result_status" => "SyntheticsTestResultStatus",
5755+
"v2.synthetics_test_result_step" => "SyntheticsTestResultStep",
5756+
"v2.synthetics_test_result_step_assertion_result" => "SyntheticsTestResultStepAssertionResult",
5757+
"v2.synthetics_test_result_step_element_updates" => "SyntheticsTestResultStepElementUpdates",
5758+
"v2.synthetics_test_result_steps_info" => "SyntheticsTestResultStepsInfo",
5759+
"v2.synthetics_test_result_sub_step" => "SyntheticsTestResultSubStep",
5760+
"v2.synthetics_test_result_sub_test" => "SyntheticsTestResultSubTest",
5761+
"v2.synthetics_test_result_summary_attributes" => "SyntheticsTestResultSummaryAttributes",
5762+
"v2.synthetics_test_result_summary_data" => "SyntheticsTestResultSummaryData",
5763+
"v2.synthetics_test_result_summary_type" => "SyntheticsTestResultSummaryType",
5764+
"v2.synthetics_test_result_tab" => "SyntheticsTestResultTab",
5765+
"v2.synthetics_test_result_trace" => "SyntheticsTestResultTrace",
5766+
"v2.synthetics_test_result_traceroute_hop" => "SyntheticsTestResultTracerouteHop",
5767+
"v2.synthetics_test_result_turn" => "SyntheticsTestResultTurn",
5768+
"v2.synthetics_test_result_turn_step" => "SyntheticsTestResultTurnStep",
5769+
"v2.synthetics_test_result_type" => "SyntheticsTestResultType",
5770+
"v2.synthetics_test_result_variable" => "SyntheticsTestResultVariable",
5771+
"v2.synthetics_test_result_variables" => "SyntheticsTestResultVariables",
5772+
"v2.synthetics_test_result_vitals_metrics" => "SyntheticsTestResultVitalsMetrics",
5773+
"v2.synthetics_test_result_warning" => "SyntheticsTestResultWarning",
5774+
"v2.synthetics_test_result_web_socket_close" => "SyntheticsTestResultWebSocketClose",
5775+
"v2.synthetics_test_sub_type" => "SyntheticsTestSubType",
5776+
"v2.synthetics_test_type" => "SyntheticsTestType",
56985777
"v2.synthetics_test_version_action_metadata" => "SyntheticsTestVersionActionMetadata",
56995778
"v2.synthetics_test_version_attributes" => "SyntheticsTestVersionAttributes",
57005779
"v2.synthetics_test_version_author" => "SyntheticsTestVersionAuthor",

0 commit comments

Comments
 (0)