Users
Security Monitoring is now available Security Monitoring is now available

Users

Create, edit, and disable users. Read more about team management.

Create a user

post https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user

Overview

Create a user for your organization.

Note: Users can only be created with the admin access role if application keys belong to administrators.

Request

Body Data (required)

User object that needs to be created.

Expand All

Field

Type

Description

access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

disabled

boolean

The new disabled status of the user.

email

email

The new email of the user.

handle

email

The user handle, must be a valid email.

icon

string

Gravatar icon associated to the user.

name

string

The name of the user.

verified

boolean

Whether or not the user logged in Datadog at least once.

{
  "access_role": "st",
  "disabled": false,
  "email": "test@datadoghq.com",
  "handle": "test@datadoghq.com",
  "name": "test user"
}

Response

User created

A Datadog User.

Expand All

Field

Type

Description

user

object

Create, edit, and disable users.

access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

disabled

boolean

The new disabled status of the user.

email

email

The new email of the user.

handle

email

The user handle, must be a valid email.

icon

string

Gravatar icon associated to the user.

name

string

The name of the user.

verified

boolean

Whether or not the user logged in Datadog at least once.

{
  "user": {
    "access_role": "st",
    "disabled": false,
    "email": "test@datadoghq.com",
    "handle": "test@datadoghq.com",
    "icon": "/path/to/matching/gravatar/icon",
    "name": "test user",
    "verified": true
  }
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Conflict

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Curl command
curl -X post https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{}
EOF

                                        

Disable a user

delete https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user/{user_handle}

Overview

Delete a user from an organization.

Note: This endpoint can only be used with application keys belonging to administrators.

Arguments

Path Parameters

Name

Type

Description

user_handle [required]

string

The handle of the user.

Response

User disabled

Array of user disabled for a given organization.

Expand All

Field

Type

Description

message

string

Information pertaining to a user disabled for a given organization.

{
  "message": "string"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export user_handle="test@datadoghq.com"
# Curl command curl -X delete https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user/${user_handle} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

Get all users

get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user

Overview

Get all users for your organization.

Response

OK

Array of Datadog users for a given organization.

Expand All

Field

Type

Description

users

[object]

Array of users.

access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

disabled

boolean

The new disabled status of the user.

email

email

The new email of the user.

handle

email

The user handle, must be a valid email.

icon

string

Gravatar icon associated to the user.

name

string

The name of the user.

verified

boolean

Whether or not the user logged in Datadog at least once.

{
  "users": [
    {
      "access_role": "st",
      "disabled": false,
      "email": "test@datadoghq.com",
      "handle": "test@datadoghq.com",
      "icon": "/path/to/matching/gravatar/icon",
      "name": "test user",
      "verified": true
    }
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Curl command
curl -X get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

                                        

Get user details

get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user/{user_handle}

Overview

Get a user’s details.

Arguments

Path Parameters

Name

Type

Description

user_handle [required]

string

The ID of the user.

Response

OK for get user

A Datadog User.

Expand All

Field

Type

Description

user

object

Create, edit, and disable users.

access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

disabled

boolean

The new disabled status of the user.

email

email

The new email of the user.

handle

email

The user handle, must be a valid email.

icon

string

Gravatar icon associated to the user.

name

string

The name of the user.

verified

boolean

Whether or not the user logged in Datadog at least once.

{
  "user": {
    "access_role": "st",
    "disabled": false,
    "email": "test@datadoghq.com",
    "handle": "test@datadoghq.com",
    "icon": "/path/to/matching/gravatar/icon",
    "name": "test user",
    "verified": true
  }
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export user_handle="test@datadoghq.com"
# Curl command curl -X get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user/${user_handle} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

Update a user

put https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user/{user_handle}

Overview

Update a user information.

Note: It can only be used with application keys belonging to administrators.

Arguments

Path Parameters

Name

Type

Description

user_handle [required]

string

The ID of the user.

Request

Body Data (required)

Description of the update.

Expand All

Field

Type

Description

access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

disabled

boolean

The new disabled status of the user.

email

email

The new email of the user.

handle

email

The user handle, must be a valid email.

icon

string

Gravatar icon associated to the user.

name

string

The name of the user.

verified

boolean

Whether or not the user logged in Datadog at least once.

{
  "access_role": "st",
  "disabled": false,
  "email": "test@datadoghq.com",
  "handle": "test@datadoghq.com",
  "name": "test user"
}

Response

User updated

A Datadog User.

Expand All

Field

Type

Description

user

object

Create, edit, and disable users.

access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

disabled

boolean

The new disabled status of the user.

email

email

The new email of the user.

handle

email

The user handle, must be a valid email.

icon

string

Gravatar icon associated to the user.

name

string

The name of the user.

verified

boolean

Whether or not the user logged in Datadog at least once.

{
  "user": {
    "access_role": "st",
    "disabled": false,
    "email": "test@datadoghq.com",
    "handle": "test@datadoghq.com",
    "icon": "/path/to/matching/gravatar/icon",
    "name": "test user",
    "verified": true
  }
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export user_handle="test@datadoghq.com"
# Curl command curl -X put https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/user/${user_handle} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \ -d @- << EOF {} EOF