diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8a84cbd83c51..338a55710a52 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -57909,7 +57909,6 @@ components: - none - false_positive - testing_or_maintenance - - remediated - investigated_case_opened - true_positive_benign - true_positive_malicious @@ -57919,7 +57918,6 @@ components: - NONE - FALSE_POSITIVE - TESTING_OR_MAINTENANCE - - REMEDIATED - INVESTIGATED_CASE_OPENED - TRUE_POSITIVE_BENIGN - TRUE_POSITIVE_MALICIOUS @@ -91072,7 +91070,7 @@ paths: schema: type: boolean - description: |- - Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. + Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. The default value is 2,592,000 seconds (30 days), the maximum value is 15,552,000 seconds (180 days), and the minimum value is 1 second. example: 15552000 in: query name: filter[queried][window][seconds] @@ -91100,7 +91098,7 @@ paths: schema: type: boolean - description: |- - Only return metrics that have been actively reporting in the specified window. + Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second. example: 3600 in: query name: window[seconds] @@ -91111,7 +91109,7 @@ paths: maximum: 2592000 minimum: 1 type: integer - - description: Maximum number of results per page. Use with `page[cursor]` for pagination. + - description: Maximum number of results per page. Use with `page[cursor]` for pagination. The default value is 10000, the maximum value is 10000, and the minimum value is 1. in: query name: page[size] required: false @@ -102449,8 +102447,6 @@ paths: schema: $ref: "#/components/schemas/SecurityMonitoringSignalResponse" description: OK - "403": - $ref: "#/components/responses/NotAuthorizedResponse" "404": $ref: "#/components/responses/NotFoundResponse" "429": @@ -102488,17 +102484,25 @@ paths: $ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request "403": - $ref: "#/components/responses/NotAuthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] summary: Modify the triage assignee of a security signal tags: ["Security Monitoring"] x-codegen-request-body-name: body @@ -102528,17 +102532,25 @@ paths: $ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request "403": - $ref: "#/components/responses/NotAuthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] summary: Change the related incidents of a security signal tags: ["Security Monitoring"] x-codegen-request-body-name: body @@ -102568,17 +102580,25 @@ paths: $ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request "403": - $ref: "#/components/responses/NotAuthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] summary: Change the triage state of a security signal tags: ["Security Monitoring"] x-codegen-request-body-name: body diff --git a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen index d30828c2f767..1eb59a7e760d 100644 --- a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen +++ b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen @@ -1 +1 @@ -2026-02-02T10:35:23.539Z \ No newline at end of file +2026-02-18T16:57:03.696Z \ No newline at end of file diff --git a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml index 721f66293b80..fc6edbd9967b 100644 --- a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml +++ b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Mon, 02 Feb 2026 10:35:23 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:03 GMT request: body: encoding: UTF-8 @@ -15,9 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"network_test","attributes":{"public_id":"iab-wcx-mhp","name":"Example - Network Path test","locations":["aws:us-east-1","agent:my-agent-name"],"subtype":"tcp","status":"live","options":{"tick_every":60},"config":{"assertions":[{"operator":"lessThan","property":"avg","target":500,"type":"latency"}],"request":{"max_ttl":30,"tcp_method":"prefer_sack","host":"example.com","traceroute_queries":3,"e2e_queries":50,"port":443}},"type":"network","tags":["env:production"],"message":"Network - Path test notification"},"id":"iab-wcx-mhp"}} + string: '{"data":{"type":"network_test","attributes":{"config":{"request":{"max_ttl":30,"tcp_method":"prefer_sack","host":"example.com","e2e_queries":50,"traceroute_queries":3,"port":443},"assertions":[{"operator":"lessThan","property":"avg","target":500,"type":"latency"}]},"message":"Network + Path test notification","name":"Example Network Path test","tags":["env:production"],"options":{"tick_every":60},"type":"network","public_id":"b2j-fw3-qr5","subtype":"tcp","locations":["aws:us-east-1","agent:my-agent-name"],"status":"live"},"id":"b2j-fw3-qr5"}} ' headers: @@ -26,11 +25,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 02 Feb 2026 10:35:23 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:03 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"public_ids":["iab-wcx-mhp"]},"type":"delete_tests_request"}}' + string: '{"data":{"attributes":{"public_ids":["b2j-fw3-qr5"]},"type":"delete_tests_request"}}' headers: Accept: - application/json @@ -41,7 +40,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"type":"delete_tests","attributes":{"deleted_at":"2026-02-02T10:35:25.382918+00:00","public_id":"iab-wcx-mhp"},"id":"iab-wcx-mhp"}]} + string: '{"data":[{"type":"delete_tests","attributes":{"deleted_at":"2026-02-18T16:57:04.752457+00:00","public_id":"b2j-fw3-qr5"},"id":"b2j-fw3-qr5"}]} ' headers: diff --git a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen index 62723cd8d29a..957e037f23c0 100644 --- a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen +++ b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-07T12:38:45.716Z \ No newline at end of file +2026-02-18T16:57:05.121Z \ No newline at end of file diff --git a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml index 8a68218d5475..5296a6bd3d57 100644 --- a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml +++ b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Jan 2026 12:38:45 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:05 GMT request: body: encoding: UTF-8 @@ -15,10 +15,10 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"suites","id":"36n-bb6-njj","attributes":{"tags":["env:production"],"type":"suite","created_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"created_at":"2026-01-07T12:38:46.109472+00:00","modified_at":"2026-01-07T12:38:46.109472+00:00","message":"Notification - message","public_id":"36n-bb6-njj","options":{},"modified_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"tests":[],"name":"Example suite name","org_id":321813,"monitor_id":249141773}}} + string: '{"data":{"type":"suites","attributes":{"type":"suite","monitor_id":259845717,"name":"Example + suite name","options":{},"tests":[],"tags":["env:production"],"public_id":"hik-xp5-9q6","created_at":"2026-02-18T16:57:05.583051+00:00","modified_at":"2026-02-18T16:57:05.583051+00:00","created_by":{"name":"Corentin + Girard","email":"corentin.girard@datadoghq.com","handle":"corentin.girard@datadoghq.com"},"message":"Notification + message","org_id":321813,"modified_by":{"name":"Corentin Girard","email":"corentin.girard@datadoghq.com","handle":"corentin.girard@datadoghq.com"}},"id":"hik-xp5-9q6"}} ' headers: @@ -27,11 +27,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 07 Jan 2026 12:38:45 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:05 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"public_ids":["36n-bb6-njj"]},"type":"delete_suites_request"}}' + string: '{"data":{"attributes":{"public_ids":["hik-xp5-9q6"]},"type":"delete_suites_request"}}' headers: Accept: - application/json @@ -42,8 +42,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"type":"suites","attributes":{"public_id":"36n-bb6-njj","deleted_at":"2026-01-07 - 12:38:46.679914"},"id":"36n-bb6-njj"}]} + string: '{"data":[{"type":"suites","attributes":{"deleted_at":"2026-02-18 16:57:06.420679","public_id":"hik-xp5-9q6"},"id":"hik-xp5-9q6"}]} ' headers: diff --git a/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.frozen b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.frozen new file mode 100644 index 000000000000..252ef6511875 --- /dev/null +++ b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-03-25T10:51:13.320Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.yml b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.yml new file mode 100644 index 000000000000..762efeeaaee9 --- /dev/null +++ b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.yml @@ -0,0 +1,144 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"handle":"test-handle-789e569afaa52bde","name":"test-name-789e569afaa52bde"},"type":"team"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"1d059472-0eff-4857-a6c8-5e5041448b54","type":"team","attributes":{"avatar":null,"banner":5,"created_at":"2026-03-25T10:51:13.938804+00:00","description":null,"handle":"test-handle-789e569afaa52bde","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-25T10:51:13.938804+00:00","name":"test-name-789e569afaa52bde","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/permission-settings"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"Test-Remove_a_user_from_a_team_returns_No_Content_response-1774435873@datadoghq.com","title":"user + title"},"type":"users"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/users + response: + body: + encoding: UTF-8 + string: '{"data": {"type": "users", "id": "66e25b0b-3f3b-427e-b162-e779f4535abb", + "attributes": {"name": null, "handle": "test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com", + "created_at": "2026-03-25T10:51:14.481612+00:00", "modified_at": "2026-03-25T10:51:14.481612+00:00", + "email": "test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com", + "icon": "https://secure.gravatar.com/avatar/be9f1c5abecde28b4c01cc8aa0680377?s=48&d=retro", + "title": "user title", "verified": false, "service_account": false, "disabled": + false, "allowed_login_methods": [], "status": "Pending", "last_login_time": + null}, "relationships": {"roles": {"data": []}, "org": {"data": {"type": "orgs", + "id": "4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}' + headers: + Content-Type: + - application/json + status: + code: 201 + message: Created +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"role":"admin"},"relationships":{"user":{"data":{"id":"66e25b0b-3f3b-427e-b162-e779f4535abb","type":"users"}}},"type":"team_memberships"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/memberships + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"TeamMembership-1d059472-0eff-4857-a6c8-5e5041448b54-66092046","type":"team_memberships","attributes":{"provisioned_by":null,"provisioned_by_id":"a1d5ff5a-c6dd-11f0-9cb6-06640ca27ad4","role":"admin"},"relationships":{"user":{"data":{"id":"66e25b0b-3f3b-427e-b162-e779f4535abb","type":"users"}}}},"included":[{"id":"66e25b0b-3f3b-427e-b162-e779f4535abb","type":"users","attributes":{"disabled":false,"email":"test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com","handle":"test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com","icon":"https://secure.gravatar.com/avatar/be9f1c5abecde28b4c01cc8aa0680377?d=retro\u0026s=48","name":null,"service_account":false,"status":"Pending"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/memberships/66e25b0b-3f3b-427e-b162-e779f4535abb + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/memberships/66e25b0b-3f3b-427e-b162-e779f4535abb + response: + body: + encoding: UTF-8 + string: '{"errors":["User 66e25b0b-3f3b-427e-b162-e779f4535abb is not a member + of Team 1d059472-0eff-4857-a6c8-5e5041448b54 not found"]}' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/users/66e25b0b-3f3b-427e-b162-e779f4535abb + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54 + 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/teams/Update-a-team-with-partial-update-returns-OK-response.frozen b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.frozen new file mode 100644 index 000000000000..e997c2a92baa --- /dev/null +++ b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T11:58:33.497Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.yml b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.yml new file mode 100644 index 000000000000..d8cf82fa10fd --- /dev/null +++ b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 11:58:33 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"handle":"test-handle-1aa8ea88c040ca48","name":"test-name-1aa8ea88c040ca48"},"type":"team"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"5f6e649c-340c-46e7-96bc-bc5ececc7839","type":"team","attributes":{"avatar":null,"banner":15,"created_at":"2026-03-25T11:58:34.181069+00:00","description":null,"handle":"test-handle-1aa8ea88c040ca48","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-25T11:58:34.181069+00:00","name":"test-name-1aa8ea88c040ca48","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/permission-settings"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 25 Mar 2026 11:58:33 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"handle":"test-handle-1aa8ea88c040ca48","name":"test-name-1aa8ea88c040ca48 + updated"},"type":"team"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839 + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"team","id":"5f6e649c-340c-46e7-96bc-bc5ececc7839","attributes":{"name":"test-name-1aa8ea88c040ca48 + updated","handle":"test-handle-1aa8ea88c040ca48","summary":null,"description":null,"avatar":null,"banner":15,"visible_modules":null,"hidden_modules":null,"created_at":"2026-03-25T11:58:34.181069+00:00","modified_at":"2026-03-25T11:58:34.727617+00:00","user_count":0,"link_count":0,"is_managed":false},"relationships":{"team_links":{"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/permission-settings"}}}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 11:58:33 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/teams/DeleteTeamMembership.rb b/examples/v2/teams/DeleteTeamMembership.rb index 1352083354e3..7ff28a9174a8 100644 --- a/examples/v2/teams/DeleteTeamMembership.rb +++ b/examples/v2/teams/DeleteTeamMembership.rb @@ -5,4 +5,7 @@ # there is a valid "dd_team" in the system DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -api_instance.delete_team_membership(DD_TEAM_DATA_ID, "user_id") + +# there is a valid "user" in the system +USER_DATA_ID = ENV["USER_DATA_ID"] +api_instance.delete_team_membership(DD_TEAM_DATA_ID, USER_DATA_ID) diff --git a/examples/v2/teams/UpdateTeam_780342264.rb b/examples/v2/teams/UpdateTeam_780342264.rb new file mode 100644 index 000000000000..a911f4e2dc8b --- /dev/null +++ b/examples/v2/teams/UpdateTeam_780342264.rb @@ -0,0 +1,20 @@ +# Update a team with partial update returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::TeamsAPI.new + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ATTRIBUTES_HANDLE = ENV["DD_TEAM_DATA_ATTRIBUTES_HANDLE"] +DD_TEAM_DATA_ATTRIBUTES_NAME = ENV["DD_TEAM_DATA_ATTRIBUTES_NAME"] +DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] + +body = DatadogAPIClient::V2::TeamUpdateRequest.new({ + data: DatadogAPIClient::V2::TeamUpdate.new({ + attributes: DatadogAPIClient::V2::TeamUpdateAttributes.new({ + handle: DD_TEAM_DATA_ATTRIBUTES_HANDLE, + name: "Example Team updated", + }), + type: DatadogAPIClient::V2::TeamType::TEAM, + }), +}) +p api_instance.update_team(DD_TEAM_DATA_ID, body) diff --git a/features/v1/dashboards_json_payload/sankey_network_widget.json b/features/v1/dashboards_json_payload/sankey_network_widget.json new file mode 100644 index 000000000000..1f237af8f2f8 --- /dev/null +++ b/features/v1/dashboards_json_payload/sankey_network_widget.json @@ -0,0 +1,41 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"sankey", + "requests":[ + { + "query":{ + "data_source":"network", + "query_string":"*", + "group_by":[ + "source", + "destination" + ], + "limit":100 + }, + "request_type":"netflow_sankey" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "notify_list":[ + + ] +} diff --git a/features/v1/dashboards_json_payload/sankey_product_analytics_widget.json b/features/v1/dashboards_json_payload/sankey_product_analytics_widget.json new file mode 100644 index 000000000000..c81edb69c6dc --- /dev/null +++ b/features/v1/dashboards_json_payload/sankey_product_analytics_widget.json @@ -0,0 +1,37 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"sankey", + "requests":[ + { + "query":{ + "data_source":"product_analytics", + "query_string":"@type:session", + "mode":"source" + }, + "request_type":"sankey" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "notify_list":[ + + ] +} diff --git a/features/v1/dashboards_json_payload/sankey_rum_widget.json b/features/v1/dashboards_json_payload/sankey_rum_widget.json new file mode 100644 index 000000000000..b8a833ee3758 --- /dev/null +++ b/features/v1/dashboards_json_payload/sankey_rum_widget.json @@ -0,0 +1,37 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"sankey", + "requests":[ + { + "query":{ + "data_source":"rum", + "query_string":"@type:view", + "mode":"source" + }, + "request_type":"sankey" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "notify_list":[ + + ] +} diff --git a/features/v2/teams.feature b/features/v2/teams.feature index 480e3215e994..50f7f314684d 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -573,12 +573,14 @@ Feature: Teams When the request is sent Then the response status is 404 API error response. - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Remove a user from a team returns "No Content" response Given new "DeleteTeamMembership" request And there is a valid "dd_team" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system And request contains "team_id" parameter from "dd_team.data.id" - And request contains "user_id" parameter from "REPLACE.ME" + And request contains "user_id" parameter from "user.data.id" When the request is sent Then the response status is 204 No Content @@ -607,11 +609,13 @@ Feature: Teams And the response "data.attributes.label" is equal to "New Label" And the response "data.attributes.url" is equal to "https://example.com" - @generated @skip @team:DataDog/aaa-omg + @skip @team:DataDog/aaa-omg Scenario: Update a team returns "API error response." response Given new "UpdateTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"avatar": "\ud83e\udd51", "banner": null, "handle": "example-team", "hidden_modules": [], "name": "Example Team", "visible_modules": []}, "relationships": {"team_links": {"data": [{"id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001", "type": "team_links"}], "links": {"related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"}}}, "type": "team"}} + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And body with value {"data": {"attributes": {"handle": "{{dd_team_2.data.attributes.handle}}", "name": "{{dd_team.data.attributes.name}}"}, "type": "team"}} When the request is sent Then the response status is 409 API error response. @@ -631,6 +635,17 @@ Feature: Teams And the response "data.attributes.hidden_modules" is equal to ["m3"] And the response "data.attributes.visible_modules" is equal to ["m1", "m2"] + @team:DataDog/aaa-omg + Scenario: Update a team with partial update returns "OK" response + Given new "UpdateTeam" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And body with value {"data": {"attributes": {"handle": "{{dd_team.data.attributes.handle}}", "name": "{{dd_team.data.attributes.name}} updated"}, "type": "team"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{dd_team.data.attributes.name}} updated" + And the response "data.attributes.handle" is equal to "{{dd_team.data.attributes.handle}}" + @team:DataDog/aaa-omg Scenario: Update a user's membership attributes on a team returns "API error response." response Given new "UpdateTeamMembership" request diff --git a/lib/datadog_api_client/v2/api/metrics_api.rb b/lib/datadog_api_client/v2/api/metrics_api.rb index 3ff28445e4ab..654be940dd91 100644 --- a/lib/datadog_api_client/v2/api/metrics_api.rb +++ b/lib/datadog_api_client/v2/api/metrics_api.rb @@ -676,11 +676,11 @@ def list_tag_configurations(opts = {}) # @option opts [MetricTagConfigurationMetricTypeCategory] :filter_metric_type Only return metrics of the given metric type. # @option opts [Boolean] :filter_include_percentiles Only return distribution metrics that have percentile aggregations enabled (true) or disabled (false). # @option opts [Boolean] :filter_queried Only return metrics that have been queried (true) or not queried (false) in the look back window. Set the window with `filter[queried][window][seconds]`; if omitted, a default window is used. - # @option opts [Integer] :filter_queried_window_seconds Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. + # @option opts [Integer] :filter_queried_window_seconds Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. The default value is 2,592,000 seconds (30 days), the maximum value is 15,552,000 seconds (180 days), and the minimum value is 1 second. # @option opts [String] :filter_tags Only return metrics that were submitted with tags matching this expression. You can use AND, OR, IN, and wildcards (for example, service:web*). # @option opts [Boolean] :filter_related_assets Only return metrics that are used in at least one dashboard, monitor, notebook, or SLO. - # @option opts [Integer] :window_seconds Only return metrics that have been actively reporting in the specified window. - # @option opts [Integer] :page_size Maximum number of results per page. Use with `page[cursor]` for pagination. + # @option opts [Integer] :window_seconds Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second. + # @option opts [Integer] :page_size Maximum number of results per page. Use with `page[cursor]` for pagination. The default value is 10000, the maximum value is 10000, and the minimum value is 1. # @option opts [String] :page_cursor Cursor for pagination. Use `page[size]` to opt-in to pagination and get the first page; for subsequent pages, use the value from `meta.pagination.next_cursor` in the response. Pagination is complete when `next_cursor` is null. # @return [Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>] MetricsAndMetricTagConfigurationsResponse data, response status code and response headers def list_tag_configurations_with_http_info(opts = {}) diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index 79b61d34a40a..3192e46a021f 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -1925,7 +1925,7 @@ def edit_security_monitoring_signal_assignee_with_http_info(signal_id, body, opt return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalTriageUpdateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( :operation => :edit_security_monitoring_signal_assignee, @@ -1997,7 +1997,7 @@ def edit_security_monitoring_signal_incidents_with_http_info(signal_id, body, op return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalTriageUpdateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( :operation => :edit_security_monitoring_signal_incidents, @@ -2069,7 +2069,7 @@ def edit_security_monitoring_signal_state_with_http_info(signal_id, body, opts = return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalTriageUpdateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( :operation => :edit_security_monitoring_signal_state, diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb index 1e4628de7aec..7cea17a372e1 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb @@ -24,7 +24,6 @@ class SecurityMonitoringSignalArchiveReason NONE = "none".freeze FALSE_POSITIVE = "false_positive".freeze TESTING_OR_MAINTENANCE = "testing_or_maintenance".freeze - REMEDIATED = "remediated".freeze INVESTIGATED_CASE_OPENED = "investigated_case_opened".freeze TRUE_POSITIVE_BENIGN = "true_positive_benign".freeze TRUE_POSITIVE_MALICIOUS = "true_positive_malicious".freeze