Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/_default/menus/api.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5719,6 +5719,30 @@ menu:
- SendInvitations
unstable: []
order: 8
- name: Update current user
url: '#update-current-user'
identifier: users-update-current-user
parent: users
generated: true
params:
versions:
- v2
operationids:
- UpdateCurrentUser
unstable: []
order: 13
- name: Get current user
url: '#get-current-user'
identifier: users-get-current-user
parent: users
generated: true
params:
versions:
- v2
operationids:
- GetCurrentUser
unstable: []
order: 12
- name: Anonymize users
url: '#anonymize-users'
identifier: users-anonymize-users
Expand Down
8 changes: 4 additions & 4 deletions content/en/api/v2/downtimes/examples.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions content/en/api/v2/incident-services/examples.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions content/en/api/v2/incidents/examples.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions content/en/api/v2/key-management/examples.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions content/en/api/v2/monitors/examples.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/en/api/v2/on-call/examples.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions content/en/api/v2/powerpack/examples.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions content/en/api/v2/roles/examples.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions content/en/api/v2/service-accounts/examples.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions content/en/api/v2/teams/examples.json

Large diffs are not rendered by default.

252 changes: 245 additions & 7 deletions content/en/api/v2/users/examples.json

Large diffs are not rendered by default.

