Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61011,6 +61011,35 @@ paths:
tags:
- Error Tracking
/api/v2/error-tracking/issues/{issue_id}/assignee:
delete:
description: Remove the assignee of an issue by `issue_id`.
operationId: DeleteIssueAssignee
parameters:
- $ref: '#/components/parameters/IssueIDPathParameter'
responses:
'204':
description: No Content
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- error_tracking_read
- error_tracking_write
- cases_read
- cases_write
summary: Remove the assignee of an issue
tags:
- Error Tracking
put:
description: Update the assignee of an issue by `issue_id`.
operationId: UpdateIssueAssignee
Expand Down
25 changes: 25 additions & 0 deletions examples/v2/error-tracking/DeleteIssueAssignee.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Remove the assignee of an issue returns "No Content" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ErrorTrackingApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
ErrorTrackingApi apiInstance = new ErrorTrackingApi(defaultClient);

// there is a valid "issue" in the system
String ISSUE_ID = System.getenv("ISSUE_ID");

try {
apiInstance.deleteIssueAssignee(ISSUE_ID);
} catch (ApiException e) {
System.err.println("Exception when calling ErrorTrackingApi#deleteIssueAssignee");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
134 changes: 134 additions & 0 deletions src/main/java/com/datadog/api/client/v2/api/ErrorTrackingApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,140 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}

/**
* Remove the assignee of an issue.
*
* <p>See {@link #deleteIssueAssigneeWithHttpInfo}.
*
* @param issueId The identifier of the issue. (required)
* @throws ApiException if fails to make API call
*/
public void deleteIssueAssignee(String issueId) throws ApiException {
deleteIssueAssigneeWithHttpInfo(issueId);
}

/**
* Remove the assignee of an issue.
*
* <p>See {@link #deleteIssueAssigneeWithHttpInfoAsync}.
*
* @param issueId The identifier of the issue. (required)
* @return CompletableFuture
*/
public CompletableFuture<Void> deleteIssueAssigneeAsync(String issueId) {
return deleteIssueAssigneeWithHttpInfoAsync(issueId)
.thenApply(
response -> {
return response.getData();
});
}

/**
* Remove the assignee of an issue by <code>issue_id</code>.
*
* @param issueId The identifier of the issue. (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table border="1">
* <caption>Response details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 204 </td><td> No Content </td><td> - </td></tr>
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> deleteIssueAssigneeWithHttpInfo(String issueId) throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'issueId' is set
if (issueId == null) {
throw new ApiException(
400, "Missing the required parameter 'issueId' when calling deleteIssueAssignee");
}
// create path and map variables
String localVarPath =
"/api/v2/error-tracking/issues/{issue_id}/assignee"
.replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Invocation.Builder builder =
apiClient.createBuilder(
"v2.ErrorTrackingApi.deleteIssueAssignee",
localVarPath,
new ArrayList<Pair>(),
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"*/*"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
return apiClient.invokeAPI(
"DELETE",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
null);
}

/**
* Remove the assignee of an issue.
*
* <p>See {@link #deleteIssueAssigneeWithHttpInfo}.
*
* @param issueId The identifier of the issue. (required)
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
public CompletableFuture<ApiResponse<Void>> deleteIssueAssigneeWithHttpInfoAsync(String issueId) {
Object localVarPostBody = null;

// verify the required parameter 'issueId' is set
if (issueId == null) {
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'issueId' when calling deleteIssueAssignee"));
return result;
}
// create path and map variables
String localVarPath =
"/api/v2/error-tracking/issues/{issue_id}/assignee"
.replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.ErrorTrackingApi.deleteIssueAssignee",
localVarPath,
new ArrayList<Pair>(),
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"*/*"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"DELETE",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
null);
}

/** Manage optional parameters to getIssue. */
public static class GetIssueOptionalParameters {
private List<GetIssueIncludeQueryParameterItem> include;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-10-17T14:43:40.022Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[
{
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"data\":{\"attributes\":{\"from\":1759416220000,\"query\":\"service:synthetics-browser\",\"to\":1760712220000,\"track\":\"rum\"},\"type\":\"search_request\"}}"
},
"headers": {},
"method": "POST",
"path": "/api/v2/error-tracking/issues/search",
"keepAlive": false,
"secure": true
},
"httpResponse": {
"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\"}}}}]}",
"headers": {
"Content-Type": [
"application/vnd.api+json"
]
},
"statusCode": 200,
"reasonPhrase": "OK"
},
"times": {
"remainingTimes": 1
},
"timeToLive": {
"unlimited": true
},
"id": "e395b278-a94e-06dd-7640-8834367dc3b0"
},
{
"httpRequest": {
"headers": {},
"method": "DELETE",
"path": "/api/v2/error-tracking/issues/d3ab59c6-84ee-11f0-87bb-da7ad0900002/assignee",
"keepAlive": false,
"secure": true
},
"httpResponse": {
"headers": {},
"statusCode": 204,
"reasonPhrase": "No Content"
},
"times": {
"remainingTimes": 1
},
"timeToLive": {
"unlimited": true
},
"id": "91bc6635-f1b8-69a9-caed-406220eadaf0"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-10-17T14:43:41.755Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"httpRequest": {
"headers": {},
"method": "DELETE",
"path": "/api/v2/error-tracking/issues/67d80aa3-36ff-44b9-a694-c501a7591737/assignee",
"keepAlive": false,
"secure": true
},
"httpResponse": {
"body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"issue not found\"}]}",
"headers": {
"Content-Type": [
"application/vnd.api+json"
]
},
"statusCode": 404,
"reasonPhrase": "Not Found"
},
"times": {
"remainingTimes": 1
},
"timeToLive": {
"unlimited": true
},
"id": "74d71d00-9097-6c51-44e0-0ffb9aaa0d32"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ Feature: Error Tracking
Then the response status is 200 OK
And the response "data.id" is equal to "{{ issue.id }}"

@generated @skip @team:DataDog/error-tracking
Scenario: Remove the assignee of an issue returns "Bad Request" response
Given new "DeleteIssueAssignee" request
And request contains "issue_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/error-tracking
Scenario: Remove the assignee of an issue returns "No Content" response
Given new "DeleteIssueAssignee" request
And there is a valid "issue" in the system
And request contains "issue_id" parameter from "issue.id"
When the request is sent
Then the response status is 204 No Content

@team:DataDog/error-tracking
Scenario: Remove the assignee of an issue returns "Not Found" response
Given new "DeleteIssueAssignee" request
And request contains "issue_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/error-tracking
Scenario: Search error tracking issues returns "Bad Request" response
Given new "SearchIssues" request
Expand Down
6 changes: 6 additions & 0 deletions src/test/resources/com/datadog/api/client/v2/api/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,12 @@
"type": "safe"
}
},
"DeleteIssueAssignee": {
"tag": "Error Tracking",
"undo": {
"type": "idempotent"
}
},
"UpdateIssueAssignee": {
"tag": "Error Tracking",
"undo": {
Expand Down
Loading