Skip to content

Remove deprecated Synthetics methods CreateTest and UpdateTest #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-04-26 08:16:19.525650",
"spec_repo_commit": "e26c7dd"
"regenerated": "2021-04-26 10:43:48.470883",
"spec_repo_commit": "ff4efbb"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-04-26 08:16:46.360849",
"spec_repo_commit": "e26c7dd"
"regenerated": "2021-04-26 10:44:17.733512",
"spec_repo_commit": "ff4efbb"
}
}
}
2 changes: 0 additions & 2 deletions docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ Class | Method | HTTP request | Description
*SyntheticsApi* | [**create_private_location**](SyntheticsApi.md#create_private_location) | **POST** /api/v1/synthetics/private-locations | Create a private location
*SyntheticsApi* | [**create_synthetics_api_test**](SyntheticsApi.md#create_synthetics_api_test) | **POST** /api/v1/synthetics/tests/api | Create an API test
*SyntheticsApi* | [**create_synthetics_browser_test**](SyntheticsApi.md#create_synthetics_browser_test) | **POST** /api/v1/synthetics/tests/browser | Create a browser test
*SyntheticsApi* | [**create_test**](SyntheticsApi.md#create_test) | **POST** /api/v1/synthetics/tests | Create a test
*SyntheticsApi* | [**delete_global_variable**](SyntheticsApi.md#delete_global_variable) | **DELETE** /api/v1/synthetics/variables/{variable_id} | Delete a global variable
*SyntheticsApi* | [**delete_private_location**](SyntheticsApi.md#delete_private_location) | **DELETE** /api/v1/synthetics/private-locations/{location_id} | Delete a private location
*SyntheticsApi* | [**delete_tests**](SyntheticsApi.md#delete_tests) | **POST** /api/v1/synthetics/tests/delete | Delete tests
Expand All @@ -235,7 +234,6 @@ Class | Method | HTTP request | Description
*SyntheticsApi* | [**update_api_test**](SyntheticsApi.md#update_api_test) | **PUT** /api/v1/synthetics/tests/api/{public_id} | Edit an API test
*SyntheticsApi* | [**update_browser_test**](SyntheticsApi.md#update_browser_test) | **PUT** /api/v1/synthetics/tests/browser/{public_id} | Edit a browser test
*SyntheticsApi* | [**update_private_location**](SyntheticsApi.md#update_private_location) | **PUT** /api/v1/synthetics/private-locations/{location_id} | Edit a private location
*SyntheticsApi* | [**update_test**](SyntheticsApi.md#update_test) | **PUT** /api/v1/synthetics/tests/{public_id} | Edit a test
*SyntheticsApi* | [**update_test_pause_status**](SyntheticsApi.md#update_test_pause_status) | **PUT** /api/v1/synthetics/tests/{public_id}/status | Pause or start a test
*TagsApi* | [**create_host_tags**](TagsApi.md#create_host_tags) | **POST** /api/v1/tags/hosts/{host_name} | Add tags to a host
*TagsApi* | [**delete_host_tags**](TagsApi.md#delete_host_tags) | **DELETE** /api/v1/tags/hosts/{host_name} | Remove host tags
Expand Down
328 changes: 0 additions & 328 deletions docs/v1/SyntheticsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Method | HTTP request | Description
[**create_private_location**](SyntheticsApi.md#create_private_location) | **POST** /api/v1/synthetics/private-locations | Create a private location
[**create_synthetics_api_test**](SyntheticsApi.md#create_synthetics_api_test) | **POST** /api/v1/synthetics/tests/api | Create an API test
[**create_synthetics_browser_test**](SyntheticsApi.md#create_synthetics_browser_test) | **POST** /api/v1/synthetics/tests/browser | Create a browser test
[**create_test**](SyntheticsApi.md#create_test) | **POST** /api/v1/synthetics/tests | Create a test
[**delete_global_variable**](SyntheticsApi.md#delete_global_variable) | **DELETE** /api/v1/synthetics/variables/{variable_id} | Delete a global variable
[**delete_private_location**](SyntheticsApi.md#delete_private_location) | **DELETE** /api/v1/synthetics/private-locations/{location_id} | Delete a private location
[**delete_tests**](SyntheticsApi.md#delete_tests) | **POST** /api/v1/synthetics/tests/delete | Delete tests
Expand All @@ -28,7 +27,6 @@ Method | HTTP request | Description
[**update_api_test**](SyntheticsApi.md#update_api_test) | **PUT** /api/v1/synthetics/tests/api/{public_id} | Edit an API test
[**update_browser_test**](SyntheticsApi.md#update_browser_test) | **PUT** /api/v1/synthetics/tests/browser/{public_id} | Edit a browser test
[**update_private_location**](SyntheticsApi.md#update_private_location) | **PUT** /api/v1/synthetics/private-locations/{location_id} | Edit a private location
[**update_test**](SyntheticsApi.md#update_test) | **PUT** /api/v1/synthetics/tests/{public_id} | Edit a test
[**update_test_pause_status**](SyntheticsApi.md#update_test_pause_status) | **PUT** /api/v1/synthetics/tests/{public_id}/status | Pause or start a test


Expand Down Expand Up @@ -529,168 +527,6 @@ Name | Type | Description | Notes
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK - Returns the created test details. | - |
**400** | - JSON format is wrong - Creation failed | - |
**402** | Test quota is reached | - |
**403** | Forbidden | - |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **create_test**
> SyntheticsTestDetails create_test(body)

Create a test

Create a Synthetic test.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import synthetics_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = synthetics_api.SyntheticsApi(api_client)
body = SyntheticsTestDetails(
config=SyntheticsTestConfig(
assertions=[
SyntheticsAssertion(),
],
config_variables=[
SyntheticsConfigVariable(
example="example_example",
name="VARIABLE_NAME",
pattern="pattern_example",
type=SyntheticsConfigVariableType("text"),
),
],
request=SyntheticsTestRequest(
basic_auth=SyntheticsBasicAuth(
password="",
username="",
),
body="body_example",
certificate=SyntheticsTestRequestCertificate(
cert=SyntheticsTestRequestCertificateItem(
content="content_example",
filename="filename_example",
updated_at="updated_at_example",
),
key=SyntheticsTestRequestCertificateItem(
content="content_example",
filename="filename_example",
updated_at="updated_at_example",
),
),
dns_server="dns_server_example",
headers=SyntheticsTestHeaders(
key="key_example",
),
host="host_example",
method=HTTPMethod("GET"),
no_saving_response_body=True,
port=1,
query={},
timeout=3.14,
url="url_example",
),
variables=[
SyntheticsBrowserVariable(
example="example_example",
id="id_example",
name="VARIABLE_NAME",
pattern="pattern_example",
type=SyntheticsBrowserVariableType("element"),
),
],
),
locations=[
"locations_example",
],
message="message_example",
monitor_id=1,
name="name_example",
options=SyntheticsTestOptions(
accept_self_signed=True,
allow_insecure=True,
device_ids=[
SyntheticsDeviceID("laptop_large"),
],
disable_cors=True,
follow_redirects=True,
min_failure_duration=1,
min_location_failed=1,
monitor_options=SyntheticsTestOptionsMonitorOptions(
renotify_interval=0,
),
no_screenshot=True,
retry=SyntheticsTestOptionsRetry(
count=1,
interval=3.14,
),
tick_every=SyntheticsTickInterval(60),
),
public_id="public_id_example",
status=SyntheticsTestPauseStatus("live"),
steps=[
SyntheticsStep(
allow_failure=True,
name="name_example",
params={},
timeout=1,
type=SyntheticsStepType("assertCurrentUrl"),
),
],
subtype=SyntheticsTestDetailsSubType("http"),
tags=[
"tags_example",
],
type=SyntheticsTestDetailsType("api"),
) # SyntheticsTestDetails | Details of the test to create.

# example passing only required values which don't have defaults set
try:
# Create a test
api_response = api_instance.create_test(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SyntheticsApi->create_test: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SyntheticsTestDetails**](SyntheticsTestDetails.md)| Details of the test to create. |

### Return type

[**SyntheticsTestDetails**](SyntheticsTestDetails.md)

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
Expand Down Expand Up @@ -2274,170 +2110,6 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **update_test**
> SyntheticsTestDetails update_test(public_id, body)

Edit a test

Edit the configuration of a Synthetic test.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import synthetics_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = synthetics_api.SyntheticsApi(api_client)
public_id = "public_id_example" # str | The public ID of the test to get details from.
body = SyntheticsTestDetails(
config=SyntheticsTestConfig(
assertions=[
SyntheticsAssertion(),
],
config_variables=[
SyntheticsConfigVariable(
example="example_example",
name="VARIABLE_NAME",
pattern="pattern_example",
type=SyntheticsConfigVariableType("text"),
),
],
request=SyntheticsTestRequest(
basic_auth=SyntheticsBasicAuth(
password="",
username="",
),
body="body_example",
certificate=SyntheticsTestRequestCertificate(
cert=SyntheticsTestRequestCertificateItem(
content="content_example",
filename="filename_example",
updated_at="updated_at_example",
),
key=SyntheticsTestRequestCertificateItem(
content="content_example",
filename="filename_example",
updated_at="updated_at_example",
),
),
dns_server="dns_server_example",
headers=SyntheticsTestHeaders(
key="key_example",
),
host="host_example",
method=HTTPMethod("GET"),
no_saving_response_body=True,
port=1,
query={},
timeout=3.14,
url="url_example",
),
variables=[
SyntheticsBrowserVariable(
example="example_example",
id="id_example",
name="VARIABLE_NAME",
pattern="pattern_example",
type=SyntheticsBrowserVariableType("element"),
),
],
),
locations=[
"locations_example",
],
message="message_example",
monitor_id=1,
name="name_example",
options=SyntheticsTestOptions(
accept_self_signed=True,
allow_insecure=True,
device_ids=[
SyntheticsDeviceID("laptop_large"),
],
disable_cors=True,
follow_redirects=True,
min_failure_duration=1,
min_location_failed=1,
monitor_options=SyntheticsTestOptionsMonitorOptions(
renotify_interval=0,
),
no_screenshot=True,
retry=SyntheticsTestOptionsRetry(
count=1,
interval=3.14,
),
tick_every=SyntheticsTickInterval(60),
),
public_id="public_id_example",
status=SyntheticsTestPauseStatus("live"),
steps=[
SyntheticsStep(
allow_failure=True,
name="name_example",
params={},
timeout=1,
type=SyntheticsStepType("assertCurrentUrl"),
),
],
subtype=SyntheticsTestDetailsSubType("http"),
tags=[
"tags_example",
],
type=SyntheticsTestDetailsType("api"),
) # SyntheticsTestDetails | New test details to be saved.

# example passing only required values which don't have defaults set
try:
# Edit a test
api_response = api_instance.update_test(public_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SyntheticsApi->update_test: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**public_id** | **str**| The public ID of the test to get details from. |
**body** | [**SyntheticsTestDetails**](SyntheticsTestDetails.md)| New test details to be saved. |

### Return type

[**SyntheticsTestDetails**](SyntheticsTestDetails.md)

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | - JSON format is wrong - Updating sub-type is forbidden | - |
**403** | Forbidden | - |
**404** | - Synthetic is not activated for the user - Test is not owned by the user - Test can't be found | - |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **update_test_pause_status**
> bool update_test_pause_status(public_id, body)

Expand Down
Loading