Skip to content

Commit e6cebab

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

18 files changed

Lines changed: 927 additions & 87 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.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Anonymize users returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.anonymizeUsers"] = true;
9+
const apiInstance = new v2.UsersApi(configuration);
10+
11+
const params: v2.UsersApiAnonymizeUsersRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
userIds: ["00000000-0000-0000-0000-000000000000"],
16+
},
17+
id: "00000000-0000-0000-0000-000000000000",
18+
type: "anonymize_users_request",
19+
},
20+
},
21+
};
22+
23+
apiInstance
24+
.anonymizeUsers(params)
25+
.then((data: v2.AnonymizeUsersResponse) => {
26+
console.log(
27+
"API called successfully. Returned data: " + JSON.stringify(data)
28+
);
29+
})
30+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 94 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -3163,6 +3163,100 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
31633163
},
31643164
"operationResponseType": "AwsOnDemandResponse",
31653165
},
3166+
"v2.AnonymizeUsers": {
3167+
"body": {
3168+
"type": "AnonymizeUsersRequest",
3169+
"format": "",
3170+
},
3171+
"operationResponseType": "AnonymizeUsersResponse",
3172+
},
3173+
"v2.SendInvitations": {
3174+
"body": {
3175+
"type": "UserInvitationsRequest",
3176+
"format": "",
3177+
},
3178+
"operationResponseType": "UserInvitationsResponse",
3179+
},
3180+
"v2.GetInvitation": {
3181+
"userInvitationUuid": {
3182+
"type": "string",
3183+
"format": "",
3184+
},
3185+
"operationResponseType": "UserInvitationResponse",
3186+
},
3187+
"v2.ListUsers": {
3188+
"pageSize": {
3189+
"type": "number",
3190+
"format": "int64",
3191+
},
3192+
"pageNumber": {
3193+
"type": "number",
3194+
"format": "int64",
3195+
},
3196+
"sort": {
3197+
"type": "string",
3198+
"format": "",
3199+
},
3200+
"sortDir": {
3201+
"type": "QuerySortOrder",
3202+
"format": "",
3203+
},
3204+
"filter": {
3205+
"type": "string",
3206+
"format": "",
3207+
},
3208+
"filterStatus": {
3209+
"type": "string",
3210+
"format": "",
3211+
},
3212+
"operationResponseType": "UsersResponse",
3213+
},
3214+
"v2.CreateUser": {
3215+
"body": {
3216+
"type": "UserCreateRequest",
3217+
"format": "",
3218+
},
3219+
"operationResponseType": "UserResponse",
3220+
},
3221+
"v2.GetUser": {
3222+
"userId": {
3223+
"type": "string",
3224+
"format": "",
3225+
},
3226+
"operationResponseType": "UserResponse",
3227+
},
3228+
"v2.DisableUser": {
3229+
"userId": {
3230+
"type": "string",
3231+
"format": "",
3232+
},
3233+
"operationResponseType": "{}",
3234+
},
3235+
"v2.UpdateUser": {
3236+
"userId": {
3237+
"type": "string",
3238+
"format": "",
3239+
},
3240+
"body": {
3241+
"type": "UserUpdateRequest",
3242+
"format": "",
3243+
},
3244+
"operationResponseType": "UserResponse",
3245+
},
3246+
"v2.ListUserOrganizations": {
3247+
"userId": {
3248+
"type": "string",
3249+
"format": "",
3250+
},
3251+
"operationResponseType": "UserResponse",
3252+
},
3253+
"v2.ListUserPermissions": {
3254+
"userId": {
3255+
"type": "string",
3256+
"format": "",
3257+
},
3258+
"operationResponseType": "PermissionsResponse",
3259+
},
31663260
"v2.ListAPIKeys": {
31673261
"pageSize": {
31683262
"type": "number",
@@ -12719,93 +12813,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1271912813
},
1272012814
"operationResponseType": "IncidentTeamResponse",
1272112815
},
12722-
"v2.SendInvitations": {
12723-
"body": {
12724-
"type": "UserInvitationsRequest",
12725-
"format": "",
12726-
},
12727-
"operationResponseType": "UserInvitationsResponse",
12728-
},
12729-
"v2.GetInvitation": {
12730-
"userInvitationUuid": {
12731-
"type": "string",
12732-
"format": "",
12733-
},
12734-
"operationResponseType": "UserInvitationResponse",
12735-
},
12736-
"v2.ListUsers": {
12737-
"pageSize": {
12738-
"type": "number",
12739-
"format": "int64",
12740-
},
12741-
"pageNumber": {
12742-
"type": "number",
12743-
"format": "int64",
12744-
},
12745-
"sort": {
12746-
"type": "string",
12747-
"format": "",
12748-
},
12749-
"sortDir": {
12750-
"type": "QuerySortOrder",
12751-
"format": "",
12752-
},
12753-
"filter": {
12754-
"type": "string",
12755-
"format": "",
12756-
},
12757-
"filterStatus": {
12758-
"type": "string",
12759-
"format": "",
12760-
},
12761-
"operationResponseType": "UsersResponse",
12762-
},
12763-
"v2.CreateUser": {
12764-
"body": {
12765-
"type": "UserCreateRequest",
12766-
"format": "",
12767-
},
12768-
"operationResponseType": "UserResponse",
12769-
},
12770-
"v2.GetUser": {
12771-
"userId": {
12772-
"type": "string",
12773-
"format": "",
12774-
},
12775-
"operationResponseType": "UserResponse",
12776-
},
12777-
"v2.DisableUser": {
12778-
"userId": {
12779-
"type": "string",
12780-
"format": "",
12781-
},
12782-
"operationResponseType": "{}",
12783-
},
12784-
"v2.UpdateUser": {
12785-
"userId": {
12786-
"type": "string",
12787-
"format": "",
12788-
},
12789-
"body": {
12790-
"type": "UserUpdateRequest",
12791-
"format": "",
12792-
},
12793-
"operationResponseType": "UserResponse",
12794-
},
12795-
"v2.ListUserOrganizations": {
12796-
"userId": {
12797-
"type": "string",
12798-
"format": "",
12799-
},
12800-
"operationResponseType": "UserResponse",
12801-
},
12802-
"v2.ListUserPermissions": {
12803-
"userId": {
12804-
"type": "string",
12805-
"format": "",
12806-
},
12807-
"operationResponseType": "PermissionsResponse",
12808-
},
1280912816
"v2.SearchWidgets": {
1281012817
"experienceType": {
1281112818
"type": "WidgetExperienceType",

0 commit comments

Comments
 (0)