Skip to content

Commit 9a0d95b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ce55d33 of spec repo
1 parent 1c294f7 commit 9a0d95b

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:
@@ -82971,6 +83079,53 @@ paths:
8297183079
operator: OR
8297283080
permissions:
8297383081
- security_monitoring_findings_read
83082+
/api/v2/anonymize_users:
83083+
put:
83084+
description: |-
83085+
Anonymize a list of users, removing their personal data. This operation is irreversible.
83086+
Requires the `user_access_manage` permission.
83087+
operationId: AnonymizeUsers
83088+
requestBody:
83089+
content:
83090+
application/json:
83091+
schema:
83092+
$ref: "#/components/schemas/AnonymizeUsersRequest"
83093+
required: true
83094+
responses:
83095+
"200":
83096+
content:
83097+
application/json:
83098+
schema:
83099+
$ref: "#/components/schemas/AnonymizeUsersResponse"
83100+
description: OK
83101+
"400":
83102+
content:
83103+
application/json:
83104+
schema:
83105+
$ref: "#/components/schemas/APIErrorResponse"
83106+
description: Bad Request
83107+
"403":
83108+
content:
83109+
application/json:
83110+
schema:
83111+
$ref: "#/components/schemas/APIErrorResponse"
83112+
description: Authentication error
83113+
"429":
83114+
$ref: "#/components/responses/TooManyRequestsResponse"
83115+
security:
83116+
- apiKeyAuth: []
83117+
appKeyAuth: []
83118+
- AuthZ:
83119+
- user_access_manage
83120+
summary: Anonymize users
83121+
tags:
83122+
- Users
83123+
x-codegen-request-body-name: body
83124+
x-permission:
83125+
operator: OR
83126+
permissions:
83127+
- user_access_manage
83128+
x-unstable: "**Note**: This endpoint is in Preview and may be subject to changes."
8297483129
/api/v2/api_keys:
8297583130
get:
8297683131
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",
@@ -12687,93 +12781,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1268712781
},
1268812782
"operationResponseType": "IncidentTeamResponse",
1268912783
},
12690-
"v2.SendInvitations": {
12691-
"body": {
12692-
"type": "UserInvitationsRequest",
12693-
"format": "",
12694-
},
12695-
"operationResponseType": "UserInvitationsResponse",
12696-
},
12697-
"v2.GetInvitation": {
12698-
"userInvitationUuid": {
12699-
"type": "string",
12700-
"format": "",
12701-
},
12702-
"operationResponseType": "UserInvitationResponse",
12703-
},
12704-
"v2.ListUsers": {
12705-
"pageSize": {
12706-
"type": "number",
12707-
"format": "int64",
12708-
},
12709-
"pageNumber": {
12710-
"type": "number",
12711-
"format": "int64",
12712-
},
12713-
"sort": {
12714-
"type": "string",
12715-
"format": "",
12716-
},
12717-
"sortDir": {
12718-
"type": "QuerySortOrder",
12719-
"format": "",
12720-
},
12721-
"filter": {
12722-
"type": "string",
12723-
"format": "",
12724-
},
12725-
"filterStatus": {
12726-
"type": "string",
12727-
"format": "",
12728-
},
12729-
"operationResponseType": "UsersResponse",
12730-
},
12731-
"v2.CreateUser": {
12732-
"body": {
12733-
"type": "UserCreateRequest",
12734-
"format": "",
12735-
},
12736-
"operationResponseType": "UserResponse",
12737-
},
12738-
"v2.GetUser": {
12739-
"userId": {
12740-
"type": "string",
12741-
"format": "",
12742-
},
12743-
"operationResponseType": "UserResponse",
12744-
},
12745-
"v2.DisableUser": {
12746-
"userId": {
12747-
"type": "string",
12748-
"format": "",
12749-
},
12750-
"operationResponseType": "{}",
12751-
},
12752-
"v2.UpdateUser": {
12753-
"userId": {
12754-
"type": "string",
12755-
"format": "",
12756-
},
12757-
"body": {
12758-
"type": "UserUpdateRequest",
12759-
"format": "",
12760-
},
12761-
"operationResponseType": "UserResponse",
12762-
},
12763-
"v2.ListUserOrganizations": {
12764-
"userId": {
12765-
"type": "string",
12766-
"format": "",
12767-
},
12768-
"operationResponseType": "UserResponse",
12769-
},
12770-
"v2.ListUserPermissions": {
12771-
"userId": {
12772-
"type": "string",
12773-
"format": "",
12774-
},
12775-
"operationResponseType": "PermissionsResponse",
12776-
},
1277712784
"v2.SearchWidgets": {
1277812785
"experienceType": {
1277912786
"type": "WidgetExperienceType",

0 commit comments

Comments
 (0)