186 changes: 169 additions & 17 deletions data/api/v2/full_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81927,55 +81927,57 @@ components:
description: Attributes of user object returned by the API.
properties:
created_at:
description: Creation time of the user.
description: The ISO 8601 timestamp of when the user account was created.
format: date-time
type: string
disabled:
description: Whether the user is disabled.
description: Whether the user account is deactivated. Disabled users cannot log in.
type: boolean
email:
description: Email of the user.
description: The email address of the user, used for login and notifications.
type: string
handle:
description: Handle of the user.
description: The unique handle (username) of the user, typically matching their email prefix.
type: string
icon:
description: URL of the user's icon.
description: URL of the user's profile icon, typically a Gravatar URL derived from the email address.
type: string
last_login_time:
description: The last time the user logged in.
description: The ISO 8601 timestamp of the user's most recent login, or null if the user has never logged in.
format: date-time
nullable: true
readOnly: true
type: string
mfa_enabled:
description: If user has MFA enabled.
description: Whether multi-factor authentication (MFA) is enabled for the user's account.
readOnly: true
type: boolean
modified_at:
description: Time that the user was last modified.
description: The ISO 8601 timestamp of when the user account was last modified.
format: date-time
type: string
name:
description: Name of the user.
description: The full display name of the user as shown in the Datadog UI.
nullable: true
type: string
service_account:
description: Whether the user is a service account.
description: |-
Whether this is a service account rather than a human user.
Service accounts are used for programmatic API access.
type: boolean
status:
description: Status of the user.
description: The current status of the user account (for example, `Active`, `Pending`, or `Disabled`).
type: string
title:
description: Title of the user.
description: The job title of the user (for example, "Senior Engineer" or "Product Manager").
nullable: true
type: string
uuid:
description: UUID of the user.
description: The globally unique identifier (UUID) of the user.
readOnly: true
type: string
verified:
description: Whether the user is verified.
description: Whether the user's email address has been verified.
type: boolean
type: object
UserAttributesStatus:
Expand Down Expand Up @@ -82377,13 +82379,23 @@ components:
description: Attributes of the edited user.
properties:
disabled:
description: If the user is enabled or disabled.
description: |-
When set to `true`, the user is deactivated and can no longer log in.
When `false`, the user is active.
type: boolean
email:
description: The email of the user.
description: |-
The email address of the user, used for login and notifications.
Must be a valid email format.
type: string
name:
description: The name of the user.
description: |-
The full display name of the user as shown in the Datadog UI.
Maximum 55 characters, cannot contain `<` or `>`.
type: string
title:
description: The job title of the user (for example, "Senior Engineer" or "Product Manager").
nullable: true
type: string
type: object
UserUpdateData:
Expand Down Expand Up @@ -97333,6 +97345,146 @@ paths:
summary: Get all CSM Serverless Agents
tags: ["CSM Agents"]
x-menu-order: 4
/api/v2/current_user:
get:
description: |-
Get the user associated with the current authentication context.
The response includes the user's profile attributes (name, email, handle,
status, MFA state), along with related resources: the user's organization,
assigned roles with their granted permissions, and team-scoped roles.
No additional permissions are required beyond valid authentication.
operationId: GetCurrentUser
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
created_at: "2024-01-15T10:30:00+00:00"
disabled: false
email: jane.doe@example.com
handle: jane.doe
icon: "https://secure.gravatar.com/avatar/abc123"
mfa_enabled: true
modified_at: "2024-06-01T12:00:00+00:00"
name: Jane Doe
service_account: false
status: Active
title: Senior Engineer
verified: true
id: 00000000-0000-9999-0000-000000000000
type: users
included: []
schema:
$ref: "#/components/schemas/UserResponse"
description: OK
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Authentication error
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Get current user
tags:
- Users
x-menu-order: 12
patch:
description: |-
Edit the profile of the currently authenticated user. Updatable fields
include `name`, `title`, `email`, and `disabled` status. The `id` field
in the request body must match the authenticated user's UUID; a mismatch
returns a 422 error. Email address changes are recorded in the audit trail.
Requires the `user_self_profile_write` permission.
operationId: UpdateCurrentUser
requestBody:
content:
application/json:
examples:
default:
value:
data:
attributes:
email: jane.doe@example.com
name: Jane Doe
title: Staff Engineer
id: 00000000-0000-9999-0000-000000000000
type: users
schema:
$ref: "#/components/schemas/UserUpdateRequest"
required: true
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
created_at: "2024-01-15T10:30:00+00:00"
disabled: false
email: jane.doe@example.com
handle: jane.doe
icon: "https://secure.gravatar.com/avatar/abc123"
mfa_enabled: true
modified_at: "2024-06-01T12:00:00+00:00"
name: Jane Doe
service_account: false
status: Active
title: Staff Engineer
verified: true
id: 00000000-0000-9999-0000-000000000000
type: users
included: []
schema:
$ref: "#/components/schemas/UserResponse"
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Bad Request
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Authentication error
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Not found
"422":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Unprocessable Entity
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Update current user
tags:
- Users
x-codegen-request-body-name: body
x-menu-order: 13
"x-permission":
operator: OR
permissions:
- user_self_profile_write
/api/v2/current_user/application_keys:
get:
description: List all application keys available for current user
Expand Down
10 changes: 10 additions & 0 deletions data/api/v2/translate_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,16 @@
"description": "Get the list of all CSM Serverless Agents running on your hosts and containers.",
"summary": "Get all CSM Serverless Agents"
},
"GetCurrentUser": {
"description": "Get the user associated with the current authentication context.\nThe response includes the user's profile attributes (name, email, handle,\nstatus, MFA state), along with related resources: the user's organization,\nassigned roles with their granted permissions, and team-scoped roles.\nNo additional permissions are required beyond valid authentication.",
"summary": "Get current user"
},
"UpdateCurrentUser": {
"description": "Edit the profile of the currently authenticated user. Updatable fields\ninclude `name`, `title`, `email`, and `disabled` status. The `id` field\nin the request body must match the authenticated user's UUID; a mismatch\nreturns a 422 error. Email address changes are recorded in the audit trail.\nRequires the `user_self_profile_write` permission.",
"summary": "Update current user",
"request_description": "",
"request_schema_description": "Update a user."
},
"ListCurrentUserApplicationKeys": {
"description": "List all application keys available for current user",
"summary": "Get all application keys owned by current user"
Expand Down
Loading