-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 512d0225 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Aug 26, 2022
1 parent
b8bfbf2
commit d9db6d7
Showing
8 changed files
with
198 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...335235736/Create-a-new-timeseries-widget-with-ci_tests-data-source_2214529743/frozen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"2022-08-22T19:31:16.232Z" |
110 changes: 110 additions & 0 deletions
110
...5235736/Create-a-new-timeseries-widget-with-ci_tests-data-source_2214529743/recording.har
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"log": { | ||
"_recordingName": "Dashboards/Create a new timeseries widget with ci_tests data source", | ||
"creator": { | ||
"comment": "persister:fs", | ||
"name": "Polly.JS", | ||
"version": "6.0.5" | ||
}, | ||
"entries": [ | ||
{ | ||
"_id": "5f3037d5856fa51f5a0d0f4b41c83704", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 651, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
}, | ||
{ | ||
"_fromType": "array", | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 559, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "POST", | ||
"postData": { | ||
"mimeType": "application/json", | ||
"params": [], | ||
"text": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1661196676 with ci_tests datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"ci_tests\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}" | ||
}, | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v1/dashboard" | ||
}, | ||
"response": { | ||
"bodySize": 1065, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 1065, | ||
"text": "{\"notify_list\":null,\"description\":null,\"restricted_roles\":[],\"author_name\":null,\"template_variables\":null,\"is_read_only\":false,\"id\":\"ykp-mnk-euu\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1661196676 with ci_tests datasource\",\"url\":\"/dashboard/ykp-mnk-euu/test-createanewtimeserieswidgetwithcitestsdatasource-1661196676-with-citests-dat\",\"created_at\":\"2022-08-22T19:31:16.421905+00:00\",\"modified_at\":\"2022-08-22T19:31:16.421905+00:00\",\"reflow_type\":\"auto\",\"author_handle\":\"[email protected]\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"title\":\"\",\"legend_layout\":\"auto\",\"show_legend\":true,\"time\":{},\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"style\":{\"line_width\":\"normal\",\"palette\":\"dog_classic\",\"line_type\":\"solid\"},\"display_type\":\"line\",\"response_format\":\"timeseries\",\"queries\":[{\"search\":{\"query\":\"test_level:test\"},\"data_source\":\"ci_tests\",\"compute\":{\"aggregation\":\"count\"},\"name\":\"query1\",\"indexes\":[\"*\"],\"group_by\":[]}]}],\"type\":\"timeseries\"},\"id\":5710436152334347}],\"layout_type\":\"ordered\"}\n" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 594, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 200, | ||
"statusText": "OK" | ||
}, | ||
"startedDateTime": "2022-08-22T19:31:16.240Z", | ||
"time": 246 | ||
}, | ||
{ | ||
"_id": "fe4ecd80daea8135e7bcc76fe16fec42", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 0, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 520, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "DELETE", | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v1/dashboard/ykp-mnk-euu" | ||
}, | ||
"response": { | ||
"bodySize": 39, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 39, | ||
"text": "{\"deleted_dashboard_id\":\"ykp-mnk-euu\"}\n" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 592, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 200, | ||
"statusText": "OK" | ||
}, | ||
"startedDateTime": "2022-08-22T19:31:16.499Z", | ||
"time": 189 | ||
} | ||
], | ||
"pages": [], | ||
"version": "1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* Create a new timeseries widget with ci_tests data source | ||
*/ | ||
|
||
import { client, v1 } from "@datadog/datadog-api-client"; | ||
|
||
const configuration = client.createConfiguration(); | ||
const apiInstance = new v1.DashboardsApi(configuration); | ||
|
||
const params: v1.DashboardsApiCreateDashboardRequest = { | ||
body: { | ||
title: | ||
"Example-Create_a_new_timeseries_widget_with_ci_tests_data_source with ci_tests datasource", | ||
widgets: [ | ||
{ | ||
definition: { | ||
title: "", | ||
showLegend: true, | ||
legendLayout: "auto", | ||
legendColumns: ["avg", "min", "max", "value", "sum"], | ||
time: {}, | ||
type: "timeseries", | ||
requests: [ | ||
{ | ||
formulas: [ | ||
{ | ||
formula: "query1", | ||
}, | ||
], | ||
queries: [ | ||
{ | ||
dataSource: "ci_tests", | ||
name: "query1", | ||
search: { | ||
query: "test_level:test", | ||
}, | ||
indexes: ["*"], | ||
compute: { | ||
aggregation: "count", | ||
}, | ||
groupBy: [], | ||
}, | ||
], | ||
responseFormat: "timeseries", | ||
style: { | ||
palette: "dog_classic", | ||
lineType: "solid", | ||
lineWidth: "normal", | ||
}, | ||
displayType: "line", | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
layoutType: "ordered", | ||
reflowType: "auto", | ||
}, | ||
}; | ||
|
||
apiInstance | ||
.createDashboard(params) | ||
.then((data: v1.Dashboard) => { | ||
console.log( | ||
"API called successfully. Returned data: " + JSON.stringify(data) | ||
); | ||
}) | ||
.catch((error: any) => console.error(error)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters