diff --git a/.apigentools-info b/.apigentools-info index 8b0813b1a38..47322839598 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-05-26 16:53:11.909073", - "spec_repo_commit": "fa84acd1" + "regenerated": "2023-05-26 17:55:42.689073", + "spec_repo_commit": "c4844513" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-05-26 16:53:11.930239", - "spec_repo_commit": "fa84acd1" + "regenerated": "2023-05-26 17:55:42.705092", + "spec_repo_commit": "c4844513" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index ee83aebc568..14fafe25bf1 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -13746,6 +13746,9 @@ components: type: string parser: $ref: '#/components/schemas/SyntheticsVariableParser' + secure: + description: Determines whether or not the extracted value will be obfuscated. + type: boolean type: $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptionsType' type: object diff --git a/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/frozen.json b/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/frozen.json index 33bd34de6d8..fd11157b686 100644 --- a/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/frozen.json +++ b/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/frozen.json @@ -1 +1 @@ -"2023-01-05T15:20:23.898Z" +"2023-05-23T13:41:47.597Z" diff --git a/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/recording.har b/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/recording.har index 28bda88a489..01254ad7abb 100644 --- a/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/recording.har +++ b/cassettes/v1/Synthetics_2658572017/Create-a-global-variable-from-test-returns-OK-response_2967481205/recording.har @@ -8,11 +8,11 @@ }, "entries": [ { - "_id": "b697210320a55a3f00a7bf7dca2eca0f", + "_id": "cbd17627b87f55470cf127936d0758f1", "_order": 0, "cache": {}, "request": { - "bodySize": 1023, + "bodySize": 1037, "cookies": [], "headers": [ { @@ -32,17 +32,17 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "text": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "queryString": [], "url": "https://api.datadoghq.com/api/v1/synthetics/tests/api" }, "response": { - "bodySize": 1239, + "bodySize": 1253, "content": { "mimeType": "application/json", - "size": 1239, - "text": "{\"status\":\"live\",\"public_id\":\"prg-fny-su9\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"deleted_at\":null,\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"monitor_id\":106967129,\"type\":\"api\",\"created_at\":\"2023-01-05T15:20:24.483020+00:00\",\"modified_at\":\"2023-01-05T15:20:24.483020+00:00\",\"subtype\":\"multi\",\"config\":{\"steps\":[{\"retry\":{\"count\":5,\"interval\":1000},\"name\":\"request is sent\",\"request\":{\"url\":\"https://datadoghq.com\",\"method\":\"GET\",\"timeout\":10},\"subtype\":\"http\",\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"type\":\"statusCode\",\"target\":200}],\"isCritical\":true,\"id\":\"dg9-uxx-k65\",\"extractedValues\":[{\"field\":\"server\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\",\"name\":\"EXTRACTED_VALUE\"}]}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":1000},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"tick_every\":60}}" + "size": 1253, + "text": "{\"public_id\":\"wk3-pn7-sn3\",\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-05-23T13:41:47.888352+00:00\",\"modified_at\":\"2023-05-23T13:41:47.888352+00:00\",\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\",\"id\":\"ymn-tzt-isn\"}]},\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"multi\",\"deleted_at\":null,\"monitor_id\":119820627,\"org_id\":321813}" }, "cookies": [], "headers": [ @@ -51,17 +51,17 @@ "value": "application/json" } ], - "headersSize": 624, + "headersSize": 663, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2023-01-05T15:20:23.901Z", - "time": 592 + "startedDateTime": "2023-05-23T13:41:47.614Z", + "time": 649 }, { - "_id": "5bd852f0eb4a846668522c57818d6cae", + "_id": "29977d1ce74ce920e2e1ad849607b5da", "_order": 0, "cache": {}, "request": { @@ -85,17 +85,17 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"description\":\"\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1672932023\",\"parse_test_options\":{\"localVariableName\":\"EXTRACTED_VALUE\",\"type\":\"local_variable\"},\"parse_test_public_id\":\"prg-fny-su9\",\"tags\":[],\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"secure\":false,\"value\":\"\"}}" + "text": "{\"description\":\"\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1684849307\",\"parse_test_options\":{\"localVariableName\":\"EXTRACTED_VALUE\",\"type\":\"local_variable\"},\"parse_test_public_id\":\"wk3-pn7-sn3\",\"tags\":[],\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"secure\":false,\"value\":\"\"}}" }, "queryString": [], "url": "https://api.datadoghq.com/api/v1/synthetics/variables" }, "response": { - "bodySize": 495, + "bodySize": 510, "content": { "mimeType": "application/json", - "size": 495, - "text": "{\"parse_test_options\":{\"type\":\"local_variable\",\"localVariableName\":\"EXTRACTED_VALUE\"},\"parse_test_extracted_at\":null,\"description\":\"\",\"tags\":[],\"last_error\":null,\"is_totp\":null,\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"value\":\"\",\"secure\":false},\"parse_test_public_id\":\"prg-fny-su9\",\"parse_test_name\":null,\"type\":\"variable\",\"id\":\"2dcbf35a-34a9-4254-8ddb-417593377a20\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1672932023\"}\n" + "size": 510, + "text": "{\"id\":\"c1b94a97-87df-440f-b5fc-ef7f391bf07a\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1684849307\",\"description\":\"\",\"type\":\"variable\",\"tags\":[],\"parse_test_public_id\":\"wk3-pn7-sn3\",\"parse_test_name\":null,\"parse_test_options\":{\"localVariableName\":\"EXTRACTED_VALUE\",\"type\":\"local_variable\"},\"parse_test_extracted_at\":null,\"is_totp\":null,\"is_fido\":null,\"last_error\":null,\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"secure\":false,\"value\":\"\"}}\n" }, "cookies": [], "headers": [ @@ -104,17 +104,17 @@ "value": "application/json" } ], - "headersSize": 623, + "headersSize": 666, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2023-01-05T15:20:24.502Z", - "time": 563 + "startedDateTime": "2023-05-23T13:41:48.273Z", + "time": 170 }, { - "_id": "77bac2103f49b190c6aaba294a726900", + "_id": "5416ecd349a2e141265486b9d15b18d8", "_order": 0, "cache": {}, "request": { @@ -131,7 +131,7 @@ "httpVersion": "HTTP/1.1", "method": "DELETE", "queryString": [], - "url": "https://api.datadoghq.com/api/v1/synthetics/variables/2dcbf35a-34a9-4254-8ddb-417593377a20" + "url": "https://api.datadoghq.com/api/v1/synthetics/variables/c1b94a97-87df-440f-b5fc-ef7f391bf07a" }, "response": { "bodySize": 0, @@ -146,17 +146,17 @@ "value": "text/html; charset=utf-8" } ], - "headersSize": 606, + "headersSize": 649, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2023-01-05T15:20:25.073Z", - "time": 519 + "startedDateTime": "2023-05-23T13:41:48.452Z", + "time": 167 }, { - "_id": "4e0eb2ab081e47b6cc3311509730e00f", + "_id": "ba553cdf9a870f9650e1f2a290951c95", "_order": 0, "cache": {}, "request": { @@ -180,7 +180,7 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"public_ids\":[\"prg-fny-su9\"]}" + "text": "{\"public_ids\":[\"wk3-pn7-sn3\"]}" }, "queryString": [], "url": "https://api.datadoghq.com/api/v1/synthetics/tests/delete" @@ -190,7 +190,7 @@ "content": { "mimeType": "application/json", "size": 96, - "text": "{\"deleted_tests\":[{\"deleted_at\":\"2023-01-05T15:20:26.202732+00:00\",\"public_id\":\"prg-fny-su9\"}]}\n" + "text": "{\"deleted_tests\":[{\"public_id\":\"wk3-pn7-sn3\",\"deleted_at\":\"2023-05-23T13:41:48.789772+00:00\"}]}\n" }, "cookies": [], "headers": [ @@ -199,14 +199,14 @@ "value": "application/json" } ], - "headersSize": 622, + "headersSize": 662, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2023-01-05T15:20:25.599Z", - "time": 651 + "startedDateTime": "2023-05-23T13:41:48.623Z", + "time": 227 } ], "pages": [], diff --git a/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/frozen.json b/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/frozen.json index 1b59bd5d263..4bdb8c9eee2 100644 --- a/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/frozen.json +++ b/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/frozen.json @@ -1 +1 @@ -"2022-08-30T12:59:30.516Z" +"2023-05-22T14:08:52.406Z" diff --git a/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/recording.har b/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/recording.har index 35a7240fe45..5dac018b946 100644 --- a/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/recording.har +++ b/cassettes/v1/Synthetics_2658572017/Create-an-API-test-with-multi-subtype-returns-OK-Returns-the-created-test-details-response_460745598/recording.har @@ -8,11 +8,11 @@ }, "entries": [ { - "_id": "e533bc723b59ee7a98aaf6ba29c84927", + "_id": "a48b8c73e651efb29dc99260937085a9", "_order": 0, "cache": {}, "request": { - "bodySize": 1095, + "bodySize": 1109, "cookies": [], "headers": [ { @@ -32,17 +32,17 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "text": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "queryString": [], "url": "https://api.datadoghq.com/api/v1/synthetics/tests/api" }, "response": { - "bodySize": 1310, + "bodySize": 1325, "content": { "mimeType": "application/json", - "size": 1310, - "text": "{\"status\":\"live\",\"public_id\":\"mtz-ccy-e3x\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"deleted_at\":null,\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"monitor_id\":81568663,\"type\":\"api\",\"created_at\":\"2022-08-30T12:59:31.130267+00:00\",\"modified_at\":\"2022-08-30T12:59:31.130267+00:00\",\"subtype\":\"multi\",\"config\":{\"steps\":[{\"retry\":{\"count\":5,\"interval\":1000},\"name\":\"request is sent\",\"request\":{\"url\":\"https://datadoghq.com\",\"method\":\"GET\",\"timeout\":10},\"subtype\":\"http\",\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"type\":\"statusCode\",\"target\":200}],\"isCritical\":true,\"id\":\"vst-9t6-t7t\",\"extractedValues\":[{\"field\":\"server\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\",\"name\":\"EXTRACTED_VALUE\"}]}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":1000},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"tick_every\":60}}" + "size": 1325, + "text": "{\"public_id\":\"i52-inf-ua8\",\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-05-22T14:08:52.875670+00:00\",\"modified_at\":\"2023-05-22T14:08:52.875670+00:00\",\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\",\"id\":\"enf-w74-k4y\"}]},\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"multi\",\"deleted_at\":null,\"monitor_id\":119714203,\"org_id\":569509}" }, "cookies": [], "headers": [ @@ -51,17 +51,17 @@ "value": "application/json" } ], - "headersSize": 624, + "headersSize": 662, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2022-08-30T12:59:30.521Z", - "time": 706 + "startedDateTime": "2023-05-22T14:08:52.410Z", + "time": 1110 }, { - "_id": "49a77c609a86a889de5f31472f457db9", + "_id": "82f8da6840c7eeca71810473b76e5cae", "_order": 0, "cache": {}, "request": { @@ -85,17 +85,17 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"public_ids\":[\"mtz-ccy-e3x\"]}" + "text": "{\"public_ids\":[\"i52-inf-ua8\"]}" }, "queryString": [], "url": "https://api.datadoghq.com/api/v1/synthetics/tests/delete" }, "response": { - "bodySize": 95, + "bodySize": 96, "content": { "mimeType": "application/json", - "size": 95, - "text": "{\"deleted_tests\":[{\"deleted_at\":\"2022-08-30T12:59:36.624525+00:00\",\"public_id\":\"mtz-ccy-e3x\"}]}" + "size": 96, + "text": "{\"deleted_tests\":[{\"public_id\":\"i52-inf-ua8\",\"deleted_at\":\"2023-05-22T14:08:53.980399+00:00\"}]}\n" }, "cookies": [], "headers": [ @@ -104,14 +104,14 @@ "value": "application/json" } ], - "headersSize": 665, + "headersSize": 661, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2022-08-30T12:59:31.235Z", - "time": 5523 + "startedDateTime": "2023-05-22T14:08:53.531Z", + "time": 690 } ], "pages": [], diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts index 011d66cfa21..6364535811f 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts @@ -36,6 +36,7 @@ const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = { type: "raw", }, type: "http_header", + secure: true, }, ], isCritical: true, diff --git a/features/v1/given.json b/features/v1/given.json index 1c5be660728..21120d825e6 100644 --- a/features/v1/given.json +++ b/features/v1/given.json @@ -199,7 +199,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"config\": {\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\"\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\"\n }\n ]\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 1000 },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" + "value": "{\n \"config\": {\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\",\n \"secure\": true\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\"\n }\n ]\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 1000 },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" } ], "step": "there is a valid \"synthetics_api_test_multi_step\" in the system", diff --git a/features/v1/synthetics.feature b/features/v1/synthetics.feature index 64bd99da6c0..2eb8926ff49 100644 --- a/features/v1/synthetics.feature +++ b/features/v1/synthetics.feature @@ -202,6 +202,7 @@ Feature: Synthetics And the response "name" is equal to "{{ unique }}" And the response "config.steps[0].retry.count" is equal to 5 And the response "config.steps[0].retry.interval" is equal to 1000 + And the response "config.steps[0].extractedValues[0].secure" is equal to true @generated @skip @team:DataDog/synthetics-app Scenario: Delete a global variable returns "JSON format is wrong" response diff --git a/features/v1/synthetics_api_test_multi_step_payload.json b/features/v1/synthetics_api_test_multi_step_payload.json index 117f1b0b72d..f514958caa2 100644 --- a/features/v1/synthetics_api_test_multi_step_payload.json +++ b/features/v1/synthetics_api_test_multi_step_payload.json @@ -25,7 +25,8 @@ "parser": { "type": "raw" }, - "type": "http_header" + "type": "http_header", + "secure": true } ], "isCritical": true, diff --git a/packages/datadog-api-client-v1/models/SyntheticsParsingOptions.ts b/packages/datadog-api-client-v1/models/SyntheticsParsingOptions.ts index e25d71b4cf5..93f05b1e753 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsParsingOptions.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsParsingOptions.ts @@ -24,6 +24,10 @@ export class SyntheticsParsingOptions { * Details of the parser to use for the global variable. */ "parser"?: SyntheticsVariableParser; + /** + * Determines whether or not the extracted value will be obfuscated. + */ + "secure"?: boolean; /** * Property of the Synthetic Test Response to use for a Synthetic global variable. */ @@ -50,6 +54,10 @@ export class SyntheticsParsingOptions { baseName: "parser", type: "SyntheticsVariableParser", }, + secure: { + baseName: "secure", + type: "boolean", + }, type: { baseName: "type", type: "SyntheticsGlobalVariableParseTestOptionsType",