-
Notifications
You must be signed in to change notification settings - Fork 58
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 7a0287eb of spec repo (#1439)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: Jiri Kuncar <[email protected]>
- Loading branch information
1 parent
0f78d0d
commit d46c426
Showing
11 changed files
with
219 additions
and
11 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Create a new dashboard with apm_issue_stream list_stream widget | ||
|
||
package main | ||
|
||
import ( | ||
"context" | ||
"encoding/json" | ||
"fmt" | ||
"os" | ||
|
||
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" | ||
) | ||
|
||
func main() { | ||
body := datadog.Dashboard{ | ||
LayoutType: datadog.DASHBOARDLAYOUTTYPE_ORDERED, | ||
Title: "Example-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget with list_stream widget", | ||
Widgets: []datadog.Widget{ | ||
{ | ||
Definition: datadog.WidgetDefinition{ | ||
ListStreamWidgetDefinition: &datadog.ListStreamWidgetDefinition{ | ||
Type: datadog.LISTSTREAMWIDGETDEFINITIONTYPE_LIST_STREAM, | ||
Requests: []datadog.ListStreamWidgetRequest{ | ||
{ | ||
Columns: []datadog.ListStreamColumn{ | ||
{ | ||
Width: datadog.LISTSTREAMCOLUMNWIDTH_AUTO, | ||
Field: "timestamp", | ||
}, | ||
}, | ||
Query: datadog.ListStreamQuery{ | ||
DataSource: datadog.LISTSTREAMSOURCE_APM_ISSUE_STREAM, | ||
QueryString: "", | ||
}, | ||
ResponseFormat: datadog.LISTSTREAMRESPONSEFORMAT_EVENT_LIST, | ||
}, | ||
}, | ||
}}, | ||
}, | ||
}, | ||
} | ||
ctx := datadog.NewDefaultContext(context.Background()) | ||
configuration := datadog.NewConfiguration() | ||
apiClient := datadog.NewAPIClient(configuration) | ||
resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) | ||
|
||
if err != nil { | ||
fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) | ||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) | ||
} | ||
|
||
responseContent, _ := json.MarshalIndent(resp, "", " ") | ||
fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) | ||
} |
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,54 @@ | ||
// Create a new dashboard with rum_issue_stream list_stream widget | ||
|
||
package main | ||
|
||
import ( | ||
"context" | ||
"encoding/json" | ||
"fmt" | ||
"os" | ||
|
||
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" | ||
) | ||
|
||
func main() { | ||
body := datadog.Dashboard{ | ||
LayoutType: datadog.DASHBOARDLAYOUTTYPE_ORDERED, | ||
Title: "Example-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget with list_stream widget", | ||
Widgets: []datadog.Widget{ | ||
{ | ||
Definition: datadog.WidgetDefinition{ | ||
ListStreamWidgetDefinition: &datadog.ListStreamWidgetDefinition{ | ||
Type: datadog.LISTSTREAMWIDGETDEFINITIONTYPE_LIST_STREAM, | ||
Requests: []datadog.ListStreamWidgetRequest{ | ||
{ | ||
Columns: []datadog.ListStreamColumn{ | ||
{ | ||
Width: datadog.LISTSTREAMCOLUMNWIDTH_AUTO, | ||
Field: "timestamp", | ||
}, | ||
}, | ||
Query: datadog.ListStreamQuery{ | ||
DataSource: datadog.LISTSTREAMSOURCE_RUM_ISSUE_STREAM, | ||
QueryString: "", | ||
}, | ||
ResponseFormat: datadog.LISTSTREAMRESPONSEFORMAT_EVENT_LIST, | ||
}, | ||
}, | ||
}}, | ||
}, | ||
}, | ||
} | ||
ctx := datadog.NewDefaultContext(context.Background()) | ||
configuration := datadog.NewConfiguration() | ||
apiClient := datadog.NewAPIClient(configuration) | ||
resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) | ||
|
||
if err != nil { | ||
fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) | ||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) | ||
} | ||
|
||
responseContent, _ := json.MarshalIndent(resp, "", " ") | ||
fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) | ||
} |
1 change: 1 addition & 0 deletions
1
...ashboards/Scenario_Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget.freeze
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-04-05T17:19:04.966Z |
38 changes: 38 additions & 0 deletions
38
..._Dashboards/Scenario_Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget.yaml
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,38 @@ | ||
interactions: | ||
- request: | ||
body: | | ||
{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget-1649179144 with list_stream widget","widgets":[{"definition":{"requests":[{"columns":[{"field":"timestamp","width":"auto"}],"query":{"data_source":"apm_issue_stream","query_string":""},"response_format":"event_list"}],"type":"list_stream"}}]} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
url: https://api.datadoghq.com/api/v1/dashboard | ||
response: | ||
body: '{"notify_list":null,"description":null,"restricted_roles":[],"author_name":null,"template_variables":null,"is_read_only":false,"id":"fbq-m3y-6wb","title":"Test-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget-1649179144 | ||
with list_stream widget","url":"/dashboard/fbq-m3y-6wb/test-createanewdashboardwithapmissuestreamliststreamwidget-1649179144-with-lists","created_at":"2022-04-05T17:19:05.083182+00:00","modified_at":"2022-04-05T17:19:05.083182+00:00","author_handle":"[email protected]","widgets":[{"definition":{"requests":[{"query":{"query_string":"","data_source":"apm_issue_stream"},"response_format":"event_list","columns":[{"field":"timestamp","width":"auto"}]}],"type":"list_stream"},"id":2589925713372507}],"layout_type":"ordered"}' | ||
code: 200 | ||
duration: '' | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
- request: | ||
body: '' | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
method: DELETE | ||
url: https://api.datadoghq.com/api/v1/dashboard/fbq-m3y-6wb | ||
response: | ||
body: '{"deleted_dashboard_id":"fbq-m3y-6wb"}' | ||
code: 200 | ||
duration: '' | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
version: 1 |
1 change: 1 addition & 0 deletions
1
...ashboards/Scenario_Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget.freeze
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-04-05T17:19:05.343Z |
38 changes: 38 additions & 0 deletions
38
..._Dashboards/Scenario_Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget.yaml
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,38 @@ | ||
interactions: | ||
- request: | ||
body: | | ||
{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget-1649179145 with list_stream widget","widgets":[{"definition":{"requests":[{"columns":[{"field":"timestamp","width":"auto"}],"query":{"data_source":"rum_issue_stream","query_string":""},"response_format":"event_list"}],"type":"list_stream"}}]} | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
url: https://api.datadoghq.com/api/v1/dashboard | ||
response: | ||
body: '{"notify_list":null,"description":null,"restricted_roles":[],"author_name":null,"template_variables":null,"is_read_only":false,"id":"847-9hf-ftb","title":"Test-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget-1649179145 | ||
with list_stream widget","url":"/dashboard/847-9hf-ftb/test-createanewdashboardwithrumissuestreamliststreamwidget-1649179145-with-lists","created_at":"2022-04-05T17:19:05.444942+00:00","modified_at":"2022-04-05T17:19:05.444942+00:00","author_handle":"[email protected]","widgets":[{"definition":{"requests":[{"query":{"query_string":"","data_source":"rum_issue_stream"},"response_format":"event_list","columns":[{"field":"timestamp","width":"auto"}]}],"type":"list_stream"},"id":7299581017937461}],"layout_type":"ordered"}' | ||
code: 200 | ||
duration: '' | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
- request: | ||
body: '' | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
method: DELETE | ||
url: https://api.datadoghq.com/api/v1/dashboard/847-9hf-ftb | ||
response: | ||
body: '{"deleted_dashboard_id":"847-9hf-ftb"}' | ||
code: 200 | ||
duration: '' | ||
headers: | ||
Content-Type: | ||
- application/json | ||
status: 200 OK | ||
version: 1 |
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