Skip to content
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
4 changes: 4 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18642,6 +18642,10 @@ components:
description: Content of the file.
maxLength: 3145728
type: string
encoding:
description: Encoding of the file content. The only supported value is `base64`,
indicating the `content` field contains base64-encoded data.
type: string
name:
description: Name of the file.
maxLength: 1500
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public static void main(String[] args) {
.name("file name")
.originalFileName("image.png")
.content("file content")
.type("file type")))
.type("file type")
.encoding("base64")))
.basicAuth(
new SyntheticsBasicAuth(
new SyntheticsBasicAuthOauthClient()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@JsonPropertyOrder({
SyntheticsTestRequestBodyFile.JSON_PROPERTY_BUCKET_KEY,
SyntheticsTestRequestBodyFile.JSON_PROPERTY_CONTENT,
SyntheticsTestRequestBodyFile.JSON_PROPERTY_ENCODING,
SyntheticsTestRequestBodyFile.JSON_PROPERTY_NAME,
SyntheticsTestRequestBodyFile.JSON_PROPERTY_ORIGINAL_FILE_NAME,
SyntheticsTestRequestBodyFile.JSON_PROPERTY_SIZE,
Expand All @@ -35,6 +36,9 @@ public class SyntheticsTestRequestBodyFile {
public static final String JSON_PROPERTY_CONTENT = "content";
private String content;

public static final String JSON_PROPERTY_ENCODING = "encoding";
private String encoding;

public static final String JSON_PROPERTY_NAME = "name";
private String name;

Expand Down Expand Up @@ -89,6 +93,28 @@ public void setContent(String content) {
this.content = content;
}

public SyntheticsTestRequestBodyFile encoding(String encoding) {
this.encoding = encoding;
return this;
}

/**
* Encoding of the file content. The only supported value is <code>base64</code>, indicating the
* <code>content</code> field contains base64-encoded data.
*
* @return encoding
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ENCODING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEncoding() {
return encoding;
}

public void setEncoding(String encoding) {
this.encoding = encoding;
}

public SyntheticsTestRequestBodyFile name(String name) {
this.name = name;
return this;
Expand Down Expand Up @@ -231,6 +257,7 @@ public boolean equals(Object o) {
SyntheticsTestRequestBodyFile syntheticsTestRequestBodyFile = (SyntheticsTestRequestBodyFile) o;
return Objects.equals(this.bucketKey, syntheticsTestRequestBodyFile.bucketKey)
&& Objects.equals(this.content, syntheticsTestRequestBodyFile.content)
&& Objects.equals(this.encoding, syntheticsTestRequestBodyFile.encoding)
&& Objects.equals(this.name, syntheticsTestRequestBodyFile.name)
&& Objects.equals(this.originalFileName, syntheticsTestRequestBodyFile.originalFileName)
&& Objects.equals(this.size, syntheticsTestRequestBodyFile.size)
Expand All @@ -242,7 +269,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
bucketKey, content, name, originalFileName, size, type, additionalProperties);
bucketKey, content, encoding, name, originalFileName, size, type, additionalProperties);
}

@Override
Expand All @@ -251,6 +278,7 @@ public String toString() {
sb.append("class SyntheticsTestRequestBodyFile {\n");
sb.append(" bucketKey: ").append(toIndentedString(bucketKey)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" originalFileName: ").append(toIndentedString(originalFileName)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-12-09T11:18:08.137Z
2026-03-03T11:12:53.062Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"bodyType\":\"application/octet-stream\",\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"files\":[{\"content\":\"file content\",\"name\":\"file name\",\"originalFileName\":\"image.png\",\"type\":\"file type\"}],\"headers\":{\"unique\":\"testcreateanapitestwithafilepayloadreturnsokreturnsthecreatedtestdetailsresponse1733743088\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1733743088\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1733743088\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}"
"json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"bodyType\":\"application/octet-stream\",\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"files\":[{\"content\":\"file content\",\"encoding\":\"base64\",\"name\":\"file name\",\"originalFileName\":\"image.png\",\"type\":\"file type\"}],\"headers\":{\"unique\":\"testcreateanapitestwithafilepayloadreturnsokreturnsthecreatedtestdetailsresponse1772536373\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1772536373\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1772536373\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}"
},
"headers": {},
"method": "POST",
Expand All @@ -12,7 +12,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"public_id\":\"pbm-cwk-hzr\",\"name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1733743088\",\"status\":\"live\",\"type\":\"api\",\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"created_at\":\"2024-12-09T11:18:08.979546+00:00\",\"modified_at\":\"2024-12-09T11:18:08.979546+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"bodyType\":\"application/octet-stream\",\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"files\":[{\"name\":\"file name\",\"originalFileName\":\"image.png\",\"type\":\"file type\",\"bucketKey\":\"api-upload-file/pbm-cwk-hzr/2024-12-09T11:18:08.684149_ee770695-2a7a-48ef-aa76-148a8425ce69.json\"}],\"headers\":{\"unique\":\"testcreateanapitestwithafilepayloadreturnsokreturnsthecreatedtestdetailsresponse1733743088\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1733743088\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"created_by\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"deleted_at\":null,\"monitor_id\":159881040,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"}}",
"body": "{\"public_id\":\"x96-ukc-pvk\",\"name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1772536373\",\"status\":\"live\",\"type\":\"api\",\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"created_at\":\"2026-03-03T11:12:53.933929+00:00\",\"modified_at\":\"2026-03-03T11:12:53.933929+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"bodyType\":\"application/octet-stream\",\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"files\":[{\"encoding\":\"base64\",\"name\":\"file name\",\"originalFileName\":\"image.png\",\"type\":\"file type\",\"bucketKey\":\"api-upload-file/x96-ukc-pvk/2026-03-03T11:12:53.730968_6541a914-12d5-43ca-8dc6-387726057eb6.json\"}],\"headers\":{\"unique\":\"testcreateanapitestwithafilepayloadreturnsokreturnsthecreatedtestdetailsresponse1772536373\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_a_file_payload_returns_OK_Returns_the_created_test_details_response-1772536373\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"created_by\":{\"name\":\"frog\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"deleted_at\":null,\"monitor_id\":263059097,\"org_id\":321813,\"modified_by\":{\"name\":\"frog\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\"}}",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -27,13 +27,13 @@
"timeToLive": {
"unlimited": true
},
"id": "775e3cb8-0e68-31f4-0122-b5501d328e3d"
"id": "e639d1e3-5610-b828-89e1-74523f7328d4"
},
{
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"public_ids\":[\"pbm-cwk-hzr\"]}"
"json": "{\"public_ids\":[\"x96-ukc-pvk\"]}"
},
"headers": {},
"method": "POST",
Expand All @@ -42,7 +42,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"deleted_tests\":[{\"public_id\":\"pbm-cwk-hzr\",\"deleted_at\":\"2024-12-09T11:18:09.927667+00:00\"}]}\n",
"body": "{\"deleted_tests\":[{\"public_id\":\"x96-ukc-pvk\",\"deleted_at\":\"2026-03-03T11:12:54.336119+00:00\"}]}\n",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -57,6 +57,6 @@
"timeToLive": {
"unlimited": true
},
"id": "f8a3f039-59e9-8d4a-79a5-b3902d97f300"
"id": "3002cecd-3dbc-3efb-a2f8-01efe3b6daa3"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"name": "file name",
"originalFileName": "image.png",
"content": "file content",
"type": "file type"
"type": "file type",
"encoding": "base64"
}],
"basicAuth": {
"accessTokenUrl": "https://datadog-token.com",
Expand Down
Loading