Skip to content

Commit 83b3de0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add new DeleteAssignee endpoint to Error Tracking APIs (#2894)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 8ed43cd commit 83b3de0

File tree

11 files changed

+369
-0
lines changed

11 files changed

+369
-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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-10-17T14:43:40.022Z"
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"log": {
3+
"_recordingName": "Error Tracking/Remove the assignee of an issue returns \"No Content\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "e395b278a94e06dd76408834367dc3b0",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 140,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 575,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"from\":1759416220000,\"query\":\"service:synthetics-browser\",\"to\":1760712220000,\"track\":\"rum\"},\"type\":\"search_request\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search"
39+
},
40+
"response": {
41+
"bodySize": 1185,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 1185,
45+
"text": "{\"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\"}}}}]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 526,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2025-10-17T14:43:40.440Z",
61+
"time": 1079
62+
},
63+
{
64+
"_id": "91bc6635f1b869a9caed406220eadaf0",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "*/*"
75+
}
76+
],
77+
"headersSize": 557,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v2/error-tracking/issues/d3ab59c6-84ee-11f0-87bb-da7ad0900002/assignee"
82+
},
83+
"response": {
84+
"bodySize": 0,
85+
"content": {
86+
"mimeType": "text/plain",
87+
"size": 0
88+
},
89+
"cookies": [],
90+
"headers": [],
91+
"headersSize": 464,
92+
"httpVersion": "HTTP/1.1",
93+
"redirectURL": "",
94+
"status": 204,
95+
"statusText": "No Content"
96+
},
97+
"startedDateTime": "2025-10-17T14:43:41.527Z",
98+
"time": 219
99+
}
100+
],
101+
"pages": [],
102+
"version": "1.2"
103+
}
104+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-10-17T14:43:41.755Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Error Tracking/Remove the assignee of an issue returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "74d71d0090976c5144e00ffb9aaa0d32",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "*/*"
22+
}
23+
],
24+
"headersSize": 557,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "DELETE",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/error-tracking/issues/67d80aa3-36ff-44b9-a694-c501a7591737/assignee"
29+
},
30+
"response": {
31+
"bodySize": 76,
32+
"content": {
33+
"mimeType": "application/vnd.api+json",
34+
"size": 76,
35+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"issue not found\"}]}"
36+
},
37+
"cookies": [],
38+
"headers": [
39+
{
40+
"name": "content-type",
41+
"value": "application/vnd.api+json"
42+
}
43+
],
44+
"headersSize": 524,
45+
"httpVersion": "HTTP/1.1",
46+
"redirectURL": "",
47+
"status": 404,
48+
"statusText": "Not Found"
49+
},
50+
"startedDateTime": "2025-10-17T14:43:41.757Z",
51+
"time": 126
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Remove the assignee of an issue returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.ErrorTrackingApi(configuration);
9+
10+
// there is a valid "issue" in the system
11+
const ISSUE_ID = process.env.ISSUE_ID as string;
12+
13+
const params: v2.ErrorTrackingApiDeleteIssueAssigneeRequest = {
14+
issueId: ISSUE_ID,
15+
};
16+
17+
apiInstance
18+
.deleteIssueAssignee(params)
19+
.then((data: any) => {
20+
console.log(
21+
"API called successfully. Returned data: " + JSON.stringify(data)
22+
);
23+
})
24+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5384,6 +5384,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
53845384
},
53855385
"operationResponseType": "IssueResponse",
53865386
},
5387+
"v2.DeleteIssueAssignee": {
5388+
"issueId": {
5389+
"type": "string",
5390+
"format": "",
5391+
},
5392+
"operationResponseType": "{}",
5393+
},
53875394
"v2.UpdateIssueState": {
53885395
"issueId": {
53895396
"type": "string",

features/v2/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

features/v2/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)