-
Notifications
You must be signed in to change notification settings - Fork 32
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 4c3cdd2 of spec repo (#1130)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b2590ee
commit 1318543
Showing
8 changed files
with
271 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Get a dashboard returns 'author_name' | ||
|
||
import com.datadog.api.v1.client.ApiClient; | ||
import com.datadog.api.v1.client.ApiException; | ||
import com.datadog.api.v1.client.Configuration; | ||
import com.datadog.api.v1.client.api.DashboardsApi; | ||
import com.datadog.api.v1.client.model.Dashboard; | ||
import java.time.*; | ||
import java.util.*; | ||
|
||
public class Example { | ||
public static void main(String[] args) { | ||
ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
DashboardsApi apiInstance = new DashboardsApi(defaultClient); | ||
|
||
// there is a valid "dashboard" in the system | ||
String DASHBOARD_ID = System.getenv("DASHBOARD_ID"); | ||
|
||
try { | ||
Dashboard result = apiInstance.getDashboard(DASHBOARD_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(); | ||
} | ||
} | ||
} |
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
src/test/resources/cassettes/features/v1/Get_a_dashboard_returns_author_name_.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 @@ | ||
2021-12-30T21:04:23.650Z |
186 changes: 186 additions & 0 deletions
186
src/test/resources/cassettes/features/v1/Get_a_dashboard_returns_author_name_.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,186 @@ | ||
[ | ||
{ | ||
"httpRequest": { | ||
"body": { | ||
"type": "JSON", | ||
"json": "{\"layout_type\":\"ordered\",\"title\":\"Test-Get_a_dashboard_returns_author_name_-1640898263 with Profile Metrics Query\",\"widgets\":[{\"definition\":{\"requests\":[{\"profile_metrics_query\":{\"compute\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\"},\"group_by\":[{\"facet\":\"service\",\"limit\":10,\"sort\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\",\"order\":\"desc\"}}],\"search\":{\"query\":\"runtime:jvm\"}}}],\"type\":\"timeseries\"}}]}" | ||
}, | ||
"headers": { | ||
"JAVA-TEST-NAME": [ | ||
"Get_a_dashboard_returns_author_name_" | ||
] | ||
}, | ||
"method": "POST", | ||
"path": "/api/v1/dashboard", | ||
"keepAlive": false, | ||
"secure": true | ||
}, | ||
"httpResponse": { | ||
"body": "{\"notify_list\":null,\"description\":null,\"restricted_roles\":[],\"author_name\":null,\"template_variables\":null,\"is_read_only\":false,\"id\":\"xb2-jve-hxz\",\"title\":\"Test-Get_a_dashboard_returns_author_name_-1640898263 with Profile Metrics Query\",\"url\":\"/dashboard/xb2-jve-hxz/test-getadashboardreturnsauthorname-1640898263-with-profile-metrics-query\",\"created_at\":\"2021-12-30T21:04:23.947661+00:00\",\"modified_at\":\"2021-12-30T21:04:23.947661+00:00\",\"author_handle\":\"frog@datadoghq.com\",\"widgets\":[{\"definition\":{\"requests\":[{\"profile_metrics_query\":{\"search\":{\"query\":\"runtime:jvm\"},\"group_by\":[{\"facet\":\"service\",\"sort\":{\"facet\":\"@prof_core_cpu_cores\",\"aggregation\":\"sum\",\"order\":\"desc\"},\"limit\":10}],\"compute\":{\"facet\":\"@prof_core_cpu_cores\",\"aggregation\":\"sum\"}}}],\"type\":\"timeseries\"},\"id\":2446599900087366}],\"layout_type\":\"ordered\"}", | ||
"headers": { | ||
"Date": [ | ||
"Thu, 30 Dec 2021 21:04:23 GMT" | ||
], | ||
"Content-Type": [ | ||
"application/json" | ||
], | ||
"Content-Length": [ | ||
"826" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"Pragma": [ | ||
"no-cache" | ||
], | ||
"Cache-Control": [ | ||
"no-cache" | ||
], | ||
"Vary": [ | ||
"Accept-Encoding" | ||
], | ||
"X-Content-Type-Options": [ | ||
"nosniff" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=15724800;" | ||
], | ||
"Content-Security-Policy": [ | ||
"frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report" | ||
], | ||
"X-Frame-Options": [ | ||
"SAMEORIGIN" | ||
] | ||
}, | ||
"statusCode": 200, | ||
"reasonPhrase": "OK" | ||
}, | ||
"times": { | ||
"remainingTimes": 1 | ||
}, | ||
"timeToLive": { | ||
"unlimited": true | ||
}, | ||
"id": "34f63680-76b1-934d-ff53-c725303fcd21" | ||
}, | ||
{ | ||
"httpRequest": { | ||
"headers": { | ||
"JAVA-TEST-NAME": [ | ||
"Get_a_dashboard_returns_author_name_" | ||
] | ||
}, | ||
"method": "GET", | ||
"path": "/api/v1/dashboard/xb2-jve-hxz", | ||
"keepAlive": false, | ||
"secure": true | ||
}, | ||
"httpResponse": { | ||
"body": "{\"notify_list\":null,\"description\":null,\"restricted_roles\":[],\"author_name\":\"Frog Account\",\"template_variables\":null,\"is_read_only\":false,\"id\":\"xb2-jve-hxz\",\"title\":\"Test-Get_a_dashboard_returns_author_name_-1640898263 with Profile Metrics Query\",\"url\":\"/dashboard/xb2-jve-hxz/test-getadashboardreturnsauthorname-1640898263-with-profile-metrics-query\",\"created_at\":\"2021-12-30T21:04:23.947661+00:00\",\"modified_at\":\"2021-12-30T21:04:23.947661+00:00\",\"author_handle\":\"frog@datadoghq.com\",\"widgets\":[{\"definition\":{\"requests\":[{\"profile_metrics_query\":{\"search\":{\"query\":\"runtime:jvm\"},\"group_by\":[{\"facet\":\"service\",\"sort\":{\"facet\":\"@prof_core_cpu_cores\",\"aggregation\":\"sum\",\"order\":\"desc\"},\"limit\":10}],\"compute\":{\"facet\":\"@prof_core_cpu_cores\",\"aggregation\":\"sum\"}}}],\"type\":\"timeseries\"},\"id\":2446599900087366}],\"layout_type\":\"ordered\"}", | ||
"headers": { | ||
"Date": [ | ||
"Thu, 30 Dec 2021 21:04:24 GMT" | ||
], | ||
"Content-Type": [ | ||
"application/json" | ||
], | ||
"Content-Length": [ | ||
"826" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"Pragma": [ | ||
"no-cache" | ||
], | ||
"Cache-Control": [ | ||
"no-cache" | ||
], | ||
"Vary": [ | ||
"Accept-Encoding" | ||
], | ||
"X-Content-Type-Options": [ | ||
"nosniff" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=15724800;" | ||
], | ||
"Content-Security-Policy": [ | ||
"frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report" | ||
], | ||
"X-Frame-Options": [ | ||
"SAMEORIGIN" | ||
] | ||
}, | ||
"statusCode": 200, | ||
"reasonPhrase": "OK" | ||
}, | ||
"times": { | ||
"remainingTimes": 1 | ||
}, | ||
"timeToLive": { | ||
"unlimited": true | ||
}, | ||
"id": "c46321bf-f724-7c70-bece-669f9f80f838" | ||
}, | ||
{ | ||
"httpRequest": { | ||
"headers": { | ||
"JAVA-TEST-NAME": [ | ||
"Get_a_dashboard_returns_author_name_" | ||
] | ||
}, | ||
"method": "DELETE", | ||
"path": "/api/v1/dashboard/xb2-jve-hxz", | ||
"keepAlive": false, | ||
"secure": true | ||
}, | ||
"httpResponse": { | ||
"body": "{\"deleted_dashboard_id\":\"xb2-jve-hxz\"}", | ||
"headers": { | ||
"Date": [ | ||
"Thu, 30 Dec 2021 21:04:24 GMT" | ||
], | ||
"Content-Type": [ | ||
"application/json" | ||
], | ||
"Content-Length": [ | ||
"38" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"Pragma": [ | ||
"no-cache" | ||
], | ||
"Cache-Control": [ | ||
"no-cache" | ||
], | ||
"Vary": [ | ||
"Accept-Encoding" | ||
], | ||
"X-Content-Type-Options": [ | ||
"nosniff" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=15724800;" | ||
], | ||
"Content-Security-Policy": [ | ||
"frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report" | ||
], | ||
"X-Frame-Options": [ | ||
"SAMEORIGIN" | ||
] | ||
}, | ||
"statusCode": 200, | ||
"reasonPhrase": "OK" | ||
}, | ||
"times": { | ||
"remainingTimes": 1 | ||
}, | ||
"timeToLive": { | ||
"unlimited": true | ||
}, | ||
"id": "c4897d24-77d3-abd5-89dd-90cf869ee5eb" | ||
} | ||
] |
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