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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-10-17T14:43:40.022Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-10-17T14:43:41.755Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions examples/v2/error-tracking/DeleteIssueAssignee.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Remove the assignee of an issue returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ErrorTrackingAPI.new

# there is a valid "issue" in the system
ISSUE_ID = ENV["ISSUE_ID"]
api_instance.delete_issue_assignee(ISSUE_ID)
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1885,6 +1885,9 @@
"issue_id" => "String",
"include" => "Array<GetIssueIncludeQueryParameterItem>",
},
"v2.DeleteIssueAssignee" => {
"issue_id" => "String",
},
"v2.UpdateIssueAssignee" => {
"issue_id" => "String",
"body" => "IssueUpdateAssigneeRequest",
Expand Down
22 changes: 22 additions & 0 deletions features/v2/error_tracking.feature
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 features/v2/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
65 changes: 65 additions & 0 deletions lib/datadog_api_client/v2/api/error_tracking_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,71 @@ def initialize(api_client = DatadogAPIClient::APIClient.default)
@api_client = api_client
end

# Remove the assignee of an issue.
#
# @see #delete_issue_assignee_with_http_info
def delete_issue_assignee(issue_id, opts = {})
delete_issue_assignee_with_http_info(issue_id, opts)
nil
end

# Remove the assignee of an issue.
#
# Remove the assignee of an issue by `issue_id`.
#
# @param issue_id [String] The identifier of the issue.
# @param opts [Hash] the optional parameters
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def delete_issue_assignee_with_http_info(issue_id, opts = {})

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ErrorTrackingAPI.delete_issue_assignee ...'
end
# verify the required parameter 'issue_id' is set
if @api_client.config.client_side_validation && issue_id.nil?
fail ArgumentError, "Missing the required parameter 'issue_id' when calling ErrorTrackingAPI.delete_issue_assignee"
end
# resource path
local_var_path = '/api/v2/error-tracking/issues/{issue_id}/assignee'.sub('{issue_id}', CGI.escape(issue_id.to_s).gsub('%2F', '/'))

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['*/*'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type]

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]

new_options = opts.merge(
:operation => :delete_issue_assignee,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type,
:api_version => "V2"
)

data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ErrorTrackingAPI#delete_issue_assignee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# Get the details of an error tracking issue.
#
# @see #get_issue_with_http_info
Expand Down
Loading