Skip to content

Commit b7f080f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[chores] Clean up Synthetics API Reference menu sidebar (#3205)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 7a5ae6f commit b7f080f

33 files changed

+470
-244
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35525,7 +35525,7 @@ paths:
3552535525
get:
3552635526
description: 'Get the detailed configuration associated with
3552735527

35528-
a Synthetic Mobile test.'
35528+
a Synthetic mobile test.'
3552935529
operationId: GetMobileTest
3553035530
parameters:
3553135531
- description: The public ID of the test to get details from.
@@ -35562,15 +35562,15 @@ paths:
3556235562
appKeyAuth: []
3556335563
- AuthZ:
3556435564
- synthetics_read
35565-
summary: Get a Mobile test
35565+
summary: Get a mobile test
3556635566
tags:
3556735567
- Synthetics
3556835568
x-permission:
3556935569
operator: OR
3557035570
permissions:
3557135571
- synthetics_read
3557235572
put:
35573-
description: Edit the configuration of a Synthetic Mobile test.
35573+
description: Edit the configuration of a Synthetic mobile test.
3557435574
operationId: UpdateMobileTest
3557535575
parameters:
3557635576
- description: The public ID of the test to get details from.
@@ -35624,7 +35624,7 @@ paths:
3562435624
appKeyAuth: []
3562535625
- AuthZ:
3562635626
- synthetics_write
35627-
summary: Edit a Mobile test
35627+
summary: Edit a mobile test
3562835628
tags:
3562935629
- Synthetics
3563035630
x-codegen-request-body-name: body

.generator/schemas/v2/openapi.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102003,7 +102003,7 @@ paths:
102003102003
appKeyAuth: []
102004102004
- AuthZ:
102005102005
- synthetics_write
102006-
summary: 'Synthetics: Create a test suite'
102006+
summary: Create a test suite
102007102007
tags:
102008102008
- Synthetics
102009102009
x-permission:
@@ -102040,7 +102040,7 @@ paths:
102040102040
appKeyAuth: []
102041102041
- AuthZ:
102042102042
- synthetics_write
102043-
summary: 'Synthetics: Bulk delete suites'
102043+
summary: Bulk delete suites
102044102044
tags:
102045102045
- Synthetics
102046102046
x-permission:
@@ -102049,7 +102049,7 @@ paths:
102049102049
- synthetics_write
102050102050
/api/v2/synthetics/suites/search:
102051102051
get:
102052-
description: Search for Synthetics suites.
102052+
description: Search for test suites.
102053102053
operationId: SearchSuites
102054102054
parameters:
102055102055
- description: The search query.
@@ -102108,7 +102108,7 @@ paths:
102108102108
appKeyAuth: []
102109102109
- AuthZ:
102110102110
- synthetics_read
102111-
summary: Search Synthetics suites
102111+
summary: Search test suites
102112102112
tags:
102113102113
- Synthetics
102114102114
x-permission:
@@ -102145,7 +102145,7 @@ paths:
102145102145
appKeyAuth: []
102146102146
- AuthZ:
102147102147
- synthetics_read
102148-
summary: 'Synthetics: Get a suite'
102148+
summary: Get a suite
102149102149
tags:
102150102150
- Synthetics
102151102151
x-permission:
@@ -102188,7 +102188,7 @@ paths:
102188102188
appKeyAuth: []
102189102189
- AuthZ:
102190102190
- synthetics_write
102191-
summary: 'Synthetics: Edit a test suite'
102191+
summary: Edit a test suite
102192102192
tags:
102193102193
- Synthetics
102194102194
x-permission:
@@ -102230,7 +102230,7 @@ paths:
102230102230
appKeyAuth: []
102231102231
- AuthZ:
102232102232
- synthetics_write
102233-
summary: 'Synthetics: Bulk delete tests'
102233+
summary: Bulk delete tests
102234102234
tags:
102235102235
- Synthetics
102236102236
x-permission:
@@ -102266,7 +102266,7 @@ paths:
102266102266
appKeyAuth: []
102267102267
- AuthZ:
102268102268
- synthetics_write
102269-
summary: 'Synthetics: Create a Network Path test'
102269+
summary: Create a Network Path test
102270102270
tags:
102271102271
- Synthetics
102272102272
x-permission:
@@ -102310,7 +102310,7 @@ paths:
102310102310
appKeyAuth: []
102311102311
- AuthZ:
102312102312
- synthetics_read
102313-
summary: 'Synthetics: Get a Network Path test'
102313+
summary: Get a Network Path test
102314102314
tags:
102315102315
- Synthetics
102316102316
x-permission:
@@ -102359,7 +102359,7 @@ paths:
102359102359
appKeyAuth: []
102360102360
- AuthZ:
102361102361
- synthetics_write
102362-
summary: 'Synthetics: Edit a Network Path test'
102362+
summary: Edit a Network Path test
102363102363
tags:
102364102364
- Synthetics
102365102365
x-permission:
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
"""
2-
Get a Mobile test returns "OK" response
2+
Get a mobile test returns "OK" response
33
"""
44

5-
from os import environ
65
from datadog_api_client import ApiClient, Configuration
76
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
87

9-
# there is a valid "synthetics_mobile_test" in the system
10-
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
11-
128
configuration = Configuration()
139
with ApiClient(configuration) as api_client:
1410
api_instance = SyntheticsApi(api_client)
1511
response = api_instance.get_mobile_test(
16-
public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
12+
public_id="public_id",
1713
)
1814

1915
print(response)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Get a Mobile test returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
8+
9+
# there is a valid "synthetics_mobile_test" in the system
10+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
11+
12+
configuration = Configuration()
13+
with ApiClient(configuration) as api_client:
14+
api_instance = SyntheticsApi(api_client)
15+
response = api_instance.get_mobile_test(
16+
public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
17+
)
18+
19+
print(response)
Lines changed: 131 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11
"""
2-
Edit a Mobile test returns "OK" response
2+
Edit a mobile test returns "OK" response
33
"""
44

5-
from os import environ
65
from datadog_api_client import ApiClient, Configuration
76
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7+
from datadog_api_client.v1.model.synthetics_check_type import SyntheticsCheckType
8+
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
9+
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
10+
from datadog_api_client.v1.model.synthetics_mobile_step import SyntheticsMobileStep
11+
from datadog_api_client.v1.model.synthetics_mobile_step_params import SyntheticsMobileStepParams
12+
from datadog_api_client.v1.model.synthetics_mobile_step_params_direction import SyntheticsMobileStepParamsDirection
13+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element import SyntheticsMobileStepParamsElement
14+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_context_type import (
15+
SyntheticsMobileStepParamsElementContextType,
16+
)
17+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_relative_position import (
18+
SyntheticsMobileStepParamsElementRelativePosition,
19+
)
20+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_user_locator import (
21+
SyntheticsMobileStepParamsElementUserLocator,
22+
)
23+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_user_locator_values_items import (
24+
SyntheticsMobileStepParamsElementUserLocatorValuesItems,
25+
)
26+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_user_locator_values_items_type import (
27+
SyntheticsMobileStepParamsElementUserLocatorValuesItemsType,
28+
)
29+
from datadog_api_client.v1.model.synthetics_mobile_step_params_positions_items import (
30+
SyntheticsMobileStepParamsPositionsItems,
31+
)
32+
from datadog_api_client.v1.model.synthetics_mobile_step_params_variable import SyntheticsMobileStepParamsVariable
33+
from datadog_api_client.v1.model.synthetics_mobile_step_type import SyntheticsMobileStepType
834
from datadog_api_client.v1.model.synthetics_mobile_test import SyntheticsMobileTest
935
from datadog_api_client.v1.model.synthetics_mobile_test_config import SyntheticsMobileTestConfig
1036
from datadog_api_client.v1.model.synthetics_mobile_test_options import SyntheticsMobileTestOptions
@@ -15,36 +41,124 @@
1541
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application_reference_type import (
1642
SyntheticsMobileTestsMobileApplicationReferenceType,
1743
)
44+
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles
45+
from datadog_api_client.v1.model.synthetics_test_ci_options import SyntheticsTestCiOptions
46+
from datadog_api_client.v1.model.synthetics_test_execution_rule import SyntheticsTestExecutionRule
47+
from datadog_api_client.v1.model.synthetics_test_options_monitor_options import SyntheticsTestOptionsMonitorOptions
48+
from datadog_api_client.v1.model.synthetics_test_options_monitor_options_notification_preset_name import (
49+
SyntheticsTestOptionsMonitorOptionsNotificationPresetName,
50+
)
51+
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
52+
from datadog_api_client.v1.model.synthetics_test_options_scheduling import SyntheticsTestOptionsScheduling
53+
from datadog_api_client.v1.model.synthetics_test_options_scheduling_timeframe import (
54+
SyntheticsTestOptionsSchedulingTimeframe,
55+
)
1856
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
19-
20-
# there is a valid "synthetics_mobile_test" in the system
21-
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
57+
from datadog_api_client.v1.model.synthetics_test_restriction_policy_binding import (
58+
SyntheticsTestRestrictionPolicyBinding,
59+
)
60+
from datadog_api_client.v1.model.synthetics_test_restriction_policy_binding_relation import (
61+
SyntheticsTestRestrictionPolicyBindingRelation,
62+
)
2263

2364
body = SyntheticsMobileTest(
24-
name="Example-Synthetic-updated",
25-
status=SyntheticsTestPauseStatus.PAUSED,
26-
type=SyntheticsMobileTestType.MOBILE,
2765
config=SyntheticsMobileTestConfig(
28-
variables=[],
66+
variables=[
67+
SyntheticsConfigVariable(
68+
name="VARIABLE_NAME",
69+
secure=False,
70+
type=SyntheticsConfigVariableType.TEXT,
71+
),
72+
],
2973
),
30-
message="",
74+
device_ids=[
75+
"chrome.laptop_large",
76+
],
77+
message="Notification message",
78+
name="Example test name",
3179
options=SyntheticsMobileTestOptions(
80+
bindings=[
81+
SyntheticsTestRestrictionPolicyBinding(
82+
principals=[],
83+
relation=SyntheticsTestRestrictionPolicyBindingRelation.EDITOR,
84+
),
85+
],
86+
ci=SyntheticsTestCiOptions(
87+
execution_rule=SyntheticsTestExecutionRule.BLOCKING,
88+
),
3289
device_ids=[
33-
"synthetics:mobile:device:iphone_15_ios_17",
90+
"synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16",
3491
],
3592
mobile_application=SyntheticsMobileTestsMobileApplication(
36-
application_id="ab0e0aed-536d-411a-9a99-5428c27d8f8e",
37-
reference_id="6115922a-5f5d-455e-bc7e-7955a57f3815",
38-
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.VERSION,
93+
application_id="00000000-0000-0000-0000-aaaaaaaaaaaa",
94+
reference_id="00000000-0000-0000-0000-aaaaaaaaaaab",
95+
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.LATEST,
3996
),
40-
tick_every=3600,
97+
monitor_options=SyntheticsTestOptionsMonitorOptions(
98+
notification_preset_name=SyntheticsTestOptionsMonitorOptionsNotificationPresetName.SHOW_ALL,
99+
),
100+
restricted_roles=SyntheticsRestrictedRoles(
101+
[
102+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
103+
]
104+
),
105+
retry=SyntheticsTestOptionsRetry(),
106+
scheduling=SyntheticsTestOptionsScheduling(
107+
timeframes=[
108+
SyntheticsTestOptionsSchedulingTimeframe(
109+
day=1,
110+
_from="07:00",
111+
to="16:00",
112+
),
113+
SyntheticsTestOptionsSchedulingTimeframe(
114+
day=3,
115+
_from="07:00",
116+
to="16:00",
117+
),
118+
],
119+
timezone="America/New_York",
120+
),
121+
tick_every=300,
41122
),
42-
steps=[],
123+
status=SyntheticsTestPauseStatus.LIVE,
124+
steps=[
125+
SyntheticsMobileStep(
126+
name="",
127+
params=SyntheticsMobileStepParams(
128+
check=SyntheticsCheckType.EQUALS,
129+
direction=SyntheticsMobileStepParamsDirection.UP,
130+
element=SyntheticsMobileStepParamsElement(
131+
context_type=SyntheticsMobileStepParamsElementContextType.NATIVE,
132+
relative_position=SyntheticsMobileStepParamsElementRelativePosition(),
133+
user_locator=SyntheticsMobileStepParamsElementUserLocator(
134+
values=[
135+
SyntheticsMobileStepParamsElementUserLocatorValuesItems(
136+
type=SyntheticsMobileStepParamsElementUserLocatorValuesItemsType.ACCESSIBILITY_ID,
137+
),
138+
],
139+
),
140+
),
141+
positions=[
142+
SyntheticsMobileStepParamsPositionsItems(),
143+
],
144+
variable=SyntheticsMobileStepParamsVariable(
145+
example="",
146+
name="VAR_NAME",
147+
),
148+
),
149+
public_id="pub-lic-id0",
150+
type=SyntheticsMobileStepType.ASSERTELEMENTCONTENT,
151+
),
152+
],
153+
tags=[
154+
"env:production",
155+
],
156+
type=SyntheticsMobileTestType.MOBILE,
43157
)
44158

45159
configuration = Configuration()
46160
with ApiClient(configuration) as api_client:
47161
api_instance = SyntheticsApi(api_client)
48-
response = api_instance.update_mobile_test(public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body=body)
162+
response = api_instance.update_mobile_test(public_id="public_id", body=body)
49163

50164
print(response)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"""
2+
Edit a Mobile test returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
8+
from datadog_api_client.v1.model.synthetics_mobile_test import SyntheticsMobileTest
9+
from datadog_api_client.v1.model.synthetics_mobile_test_config import SyntheticsMobileTestConfig
10+
from datadog_api_client.v1.model.synthetics_mobile_test_options import SyntheticsMobileTestOptions
11+
from datadog_api_client.v1.model.synthetics_mobile_test_type import SyntheticsMobileTestType
12+
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application import (
13+
SyntheticsMobileTestsMobileApplication,
14+
)
15+
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application_reference_type import (
16+
SyntheticsMobileTestsMobileApplicationReferenceType,
17+
)
18+
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
19+
20+
# there is a valid "synthetics_mobile_test" in the system
21+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
22+
23+
body = SyntheticsMobileTest(
24+
name="Example-Synthetic-updated",
25+
status=SyntheticsTestPauseStatus.PAUSED,
26+
type=SyntheticsMobileTestType.MOBILE,
27+
config=SyntheticsMobileTestConfig(
28+
variables=[],
29+
),
30+
message="",
31+
options=SyntheticsMobileTestOptions(
32+
device_ids=[
33+
"synthetics:mobile:device:iphone_15_ios_17",
34+
],
35+
mobile_application=SyntheticsMobileTestsMobileApplication(
36+
application_id="ab0e0aed-536d-411a-9a99-5428c27d8f8e",
37+
reference_id="6115922a-5f5d-455e-bc7e-7955a57f3815",
38+
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.VERSION,
39+
),
40+
tick_every=3600,
41+
),
42+
steps=[],
43+
)
44+
45+
configuration = Configuration()
46+
with ApiClient(configuration) as api_client:
47+
api_instance = SyntheticsApi(api_client)
48+
response = api_instance.update_mobile_test(public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body=body)
49+
50+
print(response)

0 commit comments

Comments
 (0)