From 9282c6863cde7ae2f43a0fe6fc74a3be34d2382b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 22 Oct 2025 11:27:24 +0000 Subject: [PATCH] Regenerate client from commit 73e447a of spec repo --- .generator/schemas/v2/openapi.yaml | 29 +++++++++ ...n-issue-returns-No-Content-response.frozen | 1 + ...f-an-issue-returns-No-Content-response.yml | 40 ++++++++++++ ...an-issue-returns-Not-Found-response.frozen | 1 + ...of-an-issue-returns-Not-Found-response.yml | 21 ++++++ .../v2/error-tracking/DeleteIssueAssignee.rb | 8 +++ features/scenarios_model_mapping.rb | 3 + features/v2/error_tracking.feature | 22 +++++++ features/v2/undo.json | 6 ++ .../v2/api/error_tracking_api.rb | 65 +++++++++++++++++++ 10 files changed, 196 insertions(+) create mode 100644 cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.yml create mode 100644 examples/v2/error-tracking/DeleteIssueAssignee.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 329c0e6965ca..9cf7a6300d0c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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 diff --git a/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.frozen b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.frozen new file mode 100644 index 000000000000..1c36c01bc376 --- /dev/null +++ b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2025-10-17T14:43:40.022Z \ No newline at end of file diff --git a/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.yml b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.yml new file mode 100644 index 000000000000..a385787344d4 --- /dev/null +++ b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-No-Content-response.yml @@ -0,0 +1,40 @@ +http_interactions: +- recorded_at: Fri, 17 Oct 2025 14:43:40 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"from":1759416220000,"query":"service:synthetics-browser","to":1760712220000,"track":"rum"},"type":"search_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/error-tracking/issues/search + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 17 Oct 2025 14:43:40 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/error-tracking/issues/d3ab59c6-84ee-11f0-87bb-da7ad0900002/assignee + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.frozen b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..ed269c62a73d --- /dev/null +++ b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-10-17T14:43:41.755Z \ No newline at end of file diff --git a/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.yml b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.yml new file mode 100644 index 000000000000..6591b7246f98 --- /dev/null +++ b/cassettes/features/v2/error_tracking/Remove-the-assignee-of-an-issue-returns-Not-Found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Fri, 17 Oct 2025 14:43:41 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/error-tracking/issues/67d80aa3-36ff-44b9-a694-c501a7591737/assignee + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found","detail":"issue not + found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/examples/v2/error-tracking/DeleteIssueAssignee.rb b/examples/v2/error-tracking/DeleteIssueAssignee.rb new file mode 100644 index 000000000000..99ce40163308 --- /dev/null +++ b/examples/v2/error-tracking/DeleteIssueAssignee.rb @@ -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) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d3995c6ac994..1b6722dd299c 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1885,6 +1885,9 @@ "issue_id" => "String", "include" => "Array", }, + "v2.DeleteIssueAssignee" => { + "issue_id" => "String", + }, "v2.UpdateIssueAssignee" => { "issue_id" => "String", "body" => "IssueUpdateAssigneeRequest", diff --git a/features/v2/error_tracking.feature b/features/v2/error_tracking.feature index 97f8ceeedd93..253c3b24b237 100644 --- a/features/v2/error_tracking.feature +++ b/features/v2/error_tracking.feature @@ -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 diff --git a/features/v2/undo.json b/features/v2/undo.json index f804a3dce1db..6c74e264b654 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1319,6 +1319,12 @@ "type": "safe" } }, + "DeleteIssueAssignee": { + "tag": "Error Tracking", + "undo": { + "type": "idempotent" + } + }, "UpdateIssueAssignee": { "tag": "Error Tracking", "undo": { diff --git a/lib/datadog_api_client/v2/api/error_tracking_api.rb b/lib/datadog_api_client/v2/api/error_tracking_api.rb index 0952915cb832..53340cbc56b6 100644 --- a/lib/datadog_api_client/v2/api/error_tracking_api.rb +++ b/lib/datadog_api_client/v2/api/error_tracking_api.rb @@ -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