-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathDeleteCaseComment.java
More file actions
28 lines (23 loc) · 1011 Bytes
/
DeleteCaseComment.java
File metadata and controls
28 lines (23 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Delete case comment returns "No Content" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CaseManagementApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
CaseManagementApi apiInstance = new CaseManagementApi(defaultClient);
// there is a valid "case" in the system
String CASE_ID = System.getenv("CASE_ID");
// there is a valid "comment" in the system
String COMMENT_ID = System.getenv("COMMENT_ID");
try {
apiInstance.deleteCaseComment(CASE_ID, COMMENT_ID);
} catch (ApiException e) {
System.err.println("Exception when calling CaseManagementApi#deleteCaseComment");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}