diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 84a7c25d04e5..6f6f29cece06 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -9572,7 +9572,7 @@ components: text: '## Some test markdown - ```js + ``` var x, y; @@ -9814,7 +9814,7 @@ components: text: '## Some test markdown - ```js + ``` var x, y; @@ -9974,7 +9974,7 @@ components: text: '## Some test markdown - ```js + ``` var x, y; diff --git a/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/frozen.json b/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/frozen.json index ca7aa6d2e1ac..2f83523f52da 100644 --- a/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/frozen.json +++ b/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/frozen.json @@ -1 +1 @@ -"2022-05-12T09:50:05.590Z" +"2025-10-03T14:49:56.873Z" diff --git a/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/recording.har b/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/recording.har index 108c273bdc5a..5aab17178cc2 100644 --- a/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/recording.har +++ b/cassettes/v1/Notebooks_2013965385/Create-a-notebook-returns-OK-response_634772673/recording.har @@ -8,11 +8,11 @@ }, "entries": [ { - "_id": "09dfd86c58e8335b7969bebfb88a5aec", + "_id": "ae2937fbfe0d7c743f45305d2565cd89", "_order": 0, "cache": {}, "request": { - "bodySize": 634, + "bodySize": 632, "cookies": [], "headers": [ { @@ -32,17 +32,17 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"data\":{\"attributes\":{\"cells\":[{\"attributes\":{\"definition\":{\"text\":\"## Some test markdown\\n\\n```js\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\",\"type\":\"markdown\"}},\"type\":\"notebook_cells\"},{\"attributes\":{\"definition\":{\"requests\":[{\"display_type\":\"line\",\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"type\":\"timeseries\",\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\",\"split_by\":{\"keys\":[],\"tags\":[]},\"time\":null},\"type\":\"notebook_cells\"}],\"name\":\"Test-Create_a_notebook_returns_OK_response-1652349005\",\"status\":\"published\",\"time\":{\"live_span\":\"1h\"}},\"type\":\"notebooks\"}}" + "text": "{\"data\":{\"attributes\":{\"cells\":[{\"attributes\":{\"definition\":{\"text\":\"## Some test markdown\\n\\n```\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\",\"type\":\"markdown\"}},\"type\":\"notebook_cells\"},{\"attributes\":{\"definition\":{\"requests\":[{\"display_type\":\"line\",\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"type\":\"timeseries\",\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\",\"split_by\":{\"keys\":[],\"tags\":[]},\"time\":null},\"type\":\"notebook_cells\"}],\"name\":\"Test-Create_a_notebook_returns_OK_response-1759502996\",\"status\":\"published\",\"time\":{\"live_span\":\"1h\"}},\"type\":\"notebooks\"}}" }, "queryString": [], "url": "https://api.datadoghq.com/api/v1/notebooks" }, "response": { - "bodySize": 1118, + "bodySize": 1240, "content": { "mimeType": "application/json", - "size": 1118, - "text": "{\"data\":{\"type\":\"notebooks\",\"id\":2466031,\"attributes\":{\"name\":\"Test-Create_a_notebook_returns_OK_response-1652349005\",\"cells\":[{\"attributes\":{\"definition\":{\"text\":\"## Some test markdown\\n\\n```js\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\",\"type\":\"markdown\"}},\"type\":\"notebook_cells\",\"id\":\"1eb30d08\"},{\"attributes\":{\"definition\":{\"requests\":[{\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_width\":\"normal\",\"palette\":\"dog_classic\",\"line_type\":\"solid\"},\"display_type\":\"line\"}],\"type\":\"timeseries\",\"show_legend\":true,\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\",\"split_by\":{\"keys\":[],\"tags\":[]},\"time\":null},\"type\":\"notebook_cells\",\"id\":\"k0c63hgi\"}],\"time\":{\"live_span\":\"1h\"},\"metadata\":{\"is_favorite\":false,\"is_template\":false,\"type\":null,\"take_snapshots\":false},\"template_variables\":[],\"status\":\"published\",\"modified\":\"2022-05-12T09:50:06.026505+00:00\",\"created\":\"2022-05-12T09:50:06.026505+00:00\",\"author\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}" + "size": 1240, + "text": "{\"data\":{\"type\":\"notebooks\",\"id\":13244449,\"attributes\":{\"name\":\"Test-Create_a_notebook_returns_OK_response-1759502996\",\"cells\":[{\"type\":\"notebook_cells\",\"id\":\"p2ywawtx\",\"attributes\":{\"definition\":{\"type\":\"markdown\",\"text\":\"## Some test markdown\\n\\n```\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\"}}},{\"type\":\"notebook_cells\",\"attributes\":{\"time\":null,\"split_by\":{\"keys\":[],\"tags\":[]},\"definition\":{\"type\":\"timeseries\",\"requests\":[{\"display_type\":\"line\",\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\"},\"id\":\"g9sa14n1\"}],\"time\":{\"live_span\":\"1h\"},\"metadata\":{\"take_snapshots\":false,\"is_template\":false,\"is_favorite\":false,\"type\":null},\"template_variables\":[],\"status\":\"published\",\"modified\":\"2025-10-03T14:49:57.096812+00:00\",\"created\":\"2025-10-03T14:49:57.096812+00:00\",\"deleted\":null,\"tags\":null,\"author\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"created_at\":\"2020-12-29T22:58:44.733921+00:00\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}\n" }, "cookies": [], "headers": [ @@ -51,17 +51,17 @@ "value": "application/json" } ], - "headersSize": 678, + "headersSize": 692, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2022-05-12T09:50:05.595Z", - "time": 486 + "startedDateTime": "2025-10-03T14:49:56.882Z", + "time": 433 }, { - "_id": "2b6069bdbedfa696f8592a9614da37f2", + "_id": "8051c5b5585d45aaab4d0fc84d36c721", "_order": 0, "cache": {}, "request": { @@ -74,28 +74,33 @@ "value": "*/*" } ], - "headersSize": 502, + "headersSize": 503, "httpVersion": "HTTP/1.1", "method": "DELETE", "queryString": [], - "url": "https://api.datadoghq.com/api/v1/notebooks/2466031" + "url": "https://api.datadoghq.com/api/v1/notebooks/13244449" }, "response": { "bodySize": 0, "content": { - "mimeType": "text/plain", + "mimeType": "text/html; charset=utf-8", "size": 0 }, "cookies": [], - "headers": [], - "headersSize": 624, + "headers": [ + { + "name": "content-type", + "value": "text/html; charset=utf-8" + } + ], + "headersSize": 678, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 204, "statusText": "No Content" }, - "startedDateTime": "2022-05-12T09:50:06.089Z", - "time": 602 + "startedDateTime": "2025-10-03T14:49:57.322Z", + "time": 300 } ], "pages": [], diff --git a/cassettes/v1/Notebooks_2013965385/Update-a-notebook-returns-OK-response_492967446/recording.har b/cassettes/v1/Notebooks_2013965385/Update-a-notebook-returns-OK-response_492967446/recording.har index 60edc081360d..6dbd3ecd3e07 100644 --- a/cassettes/v1/Notebooks_2013965385/Update-a-notebook-returns-OK-response_492967446/recording.har +++ b/cassettes/v1/Notebooks_2013965385/Update-a-notebook-returns-OK-response_492967446/recording.har @@ -61,11 +61,11 @@ "time": 447 }, { - "_id": "4ac53bb4c4af68d39eb348221c07f4d1", + "_id": "a815052c9f19d6148d41655e9794e362", "_order": 0, "cache": {}, "request": { - "bodySize": 642, + "bodySize": 640, "cookies": [], "headers": [ { @@ -85,7 +85,7 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"data\":{\"attributes\":{\"cells\":[{\"attributes\":{\"definition\":{\"text\":\"## Some test markdown\\n\\n```js\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\",\"type\":\"markdown\"}},\"type\":\"notebook_cells\"},{\"attributes\":{\"definition\":{\"requests\":[{\"display_type\":\"line\",\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"type\":\"timeseries\",\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\",\"split_by\":{\"keys\":[],\"tags\":[]},\"time\":null},\"type\":\"notebook_cells\"}],\"name\":\"Test-Update_a_notebook_returns_OK_response-1652349010-updated\",\"status\":\"published\",\"time\":{\"live_span\":\"1h\"}},\"type\":\"notebooks\"}}" + "text": "{\"data\":{\"attributes\":{\"cells\":[{\"attributes\":{\"definition\":{\"text\":\"## Some test markdown\\n\\n```\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\",\"type\":\"markdown\"}},\"type\":\"notebook_cells\"},{\"attributes\":{\"definition\":{\"requests\":[{\"display_type\":\"line\",\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"type\":\"timeseries\",\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\",\"split_by\":{\"keys\":[],\"tags\":[]},\"time\":null},\"type\":\"notebook_cells\"}],\"name\":\"Test-Update_a_notebook_returns_OK_response-1652349010-updated\",\"status\":\"published\",\"time\":{\"live_span\":\"1h\"}},\"type\":\"notebooks\"}}" }, "queryString": [], "url": "https://api.datadoghq.com/api/v1/notebooks/2466034" @@ -95,7 +95,7 @@ "content": { "mimeType": "application/json", "size": 1126, - "text": "{\"data\":{\"type\":\"notebooks\",\"id\":2466034,\"attributes\":{\"name\":\"Test-Update_a_notebook_returns_OK_response-1652349010-updated\",\"cells\":[{\"attributes\":{\"definition\":{\"text\":\"## Some test markdown\\n\\n```js\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\",\"type\":\"markdown\"}},\"type\":\"notebook_cells\",\"id\":\"7th9aiq2\"},{\"attributes\":{\"definition\":{\"requests\":[{\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_width\":\"normal\",\"palette\":\"dog_classic\",\"line_type\":\"solid\"},\"display_type\":\"line\"}],\"type\":\"timeseries\",\"show_legend\":true,\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\",\"split_by\":{\"keys\":[],\"tags\":[]},\"time\":null},\"type\":\"notebook_cells\",\"id\":\"dvsx205s\"}],\"time\":{\"live_span\":\"1h\"},\"metadata\":{\"is_favorite\":false,\"is_template\":false,\"type\":null,\"take_snapshots\":false},\"template_variables\":[],\"status\":\"published\",\"modified\":\"2022-05-12T09:50:10.903600+00:00\",\"created\":\"2022-05-12T09:50:10.418530+00:00\",\"author\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}" + "text": "{\"data\":{\"type\":\"notebooks\",\"id\":2466034,\"attributes\":{\"name\":\"Test-Update_a_notebook_returns_OK_response-1652349010-updated\",\"cells\":[{\"attributes\":{\"definition\":{\"text\":\"## Some test markdown\\n\\n```\\nvar x, y;\\nx = 5;\\ny = 6;\\n```\",\"type\":\"markdown\"}},\"type\":\"notebook_cells\",\"id\":\"7th9aiq2\"},{\"attributes\":{\"definition\":{\"requests\":[{\"q\":\"avg:system.load.1{*}\",\"style\":{\"line_width\":\"normal\",\"palette\":\"dog_classic\",\"line_type\":\"solid\"},\"display_type\":\"line\"}],\"type\":\"timeseries\",\"show_legend\":true,\"yaxis\":{\"scale\":\"linear\"}},\"graph_size\":\"m\",\"split_by\":{\"keys\":[],\"tags\":[]},\"time\":null},\"type\":\"notebook_cells\",\"id\":\"dvsx205s\"}],\"time\":{\"live_span\":\"1h\"},\"metadata\":{\"is_favorite\":false,\"is_template\":false,\"type\":null,\"take_snapshots\":false},\"template_variables\":[],\"status\":\"published\",\"modified\":\"2022-05-12T09:50:10.903600+00:00\",\"created\":\"2022-05-12T09:50:10.418530+00:00\",\"author\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}" }, "cookies": [], "headers": [ diff --git a/examples/v1/logs-pipelines/CreateLogsPipeline.ts b/examples/v1/logs-pipelines/CreateLogsPipeline.ts index f61a47f79a1b..ccfd0c27dbe5 100644 --- a/examples/v1/logs-pipelines/CreateLogsPipeline.ts +++ b/examples/v1/logs-pipelines/CreateLogsPipeline.ts @@ -16,8 +16,8 @@ const params: v1.LogsPipelinesApiCreateLogsPipelineRequest = { processors: [ { grok: { - matchRules: "rule_name_1 foo\nrule_name_2 bar\n", - supportRules: "rule_name_1 foo\nrule_name_2 bar\n", + matchRules: "rule_name_1 foo\nrule_name_2 bar", + supportRules: "rule_name_1 foo\nrule_name_2 bar", }, isEnabled: false, samples: [], diff --git a/examples/v1/logs-pipelines/UpdateLogsPipeline.ts b/examples/v1/logs-pipelines/UpdateLogsPipeline.ts index 3605ecd66513..186e95e357c6 100644 --- a/examples/v1/logs-pipelines/UpdateLogsPipeline.ts +++ b/examples/v1/logs-pipelines/UpdateLogsPipeline.ts @@ -16,8 +16,8 @@ const params: v1.LogsPipelinesApiUpdateLogsPipelineRequest = { processors: [ { grok: { - matchRules: "rule_name_1 foo\nrule_name_2 bar\n", - supportRules: "rule_name_1 foo\nrule_name_2 bar\n", + matchRules: "rule_name_1 foo\nrule_name_2 bar", + supportRules: "rule_name_1 foo\nrule_name_2 bar", }, isEnabled: false, samples: [], diff --git a/examples/v1/notebooks/CreateNotebook.ts b/examples/v1/notebooks/CreateNotebook.ts index 0e50bdc199fc..e6ba23ce9bdf 100644 --- a/examples/v1/notebooks/CreateNotebook.ts +++ b/examples/v1/notebooks/CreateNotebook.ts @@ -20,7 +20,7 @@ const params: v1.NotebooksApiCreateNotebookRequest = { ` + "```" + - `js + ` var x, y; x = 5; y = 6; diff --git a/examples/v1/notebooks/UpdateNotebook.ts b/examples/v1/notebooks/UpdateNotebook.ts index 2519d271a62e..8b4697bcc300 100644 --- a/examples/v1/notebooks/UpdateNotebook.ts +++ b/examples/v1/notebooks/UpdateNotebook.ts @@ -23,7 +23,7 @@ const params: v1.NotebooksApiUpdateNotebookRequest = { ` + "```" + - `js + ` var x, y; x = 5; y = 6; diff --git a/features/v1/logs_pipelines.feature b/features/v1/logs_pipelines.feature index 66305bbbaf2c..cdb150dd6edf 100644 --- a/features/v1/logs_pipelines.feature +++ b/features/v1/logs_pipelines.feature @@ -24,14 +24,14 @@ Feature: Logs Pipelines @generated @skip @team:DataDog/event-platform-experience Scenario: Create a pipeline returns "Bad Request" response Given new "CreateLogsPipeline" request - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/event-platform-experience Scenario: Create a pipeline returns "OK" response Given new "CreateLogsPipeline" request - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 200 OK @@ -128,7 +128,7 @@ Feature: Logs Pipelines Scenario: Update a pipeline returns "Bad Request" response Given new "UpdateLogsPipeline" request And request contains "pipeline_id" parameter from "REPLACE.ME" - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 400 Bad Request @@ -136,7 +136,7 @@ Feature: Logs Pipelines Scenario: Update a pipeline returns "OK" response Given new "UpdateLogsPipeline" request And request contains "pipeline_id" parameter from "REPLACE.ME" - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 200 OK diff --git a/features/v1/notebooks.feature b/features/v1/notebooks.feature index 2788eb421e5c..3ff8343c9b19 100644 --- a/features/v1/notebooks.feature +++ b/features/v1/notebooks.feature @@ -13,19 +13,19 @@ Feature: Notebooks @generated @skip @team:DataDog/notebooks Scenario: Create a notebook returns "Bad Request" response Given new "CreateNotebook" request - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/notebooks Scenario: Create a notebook returns "OK" response Given new "CreateNotebook" request - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "notebooks" And the response "data.attributes.name" is equal to "{{ unique }}" - And the response "data.attributes.cells[0].attributes.definition.text" is equal to "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```" + And the response "data.attributes.cells[0].attributes.definition.text" is equal to "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```" @skip @team:DataDog/notebooks Scenario: Delete a notebook returns "Bad Request" response @@ -98,7 +98,7 @@ Feature: Notebooks Scenario: Update a notebook returns "Bad Request" response Given new "UpdateNotebook" request And request contains "notebook_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 400 Bad Request @@ -106,7 +106,7 @@ Feature: Notebooks Scenario: Update a notebook returns "Conflict" response Given new "UpdateNotebook" request And request contains "notebook_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 409 Conflict @@ -114,7 +114,7 @@ Feature: Notebooks Scenario: Update a notebook returns "Not Found" response Given new "UpdateNotebook" request And request contains "notebook_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 404 Not Found @@ -123,7 +123,7 @@ Feature: Notebooks Given new "UpdateNotebook" request And there is a valid "notebook" in the system And request contains "notebook_id" parameter from "notebook.data.id" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}-updated", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}-updated", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 200 OK And the response "data.attributes.name" is equal to "{{ unique }}-updated"