diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 32d1be79c7ac..8dab661e7f8a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -1497,11 +1497,11 @@ components: nullable: true type: array tags: - description: List of team names representing ownership of a dashboard. + description: Tags associated with the dashboard. Supports up to five team tags and two AI tags. items: - description: The name of a Datadog team of the form `team:` + description: A dashboard tag, such as `team:` or `ai:`. type: string - maxItems: 5 + maxItems: 7 nullable: true type: array template_variable_presets: @@ -1994,7 +1994,7 @@ components: dataset_provider: $ref: "#/components/schemas/PublishedDatasetProvider" filter: - description: Filter applied to the dataset's rows, using events-style search syntax. + description: Filter applied to the rows of the dataset, using events-style search syntax. example: "service:web-store" type: string limit: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6b96392bdd5c..2d1e441952a2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -31666,11 +31666,11 @@ components: readOnly: true type: integer tags: - description: List of team names representing ownership of a dashboard. + description: Tags associated with the dashboard. Supports up to five team tags and two AI tags. items: - description: The name of a Datadog team, formatted as `team:` + description: A dashboard tag, such as `team:` or `ai:`. type: string - maxItems: 5 + maxItems: 7 nullable: true readOnly: true type: array diff --git a/examples/v1/dashboards/GetDashboard_3568243180.ts b/examples/v1/dashboards/GetDashboard_3568243180.ts new file mode 100644 index 000000000000..8c4a58b4919a --- /dev/null +++ b/examples/v1/dashboards/GetDashboard_3568243180.ts @@ -0,0 +1,31 @@ +/** + * Get a dashboard with five team tags and two AI tags + */ + +import { client, v1 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration({ + authMethods: { + AuthZ: { + accessToken: process.env.DD_BEARER_TOKEN as string, + }, + }, +}); +const apiInstance = new v1.DashboardsApi(configuration); + +// there is a valid "dashboard_with_team_and_ai_tags" in the system +const DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID = process.env + .DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID as string; + +const params: v1.DashboardsApiGetDashboardRequest = { + dashboardId: DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID, +}; + +apiInstance + .getDashboard(params) + .then((data: v1.Dashboard) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/dashboard-lists/GetDashboardListItems_2618168713.ts b/examples/v2/dashboard-lists/GetDashboardListItems_2618168713.ts new file mode 100644 index 000000000000..e151d0c7e51c --- /dev/null +++ b/examples/v2/dashboard-lists/GetDashboardListItems_2618168713.ts @@ -0,0 +1,30 @@ +/** + * Get dashboard list items with five team tags and two AI tags + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration({ + authMethods: { + AuthZ: { + accessToken: process.env.DD_BEARER_TOKEN as string, + }, + }, +}); +const apiInstance = new v2.DashboardListsApi(configuration); + +// there is a valid "dashboard_list" in the system +const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string); + +const params: v2.DashboardListsApiGetDashboardListItemsRequest = { + dashboardListId: DASHBOARD_LIST_ID, +}; + +apiInstance + .getDashboardListItems(params) + .then((data: v2.DashboardListItems) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/generated-test/test-runner-data/manifest.json b/features/generated-test/test-runner-data/manifest.json index 244ba23525d1..b79f57f58de4 100644 --- a/features/generated-test/test-runner-data/manifest.json +++ b/features/generated-test/test-runner-data/manifest.json @@ -966,6 +966,13 @@ "scenario": "Get a dashboard returns 'author_name'", "version": "v1" }, + { + "feature": "Dashboards", + "feature_file": "../../v1/dashboards.feature", + "file": "v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json", + "scenario": "Get a dashboard with five team tags and two AI tags", + "version": "v1" + }, { "feature": "Dashboards", "feature_file": "../../v1/dashboards.feature", @@ -4788,6 +4795,13 @@ "scenario": "Delete custom timeboard dashboard from an existing dashboard list returns \"OK\" response", "version": "v2" }, + { + "feature": "Dashboard Lists", + "feature_file": "../../v2/dashboard_lists.feature", + "file": "v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json", + "scenario": "Get dashboard list items with five team tags and two AI tags", + "version": "v2" + }, { "feature": "Dashboard Lists", "feature_file": "../../v2/dashboard_lists.feature", diff --git a/features/generated-test/test-runner-data/v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json b/features/generated-test/test-runner-data/v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json new file mode 100644 index 000000000000..ee94945f827b --- /dev/null +++ b/features/generated-test/test-runner-data/v1/dashboards/get-a-dashboard-with-five-team-tags-and-two-ai-tags.json @@ -0,0 +1,35 @@ +{ + "api": "Dashboards", + "expected_status": 200, + "feature": "Dashboards", + "id": "v1/Dashboards/Get a dashboard with five team tags and two AI tags", + "operation_id": "GetDashboard", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "dashboard_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dashboard_with_team_and_ai_tags.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v1/dashboard/{dashboard_id}" + }, + "scenario": "Get a dashboard with five team tags and two AI tags", + "schema_version": 1, + "version": "v1" +} diff --git a/features/generated-test/test-runner-data/v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json b/features/generated-test/test-runner-data/v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json new file mode 100644 index 000000000000..8d3ac8ea9913 --- /dev/null +++ b/features/generated-test/test-runner-data/v2/dashboard-lists/get-dashboard-list-items-with-five-team-tags-and-two-ai-tags.json @@ -0,0 +1,35 @@ +{ + "api": "DashboardLists", + "expected_status": 200, + "feature": "Dashboard Lists", + "id": "v2/Dashboard Lists/Get dashboard list items with five team tags and two AI tags", + "operation_id": "GetDashboardListItems", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "dashboard_list_id", + "required": true, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "path": "dashboard_list.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards" + }, + "scenario": "Get dashboard list items with five team tags and two AI tags", + "schema_version": 1, + "version": "v2" +} diff --git a/features/generated-test/test-server-data/v1/dashboards.json b/features/generated-test/test-server-data/v1/dashboards.json index 7f8ed4b0cf73..9fde83ff70c0 100644 --- a/features/generated-test/test-server-data/v1/dashboards.json +++ b/features/generated-test/test-server-data/v1/dashboards.json @@ -12247,6 +12247,96 @@ "scenario": "Get a dashboard returns 'author_name'", "version": "v1" }, + { + "feature": "Dashboards", + "frozen_at": "2026-08-31T02:38:16.989Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "layout_type": "ordered", + "tags": [ + "team:alpha", + "team:beta", + "team:gamma", + "team:delta", + "team:epsilon", + "ai:generated", + "ai:edited" + ], + "title": "Test-Get_a_dashboard_with_five_team_tags_and_two_AI_tags-1788143896", + "widgets": [] + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v1/dashboard", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"id\":\"7j6-m9w-ts2\",\"title\":\"Test-Get_a_dashboard_with_five_team_tags_and_two_AI_tags-1788143896\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/7j6-m9w-ts2/test-getadashboardwithfiveteamtagsandtwoaitags-1788143896\",\"template_variables\":null,\"widgets\":[],\"notify_list\":null,\"created_at\":\"2026-08-31T02:38:17.100817+00:00\",\"modified_at\":\"2026-08-31T02:38:17.100817+00:00\",\"tags\":[\"team:alpha\",\"team:beta\",\"team:gamma\",\"team:delta\",\"team:epsilon\",\"ai:generated\",\"ai:edited\"],\"restricted_roles\":[]}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v1/dashboard/7j6-m9w-ts2", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"id\":\"7j6-m9w-ts2\",\"title\":\"Test-Get_a_dashboard_with_five_team_tags_and_two_AI_tags-1788143896\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/7j6-m9w-ts2/test-getadashboardwithfiveteamtagsandtwoaitags-1788143896\",\"template_variables\":null,\"widgets\":[],\"notify_list\":null,\"created_at\":\"2026-08-31T02:38:17.100817+00:00\",\"modified_at\":\"2026-08-31T02:38:17.100817+00:00\",\"tags\":[\"team:alpha\",\"team:beta\",\"team:gamma\",\"team:delta\",\"team:epsilon\",\"ai:generated\",\"ai:edited\"],\"restricted_roles\":[]}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v1/dashboard/7j6-m9w-ts2", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"deleted_dashboard_id\":\"7j6-m9w-ts2\"}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get a dashboard with five team tags and two AI tags", + "version": "v1" + }, { "feature": "Dashboards", "frozen_at": "2024-11-15T19:33:06.595Z", diff --git a/features/generated-test/test-server-data/v2/dashboard-lists.json b/features/generated-test/test-server-data/v2/dashboard-lists.json index 440088fbfba5..fc81b8aa7aab 100644 --- a/features/generated-test/test-server-data/v2/dashboard-lists.json +++ b/features/generated-test/test-server-data/v2/dashboard-lists.json @@ -737,6 +737,174 @@ "scenario": "Delete custom timeboard dashboard from an existing dashboard list returns \"OK\" response", "version": "v2" }, + { + "feature": "Dashboard Lists", + "frozen_at": "2026-08-31T02:38:18.801Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "name": "Test-Get_dashboard_list_items_with_five_team_tags_and_two_AI_tags-1788143898" + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v1/dashboard/lists/manual", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"author\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"created\":\"2026-08-31T02:38:19.366670+00:00\",\"dashboards\":null,\"dashboard_count\":0,\"id\":673085,\"is_favorite\":false,\"modified\":\"2026-08-31T02:38:19.366675+00:00\",\"name\":\"Test-Get_dashboard_list_items_with_five_team_tags_and_two_AI_tags-1788143898\",\"type\":\"manual_dashboard_list\"}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "layout_type": "ordered", + "tags": [ + "team:alpha", + "team:beta", + "team:gamma", + "team:delta", + "team:epsilon", + "ai:generated", + "ai:edited" + ], + "title": "Test-Get_dashboard_list_items_with_five_team_tags_and_two_AI_tags-1788143898", + "widgets": [] + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v1/dashboard", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"id\":\"fn2-4ry-3vu\",\"title\":\"Test-Get_dashboard_list_items_with_five_team_tags_and_two_AI_tags-1788143898\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/fn2-4ry-3vu/test-getdashboardlistitemswithfiveteamtagsandtwoaitags-1788143898\",\"template_variables\":null,\"widgets\":[],\"notify_list\":null,\"created_at\":\"2026-08-31T02:38:19.484838+00:00\",\"modified_at\":\"2026-08-31T02:38:19.484838+00:00\",\"tags\":[\"team:alpha\",\"team:beta\",\"team:gamma\",\"team:delta\",\"team:epsilon\",\"ai:generated\",\"ai:edited\"],\"restricted_roles\":[]}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "dashboards": [ + { + "id": "fn2-4ry-3vu", + "type": "custom_timeboard" + } + ] + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/dashboard/lists/manual/673085/dashboards", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"added_dashboards_to_list\":[{\"type\":\"custom_timeboard\",\"id\":\"fn2-4ry-3vu\"}]}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/dashboard/lists/manual/673085/dashboards", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"dashboards\":[{\"author\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"created\":\"2026-08-31T02:38:19.484838+00:00\",\"is_favorite\":false,\"is_shared\":false,\"modified\":\"2026-08-31T02:38:19.484838+00:00\",\"title\":\"Test-Get_dashboard_list_items_with_five_team_tags_and_two_AI_tags-1788143898\",\"type\":\"custom_timeboard\",\"id\":\"fn2-4ry-3vu\",\"url\":\"/dashboard/fn2-4ry-3vu/test-getdashboardlistitemswithfiveteamtagsandtwoaitags-1788143898\",\"is_read_only\":false,\"tags\":[\"team:alpha\",\"team:beta\",\"team:gamma\",\"team:delta\",\"team:epsilon\",\"ai:generated\",\"ai:edited\"],\"icon\":null,\"integration_id\":null,\"popularity\":0}],\"total\":1}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v1/dashboard/fn2-4ry-3vu", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"deleted_dashboard_id\":\"fn2-4ry-3vu\"}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v1/dashboard/lists/manual/673085", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"deleted_dashboard_list_id\":673085}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get dashboard list items with five team tags and two AI tags", + "version": "v2" + }, { "feature": "Dashboard Lists", "frozen_at": "2022-03-21T19:16:49.586Z", diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index 10d1ecf15be4..1a46cb42e10e 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -1428,6 +1428,22 @@ Feature: Dashboards Then the response status is 200 OK And the response "author_name" is equal to "Frog Account" + @team:ddoghq/dashboards-backend + Scenario: Get a dashboard with five team tags and two AI tags + Given there is a valid "dashboard_with_team_and_ai_tags" in the system + And new "GetDashboard" request + And request contains "dashboard_id" parameter from "dashboard_with_team_and_ai_tags.id" + When the request is sent + Then the response status is 200 OK + And the response "tags" has length 7 + And the response "tags" array contains value "team:alpha" + And the response "tags" array contains value "team:beta" + And the response "tags" array contains value "team:gamma" + And the response "tags" array contains value "team:delta" + And the response "tags" array contains value "team:epsilon" + And the response "tags" array contains value "ai:generated" + And the response "tags" array contains value "ai:edited" + @team:ddoghq/reporting-and-sharing Scenario: Get a shared dashboard returns "OK" response Given there is a valid "dashboard" in the system diff --git a/features/v1/given.json b/features/v1/given.json index bf5e92cd5920..907f52316e0d 100644 --- a/features/v1/given.json +++ b/features/v1/given.json @@ -11,6 +11,18 @@ "tag": "Dashboards", "operationId": "CreateDashboard" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"title\": \"{{ unique }}\", \"layout_type\": \"ordered\", \"widgets\": [], \"tags\": [\"team:alpha\", \"team:beta\", \"team:gamma\", \"team:delta\", \"team:epsilon\", \"ai:generated\", \"ai:edited\"]}" + } + ], + "step": "there is a valid \"dashboard_with_team_and_ai_tags\" in the system", + "key": "dashboard_with_team_and_ai_tags", + "tag": "Dashboards", + "operationId": "CreateDashboard" + }, { "parameters": [ { diff --git a/features/v2/dashboard_lists.feature b/features/v2/dashboard_lists.feature index 3601b1d2eb47..83a804c0a286 100644 --- a/features/v2/dashboard_lists.feature +++ b/features/v2/dashboard_lists.feature @@ -110,6 +110,26 @@ Feature: Dashboard Lists When the request is sent Then the response status is 200 OK + @team:ddoghq/dashboards-backend + Scenario: Get dashboard list items with five team tags and two AI tags + Given there is a valid "dashboard_list" in the system + And there is a valid "dashboard_with_team_and_ai_tags" in the system + And the "dashboard_list" has the "dashboard_with_team_and_ai_tags" + And new "GetDashboardListItems" request + And request contains "dashboard_list_id" parameter from "dashboard_list.id" + When the request is sent + Then the response status is 200 OK + And the response "dashboards" has length 1 + And the response "dashboards[0].id" is equal to "{{ dashboard_with_team_and_ai_tags.id }}" + And the response "dashboards[0].tags" has length 7 + And the response "dashboards[0].tags" array contains value "team:alpha" + And the response "dashboards[0].tags" array contains value "team:beta" + And the response "dashboards[0].tags" array contains value "team:gamma" + And the response "dashboards[0].tags" array contains value "team:delta" + And the response "dashboards[0].tags" array contains value "team:epsilon" + And the response "dashboards[0].tags" array contains value "ai:generated" + And the response "dashboards[0].tags" array contains value "ai:edited" + @generated @skip @team:ddoghq/dashboards-backend Scenario: Get items of a Dashboard List returns "Not Found" response Given new "GetDashboardListItems" request diff --git a/features/v2/given.json b/features/v2/given.json index b307445fc2cc..56c88424c924 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -329,6 +329,22 @@ "tag": "Dashboard Lists", "operationId": "CreateDashboardListItems" }, + { + "parameters": [ + { + "name": "dashboard_list_id", + "source": "dashboard_list.id" + }, + { + "name": "body", + "value": "{\"dashboards\": [{\"id\": \"{{ dashboard_with_team_and_ai_tags.id }}\", \"type\": \"custom_timeboard\"}]}" + } + ], + "step": "the \"dashboard_list\" has the \"dashboard_with_team_and_ai_tags\"", + "key": "dashboard_list_dashboard_with_team_and_ai_tags", + "tag": "Dashboard Lists", + "operationId": "CreateDashboardListItems" + }, { "parameters": [ { diff --git a/packages/datadog-api-client-v1/models/Dashboard.ts b/packages/datadog-api-client-v1/models/Dashboard.ts index 37dfe8701741..210a13a33c72 100644 --- a/packages/datadog-api-client-v1/models/Dashboard.ts +++ b/packages/datadog-api-client-v1/models/Dashboard.ts @@ -80,7 +80,7 @@ export class Dashboard { */ "tabs"?: Array; /** - * List of team names representing ownership of a dashboard. + * Tags associated with the dashboard. Supports up to five team tags and two AI tags. */ "tags"?: Array; /** diff --git a/packages/datadog-api-client-v1/models/DatasetListQuery.ts b/packages/datadog-api-client-v1/models/DatasetListQuery.ts index 2996c257e92e..d846932b6a99 100644 --- a/packages/datadog-api-client-v1/models/DatasetListQuery.ts +++ b/packages/datadog-api-client-v1/models/DatasetListQuery.ts @@ -26,7 +26,7 @@ export class DatasetListQuery { */ "datasetProvider": PublishedDatasetProvider; /** - * Filter applied to the dataset's rows, using events-style search syntax. + * Filter applied to the rows of the dataset, using events-style search syntax. */ "filter"?: string; /** diff --git a/packages/datadog-api-client-v2/models/DashboardListItem.ts b/packages/datadog-api-client-v2/models/DashboardListItem.ts index 2f669c131b53..59d86348bb76 100644 --- a/packages/datadog-api-client-v2/models/DashboardListItem.ts +++ b/packages/datadog-api-client-v2/models/DashboardListItem.ts @@ -53,7 +53,7 @@ export class DashboardListItem { */ "popularity"?: number; /** - * List of team names representing ownership of a dashboard. + * Tags associated with the dashboard. Supports up to five team tags and two AI tags. */ "tags"?: Array; /**