Skip to content

Commit cc4340a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 73e447a of spec repo
1 parent 4505f25 commit cc4340a

File tree

9 files changed

+299
-0
lines changed

9 files changed

+299
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61011,6 +61011,35 @@ paths:
6101161011
tags:
6101261012
- Error Tracking
6101361013
/api/v2/error-tracking/issues/{issue_id}/assignee:
61014+
delete:
61015+
description: Remove the assignee of an issue by `issue_id`.
61016+
operationId: DeleteIssueAssignee
61017+
parameters:
61018+
- $ref: '#/components/parameters/IssueIDPathParameter'
61019+
responses:
61020+
'204':
61021+
description: No Content
61022+
'400':
61023+
$ref: '#/components/responses/BadRequestResponse'
61024+
'401':
61025+
$ref: '#/components/responses/UnauthorizedResponse'
61026+
'403':
61027+
$ref: '#/components/responses/ForbiddenResponse'
61028+
'404':
61029+
$ref: '#/components/responses/NotFoundResponse'
61030+
'429':
61031+
$ref: '#/components/responses/TooManyRequestsResponse'
61032+
security:
61033+
- apiKeyAuth: []
61034+
appKeyAuth: []
61035+
- AuthZ:
61036+
- error_tracking_read
61037+
- error_tracking_write
61038+
- cases_read
61039+
- cases_write
61040+
summary: Remove the assignee of an issue
61041+
tags:
61042+
- Error Tracking
6101461043
put:
6101561044
description: Update the assignee of an issue by `issue_id`.
6101661045
operationId: UpdateIssueAssignee
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Remove the assignee of an issue returns "No Content" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.ErrorTrackingApi;
6+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
ErrorTrackingApi apiInstance = new ErrorTrackingApi(defaultClient);
11+
12+
// there is a valid "issue" in the system
13+
String ISSUE_ID = System.getenv("ISSUE_ID");
14+
15+
try {
16+
apiInstance.deleteIssueAssignee(ISSUE_ID);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling ErrorTrackingApi#deleteIssueAssignee");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}

src/main/java/com/datadog/api/client/v2/api/ErrorTrackingApi.java

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,140 @@ public void setApiClient(ApiClient apiClient) {
5050
this.apiClient = apiClient;
5151
}
5252

53+
/**
54+
* Remove the assignee of an issue.
55+
*
56+
* <p>See {@link #deleteIssueAssigneeWithHttpInfo}.
57+
*
58+
* @param issueId The identifier of the issue. (required)
59+
* @throws ApiException if fails to make API call
60+
*/
61+
public void deleteIssueAssignee(String issueId) throws ApiException {
62+
deleteIssueAssigneeWithHttpInfo(issueId);
63+
}
64+
65+
/**
66+
* Remove the assignee of an issue.
67+
*
68+
* <p>See {@link #deleteIssueAssigneeWithHttpInfoAsync}.
69+
*
70+
* @param issueId The identifier of the issue. (required)
71+
* @return CompletableFuture
72+
*/
73+
public CompletableFuture<Void> deleteIssueAssigneeAsync(String issueId) {
74+
return deleteIssueAssigneeWithHttpInfoAsync(issueId)
75+
.thenApply(
76+
response -> {
77+
return response.getData();
78+
});
79+
}
80+
81+
/**
82+
* Remove the assignee of an issue by <code>issue_id</code>.
83+
*
84+
* @param issueId The identifier of the issue. (required)
85+
* @return ApiResponse&lt;Void&gt;
86+
* @throws ApiException if fails to make API call
87+
* @http.response.details
88+
* <table border="1">
89+
* <caption>Response details</caption>
90+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
91+
* <tr><td> 204 </td><td> No Content </td><td> - </td></tr>
92+
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
93+
* <tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
94+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
95+
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
96+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
97+
* </table>
98+
*/
99+
public ApiResponse<Void> deleteIssueAssigneeWithHttpInfo(String issueId) throws ApiException {
100+
Object localVarPostBody = null;
101+
102+
// verify the required parameter 'issueId' is set
103+
if (issueId == null) {
104+
throw new ApiException(
105+
400, "Missing the required parameter 'issueId' when calling deleteIssueAssignee");
106+
}
107+
// create path and map variables
108+
String localVarPath =
109+
"/api/v2/error-tracking/issues/{issue_id}/assignee"
110+
.replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString()));
111+
112+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
113+
114+
Invocation.Builder builder =
115+
apiClient.createBuilder(
116+
"v2.ErrorTrackingApi.deleteIssueAssignee",
117+
localVarPath,
118+
new ArrayList<Pair>(),
119+
localVarHeaderParams,
120+
new HashMap<String, String>(),
121+
new String[] {"*/*"},
122+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
123+
return apiClient.invokeAPI(
124+
"DELETE",
125+
builder,
126+
localVarHeaderParams,
127+
new String[] {},
128+
localVarPostBody,
129+
new HashMap<String, Object>(),
130+
false,
131+
null);
132+
}
133+
134+
/**
135+
* Remove the assignee of an issue.
136+
*
137+
* <p>See {@link #deleteIssueAssigneeWithHttpInfo}.
138+
*
139+
* @param issueId The identifier of the issue. (required)
140+
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
141+
*/
142+
public CompletableFuture<ApiResponse<Void>> deleteIssueAssigneeWithHttpInfoAsync(String issueId) {
143+
Object localVarPostBody = null;
144+
145+
// verify the required parameter 'issueId' is set
146+
if (issueId == null) {
147+
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
148+
result.completeExceptionally(
149+
new ApiException(
150+
400, "Missing the required parameter 'issueId' when calling deleteIssueAssignee"));
151+
return result;
152+
}
153+
// create path and map variables
154+
String localVarPath =
155+
"/api/v2/error-tracking/issues/{issue_id}/assignee"
156+
.replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString()));
157+
158+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
159+
160+
Invocation.Builder builder;
161+
try {
162+
builder =
163+
apiClient.createBuilder(
164+
"v2.ErrorTrackingApi.deleteIssueAssignee",
165+
localVarPath,
166+
new ArrayList<Pair>(),
167+
localVarHeaderParams,
168+
new HashMap<String, String>(),
169+
new String[] {"*/*"},
170+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
171+
} catch (ApiException ex) {
172+
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
173+
result.completeExceptionally(ex);
174+
return result;
175+
}
176+
return apiClient.invokeAPIAsync(
177+
"DELETE",
178+
builder,
179+
localVarHeaderParams,
180+
new String[] {},
181+
localVarPostBody,
182+
new HashMap<String, Object>(),
183+
false,
184+
null);
185+
}
186+
53187
/** Manage optional parameters to getIssue. */
54188
public static class GetIssueOptionalParameters {
55189
private List<GetIssueIncludeQueryParameterItem> include;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-10-17T14:43:40.022Z
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[
2+
{
3+
"httpRequest": {
4+
"body": {
5+
"type": "JSON",
6+
"json": "{\"data\":{\"attributes\":{\"from\":1759416220000,\"query\":\"service:synthetics-browser\",\"to\":1760712220000,\"track\":\"rum\"},\"type\":\"search_request\"}}"
7+
},
8+
"headers": {},
9+
"method": "POST",
10+
"path": "/api/v2/error-tracking/issues/search",
11+
"keepAlive": false,
12+
"secure": true
13+
},
14+
"httpResponse": {
15+
"body": "{\"data\":[{\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":4316,\"total_count\":8640},\"relationships\":{\"issue\":{\"data\":{\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"type\":\"issue\"}}}},{\"id\":\"a5bb2896-a4d0-11f0-bd76-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":280,\"total_count\":272},\"relationships\":{\"issue\":{\"data\":{\"id\":\"a5bb2896-a4d0-11f0-bd76-da7ad0900002\",\"type\":\"issue\"}}}},{\"id\":\"e2a89d14-6f07-11f0-8a88-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":4},\"relationships\":{\"issue\":{\"data\":{\"id\":\"e2a89d14-6f07-11f0-8a88-da7ad0900002\",\"type\":\"issue\"}}}},{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\"}}}},{\"id\":\"e2a89134-6f07-11f0-8d36-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"e2a89134-6f07-11f0-8d36-da7ad0900002\",\"type\":\"issue\"}}}}]}",
16+
"headers": {
17+
"Content-Type": [
18+
"application/vnd.api+json"
19+
]
20+
},
21+
"statusCode": 200,
22+
"reasonPhrase": "OK"
23+
},
24+
"times": {
25+
"remainingTimes": 1
26+
},
27+
"timeToLive": {
28+
"unlimited": true
29+
},
30+
"id": "e395b278-a94e-06dd-7640-8834367dc3b0"
31+
},
32+
{
33+
"httpRequest": {
34+
"headers": {},
35+
"method": "DELETE",
36+
"path": "/api/v2/error-tracking/issues/d3ab59c6-84ee-11f0-87bb-da7ad0900002/assignee",
37+
"keepAlive": false,
38+
"secure": true
39+
},
40+
"httpResponse": {
41+
"headers": {},
42+
"statusCode": 204,
43+
"reasonPhrase": "No Content"
44+
},
45+
"times": {
46+
"remainingTimes": 1
47+
},
48+
"timeToLive": {
49+
"unlimited": true
50+
},
51+
"id": "91bc6635-f1b8-69a9-caed-406220eadaf0"
52+
}
53+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-10-17T14:43:41.755Z
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[
2+
{
3+
"httpRequest": {
4+
"headers": {},
5+
"method": "DELETE",
6+
"path": "/api/v2/error-tracking/issues/67d80aa3-36ff-44b9-a694-c501a7591737/assignee",
7+
"keepAlive": false,
8+
"secure": true
9+
},
10+
"httpResponse": {
11+
"body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"issue not found\"}]}",
12+
"headers": {
13+
"Content-Type": [
14+
"application/vnd.api+json"
15+
]
16+
},
17+
"statusCode": 404,
18+
"reasonPhrase": "Not Found"
19+
},
20+
"times": {
21+
"remainingTimes": 1
22+
},
23+
"timeToLive": {
24+
"unlimited": true
25+
},
26+
"id": "74d71d00-9097-6c51-44e0-0ffb9aaa0d32"
27+
}
28+
]

src/test/resources/com/datadog/api/client/v2/api/error_tracking.feature

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@ Feature: Error Tracking
3232
Then the response status is 200 OK
3333
And the response "data.id" is equal to "{{ issue.id }}"
3434

35+
@generated @skip @team:DataDog/error-tracking
36+
Scenario: Remove the assignee of an issue returns "Bad Request" response
37+
Given new "DeleteIssueAssignee" request
38+
And request contains "issue_id" parameter from "REPLACE.ME"
39+
When the request is sent
40+
Then the response status is 400 Bad Request
41+
42+
@team:DataDog/error-tracking
43+
Scenario: Remove the assignee of an issue returns "No Content" response
44+
Given new "DeleteIssueAssignee" request
45+
And there is a valid "issue" in the system
46+
And request contains "issue_id" parameter from "issue.id"
47+
When the request is sent
48+
Then the response status is 204 No Content
49+
50+
@team:DataDog/error-tracking
51+
Scenario: Remove the assignee of an issue returns "Not Found" response
52+
Given new "DeleteIssueAssignee" request
53+
And request contains "issue_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737"
54+
When the request is sent
55+
Then the response status is 404 Not Found
56+
3557
@team:DataDog/error-tracking
3658
Scenario: Search error tracking issues returns "Bad Request" response
3759
Given new "SearchIssues" request

src/test/resources/com/datadog/api/client/v2/api/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,12 @@
13191319
"type": "safe"
13201320
}
13211321
},
1322+
"DeleteIssueAssignee": {
1323+
"tag": "Error Tracking",
1324+
"undo": {
1325+
"type": "idempotent"
1326+
}
1327+
},
13221328
"UpdateIssueAssignee": {
13231329
"tag": "Error Tracking",
13241330
"undo": {

0 commit comments

Comments
 (0)