Skip to content
Open
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
6 changes: 3 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1495,11 +1495,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:<name>`
description: A tag of the form `team:<name>` or `ai:<value>`.
type: string
maxItems: 5
maxItems: 7
nullable: true
type: array
template_variable_presets:
Expand Down
6 changes: 3 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30747,11 +30747,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:<name>`
description: A tag of the form `team:<name>` or `ai:<value>`.
type: string
maxItems: 5
maxItems: 7
nullable: true
readOnly: true
type: array
Expand Down
27 changes: 27 additions & 0 deletions examples/v1/dashboards/GetDashboard_3568243180.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Get a dashboard with five team tags and two AI tags

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardsApi;
import com.datadog.api.client.v1.model.Dashboard;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
DashboardsApi apiInstance = new DashboardsApi(defaultClient);

// there is a valid "dashboard_with_team_and_ai_tags" in the system
String DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID = System.getenv("DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID");

try {
Dashboard result = apiInstance.getDashboard(DASHBOARD_WITH_TEAM_AND_AI_TAGS_ID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardsApi#getDashboard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Get dashboard list items with five team tags and two AI tags

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardListsApi;
import com.datadog.api.client.v2.model.DashboardListItems;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);

// there is a valid "dashboard_list" in the system
Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

try {
DashboardListItems result = apiInstance.getDashboardListItems(DASHBOARD_LIST_ID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardListsApi#getDashboardListItems");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public Dashboard addTagsItem(String tagsItem) {
}

/**
* List of team names representing ownership of a dashboard.
* Tags associated with the dashboard. Supports up to five team tags and two AI tags.
*
* @return tags
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public Integer getPopularity() {
}

/**
* List of team names representing ownership of a dashboard.
* Tags associated with the dashboard. Supports up to five team tags and two AI tags.
*
* @return tags
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,18 @@ Feature: Dashboards
Then the response status is 200 OK
And the response "author_name" is equal to "Frog Account"

@team:DataDog/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:epsilon"
And the response "tags" array contains value "ai:generated"
And the response "tags" array contains value "ai:edited"

@team:DataDog/reporting-and-sharing
Scenario: Get a shared dashboard returns "OK" response
Given there is a valid "dashboard" in the system
Expand Down
12 changes: 12 additions & 0 deletions src/test/resources/com/datadog/api/client/v1/api/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ Feature: Dashboard Lists
When the request is sent
Then the response status is 200 OK

@team:DataDog/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].tags" has length 7
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:DataDog/dashboards-backend
Scenario: Get items of a Dashboard List returns "Not Found" response
Given new "GetDashboardListItems" request
Expand Down
16 changes: 16 additions & 0 deletions src/test/resources/com/datadog/api/client/v2/api/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,13 @@
"scenario": "Get a dashboard returns 'author_name'",
"version": "v1"
},
{
"feature": "Dashboards",
"feature_file": "../../com/datadog/api/client/v1/api/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": "../../com/datadog/api/client/v1/api/dashboards.feature",
Expand Down Expand Up @@ -4662,6 +4669,13 @@
"scenario": "Delete custom timeboard dashboard from an existing dashboard list returns \"OK\" response",
"version": "v2"
},
{
"feature": "Dashboard Lists",
"feature_file": "../../com/datadog/api/client/v2/api/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": "../../com/datadog/api/client/v2/api/dashboard_lists.feature",
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
@@ -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"
}
Loading