Skip to content

Commit 421ad3d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit ce55d33 of spec repo (#3877)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4b63a08 commit 421ad3d

17 files changed

Lines changed: 848 additions & 88 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3980,6 +3980,114 @@ components:
39803980
description: The `markdownTextAnnotation` `text`.
39813981
type: string
39823982
type: object
3983+
AnonymizeUserError:
3984+
description: Error encountered when anonymizing a specific user.
3985+
properties:
3986+
error:
3987+
description: Error message describing why anonymization failed.
3988+
example: ""
3989+
type: string
3990+
user_id:
3991+
description: UUID of the user that failed to be anonymized.
3992+
example: "00000000-0000-0000-0000-000000000000"
3993+
type: string
3994+
required:
3995+
- user_id
3996+
- error
3997+
type: object
3998+
AnonymizeUsersRequest:
3999+
description: Request body for anonymizing users.
4000+
properties:
4001+
data:
4002+
$ref: "#/components/schemas/AnonymizeUsersRequestData"
4003+
required:
4004+
- data
4005+
type: object
4006+
AnonymizeUsersRequestAttributes:
4007+
description: Attributes of an anonymize users request.
4008+
properties:
4009+
user_ids:
4010+
description: List of user IDs (UUIDs) to anonymize.
4011+
example:
4012+
- "00000000-0000-0000-0000-000000000000"
4013+
items:
4014+
example: "00000000-0000-0000-0000-000000000000"
4015+
type: string
4016+
type: array
4017+
required:
4018+
- user_ids
4019+
type: object
4020+
AnonymizeUsersRequestData:
4021+
description: Object to anonymize a list of users.
4022+
properties:
4023+
attributes:
4024+
$ref: "#/components/schemas/AnonymizeUsersRequestAttributes"
4025+
id:
4026+
description: Unique identifier for the request. Not used server-side.
4027+
example: "00000000-0000-0000-0000-000000000000"
4028+
type: string
4029+
type:
4030+
$ref: "#/components/schemas/AnonymizeUsersRequestType"
4031+
required:
4032+
- type
4033+
- attributes
4034+
type: object
4035+
AnonymizeUsersRequestType:
4036+
default: anonymize_users_request
4037+
description: Type of the anonymize users request.
4038+
enum:
4039+
- anonymize_users_request
4040+
example: anonymize_users_request
4041+
type: string
4042+
x-enum-varnames:
4043+
- ANONYMIZE_USERS_REQUEST
4044+
AnonymizeUsersResponse:
4045+
description: Response containing the result of an anonymize users request.
4046+
properties:
4047+
data:
4048+
$ref: "#/components/schemas/AnonymizeUsersResponseData"
4049+
type: object
4050+
AnonymizeUsersResponseAttributes:
4051+
description: Attributes of an anonymize users response.
4052+
properties:
4053+
anonymize_errors:
4054+
description: List of errors encountered during anonymization, one entry per failed user.
4055+
items:
4056+
$ref: "#/components/schemas/AnonymizeUserError"
4057+
type: array
4058+
anonymized_user_ids:
4059+
description: List of user IDs (UUIDs) that were successfully anonymized.
4060+
example:
4061+
- "00000000-0000-0000-0000-000000000000"
4062+
items:
4063+
example: "00000000-0000-0000-0000-000000000000"
4064+
type: string
4065+
type: array
4066+
required:
4067+
- anonymized_user_ids
4068+
- anonymize_errors
4069+
type: object
4070+
AnonymizeUsersResponseData:
4071+
description: Response data for anonymizing users.
4072+
properties:
4073+
attributes:
4074+
$ref: "#/components/schemas/AnonymizeUsersResponseAttributes"
4075+
id:
4076+
description: Unique identifier of the response.
4077+
example: "00000000-0000-0000-0000-000000000000"
4078+
type: string
4079+
type:
4080+
$ref: "#/components/schemas/AnonymizeUsersResponseType"
4081+
type: object
4082+
AnonymizeUsersResponseType:
4083+
default: anonymize_users_response
4084+
description: Type of the anonymize users response.
4085+
enum:
4086+
- anonymize_users_response
4087+
example: anonymize_users_response
4088+
type: string
4089+
x-enum-varnames:
4090+
- ANONYMIZE_USERS_RESPONSE
39834091
AnthropicAPIKey:
39844092
description: The definition of the `AnthropicAPIKey` object.
39854093
properties:
@@ -83081,6 +83189,53 @@ paths:
8308183189
operator: OR
8308283190
permissions:
8308383191
- security_monitoring_findings_read
83192+
/api/v2/anonymize_users:
83193+
put:
83194+
description: |-
83195+
Anonymize a list of users, removing their personal data. This operation is irreversible.
83196+
Requires the `user_access_manage` permission.
83197+
operationId: AnonymizeUsers
83198+
requestBody:
83199+
content:
83200+
application/json:
83201+
schema:
83202+
$ref: "#/components/schemas/AnonymizeUsersRequest"
83203+
required: true
83204+
responses:
83205+
"200":
83206+
content:
83207+
application/json:
83208+
schema:
83209+
$ref: "#/components/schemas/AnonymizeUsersResponse"
83210+
description: OK
83211+
"400":
83212+
content:
83213+
application/json:
83214+
schema:
83215+
$ref: "#/components/schemas/APIErrorResponse"
83216+
description: Bad Request
83217+
"403":
83218+
content:
83219+
application/json:
83220+
schema:
83221+
$ref: "#/components/schemas/APIErrorResponse"
83222+
description: Authentication error
83223+
"429":
83224+
$ref: "#/components/responses/TooManyRequestsResponse"
83225+
security:
83226+
- apiKeyAuth: []
83227+
appKeyAuth: []
83228+
- AuthZ:
83229+
- user_access_manage
83230+
summary: Anonymize users
83231+
tags:
83232+
- Users
83233+
x-codegen-request-body-name: body
83234+
x-permission:
83235+
operator: OR
83236+
permissions:
83237+
- user_access_manage
83238+
x-unstable: "**Note**: This endpoint is in Preview and may be subject to changes."
8308483239
/api/v2/api_keys:
8308583240
get:
8308683241
description: List all API keys available for your account.

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,12 @@
411411
"type": "safe"
412412
}
413413
},
414+
"AnonymizeUsers": {
415+
"tag": "Users",
416+
"undo": {
417+
"type": "idempotent"
418+
}
419+
},
414420
"ListAPIKeys": {
415421
"tag": "Key Management",
416422
"undo": {

features/v2/users.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ Feature: Users
77
And a valid "appKeyAuth" key in the system
88
And an instance of "Users" API
99

10+
@generated @skip @team:DataDog/org-management
11+
Scenario: Anonymize users returns "Bad Request" response
12+
Given operation "AnonymizeUsers" enabled
13+
And new "AnonymizeUsers" request
14+
And body with value {"data": {"attributes": {"user_ids": ["00000000-0000-0000-0000-000000000000"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "anonymize_users_request"}}
15+
When the request is sent
16+
Then the response status is 400 Bad Request
17+
18+
@generated @skip @team:DataDog/org-management
19+
Scenario: Anonymize users returns "OK" response
20+
Given operation "AnonymizeUsers" enabled
21+
And new "AnonymizeUsers" request
22+
And body with value {"data": {"attributes": {"user_ids": ["00000000-0000-0000-0000-000000000000"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "anonymize_users_request"}}
23+
When the request is sent
24+
Then the response status is 200 OK
25+
1026
@generated @skip @team:DataDog/org-management
1127
Scenario: Create a user returns "Bad Request" response
1228
Given new "CreateUser" request

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 94 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -3173,6 +3173,100 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
31733173
},
31743174
operationResponseType: "AwsOnDemandResponse",
31753175
},
3176+
"UsersApi.V2.AnonymizeUsers": {
3177+
body: {
3178+
type: "AnonymizeUsersRequest",
3179+
format: "",
3180+
},
3181+
operationResponseType: "AnonymizeUsersResponse",
3182+
},
3183+
"UsersApi.V2.SendInvitations": {
3184+
body: {
3185+
type: "UserInvitationsRequest",
3186+
format: "",
3187+
},
3188+
operationResponseType: "UserInvitationsResponse",
3189+
},
3190+
"UsersApi.V2.GetInvitation": {
3191+
userInvitationUuid: {
3192+
type: "string",
3193+
format: "",
3194+
},
3195+
operationResponseType: "UserInvitationResponse",
3196+
},
3197+
"UsersApi.V2.ListUsers": {
3198+
pageSize: {
3199+
type: "number",
3200+
format: "int64",
3201+
},
3202+
pageNumber: {
3203+
type: "number",
3204+
format: "int64",
3205+
},
3206+
sort: {
3207+
type: "string",
3208+
format: "",
3209+
},
3210+
sortDir: {
3211+
type: "QuerySortOrder",
3212+
format: "",
3213+
},
3214+
filter: {
3215+
type: "string",
3216+
format: "",
3217+
},
3218+
filterStatus: {
3219+
type: "string",
3220+
format: "",
3221+
},
3222+
operationResponseType: "UsersResponse",
3223+
},
3224+
"UsersApi.V2.CreateUser": {
3225+
body: {
3226+
type: "UserCreateRequest",
3227+
format: "",
3228+
},
3229+
operationResponseType: "UserResponse",
3230+
},
3231+
"UsersApi.V2.GetUser": {
3232+
userId: {
3233+
type: "string",
3234+
format: "",
3235+
},
3236+
operationResponseType: "UserResponse",
3237+
},
3238+
"UsersApi.V2.DisableUser": {
3239+
userId: {
3240+
type: "string",
3241+
format: "",
3242+
},
3243+
operationResponseType: "{}",
3244+
},
3245+
"UsersApi.V2.UpdateUser": {
3246+
userId: {
3247+
type: "string",
3248+
format: "",
3249+
},
3250+
body: {
3251+
type: "UserUpdateRequest",
3252+
format: "",
3253+
},
3254+
operationResponseType: "UserResponse",
3255+
},
3256+
"UsersApi.V2.ListUserOrganizations": {
3257+
userId: {
3258+
type: "string",
3259+
format: "",
3260+
},
3261+
operationResponseType: "UserResponse",
3262+
},
3263+
"UsersApi.V2.ListUserPermissions": {
3264+
userId: {
3265+
type: "string",
3266+
format: "",
3267+
},
3268+
operationResponseType: "PermissionsResponse",
3269+
},
31763270
"KeyManagementApi.V2.ListAPIKeys": {
31773271
pageSize: {
31783272
type: "number",
@@ -12731,93 +12825,6 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
1273112825
},
1273212826
operationResponseType: "IncidentTeamResponse",
1273312827
},
12734-
"UsersApi.V2.SendInvitations": {
12735-
body: {
12736-
type: "UserInvitationsRequest",
12737-
format: "",
12738-
},
12739-
operationResponseType: "UserInvitationsResponse",
12740-
},
12741-
"UsersApi.V2.GetInvitation": {
12742-
userInvitationUuid: {
12743-
type: "string",
12744-
format: "",
12745-
},
12746-
operationResponseType: "UserInvitationResponse",
12747-
},
12748-
"UsersApi.V2.ListUsers": {
12749-
pageSize: {
12750-
type: "number",
12751-
format: "int64",
12752-
},
12753-
pageNumber: {
12754-
type: "number",
12755-
format: "int64",
12756-
},
12757-
sort: {
12758-
type: "string",
12759-
format: "",
12760-
},
12761-
sortDir: {
12762-
type: "QuerySortOrder",
12763-
format: "",
12764-
},
12765-
filter: {
12766-
type: "string",
12767-
format: "",
12768-
},
12769-
filterStatus: {
12770-
type: "string",
12771-
format: "",
12772-
},
12773-
operationResponseType: "UsersResponse",
12774-
},
12775-
"UsersApi.V2.CreateUser": {
12776-
body: {
12777-
type: "UserCreateRequest",
12778-
format: "",
12779-
},
12780-
operationResponseType: "UserResponse",
12781-
},
12782-
"UsersApi.V2.GetUser": {
12783-
userId: {
12784-
type: "string",
12785-
format: "",
12786-
},
12787-
operationResponseType: "UserResponse",
12788-
},
12789-
"UsersApi.V2.DisableUser": {
12790-
userId: {
12791-
type: "string",
12792-
format: "",
12793-
},
12794-
operationResponseType: "{}",
12795-
},
12796-
"UsersApi.V2.UpdateUser": {
12797-
userId: {
12798-
type: "string",
12799-
format: "",
12800-
},
12801-
body: {
12802-
type: "UserUpdateRequest",
12803-
format: "",
12804-
},
12805-
operationResponseType: "UserResponse",
12806-
},
12807-
"UsersApi.V2.ListUserOrganizations": {
12808-
userId: {
12809-
type: "string",
12810-
format: "",
12811-
},
12812-
operationResponseType: "UserResponse",
12813-
},
12814-
"UsersApi.V2.ListUserPermissions": {
12815-
userId: {
12816-
type: "string",
12817-
format: "",
12818-
},
12819-
operationResponseType: "PermissionsResponse",
12820-
},
1282112828
"WidgetsApi.V2.SearchWidgets": {
1282212829
experienceType: {
1282312830
type: "WidgetExperienceType",

0 commit comments

Comments
 (0)